X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinpgnt.c;h=7bdf6378f956f760b4a4a3d48207c6812536030f;hb=9f9d72ec58642e91b4f93ee4405a8086ee2fb2f0;hp=e9d91e3db237d9d88b758806f04db44fbd9ec50a;hpb=fe210692fd0699e91d0194b44dc5faf278d90093;p=PuTTY.git diff --git a/windows/winpgnt.c b/windows/winpgnt.c index e9d91e3d..7bdf6378 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -120,7 +120,7 @@ struct PassphraseProcStruct { /* * Dialog-box function for the Licence box. */ -static int CALLBACK LicenceProc(HWND hwnd, UINT msg, +static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -144,7 +144,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg, /* * Dialog-box function for the About box. */ -static int CALLBACK AboutProc(HWND hwnd, UINT msg, +static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -179,7 +179,7 @@ static HWND passphrase_box; /* * Dialog-box function for the passphrase box. */ -static int CALLBACK PassphraseProc(HWND hwnd, UINT msg, +static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static char **passphrase = NULL; @@ -368,7 +368,7 @@ static void win_add_keyfile(Filename *filename) * comment to use in the passphrase prompt. */ while (1) { - int dlgret; + INT_PTR dlgret; struct PassphraseProcStruct pps; pps.passphrase = &passphrase; @@ -377,11 +377,11 @@ static void win_add_keyfile(Filename *filename) NULL, PassphraseProc, (LPARAM) &pps); passphrase_box = NULL; - sfree(err); - if (!dlgret) goto done; /* operation cancelled */ + sfree(err); + assert(passphrase != NULL); ret = pageant_add_keyfile(filename, passphrase, &err); @@ -461,7 +461,7 @@ static void prompt_add_keyfile(void) /* * Dialog-box function for the key list box. */ -static int CALLBACK KeyListProc(HWND hwnd, UINT msg, +static INT_PTR CALLBACK KeyListProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { struct RSAKey *rkey; @@ -789,7 +789,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, case WM_SYSCOMMAND: switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */ case IDM_PUTTY: - if((int)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""), + if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""), SW_SHOW) <= 32) { MessageBox(NULL, "Unable to execute PuTTY!", "Error", MB_OK | MB_ICONERROR); @@ -856,7 +856,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, GetMenuItemInfo(session_menu, wParam, FALSE, &mii); strcpy(param, "@"); strcat(param, mii.dwTypeData); - if((int)ShellExecute(hwnd, NULL, putty_path, param, + if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, param, _T(""), SW_SHOW) <= 32) { MessageBox(NULL, "Unable to execute PuTTY!", "Error", MB_OK | MB_ICONERROR); @@ -1191,7 +1191,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) session_menu = CreateMenu(); AppendMenu(systray_menu, MF_ENABLED, IDM_PUTTY, "&New Session"); AppendMenu(systray_menu, MF_POPUP | MF_ENABLED, - (UINT) session_menu, "&Saved Sessions"); + (UINT_PTR) session_menu, "&Saved Sessions"); AppendMenu(systray_menu, MF_SEPARATOR, 0, 0); } AppendMenu(systray_menu, MF_ENABLED, IDM_VIEWKEYS,