Commit Graph
100 Commits
Author SHA1 Message Date
nhmall d008d6c995 use .Substring to limit maintenance to major Lua version releases only 2020-12-11 22:35:37 -05:00
nhmall 6dc033e5d8 don't miss the special furniture checks during liquid flow
Closes #405
2020-12-11 16:28:59 -05:00
nhmall abca3d26db another Lua version bit, this one a recent addition 2020-12-11 15:34:43 -05:00
nhmall cb84c555d7 more Lua 5.4.2 bits 2020-12-11 09:25:01 -05:00
nhmall affb60dd97 support for build with current Lua version 5.4.2
This may require
    	make spotless
    	make fetch-lua
for some platforms.
2020-12-11 09:20:26 -05:00
nhmall 0d1a894661 move .travis.yml to outdated for now 2020-12-11 09:11:09 -05:00
nhmall 69455f404e Guidebook date bump 2020-12-11 08:46:39 -05:00
nhmall 99980376b2 minor corrections to Cross-compiling doc 2020-12-07 08:00:30 -05:00
nhmall efbd92b906 a couple of space-indents to tabs-indents in sys/winnt/Makefile.msc 2020-12-04 08:25:52 -05:00
nhmall 5b3632249f add a couple of optional fetching targets to sys/winnt/Makefile.msc 2020-12-04 08:21:53 -05:00
nhmall f543763695 stairway save/restore bit
The logic surrounding stairway saves and restores should not be within
a block reserved for deliminating external file structure.
2020-12-03 10:05:31 -05:00
nhmall a03cce0505 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-12-02 22:02:30 -05:00
nhmall cfc4612338 correct coding typo: nx instead of ny
Prevented proper migration of obj dropped down the stairs.

Also, don't include your attached chain when counting drop impacts.
2020-12-02 21:59:26 -05:00
nhmall 2c19db61aa daily cron update doc/Guidebook.txt 2020-11-30 20:22:18 -05:00
nhmall 0d6481ad8c spelling correction tidbit
Closes #415
2020-11-28 08:59:03 -05:00
nhmall 7c91c76265 remove a comma at the end of an enumerator list 2020-11-26 15:48:56 -05:00
nhmall cb5bda40e2 update an old msdos file 2020-11-25 07:53:24 -05:00
nhmall d5d75a9e38 move an outdated file: sys/unix/README.linux 2020-11-25 07:27:25 -05:00
nhmall 9ea45d7a1f remove some trailing whitespace 2020-11-25 07:23:23 -05:00
nhmall c2e20ff263 Makefile autodetects Visual Studio 16.8.2 2020-11-22 12:49:55 -05:00
nhmall 9aeb4db3b2 wasm-bug-fixes-2 github PR #412 2020-11-18 08:21:07 -05:00
nhmall 75c66d2881 Merge branch 'wasm-bug-fixes-2' of https://github.com/apowers313/NetHack into wasm-bug-fixes-2 2020-11-18 08:18:16 -05:00
nhmall 03d1eed0b5 daily cron doc/Guidebook.txt update 2020-11-17 09:14:47 -05:00
nhmall f965d187b8 support for build with current Lua version 5.4.1
This may require
	make spotless
	make fetch-lua
for some platforms.
2020-11-15 11:08:10 -05:00
nhmall b37116b0f9 merge pr #403 wasm fixes
Closes #403
2020-10-31 09:30:38 -04:00
nhmall 32e67c0e46 Merge branch 'wasm-pr403' into NetHack-3.7 2020-10-31 09:29:46 -04:00
nhmall 6c62b991c2 Merge branch 'wasm-bug-fixes' of https://github.com/apowers313/NetHack into wasm-pr403 2020-10-31 09:22:55 -04:00
nhmall 96ba25241c revert to numeric 2020-10-30 09:14:23 -04:00
nhmall 01c4a50f98 warning and a bit of alignment-related header consolidation 2020-10-30 09:08:23 -04:00
nhmall d1c7f26d4b clear a couple of new warnings
mondata.c:198:17: warning: unused variable 's' [-Wunused-variable]
    const char *s;
                ^
1 warning generated.

steed.c:43:17: warning: unused variable 's' [-Wunused-variable]
    const char *s;
                ^
1 warning generated.
2020-10-20 19:37:51 -04:00
nhmall 4c933fbf3c recognize visual studio 2019 16.7.6 in sys/winnt/Makefile.msc 2020-10-15 09:38:52 -04:00
nhmall 060bfe6f5d Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-10-11 14:30:30 -04:00
nhmall e4473de586 cron daily Files update 2020-10-11 14:29:16 -04:00
nhmall d9395dcd23 more integration suggestion adoption 2020-10-11 13:42:12 -04:00
nhmall 6806c30a59 adopt some integration suggestions
sys/lib -> sys/libnh
sys/lib/libnethackmain.c -> sys/libnh/libnhmain.c
libnethack.a -> libnh.a
2020-10-11 13:33:51 -04:00
nhmall 0adb64e384 get this working: "make wasm" 2020-10-11 10:51:46 -04:00
nhmall d4e97cc650 libnethackmain.c includes date.h 2020-10-11 09:43:15 -04:00
nhmall eaa8b99eea follow-up bit
remove an unnecessary dependency for top Makefile wasm
2020-10-11 09:16:23 -04:00
nhmall efdf4f8979 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-10-11 09:12:02 -04:00
nhmall 75f852f277 cross-compiles need not build host native lua library
Because some Makefile.top dependencies triggered the build
of the host native lua library, the cross-compiles were
building it needlessly.

Make it a make variable so that it can be overridden by
cross-compile recipes in sys/unix/hints/include/cross-*.2020
2020-10-11 09:08:27 -04:00
nhmall d6719ea0db cron daily Files update 2020-10-10 19:36:36 -04:00
nhmall 9599fa27df update win/win32/vs/.gitattributes text 2020-10-10 18:38:25 -04:00
nhmall 3e66cbd781 more warnings 2020-10-10 16:41:09 -04:00
nhmall 48fa4fa5dd more warning bits 2020-10-10 16:28:17 -04:00
nhmall 55d1d547a6 silence some util/makdefs.c src/mdlib warnings
In file included from makedefs.c:213:0:
../src/mdlib.c: In function ‘runtime_info_init’:
../src/mdlib.c:808:12: warning: variable ‘timeresult’ set but not used [-Wunused-but-set-variable]
     time_t timeresult;
            ^~~~~~~~~~
makedefs.c: In function ‘do_date’:
makedefs.c:1140:16: warning: unused variable ‘ind’ [-Wunused-variable]
     const char ind[] = "    ";
                ^~~
makedefs.c:1139:9: warning: unused variable ‘steps’ [-Wunused-variable]
     int steps = 0;
         ^~~~~
makedefs.c: In function ‘do_monstr’:
makedefs.c:1934:12: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
     int i, j;
            ^
2020-10-10 08:55:43 -04:00
nhmall 017448addf re-enable the MSDOS cross-compile on travis-ci 2020-10-09 09:36:55 -04:00
nhmall 3e39984877 more wasm dependency order tinkering 2020-10-09 09:18:51 -04:00
nhmall 139b138b78 follow-up bit
make variable had changed in PRE but not in POST
2020-10-09 09:05:56 -04:00
nhmall a09a41f9a3 more wasm build
This issue
https://github.com/NetHack/NetHack/issues/398
reported some issues with the wasm build. Attempt to resolve
some of those.
2020-10-09 08:54:36 -04:00
nhmall de80dd2437 cross-compile fix-up 2020-10-09 08:52:46 -04:00
nhmall 5dcc328759 be more consistent with CROSS_TO_target macro names for cross-compiles
-DCROSS_TO_MSDOS	msdos cross-compile (djgpp cross-compiler)
-DCROSS_TO_AMIGA	Amiga cross-compile
-DCROSS_TO_WASM		wasm cross-compile (emscripten)
2020-10-08 13:49:24 -04:00
nhmall 1b0a9f8e31 follow-up to previous 2020-10-07 09:23:41 -04:00
nhmall b0e71f68bc small monsters seeping through their shirt
The code is slightly different than in the PR which left out the noncorporeal case.

Closes #397
2020-10-07 09:09:51 -04:00
nhmall cb2b710b22 update Cross-compiling document for PR385 Web Assemply and libnethack
Credit: The initial Web Assembly cross compile was found in a pull request:
            https://github.com/NetHack/NetHack/pull/385
        by apowers313. The pull request was merged with some accompanying
        NetHack source tree integration changes in early October 2020.

Cross-compiler used: emscripten
Cross-compiler url: https://emscripten.org/docs/getting_started/downloads.html

    Here's a brief guide to obtaining the cross-compiler sources via git and
    building it on your system.

    For Ubuntu, the build prerequisite packages for building the compiler can
    be easily obtained:

        sudo apt-get install python3 cmake default-jre

    For macOS, you will need to install Xcode, git, cmake, Python 3.5 or new
    (at time of this writing).

    After installing the prerequite packages above, obtain the cross-compiler
    via git and build it from the directory of your choice using steps similar
    to these:

            git clone https://github.com/emscripten-core/emsdk.git
            cd emsdk
            git pull
            ./emsdk install latest
            ./emsdk activate latest
            source ./emsdk_env.sh

    The steps above reflect what was outlined at this url at the time
    of writing:

            https://emscripten.org/docs/getting_started/downloads.html

    That is the definitive source and trumps anything documented here.

    On your linux host, prepare to cross-compile NetHack as follows:

        cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
        make fetch-lua

    On your macOS host, prepare to cross-compile NetHack as follows:

        cd sys/unix ; sh setup.sh hints/macOS.2020 ; cd ../..
        make fetch-lua

    Then, cross-compile to targets/wasm as follows:

        make CROSS_TO_WASM=1

    You can build src/nethacklib.a from pull request 385 as follows:

        make WANT_LIBNH=1

    Do not add any additional windowport interfaces to your build
    (such as WANT_WIN_TTY=1 WANT_WIN_CURSES=1 WANT_WIN_X11=1 or
    WANT_WIN_QT=1) as those aren't applicable to the Web Assembly
    or nethacklib builds. A "shim" pseudo-windowport is included
    from pull request 385.

    Result: As mentioned, the wasm cross-compile will end up in
            targets/wasm and the nethacklib.a will end up
            src.

    The cross-compiler hints additions are enclosed inside ifdef sections
    and shouldn't interfere with the non-cross-compile builds using
    hints/linux.2020 or hints/macOS.2020.
2020-10-06 11:00:33 -04:00
nhmall 724e5fba25 adding ; was inappropriate for BUILDMORE list of dependencies 2020-10-06 02:26:40 -04:00
nhmall b68f960c59 temporarily turn off the msdos cross-compile on travis 2020-10-06 02:15:25 -04:00
nhmall a8d31910ec target lua build was missing -c on cross-compile 2020-10-06 02:01:30 -04:00
nhmall dc47c46314 more wasm cross-compiling follow-up 2020-10-06 01:47:19 -04:00
nhmall 43112cec01 clear a -Wshadow warning in options.c
options.c
options.c: In function ‘match_optname’:
options.c:5734:27: warning: declaration of ‘opt_name’ shadows a global declaration [-Wshadow]
 const char *user_string, *opt_name;
                           ^~~~~~~~
In file included from options.c:52:0:
../include/optlist.h:56:1: note: shadowed declaration is here
 opt_##a,
 ^
../include/optlist.h:307:5: note: in expansion of macro ‘NHOPTC’
     NHOPTC(name, PL_NSIZ, opt_in, set_gameview, No, Yes, No, No, NoAlias,
     ^~~~~~
2020-10-05 09:24:42 -04:00
nhmall ab5c8dff05 cron daily Files update 2020-10-04 21:14:59 -04:00
nhmall ac493aa455 placement of libnethack targets required adjusting
From -PRE to -POST section
2020-10-04 21:12:03 -04:00
nhmall d8961b0067 updates for LIBNH build 2020-10-04 20:48:09 -04:00
nhmall 7bf5172f2e unixmain and libnethackmain diverged in the updated PR
put unixmain back the way it was, now that libnethackmain is in the tree after all.
2020-10-04 20:14:45 -04:00
nhmall c3683eaa9b Merge branch 'libnethack2' into NetHack-3.7 2020-10-04 20:13:35 -04:00
nhmall 60dbb4c12f the .gitignore doesn't match the target locations on the merged code
Leave it be for now.
2020-10-04 20:09:28 -04:00
nhmall 11b5f29e07 merging conflict fixup 2020-10-04 20:07:57 -04:00
nhmall 15c1cb648d integrate updates made to PR earlier on Oct 4 2020-10-04 20:05:29 -04:00
nhmall 751d5ef76c Merge branch 'libnethack' of https://github.com/apowers313/NetHack into libnethack2 2020-10-04 19:51:37 -04:00
nhmall 61185f3405 cron daily Files update 2020-10-04 15:26:50 -04:00
nhmall de0195191b update original documentation for pr385
Changes to be committed:
	modified:   sys/lib/README.md
2020-10-04 15:19:58 -04:00
nhmall f6b0d86ce6 Merge branch 'NetHack-3.7' 2020-10-04 14:54:41 -04:00
nhmall b41b897565 remove two unneeded files 2020-10-04 14:51:10 -04:00
nhmall ef6978ec51 update sys/winnt/console.rc 2020-10-02 16:01:04 -04:00
nhmall ee08122771 Guidebook.txt update 2020-10-02 12:32:11 -04:00
nhmall af739196cf bump Guidebook date to reflect most recent changes 2020-10-02 12:29:26 -04:00
nhmall 1261aedd45 more recover and cross-compiling 2020-10-01 10:04:05 -04:00
nhmall 92902fd128 make sure recover utily is built for the CROSSCOMPILE target 2020-09-30 21:45:45 -04:00
nhmall a47e742892 cron daily Files update 2020-09-29 19:44:13 -04:00
nhmall 1ff5b519c8 reinstate one $(CROSSCOMPILE_TARGET) in sys/winnt/Makefile.msc
It was removed but shouldn't have been.
2020-09-29 15:13:52 -04:00
nhmall 945d10cfbc cross-compile update
Update the cross-compiling doc at the top.

Remove sys/msdos/Makefile1.cross, sys/msdos/Makefile2.cross, and
sys/msdos/msdos-cross-compile.sh as they are no longer required.

Remove occurrences of CROSSCOMPILE_HOST as the host-side of a
cross-compile can be determined from:
    defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_TARGET)
without the additional macro.
2020-09-29 15:01:37 -04:00
nhmall 5e9303f9df msdos cross-compile follow-up bits
add missing make rule for ../win/share files to cross-pre.2020

adjust .travis.yml to use the new approach for building msdos target
2020-09-29 09:41:31 -04:00
nhmall 560ace217b cron-daily Files update 2020-09-28 21:58:12 -04:00
nhmall d33cc59c64 move some left-over outdated files from old Mac 2020-09-28 18:42:27 -04:00
nhmall 24a554ecaf cron-daily Files update 2020-09-28 18:33:46 -04:00
nhmall 4b58cfd201 follow-up bit
break into TARGETDIR and TARGETPFX
2020-09-28 18:19:20 -04:00
nhmall 5eada896e2 Merge branch 'crosscompile-integration-amiga' into NetHack-3.7 2020-09-28 18:08:15 -04:00
nhmall 19d3d24cc0 Merge branch 'crosscompile-integration-msdos' into NetHack-3.7 2020-09-28 18:07:55 -04:00
nhmall ba34897fa6 Merge branch 'crosscompile-integration-core' into NetHack-3.7 2020-09-28 18:07:19 -04:00
nhmall cb223271cb add cross-compile recipe for amiga
Disclaimer: This is a minimal recipe, just to get someone else
started if they have a desire to get a full cross-compile of
NetHack-3.7 going for the Amiga. Some NetHack code bitrot was
corrected, and it does seem able to compile the game itself
to a point. See caveats below.

- If you want to obtain the cross-compiler and tools/libs for Amiga
         https://github.com/bebbo/amiga-gcc

  To our knowledge, a pre-built copy isn't available, so you have to
  obtain the source via git and build it on your system.

  The build prerequisite packages for Ubuntu are easily obtained:

    sudo apt install make wget git gcc g++ lhasa libgmp-dev \
        libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev \
        autoconf rsync

  The build prerequisite packages for macOS are apparently easily
  obtained via homebrew, but that was not tested:

    brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
    texinfo gcc make autoconf

  After installing the prerequite packages and the cross-compiler
  it was a straightforward build:

        git clone https://github.com/bebbo/amiga-gcc.git
        cd amiga-gcc
        make update
    [Note that you may have to take ownership of the files in the
     bebbo repo via chown before succesfully carrying out the next
     steps]
        make clean
        make clean-prefix
        date; make all -j3 >&b.log; date
  The compiler pieces are installed in /opt/amiga by default which
  was satisfactory for our initial attempt, but if you want you can
  alter the prefix before you build if you want. That is all
  spelled out on the page at: https://github.com/bebbo/amiga-gcc

  The Amiga cross-compile can then be carried out by specifying
  CROSS_TO_AMIGA=1 on the make command line.

  For example:
       make CROSS_TO_AMIGA=1 all
       make CROSS_TO_AMIGA=1 package

You can explicitly include tty and curses support if desired, otherwise
you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
support has not been tested.

       make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_AMIGA=1 all

Also note that building the amiga targets using the make command
above, does not preclude you from building local linux or macOS
targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
command line.

The cross-compiler hints additions are enclosed inside ifdef sections
and won't interfere with the non-cross-compile build in that case.

CAVEATS: The original NetHack Amiga build steps included the source for
some utilities that were built and executed on the amiga: txt2iff and
xpm2iff as part of the NetHack build procedure on amiga. Those did not
compile out-of-the-box on the linux host. They will either have to be:
    - ported to build and run on the linux or macOS cross-compile host

   or

    - their functionality will have to be rolled into amiga NetHack
      itself and executed on the target Amiga the first time the game
      is run, perhaps.

Good luck amiga aficionados, perhaps you'll be able to take this
initial effort forward and get NetHack-3.7 available on the amiga or
amiga-emulator. Let us know if you do, and we can roll changes in
if you provide them.
2020-09-28 17:30:22 -04:00
nhmall 14b532bf10 add cross-compile recipe for msdos
- If you want to obtain the djgpp cross-compiler and tools/libs for MSDOS,
which is available for linux and macOS, you can use the following script
to obtain it:

       sh sys/msdos/fetch-cross-compiler.sh

That script won't install anything, it is just file fetches. It will
store the cross-compiler in subfolders of lib and the hints files are
configured to find it appropriately there.

Note: Both the fetch and the msdos cross-compile package target require
unzip and zip to be available on your host build system.

Cross-compiler bits:
       https://github.com/andrewwutw/build-djgpp
   and the pre-built binary for your platform from:
       https://github.com/andrewwutw/build-djgpp/releases/download/v3.0/
   and a DOS-extender (for including in msdos packaging) from
       http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip
   and pdcurses from:
       https://github.com/wmcbrine/PDCurses.git

The MSDOS cross-compile can then be carried out by specifying
CROSS_TO_MSDOS=1 on the make command line.

For example:
       make CROSS_TO_MSDOS=1 all
       make CROSS_TO_MSDOS=1 package

You can explicitly include tty and curses support if desired, otherwise
you'll end up with a tty-only cross-compile build:
       make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 all

Also note that building the msdos targets using the make command
above, does not preclude you from building local linux or macOS
targets as well. Just drop the CROSS_TO_MSDOS=1 from the make
command line.

The cross-compiler hints additions are enclosed inside ifdef sections
and won't interfere with the non-cross-compile build in that case.
2020-09-28 16:28:15 -04:00
nhmall b9b4755fe3 expand sys/unix Makefiles scope
Expand the use of the sys/unix Makefiles to be used for both normal
local builds and installs, as well as cross-compiles for other
platforms/targets.

Up until now, the primary unix Makefiles have treated util/host-side
component compiles, links and target object files just the same as
the game component compiles, links, and target object files.

Unfortunately, that meant that cross-compile effort typically had
to re-invent Makefiles specific to the cross-compile, creating a
maintenance burden and deviation from the typical local unix build
and providing a daunting obstacle to those that want to establish
build for a target environment/platform.

This change distinguishes between util/host-side component builds,
links, and component builds and targets object files destined for
the game (and other target platforms) in the Makefiles.

In theory, this will ease the effort for people that want to try to
resurrect NetHack perhaps on an old platform where it is no longer
viable to build NetHack-3.7 on the platform itself using old, outdated
compile tools, possibly with an old, outdated C dialect.

Some details:

-  Game-related targets in the Makefiles (as opposed to util/host-side
   targets that will be executed on the host), which could be destined
   for another platform in a cross-compile scenario are prefixed with
   $(TARGETPFX) so that they are distinguished.

   The default scenario where no cross-compiler is involved, is to
   define TARGETPFX to nothing, and therefore meant to have no effect.

-  Game-related compile and link commands in the Makefiles and their
   associated command line flags are distinguished from util/host-side
   compile and link commands in the Makefiles by using $(TARGET_CC),
   $(TARGET_CFLAGS), $(TARGET_LINK), $(TARGET_LFLAGS), $(TARGET_CXX),
   $(TARGET_CXXFLAGS), $(TARGET_LIBS).

   Those are used in the Makefile in place of $(CC), $(CFLAGS), $(LINK),
   $(LFLAGS), $(CXX), $(CXXFLAGS), $(LIBS).

   The default scenario where no cross-compiler is involved, defines
   the TARGET_ version of those Makefile variables to match their
   typical non-TARGET_ ounterparts.

-  The dependency lists in the Makefiles includes the $(TARGETPFX)
   prefix for stuff that would potentially be produced from a
   cross-compile build.

-  It adds pregame targets and $(PREGAME) variable, so that hints files
   can add some additional stuff if required for a cross-compile
   scenario.

   The default scenario where no cross-compiler is involved doesn't
   do anything for $(PREGAME).

-  It adds $(BUILDMORE) target and variable, so that hints files
   can add some additional things to be built for a cross-compile
   scenario.

-  It adds a "package" target and $(PACKAGE) variable, so that hints files
   can add steps for the target platform in a cross-compile
   scenario.

   The "install" target assumes local build and placement and
   isn't really applicable to a cross-compile scenario where the results
   really just need to be bundled up for transport to the target platform.

-  Also, this adds a pair of include files that can be updated with some
   cross-compile recipes as they evolve. They are named "cross-pre.2020"
   (for stuff to be included in the PRE section) and "cross-post.2020"
   for stuff to be included in the POST section via sys/unix/setup.sh.

   Those are included in sys/unix/hints/linux.2020 and
   sys/unix/hints/macOS.2020 hints files.
2020-09-28 16:25:31 -04:00
nhmall c1ebfb730c whitespace bit 2020-09-22 10:28:22 -04:00
nhmall 29c558ed12 follow-up bit; ensure the mkstemp() file is unlinked 2020-09-22 10:11:51 -04:00
nhmall 1a0ee44760 unique temp files for makedefs invocations (GitHub issue #391)
As reported in https://github.com/NetHack/NetHack/issues/391
if make was invoked with -j, makedefs instances could end up running in
parallel and could trample on each other's grep.tmp tempory files.

Default to using mkstemp(); allow a port runtime library implementation
that lacks mkstemp() to define HAS_NO_MKSTEMP to revert to the old behaviour.

Provide a work-alike mkstemp() implementation for windows Visual Studio build
in mdlib.c so there is no requirement to define HAS_NO_MKSTEMP there.

Fixes #391
2020-09-22 09:03:15 -04:00
nhmall a3be3f79b6 syntax bit 2020-09-12 00:32:05 -04:00
nhmall 1079c01333 sys/winnt/Makefile.msc update for VS 2019 16.7.2 2020-08-25 22:41:54 -04:00
nhmall 61b86b8838 Merge branch 'NetHack-3.7' 2020-08-20 11:20:26 -04:00
nhmall e191e6bc8f build warning fix on g++ >= 9 and Qt
../win/Qt/qt_menu.cpp: In member function ‘virtual void nethack_qt_::NetHackQtTextWindow::UseRIP(int, time_t)’:
../win/Qt/qt_menu.cpp:680:54: warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 17 [-Wformat-truncation=]
  680 |     snprintf(rip_line[NAME_LINE], STONE_LINE_LEN+1, "%s", g.plname);
      |                                                      ^~   ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from ../win/Qt/qt_menu.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin_snprintf’ output between 1 and 32 bytes into a destination of size 17
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~../win/Qt/qt_menu.cpp: In member function ‘virtual void nethack_qt_::NetHackQtTextWindow::UseRIP(int, time_t)’:
../win/Qt/qt_menu.cpp:680:54: warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 17 [-Wformat-truncation=]
  680 |     snprintf(rip_line[NAME_LINE], STONE_LINE_LEN+1, "%s", g.plname);
      |                                                      ^~   ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from ../win/Qt/qt_menu.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin_snprintf’ output between 1 and 32 bytes into a destination of size 17
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-08-20 11:18:32 -04:00
nhmall 4620bfccbf grammar bit 2020-08-20 09:50:07 -04:00
nhmall d86dd4bb1b comment out what appears to be an obsolete bit in windows Makefile.gcc 2020-08-18 10:36:15 -04:00