from Yitzhak

Add absent prototypes to some core routines.
Also add some port function() to function(void) in some win32 routines.
Also updates the Borland C Makefile for win32.
This commit is contained in:
nethack.allison
2002-02-05 13:21:43 +00:00
parent b407cf3dcf
commit 7d1e6f7d57
30 changed files with 96 additions and 73 deletions

View File

@@ -19,7 +19,7 @@ static int nhi_read_pos = 0;
static int nhi_write_pos = 0;
/* initialize input queue */
void mswin_nh_input_init()
void mswin_nh_input_init(void)
{
if( !nhi_init_input ) {
nhi_init_input = 1;

View File

@@ -26,10 +26,10 @@ typedef struct mswin_event {
#define NHEVENT_KBD(c) { MSNHEvent e; e.type=NHEVENT_CHAR; e.kbd.ch=(c); mswin_input_push(&e); }
#define NHEVENT_MS(_mod, _x, _y) { MSNHEvent e; e.type=NHEVENT_MOUSE; e.ms.mod = (_mod); e.ms.x=(_x); e.ms.y=(_y); mswin_input_push(&e); }
void mswin_nh_input_init();
int mswin_have_input();
void mswin_nh_input_init(void);
int mswin_have_input(void);
void mswin_input_push(PMSNHEvent event);
PMSNHEvent mswin_input_pop();
PMSNHEvent mswin_input_peek();
PMSNHEvent mswin_input_pop(void);
PMSNHEvent mswin_input_peek(void);
#endif /* MSWINInput_h */

View File

@@ -25,7 +25,7 @@ LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
static LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
static void register_main_window_class();
static void register_main_window_class(void);
static void select_map_mode(int map_mode);
static int menuid2mapmode(int menuid);
static int mapmode2menuid(int map_mode);

View File

@@ -13,7 +13,7 @@
#define NHWND_ALIGN_TOP 2
#define NHWND_ALIGN_BOTTOM 3
HWND mswin_init_main_window ();
HWND mswin_init_main_window (void);
void mswin_layout_main_window(HWND changed_child);
#endif /* MSWINMainWindow_h */

View File

@@ -31,7 +31,7 @@ typedef struct mswin_nethack_map_window {
static TCHAR szNHMapWindowClass[] = TEXT("MSNethackMapWndClass");
LRESULT CALLBACK MapWndProc(HWND, UINT, WPARAM, LPARAM);
static void register_map_window_class();
static void register_map_window_class(void);
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
static void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam);
static void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam);

View File

@@ -9,7 +9,7 @@
#include "global.h"
HWND mswin_init_map_window ();
HWND mswin_init_map_window (void);
void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw);
#define NHMAP_VIEW_TILES 0

View File

@@ -35,7 +35,7 @@ typedef struct mswin_nethack_message_window {
static TCHAR szMessageWindowClass[] = TEXT("MSNHMessageWndClass");
LRESULT CALLBACK NHMessageWndProc(HWND, UINT, WPARAM, LPARAM);
static void register_message_window_class();
static void register_message_window_class(void);
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
static void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam);
#ifndef MSG_WRAP_TEXT

View File

@@ -8,7 +8,7 @@
#include "config.h"
#include "global.h"
HWND mswin_init_message_window ();
HWND mswin_init_message_window (void);
void mswin_message_window_size (HWND hWnd, LPSIZE sz);

View File

@@ -8,7 +8,7 @@
#include "config.h"
#include "global.h"
HWND mswin_init_RIP_window ();
HWND mswin_init_RIP_window (void);
void mswin_display_RIP_window (HWND hwnd);
#endif /* MSWINRIPWindow_h */

View File

@@ -16,7 +16,7 @@ typedef struct mswin_nethack_status_window {
static TCHAR szStatusWindowClass[] = TEXT("MSNHStatusWndClass");
LRESULT CALLBACK StatusWndProc(HWND, UINT, WPARAM, LPARAM);
static void register_status_window_class();
static void register_status_window_class(void);
HWND mswin_init_status_window () {
static int run_once = 0;

View File

@@ -8,7 +8,7 @@
#include "config.h"
#include "global.h"
HWND mswin_init_status_window ();
HWND mswin_init_status_window (void);
void mswin_status_window_size (HWND hWnd, LPSIZE sz);
#endif /* MSWINStatusWindow_h */

View File

@@ -8,7 +8,7 @@
#include "config.h"
#include "global.h"
HWND mswin_init_text_window ();
HWND mswin_init_text_window (void);
void mswin_display_text_window (HWND hwnd);
#endif /* MSWINTextWindow_h */

View File

@@ -28,7 +28,7 @@ extern void logDebug(const char *fmt, ...);
void logDebug(const char *fmt, ...) { }
#endif
static void mswin_main_loop();
static void mswin_main_loop(void);
/* Interface definition, for windows.c */
struct window_procs mswin_procs = {

View File

@@ -57,10 +57,10 @@ typedef struct mswin_nhwindow_app {
char* saved_text;
} NHWinApp, *PNHWinApp;
extern PNHWinApp GetNHApp();
#define E extern
E PNHWinApp GetNHApp(void);
E struct window_procs mswin_procs;
#undef E