1
0
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:
Simon Tatham
2003-08-25 13:53:41 +00:00
parent 66fa6f320e
commit bfb9b28393
10 changed files with 726 additions and 450 deletions

View File

@ -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,