Borland build fixes (from Yitzhak)
> This patch fixes warnings relating to pointers (using int * > instead of unsigned int * ), provides prototypes for some > functions, and adds a missing argument to one of the functions > > It also changes a bit in the way flex/bison are used in the > Borland makefile to allow me to test compilation with those > utilities using a batch file.
This commit is contained in:
@@ -136,15 +136,19 @@ OBJ = o
|
|||||||
# Yacc/Lex ... if you got 'em.
|
# Yacc/Lex ... if you got 'em.
|
||||||
#
|
#
|
||||||
# If you have yacc and lex programs (or work-alike such as bison
|
# If you have yacc and lex programs (or work-alike such as bison
|
||||||
# and flex), comment out the upper two macros and uncomment
|
# and flex), uncomment the upper two macros.
|
||||||
# the lower two.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
DO_YACC = YACC_MSG
|
|
||||||
DO_LEX = LEX_MSG
|
|
||||||
#DO_YACC = YACC_ACT
|
#DO_YACC = YACC_ACT
|
||||||
#DO_LEX = LEX_ACT
|
#DO_LEX = LEX_ACT
|
||||||
|
|
||||||
|
!IFNDEF DO_YACC
|
||||||
|
DO_YACC = YACC_MSG
|
||||||
|
!ENDIF
|
||||||
|
!IFNDEF DO_LEX
|
||||||
|
DO_LEX = LEX_MSG
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
# Wilbur Streett's Win32 ports of GNU bison and flex are available at:
|
# Wilbur Streett's Win32 ports of GNU bison and flex are available at:
|
||||||
# http://www.monmouth.com/~wstreett/lex-yacc/lex-yacc.html
|
# http://www.monmouth.com/~wstreett/lex-yacc/lex-yacc.html
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ extern INPUT_RECORD ir;
|
|||||||
char dllname[512];
|
char dllname[512];
|
||||||
char *shortdllname;
|
char *shortdllname;
|
||||||
|
|
||||||
|
int FDECL(__declspec(dllexport) __stdcall
|
||||||
|
ProcessKeystroke, (HANDLE hConIn, INPUT_RECORD *ir,
|
||||||
|
boolean *valid, BOOLEAN_P numberpad, int portdebug));
|
||||||
|
|
||||||
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
||||||
{
|
{
|
||||||
char dlltmpname[512];
|
char dlltmpname[512];
|
||||||
@@ -214,7 +218,7 @@ int __declspec(dllexport) __stdcall
|
|||||||
CheckInput(hConIn, ir, count, numpad, mode, mod, cc)
|
CheckInput(hConIn, ir, count, numpad, mode, mod, cc)
|
||||||
HANDLE hConIn;
|
HANDLE hConIn;
|
||||||
INPUT_RECORD *ir;
|
INPUT_RECORD *ir;
|
||||||
int *count;
|
DWORD *count;
|
||||||
boolean numpad;
|
boolean numpad;
|
||||||
int mode;
|
int mode;
|
||||||
int *mod;
|
int *mod;
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ extern INPUT_RECORD ir;
|
|||||||
char dllname[512];
|
char dllname[512];
|
||||||
char *shortdllname;
|
char *shortdllname;
|
||||||
|
|
||||||
|
int FDECL(__declspec(dllexport) __stdcall
|
||||||
|
ProcessKeystroke, (HANDLE hConIn, INPUT_RECORD *ir,
|
||||||
|
boolean *valid, BOOLEAN_P numberpad, int portdebug));
|
||||||
|
|
||||||
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
||||||
{
|
{
|
||||||
char dlltmpname[512];
|
char dlltmpname[512];
|
||||||
@@ -246,7 +250,7 @@ int __declspec(dllexport) __stdcall
|
|||||||
CheckInput(hConIn, ir, count, numpad, mode, mod, cc)
|
CheckInput(hConIn, ir, count, numpad, mode, mod, cc)
|
||||||
HANDLE hConIn;
|
HANDLE hConIn;
|
||||||
INPUT_RECORD *ir;
|
INPUT_RECORD *ir;
|
||||||
int *count;
|
DWORD *count;
|
||||||
boolean numpad;
|
boolean numpad;
|
||||||
int mode;
|
int mode;
|
||||||
int *mod;
|
int *mod;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Keystroke handling contributed by Ray Chason.
|
* Keystroke handling contributed by Ray Chason.
|
||||||
|
* The following text was written by Ray Chason.
|
||||||
*
|
*
|
||||||
* The problem
|
* The problem
|
||||||
* ===========
|
* ===========
|
||||||
@@ -153,6 +154,7 @@
|
|||||||
* * After pushing the bogus key and calling ReadConsole, check to see
|
* * After pushing the bogus key and calling ReadConsole, check to see
|
||||||
* if we got the bogus key; if so, and an Alt is pressed, process the
|
* if we got the bogus key; if so, and an Alt is pressed, process the
|
||||||
* event as an Alt sequence.
|
* event as an Alt sequence.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static char where_to_get_source[] = "http://www.nethack.org/";
|
static char where_to_get_source[] = "http://www.nethack.org/";
|
||||||
@@ -167,6 +169,10 @@ extern INPUT_RECORD ir;
|
|||||||
char dllname[512];
|
char dllname[512];
|
||||||
char *shortdllname;
|
char *shortdllname;
|
||||||
|
|
||||||
|
int FDECL(__declspec(dllexport) __stdcall
|
||||||
|
ProcessKeystroke, (HANDLE hConIn, INPUT_RECORD *ir,
|
||||||
|
boolean *valid, BOOLEAN_P numberpad, int portdebug));
|
||||||
|
|
||||||
static INPUT_RECORD bogus_key;
|
static INPUT_RECORD bogus_key;
|
||||||
|
|
||||||
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
||||||
@@ -444,7 +450,8 @@ int __declspec(dllexport) __stdcall
|
|||||||
CheckInput(hConIn, ir, count, numpad, mode, mod, cc)
|
CheckInput(hConIn, ir, count, numpad, mode, mod, cc)
|
||||||
HANDLE hConIn;
|
HANDLE hConIn;
|
||||||
INPUT_RECORD *ir;
|
INPUT_RECORD *ir;
|
||||||
int *count, *mod;
|
DWORD *count;
|
||||||
|
int *mod;
|
||||||
boolean numpad;
|
boolean numpad;
|
||||||
coord *cc;
|
coord *cc;
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
void FDECL(cmov, (int, int));
|
void FDECL(cmov, (int, int));
|
||||||
void FDECL(nocmov, (int, int));
|
void FDECL(nocmov, (int, int));
|
||||||
|
int FDECL(process_keystroke, (INPUT_RECORD *, boolean *,
|
||||||
|
BOOLEAN_P numberpad, int portdebug));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following WIN32 Console API routines are used in this file.
|
* The following WIN32 Console API routines are used in this file.
|
||||||
@@ -69,7 +71,7 @@ typedef int (__stdcall * NHKBHIT)(
|
|||||||
typedef int (__stdcall * CHECKINPUT)(
|
typedef int (__stdcall * CHECKINPUT)(
|
||||||
HANDLE,
|
HANDLE,
|
||||||
INPUT_RECORD *,
|
INPUT_RECORD *,
|
||||||
int *,
|
DWORD *,
|
||||||
BOOLEAN_P,
|
BOOLEAN_P,
|
||||||
int,
|
int,
|
||||||
int *,
|
int *,
|
||||||
@@ -799,7 +801,7 @@ win32con_debug_keystrokes()
|
|||||||
while (!valid || ch != 27) {
|
while (!valid || ch != 27) {
|
||||||
ReadConsoleInput(hConIn,&ir,1,&count);
|
ReadConsoleInput(hConIn,&ir,1,&count);
|
||||||
if ((ir.EventType == KEY_EVENT) && ir.Event.KeyEvent.bKeyDown)
|
if ((ir.EventType == KEY_EVENT) && ir.Event.KeyEvent.bKeyDown)
|
||||||
ch = process_keystroke(&ir, &valid, 1);
|
ch = process_keystroke(&ir, &valid, iflags.num_pad, 1);
|
||||||
}
|
}
|
||||||
(void)doredraw();
|
(void)doredraw();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user