Merge branch 'NetHack-3.6'

# Conflicts:
#	DEVEL/Developer.txt
#	include/config.h
#	include/decl.h
#	include/display.h
#	include/extern.h
#	include/global.h
#	include/hack.h
#	include/patchlevel.h
#	src/display.c
#	src/dothrow.c
#	src/makemon.c
#	src/monst.c
#	src/objnam.c
#	src/sp_lev.c
#	src/wield.c
#	src/zap.c
#	sys/share/pmatchregex.c
#	sys/winnt/Makefile.msc
This commit is contained in:
Bart House
2019-07-14 23:36:56 -07:00
32 changed files with 162 additions and 822 deletions

View File

@@ -116,9 +116,6 @@ struct window_procs mswin_procs = {
mswin_status_init, mswin_status_finish, mswin_status_enablefield,
mswin_status_update,
genl_can_suspend_yes,
#ifdef NEW_KEYBOARD_HIT
mswin_keyboard_hit
#endif
};
/*
@@ -1405,15 +1402,6 @@ mswin_nhgetch()
return (key);
}
#ifdef NEW_KEYBOARD_HIT
/* boolean keyboard_hit() -- returns TRUE if input is available */
boolean
mswin_keyboard_hit()
{
return mswin_have_input() != 0;
}
#endif
/*
int nh_poskey(int *x, int *y, int *mod)
-- Returns a single character input from the user or a

View File

@@ -1,8 +0,0 @@
set BIN_DIR=..\..\..\..\bin\Debug\Win32
set FUZZER_LOG=%BIN_DIR%\fuzzer.log
set FUZZER_DIR=%BIN_DIR%\fuzzer
if exist %BIN_DIR%\%USERNAME%* del %BIN_DIR%\%USERNAME%*
if exist %FUZZER_LOG% del %FUZZER_LOG%

View File

@@ -1,36 +0,0 @@
echo off
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION
set STEP_SIZE=5000
set FINAL_MOVE=500000
set START_MOVE=5000
set BIN_DIR=..\..\..\..\bin\Debug\Win32
set SAVED_GAME=%USERNAME%-wizard.NetHack-saved-game
set LOG_FILE=%BIN_DIR%\runtil.log
set FUZZER_LOG=%BIN_DIR%\fuzzer.log
set FUZZER_DIR=%BIN_DIR%\fuzzer
set SAVE_DIR=%FUZZER_DIR%\save
set BASELINE=%FUZZER_DIR%\fuzzer.log
if exist %FUZZER_DIR% rmdir /s /q %FUZZER_DIR%
mkdir %FUZZER_DIR%
mkdir %SAVE_DIR%
for /L %%i in (%START_MOVE%, %STEP_SIZE%, %FINAL_MOVE%) do (
call runtill.bat %%i
if ERRORLEVEL 1 (
echo FAILED getting running to %%i.
exit /b 1
)
)
echo SUCCESS.

View File

@@ -1,7 +0,0 @@
call clean.bat
set BIN_DIR=..\..\..\..\bin\Debug\Win32
set SAVED_GAME=%USERNAME%-wizard.NetHack-saved-game
set FUZZER_DIR=%BIN_DIR%\fuzzer
copy %FUZZER_DIR%\%SAVED_GAME% %BIN_DIR%\%SAVED_GAME%

View File

@@ -1,77 +0,0 @@
REM
REM runtill target_move
REM
echo off
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION
set TARGET_MOVE=%1
if %TARGET_MOVE% == "" (
echo Usage:runtill target_move
goto :eof
)
set BIN_DIR=..\..\..\..\bin\Debug\Win32
set SAVED_GAME=%USERNAME%-wizard.NetHack-saved-game
set LOG_FILE=%BIN_DIR%\runtil.log
set FUZZER_LOG=%BIN_DIR%\fuzzer.log
set FUZZER_DIR=%BIN_DIR%\fuzzer
set SAVE_DIR=%FUZZER_DIR%\save
set BASELINE=%FUZZER_DIR%\fuzzer.log
if not exist %FUZZER_DIR% mkdir %FUZZER_DIR%
if not exist %SAVE_DIR% mkdir %SAVE_DIR%
call clean.bat
if not exist %FUZZER_DIR%\%SAVED_GAME% (
%BIN_DIR%\nethack -D -F 0
copy %BIN_DIR%\%SAVED_GAME% %FUZZER_DIR%
copy %BIN_DIR%\%SAVED_GAME% %SAVE_DIR%\0.save
)
call restore.bat
%BIN_DIR%\nethack -D -F %TARGET_MOVE%
move %BIN_DIR%\*.snap %BIN_DIR%\snapshots
copy %FUZZER_LOG% %BASELINE%
for /f "tokens=2,3 delims=: usebackq" %%i in (`findstr /c:START %BASELINE%`) do (
set START_SEED=%%j
set START_MOVE=%%i
)
for /f "tokens=2,3 delims=: usebackq" %%i in (`findstr /c:STOP %BASELINE%`) do (
set STOP_SEED=%%j
set STOP_MOVE=%%i
)
if !STOP_MOVE! LSS %TARGET_MOVE% (
cls
echo FAILED: Failed to reach target move. !STOP_MOVE! is not GTE %TARGET_MOVE%.
exit /b 1
)
call restore.bat
%BIN_DIR%\nethack -D -F %TARGET_MOVE%
fc %FUZZER_LOG% %BASELINE%
if ERRORLEVEL 1 (
cls
echo FAILED: Unable to reproduce same timeline
exit /b 1
)
del /q %FUZZER_DIR%\%SAVED_GAME%
copy %BIN_DIR%\%SAVED_GAME% %FUZZER_DIR%
copy %BIN_DIR%\%SAVED_GAME% %SAVE_DIR%\!STOP_MOVE!.save
echo !START_MOVE! to !STOP_MOVE!.
echo SUCCESS.

View File

@@ -167,9 +167,6 @@ void mswin_raw_print(const char *str);
void mswin_raw_print_bold(const char *str);
void mswin_raw_print_flush();
int mswin_nhgetch(void);
#ifdef NEW_KEYBOARD_HIT
boolean mswin_keyboard_hit(void);
#endif
int mswin_nh_poskey(int *x, int *y, int *mod);
void mswin_nhbell(void);
int mswin_doprev_message(void);