Commit Graph
100 Commits
Author SHA1 Message Date
nhmall 86c444d1ac updates from cron job 2022-02-21 10:16:44 -05:00
nhmall f845df9eeb build tested with visual studio 2022 17.1.0 2022-02-16 15:57:03 -05:00
nhmall a7009e2a54 obsolete nhlan.c follow-up
- visual studio project files
- .gitattributes
2022-02-15 15:22:34 -05:00
nhmall a68cf63a05 another obsolete function reference 2022-02-15 08:16:21 -05:00
nhmall c0a4b38bf6 remove obsolete function and references 2022-02-15 08:13:27 -05:00
nhmall 6005717e6d cut error 2022-02-13 09:10:53 -05:00
nhmall 99ffd027ae remove NHAccess symset, github issue #638
Closes #638
2022-02-13 09:07:41 -05:00
nhmall 5faace8b9e remove unnecessary null checks from christen_monst
Closes #681
2022-02-11 09:08:31 -05:00
nhmall 246abbbf5c update tested versions of visual studio 2022-02-10 18:58:06 -05:00
nhmall 9b1a501c34 error on parse_condition pr #680
The  while(s[sidx]) { ... was acting as while(1), but the
loop body contained appropriate checks and returns to
function correctly.

Fixes #680
2022-02-10 18:18:25 -05:00
nhmall 08da5befcb comment out some now dead code
Closes #670
2022-02-10 09:16:29 -05:00
nhmall 675fc39a06 add comment with some tile palette info 2022-02-09 23:16:48 -05:00
nhmall c845a765a5 pr #675 and pr #676 2022-02-09 16:16:36 -05:00
nhmall 478daa0002 Merge branch 'argrath' into NetHack-3.7 2022-02-09 16:09:37 -05:00
nhmall a1b14b6b5c Merge branch 'fix-eat' of https://github.com/argrath/NetHack into argrath 2022-02-09 15:46:31 -05:00
nhmall d0eceb9508 Merge branch 'fix-save' of https://github.com/argrath/NetHack into argrath 2022-02-09 15:45:01 -05:00
nhmall d94ebf7396 tab to spaces follow-up
Also, the commit for 0e9ecb88fb
was missing the issue close directive, so do it here.

Closes #674
2022-02-09 05:52:55 -05:00
nhmall 0e9ecb88fb don't dereference NULL u.ustuck in dobuzz() 2022-02-09 05:47:08 -05:00
nhmall 2c7fa4a704 trap magic number follow-up 2022-02-08 19:29:27 -05:00
nhmall 947d80ec6f replace some trap function result magic numbers 2022-02-08 19:16:42 -05:00
nhmall fe03b10208 fix mintrap() return value and resurrect dead code
fixes #672
2022-02-08 17:31:34 -05:00
nhmall f1ef83b4db fixes3-7-0.txt updates for pr #669 and pr #671 2022-02-08 16:20:58 -05:00
nhmall ca17edb99f Merge branch 'pr671' into NetHack-3.7 2022-02-08 16:10:49 -05:00
nhmall 78dc1302eb Merge branch 'fix-shk' of https://github.com/argrath/NetHack into pr671 2022-02-08 16:09:52 -05:00
nhmall adede74dc2 Merge branch 'pr669' into NetHack-3.7 2022-02-08 08:21:34 -05:00
nhmall c2cb89cae9 vms bits to c99 2022-02-07 15:15:14 -05:00
nhmall 5ac860bdc7 there was some left-over k&r code in win/chain 2022-02-07 14:58:16 -05:00
nhmall 96c71660c6 fix two reported warnings with SERVER_ADMIN_MSG defined
Report stated a -Wformat-nonliteral at line 612,
and a -Wformat-security at line 614

I was only seeing the latter, so I added the former to the
flags in sys/unix/hints/include/compiler.370. Some compiler
versions have that warning on by default internally and others
don't. If the format string isn't a string literal, there's no
inteference with printf argument checking because that only
operates on string literals.
2022-02-07 09:16:31 -05:00
nhmall ac1a7ae378 updates from cron job 2022-02-06 15:14:38 -05:00
nhmall 19ff846645 prevent Windows back_buffer_flip() early on 2022-02-06 10:47:41 -05:00
nhmall 88e447475e follow up for code-reordering in flush_screen() 2022-02-06 09:57:26 -05:00
nhmall 787d184570 some Makefile.mingw32 tweaking 2022-02-06 01:02:27 -05:00
nhmall 3d111a6825 change order of exe dependency in Makefile.mingw32 2022-02-05 21:51:50 -05:00
nhmall 8aa29f8a08 adjust Makefile.mingw32 for 3.7 date and time stamping
NetHack 3.7 stores timestamp information, as well as github
commit hashs information if available, internally by compiling
date.c. It is important to ensure that date.c is always
recompiled after any other NetHack source files are compiled.
2022-02-05 21:34:55 -05:00
nhmall 05f3e6efd3 update the dependencies in sys/windows/Makefile.msc
As usual for the visual studio nmake Makefile.msc, steal the generated
dependencies from the tail of sys/unix/Makefile.src, and adjust the text
to suit the Windows build.
2022-02-05 20:12:10 -05:00
nhmall 99cdb8bfb5 a slight code-reordering in flush_screen()
despite flush_screen() being called with a True argument signifying that
the cursor was to be left on the hero, sometimes the cursor wasn't. That
was confirmed through some debug tracing and discussion. The subsequent
bot() and timebot() calls could leave the cursor in the status area (on
tty at least), and that was particularly observable during some runmodes.

Get the bot() and timebot() calls out of the way ahead of the cursor
placement call to the window port.
2022-02-05 14:12:18 -05:00
nhmall ea2e61aba0 Merge branch 'pr668' into NetHack-3.7 2022-02-05 09:33:01 -05:00
nhmall 211b908681 Merge branch 'remove-redundant' of https://github.com/argrath/NetHack into pr668 2022-02-05 08:57:16 -05:00
nhmall 2e3e53883f remove a workaround in Makefile.mingw32 2022-02-04 23:07:22 -05:00
nhmall e795dd107e fix Makefile.mingw32 2022-02-04 20:26:05 -05:00
nhmall 0fba9cf896 .gitattributes for Xcode directory 2022-02-04 19:01:11 -05:00
nhmall 2f83190f8a macOS.370 Lua 2022-02-04 18:55:12 -05:00
nhmall ee1eff538c Lua link on Jammy Jellyfish 2022-02-04 18:03:08 -05:00
nhmall 6af710bc97 provide a Makefile target to clean the Lua submodule 2022-02-04 17:11:09 -05:00
nhmall a25259a97a more obsolete file references 2022-02-04 15:52:42 -05:00
nhmall a71d5e3cb3 remove some obsolete file references 2022-02-04 15:43:21 -05:00
nhmall 990d672dce inadvertent space typo 2022-02-04 15:23:23 -05:00
nhmall 6057c9813d CI update for mingw
Add GIT=1 to the make-mingw32 command
2022-02-04 15:07:32 -05:00
nhmall b8489de8eb support use of git submodules with the Makefiles
git=1 when invoking make will use the submodule submodules/lua.

On windows, it will also use the submodule submodules/pdcurses.
2022-02-04 14:48:29 -05:00
nhmall 8499c71fcc update a couple of lagging 3.6 references 2022-02-04 12:47:05 -05:00
nhmall 3db819478f update OS terminology used in some text references 2022-02-04 11:26:14 -05:00
nhmall 5d4fc4591d more .gitattributes updates 2022-02-04 11:01:20 -05:00
nhmall ccf9bb5fe2 updated Files 2022-02-04 10:43:43 -05:00
nhmall 471df587ab take 2 on src/.gitattributes 2022-02-04 09:41:30 -05:00
nhmall c9e9b7a02a Revert "revert today's src/.gitattributes changes"
This reverts commit 5204eef9c0.
2022-02-04 09:40:31 -05:00
nhmall ec350281c6 Revert "This is cron-daily v1-Jan-26-2022. 000files updated: Files"
This reverts commit 6d513efc1e.
2022-02-04 09:39:23 -05:00
nhmall 5204eef9c0 revert today's src/.gitattributes changes
For now. They appear to have broken some automation.
2022-02-03 12:31:21 -05:00
nhmall 01e820fa37 yet even more src/.gitattributes (final?) 2022-02-03 11:26:49 -05:00
nhmall 4dbc3566cf even more src/.gitattributes 2022-02-03 11:24:07 -05:00
nhmall 4f55c938d3 more src/.gitattributes 2022-02-03 11:22:29 -05:00
nhmall d66e375f70 update src/.gitattributes for cron-job purposes 2022-02-03 11:19:54 -05:00
nhmall bc752a8f9d remove some duplicated code in monst.c 2022-02-02 21:26:01 -05:00
nhmall c26bae521b static keyword on prototype, but function missing it
error 28 in line 4090 of "invent.c": redeclaration of var <adjust_ok> with new storage-class
error 28 in line 4100 of "invent.c": redeclaration of var <adjust_gold_ok> with new storage-class
error 28 in line 610 of "mdlib.c": redeclaration of var <count_and_validate_winopts> with new storage-class
error 28 in line 3846 of "options.c": redeclaration of var <pfxfn_cond_> with new storage-class
error 28 in line 3886 of "options.c": redeclaration of var <pfxfn_font> with new storage-class
error 28 in line 5307 of "options.c": redeclaration of var <determine_ambiguities> with new storage-class
error 28 in line 5343 of "options.c": redeclaration of var <length_without_val> with new storage-class
error 28 in line 6853 of "options.c": redeclaration of var <illegal_menu_cmd_key> with new storage-class
error 28 in line 7708 of "options.c": redeclaration of var <count_apes> with new storage-class
error 28 in line 2686 of "pickup.c": redeclaration of var <stash_ok> with new storage-class
error 28 in line 1008 of "read.c": redeclaration of var <can_center_cloud> with new storage-class
error 28 in line 31 of "rnd.c": redeclaration of var <whichrng> with new storage-class
2022-02-02 15:33:49 -05:00
nhmall 8ce4874152 remove unintentional repeat code in outdated file 2022-02-02 10:25:40 -05:00
nhmall ba6688b40e follow-up to tilemap.c change 2022-02-01 17:18:44 -05:00
nhmall 3a4302773d two minor core changes for hypothetical Amiga cross port
The tilemap change provides three variables that used to be
uppercase compile macros in the past, and Amiga (and other ports?) used
them.

The other change just uncomments the header file include.
2022-02-01 17:11:35 -05:00
nhmall 83dcb5772b Merge branch 'amiga' into NetHack-3.7 2022-02-01 17:01:40 -05:00
nhmall bb01c6378a last known Amiga cross-compile -> outdated
Place the last known Amiga cross-compile effort into the outdated folder
tree.

This shell script was meant to be run from the top of the NetHack tree:
    outdated/sys/unix/cross-amiga.sh
It attempts two things:
1. obtain the source-code for the Amiga cross compiler and build it
   from scratch. Warning: it pulls a number of the required packages
   from the internet and installs them. (Linux was tested, but the macOS
   usage never was).
2. move the outdated hints file and hints include files for Amiga
   into the live tree for someone attempting to resurrect an Amiga port.
   It doesn't tinker with any of the files needed for the NetHack-3.7
   work-in-progess for other platforms.

Once the shell script completes those things, the cross-compile build
steps would be:
  i) cd sys/unix ; sh setup.sh hints/cross-amiga ; cd ../..
 ii) make CROSS_TO_AMIGA=1 all
iii) make CROSS_TO_AMIGA=1 package
2022-02-01 16:43:39 -05:00
nhmall c75e5d99d2 syntax in prototype 2022-02-01 13:03:41 -05:00
nhmall ae11c6e25d some warnings with clang version 13.0.0-9
---------------------
win/curses/cursstat.c:

../win/curses/cursstat.c:301:9: warning: variable 'height' set but not used [-Wunused-but-set-variable]
        height, width, w, xtra, clen, x, y, t, ex, ey,
        ^
1 warning generated.

---------------------
win/Qt/qt_menu.cpp:

../win/Qt/qt_menu.cpp:1123:9: warning: variable 'h' set but not used [-Wunused-but-set-variable]
    int h=0;
        ^
1 warning generated.

---------------------
/win/Qt/qt_yndlg.cpp:

../win/Qt/qt_yndlg.cpp:170:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
        int x=margin, y=extra+margin;
            ^
../win/Qt/qt_yndlg.cpp:170:16: warning: variable 'y' set but not used [-Wunused-but-set-variable]
        int x=margin, y=extra+margin;
                      ^
2 warnings generated.

Commenting out the x and y references, then leads to the following additional warnings,
so comment those out too:

../win/Qt/qt_yndlg.cpp:167:12: warning: unused variable 'margin' [-Wunused-variable]
        const int margin=8;
                  ^
../win/Qt/qt_yndlg.cpp:168:12: warning: unused variable 'gutter' [-Wunused-variable]
        const int gutter=8;
                  ^
../win/Qt/qt_yndlg.cpp:169:12: warning: unused variable 'extra' [-Wunused-variable]
        const int extra=fontMetrics().height(); // Extra for group
                  ^
3 warnings generated.

---------------------
2022-01-31 15:11:05 -05:00
nhmall e86b926e54 more CI mingw tinkering
The default tar in the path withing the CI environment is not
the bsdtar variation of tar that comes with Windows (the one
which will extract zip files as well as tar files).

Try using powershell instead for the extraction instead.
2022-01-30 14:27:44 -05:00
nhmall 87d58c1c83 more ming32 build in CI 2022-01-30 08:58:49 -05:00
nhmall 1caf9821d2 fake mail follow-up tidbit 2022-01-29 23:33:58 -05:00
nhmall 087f3993f7 yet more fixes*.* rename 2022-01-29 22:57:22 -05:00
nhmall 0150692a94 rework the fake mail readmail() routine
Remove the dynamic memory allocation.
2022-01-29 22:32:40 -05:00
nhmall b1b2c67d09 ensure MSYSTEM matches mingw tools used in CI 2022-01-29 20:41:49 -05:00
nhmall 988e241021 back out one of the pr624 changes
This one caused a build failure on a cross-compile.
2022-01-29 20:32:30 -05:00
nhmall bfb2a29f7a update .gitattributes for two windows folders 2022-01-29 18:16:07 -05:00
nhmall fd792509da build doc updates and windows Makefile updates 2022-01-29 17:29:51 -05:00
nhmall 8c7137613b move a file that is no longer used to outdated 2022-01-29 15:00:50 -05:00
nhmall 893d11f7d5 mingw symbols follow-up 2022-01-29 14:06:52 -05:00
nhmall 721db76189 do away with symbols.template in windows
If the one provided in the zip/distribution is newer, replace
the one used by the game after renaming the current one to
symbols.save.

If the one used by the game is newer, do nothing with it.
2022-01-29 14:04:20 -05:00
nhmall 9b38353833 update for mingw build within CI 2022-01-29 13:58:38 -05:00
nhmall 4db0afe785 fix a comment typo 2022-01-29 09:36:09 -05:00
nhmall c03f24ceb7 try to work around a mingw shortcoming within CI
The mingw-w64 version on the CI platform is older and
is missing a sought copy of winres.h.

This attempts to work around that by having the Makefile
create a temporary copy of winres.h in the win/win32 directory
which that windres.exe is already search in. The file is
then immediately removed after windres uses it.

The contents of the temporary winres.h match the contents
of that file that is distributed with the more up-to-date msys2
distribution of mingw-w64.

It won't be known if this workaround solves all the CI issues
with the mingw build until after it is committed and observed.
2022-01-29 09:20:29 -05:00
nhmall c2024b8990 remove some outdated references to travis 2022-01-29 08:34:58 -05:00
nhmall b9228bd284 Jan 28 cron daily updates 2022-01-28 10:57:08 -05:00
nhmall fdaf6ab328 comment bit 2022-01-28 09:31:30 -05:00
nhmall 1b7ffcc87b Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-01-28 07:50:46 -05:00
nhmall f5fd7e1557 CI mingw build should now invoke compile via gcc 2022-01-28 07:49:41 -05:00
nhmall a6a7af368f mingw rc and lua version 2022-01-28 00:08:02 -05:00
nhmall 5d4fa475fa CI mingw build follow-up 2022-01-27 23:00:49 -05:00
nhmall 0431bcf3ac update CI build for mingw 2022-01-27 22:54:03 -05:00
nhmall b50d78231c fixes37.0 entry for pr#661
Makefile.mingw32 and Makefile.mingw32.depend are intended to replace
Makefile.gcc.
To use them:

cd /d/prj/NetHack/src
cp ../sys/windows/Makefile.mingw32* .
mingw32-make -f Makefile.mingw32 clean
mingw32-make -f Makefile.mingw32 depend
mingw32-make -f Makefile.mingw32
Improvements:

Add $(USE_LUADLL) to release lua-5.4.3.dll, instead of link static
lua.lib into .exe files.
Add windres "--target" option, to fix the NetHackW.exe startup problem.
Add "-s" option to $(LDFLAGS) in release mode, to make exe/dll smaller.
Add $(CLEAN_DIR) and $(CLEAN_FILE) to track what to clean.
Remove *.tag, but use "order-only prerequisites" to make directory
before any '.o' is built.
Use make variables and functions to improve readability.
Each project has its own directory to hold object files, to fix the
interference problem between different projects, like NetHack.exe object
files were built with "-DTILES".
Add "-mconsole" option when linking NetHack.exe, to fix that sometimes
GetStdHandle returned with invalid handle error.
Add ".PHONY" statements.
Use "gcc -E -MM -MT" to implement semi-auto "Prerequisites Generating".
2022-01-27 18:40:53 -05:00
nhmall 8a26e01397 remove sys/windows/Makefile.gcc
It has been superseded by sys/windows/Makefile.mingw32
2022-01-27 18:34:23 -05:00
nhmall 5f0b52cf83 utilize the submodules for Windows build 2022-01-27 18:30:43 -05:00
nhmall 13ee03be1f support for build with current Lua version 5.4.4
On some platforms this may require:
       re-using a sys/unix/hints file to generate updated Makefiles
       make spotless
       make fetch-lua
2022-01-27 18:23:17 -05:00
nhmall 5928f8f70a windows date updates
Also remove reference to sys/windows/Makefile.gcc
2022-01-27 16:59:00 -05:00
nhmall f4331a2d03 adjust build procedures for added file
Builds for:
   sys/msdos/Makefile.GCC - for local build on msdos itself (untested)
   sys/unix/NetHack.xcodeproj/project.pbxproj   - for Xcode build
   sys/windows/Makefile.gcc - for Windows build via Ming-w64 (untested)
   sys/windows/Makefile.msc - for visual studio nmake build
   sys/windows/vs/files.props for visual studio solution/project build
2022-01-20 10:37:53 -05:00
nhmall 30af8e0ddc more if (c) XtSetArg(...); num_args++; braces 2022-01-19 11:01:52 -05:00