projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Paul van der Meij points out that do_reconfig() should not free
[u/mdw/putty]
/
winmisc.c
diff --git
a/winmisc.c
b/winmisc.c
index
10c9fe3
..
7e58e93
100644
(file)
--- a/
winmisc.c
+++ b/
winmisc.c
@@
-2,11
+2,9
@@
* winmisc.c: miscellaneous Windows-specific things.
*/
* winmisc.c: miscellaneous Windows-specific things.
*/
-#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "putty.h"
#include <stdio.h>
#include <stdlib.h>
#include "putty.h"
-#include "winstuff.h"
OSVERSIONINFO osVersion;
OSVERSIONINFO osVersion;
@@
-39,6
+37,21
@@
int filename_is_null(Filename fn)
return !*fn.path;
}
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,
int SaneDialogBox(HINSTANCE hinst,
LPCTSTR tmpl,
HWND hwndparent,