Commit Graph

2001 Commits

Author SHA1 Message Date
Pasi Kallinen
29a8153170 Add a new bigroom variant "boulder maze" 2021-07-09 18:18:31 +03:00
nhmall
216c26aaef do vs2017 warnings.h a little differently than vs2019
fixes #545
2021-07-07 09:05:22 -04:00
nhmall
ca7b1d5df0 another nhsetup.bat tweak 2021-06-08 14:15:36 -04:00
nhmall
e6d9e6be0b no need to check vs version in nhsetup.bat 2021-06-08 13:56:02 -04:00
nhmall
0305a14a27 windows substitution error in gcc Makefile 2021-06-04 21:46:03 -04:00
nhmall
7439c8b060 windsys.c name tidbit 2021-06-04 08:51:42 -04:00
nhmall
631e80c47a msdos Install.dos tidbit 2021-06-04 08:49:20 -04:00
nhmall
80d3178d25 windows doc update tidbit 2021-06-04 00:24:46 -04:00
nhmall
254c6c55f5 Windows build warning and Makefile update
.\hack.c(2657): warning C4389: '!=': signed/unsigned mismatch
Visual Studio autodetection update for Makefile.msc
2021-06-04 00:14:37 -04:00
nhmall
91ab71f0f9 windows and visual studio follow-up bit 2021-06-03 23:43:32 -04:00
nhmall
0a10bd632d change references from winnt to windows
rename sys/winnt to sys/windows
move vs (visual studio) folder out of win/win32 and into sys/windows
rename include/ntconf.h to include/windconf.h
rename winnt.c to windsys.c
place visual studio projects into individual subfolders.

This will hopefully resolve GitHub issue #484 as well.
2021-06-03 23:26:00 -04:00
PatR
acfbf20958 unix/Makefile.top fetch-Lua bit
% make spotless
% sh sys/unix/setup.sh sys/unix/hints/macOS.2020
% make fetch-Lua

worked, but the last ended with

|rm include/nhlua.h
|rm: include/nhlua.h: No such file or directory
|make: [fetch-Lua] Error 1 (ignored)

which might frighten skittish users (like me).  Check whether the
constructed header file exists (so is assumed to be for an earlier
Lua version) and only delete it in that case.  No more scary report
of benign failure when it isn't there (after 'make spotless' or for
brand new source setup).

Also, some time ago we came to the conclusion that 'if [ ]' was an
extension for GNU 'bash' and wouldn't work with some older actual
'sh' implementations.  This replaces the one post-3.6 instance of
|if [ ! -d foo ] then bar; fi
in Makefile.top with
|if test -d foo; then true; else bar; fi
Testing was successful but done with bash rather than an old sh. :-}
2021-06-02 17:13:56 -07:00
nhmall
5c95603a82 Makefile command echo suppression 2021-06-02 19:21:37 -04:00
nhmall
e69808987e support for build with current Lua version 5.4.3
On some platforms this may require:
	make spotless
	make fetch-lua

I did attempt to force a reminder message about the latter to
Makefile.top this time, and hope that works correctly for everyone.
2021-06-02 19:12:47 -04:00
PatR
0cdb91aa50 Unix 'make update'
Revise Makefile.top to remove the obsolete commands which change
the last modified date of save and bones files during 'make update'.
Using file dates to validate save files against nethack hasn't been
useful for many years.

Also, update assorted comments.
2021-05-23 18:14:13 -07:00
Pasi Kallinen
29868036f1 Lua: nhcore script with function callbacks
Adds possible callbacks for "start_new_game", "restore_old_game",
"moveloop_turn", and "game_exit" which when defined, will be called
from core code at the appropriate time.

Adds lua hooks for dump_fmtstr (only if DUMPLOG), dnum_name, u.moves,
u.uhave_amulet, and u.depth.
2021-05-21 21:24:59 +03:00
nhmall
49c008fcee Windows nmake build - recognize VS 16.8.5 2021-02-20 11:53:17 -05:00
nhmall
c4d9ceda9d Windows sys/winnt/Makefile.msc update 2021-02-05 19:54:15 -05:00
nhmall
30bb6525b2 add -Wdeprecated-copy if clang and clang >= 9 2021-02-05 16:28:09 -05:00
nhmall
d344e61da1 typo fix 2021-02-05 10:03:18 -05:00
nhmall
5003a0578c sync some macOS hints changes to linux hints 2021-02-05 09:51:07 -05:00
nhmall
769b8877fc separate the C compiler flags and C++ compiler flags where needed 2021-02-05 09:45:03 -05:00
nhmall
f8785792bd potential fix for the macOS issue encountered
Some build flags were unintentionally overlooked in a previous change
2021-02-05 09:38:35 -05:00
nhmall
d714eca924 roll back a Makefile.src change due to macOS issue afterwards
Requires further investigation
2021-02-05 07:43:51 -05:00
nhmall
b14c47132f more cross-compile warning bits
maximize warnings for NetHack sources
minimize warnings for Lua and pdcurses which we won't be changing
2021-02-04 19:42:07 -05:00
nhmall
c87b556f42 more msdos cross-compile pdcurses warning suppression 2021-02-04 18:53:18 -05:00
nhmall
fd970e58a2 warnings in cross-compile of pdcurses are not desired 2021-02-04 18:41:07 -05:00
nhmall
4380b4e3e4 progress detail in the CI log file is too verbose 2021-02-04 18:04:11 -05:00
nhmall
91558e5ce9 another duplicate entry in Xcode project file 2021-02-03 22:04:15 -05:00
nhmall
b00677223d remove a duplicate entry in Xcode project file 2021-02-03 22:03:04 -05:00
nhmall
2cfd5784f2 add missing lua files to Xcode build 2021-02-03 21:52:42 -05:00
PatR
bb87d620a9 Couple of Xcode setup documenation bits 2021-02-03 17:10:49 -08:00
nhmall
5e93fd06c0 ensure build with old linux-qt5 hints 2021-02-03 13:46:13 -05:00
nhmall
8b21a170fb clear a number of Qt build warnings on linux related to compiler flags
option ‘-Wimplicit’ is valid for C/ObjC but not for C++
option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
option ‘-Wmissing-parameter-type’ is valid for C/ObjC but not for C++
option ‘-Wold-style-definition’ is valid for C/ObjC but not for C++
option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
2021-02-03 13:18:43 -05:00
nhmall
7b454f8ba3 Windows format string bits 2021-02-02 21:55:34 -05:00
nhmall
9684b75f54 whitelist some macOS clang format-nonliteral warnings 2021-02-02 19:50:07 -05:00
nhmall
5b1d668c44 enable -Wformat-nonliteral for linux and equivalent for windows compilers
Whitelist all the verified existing triggers:
makedefs.c: In function ‘name_file’
attrib.c: one compiler balks at a ? b : c for fmtstring
cmd.c: In function ‘extcmd_via_menu’
cmd.c: In function ‘wiz_levltyp_legend’
do.c: In function ‘goto_level’
do_name.c: In function ‘coord_desc’
dungeon.c: In function ‘overview_stats’
eat.c:  one compiler balks at a ? b : c for fmtstring
end.c:  one compiler balks at a ? b : c for fmtstring
engrave.c: In function ‘engr_stats’
hack:c one compiler balks at a ? b : c for fmtstring
hacklib.c: one compiler balks at a ? b : c for fmtstring
insight.c: one compiler balks at a ? b : c for fmtstring
invent.c: In function ‘let_to_name’
light.c: In function ‘light_stats’
mhitm.c: In function ‘missmm’
options.c: In function ‘handler_symset’
options.c: In function ‘basic_menu_colors’
options.c: In function ‘optfn_o_autopickup_exceptions’
options.c: In function ‘optfn_o_menu_colors’
options.c: In function ‘optfn_o_message_types’
options.c: In function ‘optfn_o_status_cond’
options.c: In function ‘optfn_o_status_hilites’
options.c: In function ‘doset’
options.c: In function ‘doset_add_menu’
options.c: In function ‘show_menu_controls’
options.c: In function ‘handle_add_list_remove’
pager.c: In function ‘do_supplemental_info’
pager.c: In function ‘dohelp’
region.c: In function ‘region_stats’
rumors.c: sscanf usage
sounds.c: In function ‘domonnoise’
spell.c: In function ‘dospellmenu’
timeout.c: In function ‘timer_stats’
topten.c: In function ‘outentry’, fscanf, sscanf, fprintf usage
windows.c: In function ‘genl_status_update’
zap.c: one compiler balks at a ? b : c for fmtstring
win/curses/cursstat.c: In function ‘curses_status_update’
win/tty/wintty.c: In function ‘tty_status_update’
win/win32/mswproc.c: In function ‘mswin_status_update’
2021-02-02 19:03:12 -05:00
nhmall
32c417d788 Windows nmake build warnings during compiles of Lua sources 2021-02-01 13:03:32 -05:00
nhmall
a6631e3bb0 suppress a particular warning for an individual function; useful for non-gcc
Microsoft and other non-GNU compilers don't recognize gcc tricks
like  /*NOTREACHED*/ to suppress individual warnings. clang recognizes most
of them because it tries to be gcc-compatible. Because of that, a lot of
potentially useful warnings have had to be completely suppressed in the
past in all source files when using the non-gcc compatible compilers.

Now that the code is C99, take advantage of a way to suppress warnings for
individual functions, a big step up from suppressing the warnings
altogether.

Unfortunately, it does require a bit of ugliness caused by the
insertion of some macros in a few spots, but I'm not aware of
a cleaner alternative that still allows warnings to be enabled
in general, while suppressing a warning for known white-listed
instances.

Prior to the warning-tiggering function, place whichever one of
the following is needed to suppress the warning being encountered:

DISABLE_WARNING_UNREACHABLE_CODE
DISABLE_WARNING_CONDEXPR_IS_CONSTANT

After the warning-triggering function, place this:

RESTORE_WARNINGS

Under the hood, the compiler-appropriate warning-disabling
mechanics involve the use of C99 _Pragma, which can be used
in macros.

For unrecognized or inappropriate compilers, or if
DISABLE_WARNING_PRAGMAS is defined, the macros expand
to nothing.
2021-02-01 12:54:19 -05:00
nhmall
113ee039e7 outdated files in Xcode project 2021-01-31 21:18:48 -05:00
nhmall
5c3582d27a Xcode project fix when NetHack source directory path contains spaces
Underlying shell scripts configued in the Xcode project were not
coded to accommodate spaces in the path
2021-01-31 20:07:50 -05:00
PatR
0b1f5ea45e outdated vs Unix 'make depend'
After the most recent round of moving old stuff to 'outdated',
src/windows.c contained two references to non-existent files.
That broke 'make depend'.  Updating it to turn those two into
comments seems risky because someone might add an include for
some new interface later in the file.  So comment them out in
the source instead.  Also, redo previous 'make depend' update
from about three weeks ago to do the same thing.
2021-01-31 13:05:32 -08:00
nhmall
322293993f follow-up to remove some remnant wingem.h references
this should correct the broken mingw tty build
2021-01-31 13:44:15 -05:00
nhmall
b851b28cbe FDECL and NDECL in sys/vms 2021-01-31 12:49:22 -05:00
nhmall
4a6eb00c84 relocate some gem and Gnome files to outdated folder tree 2021-01-31 08:51:35 -05:00
nhmall
e2a3368837 remove Amiga cross-compile bits 2021-01-31 07:57:28 -05:00
nhmall
0714ddcef8 update msdos djgpp cross-compiler gcc version 2021-01-28 08:02:45 -05:00
nhmall
0b518d0cee Windows Makefile.msc update 2021-01-27 23:07:52 -05:00
nhmall
f963c5aca7 switch source tree from k&r to c99 2021-01-26 21:06:16 -05:00
nhmall
18a4a41b15 compiler settings alignment between macOS.2020 and linux.2020
get the warning flags on linux and macOS into better alignment

move the compiler flags into hints/include/compiler.2020 so that
maintenance changes can be made there and take effect for both
linux and macOS

this will likely trigger some initial new code warnings to be
investigated on either or both platforms
2021-01-22 16:05:30 -05:00