From c005606a048770ba3a0adb931a810d546c424035 Mon Sep 17 00:00:00 2001 From: Richard Basch Date: Tue, 25 Feb 1997 17:21:35 +0000 Subject: [PATCH] read_pwd.c: Improperly applied Doug Engert's windows dialog patch last time. win-pwd.h: contents have been subsumed into win-mac.h win-pwd.rc: Moved to lib/krb5.rc Makefile.in: Reverted back to pre win-pwd version. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9976 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/Makefile.in | 7 +------ src/lib/krb5/os/read_pwd.c | 14 +++++-------- src/lib/krb5/os/win-pwd.h | 28 -------------------------- src/lib/krb5/os/win-pwd.rc | 40 ------------------------------------- 4 files changed, 6 insertions(+), 83 deletions(-) delete mode 100644 src/lib/krb5/os/win-pwd.h delete mode 100644 src/lib/krb5/os/win-pwd.rc diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index f5efb6621..db3f3f1d9 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -128,12 +128,7 @@ SRCS= \ $(srcdir)/ustime.c \ $(srcdir)/write_msg.c -##WIN16##LIBOBJS = $(OBJS) -##WIN32##LIBOBJS = $(OBJS) win-pwd.obj - -##WIN32##.rc.obj: -##WIN32## $(RC) $(CPPFLAGS) /r $** -##WIN32## $(CVTRES) /nologo /out:$@ $*.res +##DOS##LIBOBJS = $(OBJS) all-unix:: all-libobjs clean-unix:: clean-libobjs diff --git a/src/lib/krb5/os/read_pwd.c b/src/lib/krb5/os/read_pwd.c index 4ce84f50d..2ad15d658 100644 --- a/src/lib/krb5/os/read_pwd.c +++ b/src/lib/krb5/os/read_pwd.c @@ -159,11 +159,10 @@ cleanup: } #endif -#ifdef _WIN32 /* defined(_MSDOS) || defined(_WIN32) */ +#if defined(_MSDOS) || defined(_WIN32) #define DEFINED_KRB5_READ_PASSWORD #include -#include "win-pwd.h" typedef struct { char *pwd_prompt; @@ -282,18 +281,14 @@ cleanup: } #endif -static char *pwd_prompt; -static char *pwd_prompt2; -static char *pwd_return_pwd; -static int *pwd_size_return; - static int CALLBACK read_pwd_proc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) { - pwd_params FAR *dp = (pwd_params FAR *) lParam; + pwd_params FAR *dp; switch(msg) { case WM_INITDIALOG: + dp = (pwd_params FAR *) lParam; SetWindowLong(hdlg, DWL_USER, lParam); SetDlgItemText(hdlg, ID_READ_PWD_PROMPT, dp->pwd_prompt); SetDlgItemText(hdlg, ID_READ_PWD_PROMPT2, dp->pwd_prompt2); @@ -302,11 +297,12 @@ read_pwd_proc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) return TRUE; case WM_COMMAND: + dp = (pwd_params FAR *) GetWindowLong(hdlg, DWL_USER); switch (wParam) { case IDOK: *(dp->pwd_size_return) = GetDlgItemText(hdlg, ID_READ_PWD_PWD, - pwd_return_pwd, *pwd_size_return); + dp->pwd_return_pwd, *(dp->pwd_size_return)); EndDialog(hdlg, TRUE); break; diff --git a/src/lib/krb5/os/win-pwd.h b/src/lib/krb5/os/win-pwd.h deleted file mode 100644 index 73ebf4abc..000000000 --- a/src/lib/krb5/os/win-pwd.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * lib/krb5/os/win-pwd.h - * - * Copyright 1997 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - */ - -#define ID_READ_PWD_DIALOG 10000 -#define ID_READ_PWD_PROMPT 10001 -#define ID_READ_PWD_PROMPT2 10002 -#define ID_READ_PWD_PWD 10003 diff --git a/src/lib/krb5/os/win-pwd.rc b/src/lib/krb5/os/win-pwd.rc deleted file mode 100644 index 53e20365a..000000000 --- a/src/lib/krb5/os/win-pwd.rc +++ /dev/null @@ -1,40 +0,0 @@ -/* - * lib/krb5/os/win-pwd.h - * - * Copyright 1997 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - */ - -#include "win-pwd.h" -#include - -ID_READ_PWD_DIALOG DIALOG 60, 72, 200, 84 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | - DS_SETFONT -CAPTION "Kerberos Password/Challenge" -FONT 8, "Helv" -{ - LTEXT "", ID_READ_PWD_PROMPT, 10, 8, 180, 10 - LTEXT "", ID_READ_PWD_PROMPT2, 10, 24, 180, 10 - EDITTEXT ID_READ_PWD_PWD, 10, 42, 180, 12, ES_AUTOHSCROLL | ES_PASSWORD | - WS_BORDER | WS_TABSTOP - DEFPUSHBUTTON "&OK", IDOK, 55, 61, 40, 14 - PUSHBUTTON "&Cancel", IDCANCEL, 107, 61, 40, 14 -} -- 2.26.2