Commit Graph
100 Commits
Author SHA1 Message Date
nhmall adbee93dea cron job updates 2022-04-16 11:08:34 -04:00
nhmall 5762631f96 resolve build error on windows with vs2022
win/tty/getline.c(305) :
warning C4701: potentially uninitialized local variable 'ecmatches' used
win/tty/getline.c(305) :
error C4703: potentially uninitialized local pointer variable
'ecmatches' used
2022-04-16 08:32:13 -04:00
nhmall d20b2772eb visual studio comment follow-up 2022-04-12 14:49:34 -04:00
nhmall 1daa2806f9 build tested with updated Visual Studio versions
VS 2017 (Apr 12, 2022 version 15.9.46)
VS 2019 (Apr 12, 2022 version 16.11.12)
VS 2022 (Apr 12, 2022 version 17.1.4)
2022-04-12 14:43:28 -04:00
nhmall 4d1caf8e3a Windows keyhandling 2022-04-11 15:24:55 -04:00
nhmall b9abd2a185 fix a Windows initializer 2022-04-10 17:18:48 -04:00
nhmall 6670c31f90 try CI build with mingw-w64 release 5 2022-04-09 13:52:41 -04:00
nhmall 303e34e5c6 clear a warning: variable set but not used
makedefs.c:2125:12: warning: variable 'sum' set but not used
[-Wunused-but-set-variable]
    int i, sum = 0;
           ^
    1 warning generated.
2022-04-04 10:35:43 -04:00
nhmall e74f3c607a Windows build test with Visual Studio 2022 17.1.3 2022-04-02 13:45:04 -04:00
nhmall d7630ebff8 make zip file contents pathless for msdos pkg 2022-04-01 16:11:30 -04:00
nhmall af24a46e32 Merge branch 'fix-trap' of https://github.com/argrath/NetHack into pr712 2022-03-25 08:21:49 -04:00
nhmall 2c21a75cb2 Merge branch 'pr713' into NetHack-3.7 2022-03-25 08:18:01 -04:00
nhmall 5478baa6ee giant ant tiles or right side of msdos display 2022-03-23 22:01:01 -04:00
nhmall a61586153f Windows nmake build - separate x86 and x64 objs 2022-03-13 21:17:08 -04:00
nhmall 439087ec6d remove a commented out test line from Makefile.utl 2022-03-13 11:37:00 -04:00
nhmall c7b63d5ef9 follow-up: missed one include/tile.h 2022-03-13 11:24:19 -04:00
nhmall a7e83696bd update include/.gitinfo 2022-03-13 11:17:58 -04:00
nhmall 2234cc256d some parallel Make glitches noticed
observed: parallel build attempts of makedefs that trampled over
one another.

attempted workaround: Add a dependency as per Pat R's suggestion.

observed: Concurrent header file movement collisions were sometimes
causing file busy errors and build failures.

workaround: Eliminate tile.h header file movement from the
Makefile build so that the collisions won't occur with that
particular file. Leave the header file tile.h in win/share as it
is in the distribution and just adjust the include path in the
rule for the specific files that use it.

observed: tiletxt.c created on-the-fly from Makefile echo statements
sometimes resulted in garbled and duplicate content in it when
parallel makes were involved, and that caused a build failure.

workaround: Instead of creating a tiletxt.c on-the-fly via echo
statements in the Makefile, simplify things and use that
same #include "tilemap.c" approach but make it an actual file
in the distribution. That makes it available for other platforms
too.
2022-03-13 11:06:45 -04:00
nhmall 2bb26da9fa Windows visual studio project updates
hide a couple of warnings in non-nethack code
get rid of an obsolete file reference
2022-03-13 10:20:41 -04:00
nhmall 9e6bddac10 warning fix artifact.c
artifact.c: In function 'dump_artifact_info':
artifact.c:1088:37: warning: '%s' directive writing up to 255 bytes into a region of size 218 [-Wformat-overflow=]
 1088 |             Sprintf(buf, "  %-36.36s%s", artiname(m), buf2);
      |                                     ^~                ~~~~
In file included from ../include/config.h:652,
                 from ../include/hack.h:10,
                 from artifact.c:6:
../include/global.h:255:24: note: 'sprintf' output between 39 and 294 bytes into a destination of size 256
  255 | #define Sprintf (void) sprintf
artifact.c:1088:13: note: in expansion of macro 'Sprintf'
 1088 |             Sprintf(buf, "  %-36.36s%s", artiname(m), buf2);
      |             ^~~~~~~
2022-03-12 21:49:32 -05:00
nhmall 3fc39f273a missed band for windows Makefile.msc 2022-03-11 07:51:12 -05:00
nhmall a16f17a029 header file ordering change
This is groundwork for some other changes.

Include integer.h ahead of global.h in config.h.
2022-03-11 07:33:28 -05:00
nhmall 274984480c warning fix artifact.c
src/artifact.c(65): warning C4132: 'zero_artiexist': const object
should be initialized
2022-03-10 09:15:04 -05:00
nhmall 8551594ef8 Merge branch 'pr693' into NetHack-3.7 2022-03-10 09:10:05 -05:00
nhmall 3780bb7030 Merge branch 'fix-splev' of https://github.com/argrath/NetHack into pr693 2022-03-10 09:09:33 -05:00
nhmall fa4ad397dc some sys/windows build updates
Place built libraries for Lua and pdcurses into lib instead of the
more transient src/o subfolder.

Remove a kludge involving sys/windows/stub-pdcscrn.c.

Don't link pdcurses into NetHackW.exe (required a couple of stubs
since NetHack.exe and NetHackW.exe currently share object files
under the visual studio nmake build.

(Note: This may require a couple of follow-on minor modifications
to the mingw build. If so, the CI will flag that for us after this
commit)
2022-03-09 12:02:37 -05:00
nhmall cceef37c8b Windows nmake build fix 2022-03-07 07:35:35 -05:00
nhmall 108dc2d262 updates from cron job 2022-02-22 20:14:44 -05:00
nhmall 407e515d7a whitelist a new warning in cmd.c
src/cmd.c(1253): warning: conditional expression is constant
2022-02-22 15:10:33 -05:00
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