Merge branch 'master' into NetHack-3.7
# Conflicts: # src/pline.c # sys/winnt/windmain.c # win/tty/topl.c # win/win32/scripts/fuzzer/longtest.bat # win/win32/scripts/fuzzer/restore.bat # win/win32/scripts/fuzzer/runtill.bat
This commit is contained in:
@@ -564,13 +564,9 @@ typedef unsigned char uchar;
|
||||
%N first character of player name
|
||||
DUMPLOG_FILE is not used if SYSCF is defined
|
||||
*/
|
||||
#endif /* DUMPLOG_FILE */
|
||||
#endif
|
||||
|
||||
#endif /* DUMPLOG */
|
||||
|
||||
/* NEW_KEYBOARD_HIT adds new window proc to return whether keyboard has been hit
|
||||
and character input is available */
|
||||
/* #define NEW_KEYBOARD_HIT */
|
||||
#endif
|
||||
|
||||
#define USE_ISAAC64 /* Use cross-plattform, bundled RNG */
|
||||
|
||||
|
||||
@@ -470,17 +470,6 @@ struct early_opt {
|
||||
boolean valallowed;
|
||||
};
|
||||
|
||||
struct ptr_array {
|
||||
size_t length;
|
||||
size_t max_length;
|
||||
void ** elements;
|
||||
};
|
||||
typedef struct ptr_array ptr_array_t;
|
||||
|
||||
/* logging verbosity levels */
|
||||
#define LOG_MINIMAL 0
|
||||
#define LOG_VERBOSE 1
|
||||
|
||||
/* special key functions */
|
||||
enum nh_keyfunc {
|
||||
NHKF_ESC = 0,
|
||||
|
||||
@@ -28,10 +28,6 @@ E void FDECL(welcome, (BOOLEAN_P));
|
||||
E time_t NDECL(get_realtime);
|
||||
E int FDECL(argcheck, (int, char **, enum earlyarg));
|
||||
E void NDECL(early_init);
|
||||
E void NDECL(fuzzer_toggle);
|
||||
E void NDECL(fuzzer_check);
|
||||
E void NDECL(fuzzer_auto_start);
|
||||
E boolean FDECL(fuzzer_msg_history, (const char *));
|
||||
|
||||
/* ### apply.c ### */
|
||||
|
||||
@@ -955,7 +951,6 @@ E boolean
|
||||
FDECL(fuzzymatch, (const char *, const char *, const char *, BOOLEAN_P));
|
||||
E void FDECL(init_random, (int FDECL((*fn), (int))));
|
||||
E void FDECL(reseed_random, (int FDECL((*fn), (int))));
|
||||
E void FDECL(set_random, (unsigned long, int FDECL((*fn), (int))));
|
||||
E time_t NDECL(getnow);
|
||||
E int NDECL(getyear);
|
||||
#if 0
|
||||
@@ -974,8 +969,6 @@ E void FDECL(strbuf_append, (strbuf_t *, const char *));
|
||||
E void FDECL(strbuf_reserve, (strbuf_t *, int));
|
||||
E void FDECL(strbuf_empty, (strbuf_t *));
|
||||
E void FDECL(strbuf_nl_to_crlf, (strbuf_t *));
|
||||
E struct ptr_array * FDECL(ptr_array_new, (size_t length));
|
||||
E void FDECL(ptr_array_free, (struct ptr_array *));
|
||||
|
||||
/* ### invent.c ### */
|
||||
|
||||
@@ -1151,9 +1144,6 @@ E void NDECL(gettty);
|
||||
E void NDECL(setftty);
|
||||
E void FDECL(settty, (const char *));
|
||||
E int NDECL(tgetch);
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
E boolean NDECL(tkbhit);
|
||||
#endif
|
||||
E void FDECL(cmov, (int x, int y));
|
||||
E void FDECL(nocmov, (int x, int y));
|
||||
|
||||
@@ -1560,9 +1550,6 @@ E void FDECL(mplayer_talk, (struct monst *));
|
||||
|
||||
#ifndef WIN32
|
||||
E int NDECL(tgetch);
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
E boolean NDECL(tkbhit);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef TOS
|
||||
E char NDECL(switchar);
|
||||
@@ -1593,9 +1580,7 @@ E void FDECL(gotoxy, (int, int));
|
||||
#endif
|
||||
#ifdef TOS
|
||||
E int FDECL(_copyfile, (char *, char *));
|
||||
#ifndef NEW_KEYBOARD_HIT
|
||||
E int NDECL(kbhit);
|
||||
#endif
|
||||
E void NDECL(set_colors);
|
||||
E void NDECL(restore_colors);
|
||||
#ifdef SUSPEND
|
||||
@@ -1605,9 +1590,7 @@ E int NDECL(dosuspend);
|
||||
#ifdef WIN32
|
||||
E char *FDECL(get_username, (int *));
|
||||
E void FDECL(nt_regularize, (char *));
|
||||
#ifndef NEW_KEYBOARD_HIT
|
||||
E int NDECL((*nt_kbhit));
|
||||
#endif
|
||||
E void FDECL(Delay, (int));
|
||||
#endif /* WIN32 */
|
||||
#endif /* MICRO || WIN32 */
|
||||
@@ -1675,15 +1658,10 @@ E void FDECL(regex_free, (struct nhregex *));
|
||||
|
||||
#ifdef WIN32
|
||||
E void NDECL(get_scr_size);
|
||||
#ifndef NEW_KEYBOARD_HIT
|
||||
E int NDECL(nttty_kbhit);
|
||||
#endif
|
||||
E void FDECL(nttty_open, (int));
|
||||
E void NDECL(nttty_rubout);
|
||||
E int NDECL(tgetch);
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
E boolean NDECL(tkbhit);
|
||||
#endif
|
||||
E int FDECL(ntposkey, (int *, int *, int *));
|
||||
E void FDECL(set_output_mode, (int));
|
||||
E void NDECL(synch_cursor);
|
||||
@@ -1938,10 +1916,6 @@ E void VDECL(verbalize, (const char *, ...)) PRINTF_F(1, 2);
|
||||
E void VDECL(raw_printf, (const char *, ...)) PRINTF_F(1, 2);
|
||||
E void VDECL(impossible, (const char *, ...)) PRINTF_F(1, 2);
|
||||
E void VDECL(config_error_add, (const char *, ...)) PRINTF_F(1, 2);
|
||||
E void FDECL(nhassert_failed, (const char *, int));
|
||||
E void NDECL(fuzzer_start);
|
||||
E void NDECL(fuzzer_stop);
|
||||
E void VDECL(fuzzer_log, (int, const char *, ...)) PRINTF_F(2, 3);
|
||||
|
||||
/* ### polyself.c ### */
|
||||
|
||||
@@ -2167,7 +2141,6 @@ E int FDECL(rnd, (int));
|
||||
E int FDECL(d, (int, int));
|
||||
E int FDECL(rne, (int));
|
||||
E int FDECL(rnz, (int));
|
||||
E unsigned long NDECL(rul);
|
||||
|
||||
/* ### role.c ### */
|
||||
|
||||
|
||||
@@ -433,10 +433,6 @@ struct instance_flags {
|
||||
chosen_windowport[], but do not switch to
|
||||
it in the midst of options processing */
|
||||
boolean obsolete; /* obsolete options can point at this, it isn't used */
|
||||
boolean fuzzer_auto_start; /* start fuzzer automatically */
|
||||
int fuzzer_stop_and_save; /* move when fuzzer stops and saves game */
|
||||
boolean fuzzer_saving; /* fuzzer is saving game */
|
||||
int verbose_logging_start; /* move when verbose fuzzer logging starts */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -382,10 +382,5 @@ struct savefile_info {
|
||||
#define nhassert(e) ((void)0)
|
||||
#endif
|
||||
|
||||
/* Supply nhassert macro if not supplied by port */
|
||||
#ifndef nhassert
|
||||
#define nhassert(expression) (void)((!!(expression)) || \
|
||||
(nhassert_failed(__FILE__, __LINE__), 0))
|
||||
#endif
|
||||
|
||||
#endif /* GLOBAL_H */
|
||||
|
||||
@@ -134,8 +134,6 @@ extern void NDECL(getlock);
|
||||
#ifndef HAS_STDINT_H
|
||||
#define HAS_STDINT_H /* force include of stdint.h in integer.h */
|
||||
#endif
|
||||
/* Turn on some additional warnings */
|
||||
#pragma warning(3:4389)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* The following is needed for prototypes of certain functions */
|
||||
@@ -148,6 +146,14 @@ extern void NDECL(getlock);
|
||||
#define strncmpi(a, b, c) strnicmp(a, b, c)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Visual Studio defines this in their own headers, which we don't use */
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
#pragma warning( \
|
||||
disable : 4996) /* deprecation warning suggesting snprintf_s */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
@@ -245,11 +251,8 @@ int _RTLENTRY _EXPFUNC read(int __handle, void _FAR *__buf, unsigned __len);
|
||||
#ifndef CURSES_GRAPHICS
|
||||
#include <conio.h> /* conflicting definitions with curses.h */
|
||||
#endif
|
||||
|
||||
#ifndef NEW_KEYBOARD_HIT
|
||||
#undef kbhit /* Use our special NT kbhit */
|
||||
#define kbhit (*nt_kbhit)
|
||||
#endif
|
||||
|
||||
#ifdef LAN_FEATURES
|
||||
#define MAX_LAN_USERNAME 20
|
||||
@@ -268,17 +271,17 @@ extern int FDECL(set_win32_option, (const char *, const char *));
|
||||
extern int FDECL(alternative_palette, (char *));
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define nhassert(expression) ((void)0)
|
||||
#else
|
||||
extern void FDECL(nhassert_failed, (const char * exp, const char * file,
|
||||
int line));
|
||||
|
||||
#define nhassert(expression) (void)((!!(expression)) || \
|
||||
(nhassert_failed(#expression, __FILE__, __LINE__), 0))
|
||||
#endif
|
||||
|
||||
#define nethack_enter(argc, argv) nethack_enter_winnt()
|
||||
extern void FDECL(nethack_exit, (int)) NORETURN;
|
||||
extern boolean FDECL(file_exists, (const char *));
|
||||
|
||||
/* Override the default version of nhassert. The default version is unable
|
||||
* to generate a string form of the expression due to the need to be
|
||||
* compatible with compilers which do not support macro stringization (i.e.
|
||||
* #x to turn x into its string form).
|
||||
*/
|
||||
extern void FDECL(nt_assert_failed, (const char *, const char *, int));
|
||||
#define nhassert(expression) (void)((!!(expression)) || \
|
||||
(nt_assert_failed(#expression, __FILE__, __LINE__), 0))
|
||||
|
||||
#endif /* NTCONF_H */
|
||||
|
||||
@@ -305,9 +305,7 @@
|
||||
|
||||
#define HLOCK "perm" /* an empty file used for locking purposes */
|
||||
|
||||
#ifndef NEW_KEYBOARD_HIT
|
||||
#define tgetch getchar
|
||||
#endif
|
||||
|
||||
#ifndef NOSHELL
|
||||
#define SHELL /* do not delete the '!' command */
|
||||
|
||||
@@ -79,9 +79,6 @@ struct window_procs {
|
||||
(int, const char *, const char *, BOOLEAN_P));
|
||||
void FDECL((*win_status_update), (int, genericptr_t, int, int, int, unsigned long *));
|
||||
boolean NDECL((*win_can_suspend));
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
boolean NDECL((*win_keyboard_hit));
|
||||
#endif
|
||||
};
|
||||
|
||||
extern
|
||||
@@ -163,9 +160,6 @@ extern
|
||||
*/
|
||||
#define status_enablefield (*windowprocs.win_status_enablefield)
|
||||
#define status_update (*windowprocs.win_status_update)
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
#define keyboard_hit (*windowprocs.win_keyboard_hit)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WINCAP
|
||||
@@ -385,9 +379,6 @@ struct chain_procs {
|
||||
(CARGS, int, const char *, const char *, BOOLEAN_P));
|
||||
void FDECL((*win_status_update), (CARGS, int, genericptr_t, int, int, int, unsigned long *));
|
||||
boolean FDECL((*win_can_suspend), (CARGS));
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
boolean FDECL((*keyboard_hit), (CARGS));
|
||||
#endif
|
||||
};
|
||||
#endif /* WINCHAIN */
|
||||
|
||||
@@ -458,9 +449,6 @@ extern void FDECL(safe_status_enablefield,
|
||||
(int, const char *, const char *, BOOLEAN_P));
|
||||
extern void FDECL(safe_status_update, (int, genericptr_t, int, int, int, unsigned long *));
|
||||
extern boolean NDECL(safe_can_suspend);
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
extern boolean NDECL(safe_keyboard_hit);
|
||||
#endif
|
||||
extern void FDECL(stdio_raw_print, (const char *));
|
||||
extern void FDECL(stdio_raw_print_bold, (const char *));
|
||||
extern void NDECL(stdio_wait_synch);
|
||||
|
||||
@@ -50,12 +50,6 @@ struct WinDesc {
|
||||
#define WIN_STOP 1 /* for NHW_MESSAGE; stops output */
|
||||
#define WIN_LOCKHISTORY 2 /* for NHW_MESSAGE; suppress history updates */
|
||||
|
||||
/* topline states */
|
||||
#define TOPLINE_EMPTY 0 /* empty */
|
||||
#define TOPLINE_NEED_MORE 1 /* non-empty, need --More-- */
|
||||
#define TOPLINE_NON_EMPTY 2 /* non-empty, no --More-- required */
|
||||
#define TOPLINE_SPECIAL_PROMPT 3 /* special prompt state */
|
||||
|
||||
/* descriptor for tty-based displays -- all the per-display data */
|
||||
struct DisplayDesc {
|
||||
short rows, cols; /* width and height of tty display */
|
||||
@@ -253,10 +247,6 @@ E void FDECL(genl_outrip, (winid, int, time_t));
|
||||
E char *FDECL(tty_getmsghistory, (BOOLEAN_P));
|
||||
E void FDECL(tty_putmsghistory, (const char *, BOOLEAN_P));
|
||||
|
||||
#ifdef NEW_KEYBOARD_HIT
|
||||
E boolean NDECL(tty_keyboard_hit);
|
||||
#endif
|
||||
|
||||
#ifdef NO_TERMS
|
||||
#ifdef MAC
|
||||
#ifdef putchar
|
||||
|
||||
Reference in New Issue
Block a user