From: nethack.allison Date: Fri, 25 Jan 2002 01:54:44 +0000 (+0000) Subject: Windows Me and Windows XP. X-Git-Tag: MOVE2GIT~3353 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7406ad3855ce8ffaf310a643eef8ca7bda5df63e;p=nethack Windows Me and Windows XP. --- diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index c9de94509..f6a5aaa86 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -17,7 +17,7 @@ struct getlin_data { size_t result_size; }; -LRESULT CALLBACK GetlinDlgProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK GetlinDlgProc(HWND, UINT, WPARAM, LPARAM); int mswin_getlin_window ( const char *question, @@ -47,7 +47,7 @@ int mswin_getlin_window ( return ret; } -LRESULT CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +BOOL CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { struct getlin_data* data; RECT main_rt, dlg_rt; @@ -117,7 +117,7 @@ struct extcmd_data { int* selection; }; -LRESULT CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM); int mswin_ext_cmd_window (int* selection) { @@ -141,7 +141,7 @@ int mswin_ext_cmd_window (int* selection) return ret; } -LRESULT CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +BOOL CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { struct extcmd_data* data; RECT main_rt, dlg_rt; @@ -231,7 +231,7 @@ struct plsel_data { int* selection; }; -LRESULT CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LPARAM); static void plselInitDialog(HWND hWnd); static void plselAdjustLists(HWND hWnd, int changed_opt); static int plselFinalSelection(HWND hWnd, int* selection); @@ -258,7 +258,7 @@ int mswin_player_selection_window ( int* selection ) return ret; } -LRESULT CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +BOOL CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { struct plsel_data* data; RECT main_rt, dlg_rt; diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index 3cc880535..f467dbb33 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -48,11 +48,11 @@ extern short glyph2tile[]; #define NHMENU_IS_SELECTABLE(item) ((item).identifier.a_obj!=NULL) -LRESULT CALLBACK MenuWndProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK MenuWndProc(HWND, UINT, WPARAM, LPARAM); static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); -static LRESULT onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam); -static LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam); -static LRESULT onListChar(HWND hWnd, HWND hwndList, WORD ch); +static BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam); +static BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam); +static BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch); static void LayoutMenu(HWND hwnd); static void SetMenuType(HWND hwnd, int type); static void SetMenuListType(HWND hwnd, int now); @@ -210,7 +210,7 @@ int mswin_menu_window_select_menu (HWND hWnd, int how, MENU_ITEM_P ** _selected) return ret_val; } -LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +BOOL CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { PNHMenuWindow data; int nItem; @@ -550,7 +550,7 @@ HWND GetMenuControl(HWND hWnd) } -LRESULT onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) +BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) { LPMEASUREITEMSTRUCT lpmis; TEXTMETRIC tm; @@ -578,7 +578,7 @@ LRESULT onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) return TRUE; } -LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) +BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) { LPDRAWITEMSTRUCT lpdis; PNHMenuItem item; @@ -688,7 +688,7 @@ LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) return TRUE; } -LRESULT onListChar(HWND hWnd, HWND hwndList, WORD ch) +BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch) { int i = 0; PNHMenuWindow data; diff --git a/win/win32/mhtext.c b/win/win32/mhtext.c index ec74ad090..a83acf985 100644 --- a/win/win32/mhtext.c +++ b/win/win32/mhtext.c @@ -7,11 +7,13 @@ #include "mhmsg.h" #include "mhfont.h" +PNHWinApp GetNHApp(void); + typedef struct mswin_nethack_text_window { TCHAR* window_text; } NHTextWindow, *PNHTextWindow; -LRESULT CALLBACK TextWndProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK TextWndProc(HWND, UINT, WPARAM, LPARAM); static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); static void LayoutText(HWND hwnd); @@ -71,7 +73,7 @@ void mswin_display_text_window (HWND hWnd) GetNHApp()->hMenuWnd = NULL; } -LRESULT CALLBACK TextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +BOOL CALLBACK TextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HWND control; HDC hdc; diff --git a/win/win32/winhack.c b/win/win32/winhack.c index 655f03c8b..a85a383b5 100644 --- a/win/win32/winhack.c +++ b/win/win32/winhack.c @@ -16,13 +16,16 @@ #define SHARED_DCL extern #endif -SHARED_DCL char orgdir[PATHLEN]; /* also used in pcsys.c, amidos.c */ - extern void FDECL(nethack_exit,(int)); // Global Variables: NHWinApp _nethack_app; +#ifdef __BORLANDC__ +#define _stricmp(s1,s2) stricmp(s1,s2) +#define _strdup(s1) strdup(s1) +#endif + // Foward declarations of functions included in this code module: BOOL InitInstance(HINSTANCE, int); diff --git a/win/win32/winhack.rc b/win/win32/winhack.rc index c857afdaa..90dc3828f 100644 --- a/win/win32/winhack.rc +++ b/win/win32/winhack.rc @@ -1,5 +1,9 @@ //Microsoft Developer Studio generated resource script. // +#if defined(__BORLANDC__) +LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US +#endif + #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS