mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 01:27:35 -05:00
Windows PSCP now links against winsftp.c, and scp.c is now a
platform-independent source file. Haven't yet added the extra abstraction routines to uxsftp.c to create a Unix PSCP port, but it shouldn't take long. Also in this checkin, a change of semantics in platform_default_s(): now strings returned from it are expected to be dynamically allocated. [originally from svn r3420]
This commit is contained in:
15
winmisc.c
15
winmisc.c
@ -39,6 +39,21 @@ int filename_is_null(Filename fn)
|
||||
return !*fn.path;
|
||||
}
|
||||
|
||||
char *get_username(void)
|
||||
{
|
||||
DWORD namelen;
|
||||
char *user;
|
||||
|
||||
namelen = 0;
|
||||
if (GetUserName(NULL, &namelen) == FALSE)
|
||||
return NULL;
|
||||
|
||||
user = snewn(namelen, char);
|
||||
GetUserName(user, &namelen);
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
int SaneDialogBox(HINSTANCE hinst,
|
||||
LPCTSTR tmpl,
|
||||
HWND hwndparent,
|
||||
|
Reference in New Issue
Block a user