From: Danilo Almeida Date: Thu, 11 Oct 2001 00:10:44 +0000 (+0000) Subject: * intern.c (ScreenInsChar): Return BOOL X-Git-Tag: krb5-1.3-alpha1~1045 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f37b97029b13605e54d96d395695aaaad86852ec;p=krb5.git * intern.c (ScreenInsChar): Return BOOL * enc_des.h: Remove undefined encrypt_send_supprt(). * encrypt.h: Fix parameters in declaration for encrypt_init(). Remove undefined encrypt_send_supprt(). * screen.h: HANDLE -> HINSTANCE. ScreenInsChar() returns BOOL. * wt-proto.h: Remove WinMain declaration since that is already in the standard Windows headers. Update declarations to current Microsoft Platform SDK definitions. Remove some undefined functions. * telnet.c: Update declarations to use definitions in current Microsoft Platform SDK (HANDLE -> HINSTANCE, and others). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13798 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/wintel/ChangeLog b/src/windows/wintel/ChangeLog index f1125bc0c..cd37a3f9d 100644 --- a/src/windows/wintel/ChangeLog +++ b/src/windows/wintel/ChangeLog @@ -1,3 +1,23 @@ +2001-10-10 Danilo Almeida + + * intern.c (ScreenInsChar): Return BOOL. + + * enc_des.h: Remove undefined encrypt_send_supprt(). + + + * encrypt.h: Fix parameters in declaration for encrypt_init(). + Remove undefined encrypt_send_supprt(). + + * screen.h: HANDLE -> HINSTANCE. ScreenInsChar() returns BOOL. + + * wt-proto.h: Remove WinMain declaration since that is already in + the standard Windows headers. Update declarations to current + Microsoft Platform SDK definitions. Remove some undefined + functions. + + * telnet.c: Update declarations to use definitions in current + Microsoft Platform SDK (HANDLE -> HINSTANCE, and others). + 2001-10-09 Ken Raeburn * enc_des.c, enc_des.h, encrypt.c, encrypt.h: Make prototypes diff --git a/src/windows/wintel/enc_des.h b/src/windows/wintel/enc_des.h index c4108eba5..b7f0f95fd 100644 --- a/src/windows/wintel/enc_des.h +++ b/src/windows/wintel/enc_des.h @@ -58,7 +58,6 @@ #ifdef ENCRYPTION void encrypt_init (char *, int); Encryptions *findencryption (int); -void encrypt_send_supprt (void); void encrypt_auto (int); void decrypt_auto (int); void encrypt_is (unsigned char *, int); diff --git a/src/windows/wintel/encrypt.h b/src/windows/wintel/encrypt.h index 3d8a025b9..4d7afb176 100644 --- a/src/windows/wintel/encrypt.h +++ b/src/windows/wintel/encrypt.h @@ -100,9 +100,8 @@ typedef struct { #define SK_DES 1 /* Matched Kerberos v5 ENCTYPE_DES */ -void encrypt_init (kstream, char *, int); +void encrypt_init (kstream, kstream_ptr); Encryptions *findencryption (int); -void encrypt_send_supprt (void); void encrypt_auto (int); void decrypt_auto (int); void encrypt_is (unsigned char *, int); diff --git a/src/windows/wintel/intern.c b/src/windows/wintel/intern.c index 176cbedcd..0cdd5537d 100644 --- a/src/windows/wintel/intern.c +++ b/src/windows/wintel/intern.c @@ -679,7 +679,7 @@ ScreenTab(SCREEN *pScr) #endif -int +BOOL ScreenInsChar(SCREEN *pScr, int x) { int i; @@ -688,7 +688,7 @@ ScreenInsChar(SCREEN *pScr, int x) pScrLine = GetScreenLineFromY(pScr, pScr->y); if (pScrLine == NULL) - return(-1); + return(FALSE); for(i = pScr->width - x; i >= pScr->x; i--) { pScrLine->text[x+i] = pScrLine->text[i]; @@ -703,6 +703,7 @@ ScreenInsChar(SCREEN *pScr, int x) rc.bottom = pScr->cyChar * pScr->y; InvalidateRect(pScr->hWnd, &rc, TRUE); SendMessage(pScr->hWnd, WM_PAINT, 0, 0); + return(TRUE); } diff --git a/src/windows/wintel/screen.h b/src/windows/wintel/screen.h index e447b4205..7cba678ce 100644 --- a/src/windows/wintel/screen.h +++ b/src/windows/wintel/screen.h @@ -146,7 +146,7 @@ Prototypes HWND hWnd); void ScreenInit( - HANDLE hInstance); + HINSTANCE hInstance); void SetScreenInstance( HINSTANCE hInstance); @@ -243,7 +243,7 @@ intern.c SCREEN *pScr, int toggle); - int ScreenInsChar( + BOOL ScreenInsChar( SCREEN *pScr, int x); diff --git a/src/windows/wintel/telnet.c b/src/windows/wintel/telnet.c index 1b943c1b2..449471b7b 100644 --- a/src/windows/wintel/telnet.c +++ b/src/windows/wintel/telnet.c @@ -52,7 +52,7 @@ krb5_context k5_context; /* * - * FUNCTION: WinMain(HANDLE, HANDLE, LPSTR, int) + * FUNCTION: WinMain(HINSTANCE, HINSTANCE, LPSTR, int) * * PURPOSE: calls initialization function, processes message loop * @@ -72,7 +72,7 @@ krb5_context k5_context; */ int PASCAL -WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; @@ -115,7 +115,7 @@ WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) } /* - * FUNCTION: InitApplication(HANDLE) + * FUNCTION: InitApplication(HINSTANCE) * * PURPOSE: Initializes window data and registers window class * @@ -133,7 +133,7 @@ WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) */ BOOL -InitApplication(HANDLE hInstance) +InitApplication(HINSTANCE hInstance) { WNDCLASS wc; @@ -175,7 +175,7 @@ InitApplication(HANDLE hInstance) * create and display the main program window. */ BOOL -InitInstance(HANDLE hInstance, int nCmdShow) +InitInstance(HINSTANCE hInstance, int nCmdShow) { int xScreen = 0; int yScreen = 0; @@ -238,7 +238,7 @@ char buf[2048]; * WM_COMMAND - application menu (About dialog box) * WM_DESTROY - destroy window */ -long PASCAL +LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HGLOBAL hBuffer; @@ -622,17 +622,12 @@ GetNewConnection(void) } -int NEAR -DoDialog(char *szDialog, FARPROC lpfnDlgProc) +int +DoDialog(char *szDialog, DLGPROC lpfnDlgProc) { int nReturn; - lpfnDlgProc = MakeProcInstance(lpfnDlgProc, hInst); - if (lpfnDlgProc == NULL) - MessageBox(hWnd, "Couldn't make procedure instance", NULL, MB_OK); - nReturn = DialogBox(hInst, szDialog, hWnd, lpfnDlgProc); - FreeProcInstance(lpfnDlgProc); return (nReturn); } @@ -647,8 +642,8 @@ DoDialog(char *szDialog, FARPROC lpfnDlgProc) * WM_INITDIALOG - initialize dialog box * WM_COMMAND - Input received */ -BOOL PASCAL -OpenTelnetDlg(HWND hDlg, WORD message, WORD wParam, LONG lParam) +INT_PTR CALLBACK +OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { char szConnectName[256]; HDC hDC; diff --git a/src/windows/wintel/wt-proto.h b/src/windows/wintel/wt-proto.h index 1e96814b4..15b9c1a8e 100644 --- a/src/windows/wintel/wt-proto.h +++ b/src/windows/wintel/wt-proto.h @@ -1,60 +1,63 @@ /* wt-proto.h */ - int PASCAL WinMain( - HANDLE, - HANDLE, - LPSTR, - int); - - BOOL InitApplication( - HANDLE); - - BOOL InitInstance( - HANDLE, - int); - - long PASCAL MainWndProc( - HWND, - UINT, - WPARAM, - LPARAM); - - BOOL PASCAL About( - HWND, - WORD, - WORD, - LONG); - - BOOL PASCAL OpenTelnetDlg( - HWND, - WORD, - WORD, - LONG); - - int TelnetSend( - kstream, - char *, - int, - int); - - BOOL PASCAL ConfigSessionDlg( - HWND, - WORD, - WORD, - LONG); - - int OpenTelnetConnection(void); - - int NEAR DoDialog(char *szDialog, - FARPROC lpfnDlgProc); - - BOOL parse_cmdline( - char *cmdline); - - CONNECTION *GetNewConnection(void); - - void start_negotiation( - kstream ks); - - /* somewhere... */ - struct machinfo *PASCAL Shostlook( - char *hname); +BOOL +InitApplication( + HINSTANCE + ); + +BOOL +InitInstance( + HINSTANCE, + int + ); + +LRESULT +CALLBACK +MainWndProc( + HWND, + UINT, + WPARAM, + LPARAM + ); + +INT_PTR +CALLBACK +OpenTelnetDlg( + HWND, + UINT, + WPARAM, + LPARAM + ); + +int +TelnetSend( + kstream, + char *, + int, + int + ); + +int +OpenTelnetConnection( + void + ); + +int +DoDialog( + char *szDialog, + DLGPROC lpfnDlgProc + ); + +BOOL +parse_cmdline( + char *cmdline + ); + +CONNECTION * +GetNewConnection( + void + ); + +void +start_negotiation( + kstream ks + );