X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/4c48c989a62fba2809d684b30963b4411038fe96..ae0500e538e2fb821ef1ad8529aed7999acf7a19:/winmisc.c diff --git a/winmisc.c b/winmisc.c index 10c9fe36..71f09a87 100644 --- a/winmisc.c +++ b/winmisc.c @@ -1,12 +1,10 @@ /* - * winmisc.c: miscellaneous Windows-specific things. + * winmisc.c: miscellaneous Windows-specific things */ -#include #include #include #include "putty.h" -#include "winstuff.h" OSVERSIONINFO osVersion; @@ -16,6 +14,8 @@ void platform_get_x11_auth(char *display, int *proto, /* We don't support this at all under Windows. */ } +const char platform_x11_best_transport[] = "localhost"; + Filename filename_from_str(const char *str) { Filename ret; @@ -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,