reformat and fix
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1605 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
* Date: June 1996
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
RCSID("$Id$");
|
||||
#endif
|
||||
|
||||
#ifdef WIN32 /* Visual C++ 4.0 (Windows95/NT) */
|
||||
#include <Windows.h>
|
||||
#include "passwd_dlg.h"
|
||||
@@ -49,44 +54,44 @@
|
||||
|
||||
char passwd[passwdBufSZ];
|
||||
|
||||
BOOL CALLBACK pwd_dialog_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
BOOL CALLBACK
|
||||
pwd_dialog_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
switch(wParam)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
switch(wParam)
|
||||
{
|
||||
case IDOK:
|
||||
if(!GetDlgItemText(hwndDlg,IDC_PASSWD_EDIT, passwd ,passwdBufSZ))
|
||||
EndDialog(hwndDlg, IDCANCEL);
|
||||
case IDCANCEL:
|
||||
EndDialog(hwndDlg, wParam);
|
||||
return TRUE;
|
||||
}
|
||||
case IDOK:
|
||||
if(!GetDlgItemText(hwndDlg,IDC_PASSWD_EDIT, passwd, passwdBufSZ))
|
||||
EndDialog(hwndDlg, IDCANCEL);
|
||||
case IDCANCEL:
|
||||
EndDialog(hwndDlg, wParam);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* return 0 if ok, 1 otherwise */
|
||||
int pwd_dialog(char *buf, int size)
|
||||
int
|
||||
pwd_dialog(char *buf, int size)
|
||||
{
|
||||
int i;
|
||||
HWND wnd = GetActiveWindow();
|
||||
HANDLE hInst = GetModuleHandle("des");
|
||||
switch(DialogBox(hInst,MAKEINTRESOURCE(IDD_PASSWD_DIALOG),wnd,pwd_dialog_proc))
|
||||
{
|
||||
case IDOK:
|
||||
strcpy(buf,passwd);
|
||||
for(i=0; passwd[i] != '\0'; i++) passwd[i] = '\0';
|
||||
return 0;
|
||||
case IDCANCEL:
|
||||
default:
|
||||
for(i=0; passwd[i] != '\0'; i++) passwd[i] = '\0';
|
||||
return 1;
|
||||
}
|
||||
int i;
|
||||
HWND wnd = GetActiveWindow();
|
||||
HANDLE hInst = GetModuleHandle("des");
|
||||
switch(DialogBox(hInst,MAKEINTRESOURCE(IDD_PASSWD_DIALOG),wnd,pwd_dialog_proc))
|
||||
{
|
||||
case IDOK:
|
||||
strcpy(buf,passwd);
|
||||
for(i=0; passwd[i] != '\0'; i++) passwd[i] = '\0';
|
||||
return 0;
|
||||
case IDCANCEL:
|
||||
default:
|
||||
for(i=0; passwd[i] != '\0'; i++) passwd[i] = '\0';
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
Reference in New Issue
Block a user