Commit Graph
100 Commits
Author SHA1 Message Date
nhmall b40ef88e1e nmake warning
NMAKE : warning U4004: too many rules for target 'o\x86\cppregex.o'
2022-10-23 12:38:22 -04:00
nhmall 6f20939db9 support Unicode on Win32 pr #903 2022-10-23 12:34:16 -04:00
nhmall 6fd0bd3169 Merge branch 'unicode-win32' of https://github.com/chasonr/NetHack into NetHack-3.7 2022-10-23 12:32:04 -04:00
nhmall f3079ff274 Merge branch 'pr901' into NetHack-3.7 2022-10-15 12:54:31 -04:00
nhmall f70ad6598d pull request #901
Also, makes some Makefile lines a little bit shorter
2022-10-15 12:53:01 -04:00
nhmall 433d991335 MinGW build update 2022-10-15 12:28:53 -04:00
nhmall d4bb4758aa transcribe dependencies from sys/unix/Makefile.src
Transcribe the dependencies from sys/unix/Makefile.src
to sys/msdos/Makefile.GCC and sys/windows/Makefile.nmake
to bring them up to date.
2022-10-15 12:28:53 -04:00
nhmall e157224edc MinGW build update 2022-10-12 12:24:59 -04:00
nhmall a8cd11ee8a transcribe dependencies from sys/unix/Makefile.src
Transcribe the dependencies from sys/unix/Makefile.src
to sys/msdos/Makefile.GCC and sys/windows/Makefile.nmake
to bring them up to date.
2022-10-09 10:39:50 -04:00
nhmall 4ab2860718 warning fix in msdos build
../sys/msdos/font.c:24:12: warning: declaration of 'flags' shadows a global declaration [-Wshadow]
   24 |     uint32 flags;
      |            ^~~~~
In file included from ../include/hack.h:285,
                 from ../sys/msdos/font.c:3:
../include/flag.h:422:29: note: shadowed declaration is here
  422 | extern NEARDATA struct flag flags;
      |                             ^~~~~
make[2]: Entering directory '/home/nhmall/git/NHsource/util'
2022-10-09 09:35:24 -04:00
nhmall 9f4b239a6f Merge branch 'pr899' into NetHack-3.7 2022-10-09 09:31:21 -04:00
nhmall 78ac9c767f Merge branch 'dos-tty-unicode' of https://github.com/chasonr/NetHack into pr899 2022-10-09 09:26:08 -04:00
nhmall e5c4b6f65a potentially uninitialized variable warnings
src/mkroom.c(1068) :
warning C4701: potentially uninitialized local variable 'insidex' used
src/mkroom.c(1070) :
warning C4701: potentially uninitialized local variable 'insidey' used

The warning is because the insidex and insidey variables only get
assigned a value conditionally within a for-loop, but contain random
values if that for-loop is not executed, and they are used unconditionaly
later on in the code.

Initializing them changes that from containing random values to containing
zeros, whether that is appropriate or not.

In this particular case, insidex and insidey look to be riding on the coat
tails of insidect and there is a check for invalid insidect in the code,
so that should catch the situation.
2022-10-09 09:11:56 -04:00
nhmall 8bc41c10c7 Merge branch 'dos-vesa-crash' of https://github.com/chasonr/NetHack into pr898 2022-10-09 08:29:29 -04:00
nhmall 334fd76ab4 mstrength prototype and preprocessor 2022-10-07 11:15:10 -04:00
nhmall 26d13f6656 just the one mstrength() for makedefs and game 2022-10-07 11:00:15 -04:00
nhmall c4fc5cf9ce gcc warning 2022-10-07 10:36:16 -04:00
nhmall 691ffbe456 be consistent in preprocessor conditional 2022-10-07 10:30:36 -04:00
nhmall b0029472de during devel make it easy to review mon difficulty 2022-10-07 10:26:40 -04:00
nhmall 14ef7b6005 paste error 2022-10-06 21:39:00 -04:00
nhmall d1755013b4 less specific re version to reduce doc maintenance 2022-10-06 21:36:23 -04:00
nhmall a1a00c8753 djgpp cross-compiler version update 2022-10-06 21:17:04 -04:00
nhmall 82c6db30a5 do CI DOS build in single make command 2022-10-06 21:05:39 -04:00
nhmall 682291ca4e warning fix
../win/curses/cursmain.c: In function 'curses_init_nhwindows':
../win/curses/cursmain.c:157:17: warning: unused variable 'pdc_font' [-Wunused-variable]
  157 |     static char pdc_font[BUFSZ] = "";
      |                 ^~~~~~~~
../win/curses/cursmain.c: At top level:
../win/curses/cursmain.c:157:17: warning: 'pdc_font' defined but not used [-Wunused-variable]
2022-10-06 20:57:54 -04:00
nhmall cea9b75cb2 fetch-cross-compiler.sh directory check follow-up 2022-10-06 12:45:14 -04:00
nhmall bbac072e62 fixes entry for pr889 2022-10-06 12:37:16 -04:00
nhmall 08163e94bb Merge branch 'unicode' of https://github.com/chasonr/NetHack into pr889 2022-10-06 12:31:21 -04:00
nhmall 13028143af latest Xcode build issue
An Xcode update has started causing the same problem that was experienced on
Linux with newer compiler or glibc a while back.

˜
In file included from monst.c:6:
In file included from ../include/config.h:670:
In file included from ../include/integer.h:54:
In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/stdint.h:52:
In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:302:39: error: too few arguments provided to function-like macro invocation
^
1 error generated.
make[1]: *** [monst.o] Error 1

 Please enter the commit message for your changes. Lines starting
2022-10-04 19:09:54 -04:00
nhmall 83f64ee2b6 a couple of warnings 2022-09-30 08:59:57 -04:00
nhmall 8bb4bf3e59 huge chunk of meant name change not comprehensive
warning: for tile 250 (numbered 250) of objects.txt,
        found 'huge chunk of meat' while expecting 'enormous meatball'
	../win/share/objects.txt: 460 tiles
2022-09-29 12:48:03 -04:00
nhmall c92e232a99 update tested versions of Visual Studio 2022-09-21 2022-09-21 14:55:34 -04:00
nhmall 8ef9cf85ab remove unused math.h in isaac64.c
Close  #878
2022-09-19 17:32:42 -04:00
nhmall 2f7b202530 avoid a format-overflow warning
options.c: In function ‘option_help’:
options.c:8820:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 220 [-Wformat-overflow=]
 8820 |     Sprintf(buf, "Set options as OPTIONS=<options> in %s", configfile);
      |                                                       ^~   ~~~~~~~~~~
2022-09-17 19:29:09 -04:00
nhmall 6151623cce Revert "NEED_VARARGS bit for end.c and files.c"
This reverts commit af71163d99.
2022-09-17 15:58:05 -04:00
nhmall 8df41a6ba2 Revert "NEED_VARARGS followup"
This reverts commit 4d34e153e0.
2022-09-17 15:57:52 -04:00
nhmall 1bd4c3c022 Revert "paste fix"
This reverts commit d1750e4abe.
2022-09-17 15:57:31 -04:00
nhmall d1750e4abe paste fix 2022-09-17 14:48:02 -04:00
nhmall 4d34e153e0 NEED_VARARGS followup 2022-09-17 14:22:20 -04:00
nhmall af71163d99 NEED_VARARGS bit for end.c and files.c
avoid build failure in the event that NEED_VARARGS is already defined
on the compiler command line.
2022-09-17 12:31:26 -04:00
nhmall a5d462b194 more inconsistencies 2022-09-16 10:44:39 -04:00
nhmall 018a39d2de modernize added old-style function declarator 2022-09-16 00:55:08 -04:00
nhmall 1c177dcb39 a couple of inconsistencies
make pmatchregex regex_error_desc return type match cppregex.cpp and
posixregex.c

make the extern declaration for loadsyms[] in options.c match the
one in symbols.c.
2022-09-14 20:23:48 -04:00
nhmall 970a263d90 Merge branch 'pr873' into NetHack-3.7 2022-09-13 23:06:52 -04:00
nhmall 3951b4dc2a Merge branch 'vga-fixes' of https://github.com/chasonr/NetHack into pr873 2022-09-13 23:05:59 -04:00
nhmall 356e3176bc MacOS msdos compiler fetch script bit 2022-09-11 19:33:56 -04:00
nhmall 6676959f5b comment and declaration is outdated
It looks like quite a lot of time has passed since this was accurate.
2022-09-11 09:08:35 -04:00
nhmall c6a8519fec Guidebook update 2022-09-09 10:16:45 -04:00
nhmall a4c4e75467 a couple of warnings in files.c
Warning	C6031	Return value ignored: 'rename'.	src/files.c	1240
Warning	C6031	Return value ignored: 'write'.	src/files.c	3879
2022-09-08 12:31:36 -04:00
nhmall cebc9e9416 fix a grammar bit adjacent to recent spelling fix 2022-09-08 12:08:37 -04:00
nhmall c548fff9e4 some spelling corrections
The pull request included some changes that were neither accidental nor
unintentional, so only a subset of the changes from pull request #869
submitted by klorpa were manually applied.

behaviour  -> behavior
speach     -> speech
knowlege   -> knowledge
incrments  -> increments
stethscope -> stethoscope
staiway    -> stairway
arifact    -> artifact
extracing  -> extracting

The uses of "iff" were left alone.

Close #869
2022-09-08 10:54:11 -04:00
nhmall feebb561d6 redundant comparison code watchman_canseeu()
m_canseeu() already includes couldsee() so redundant code was flagged.

: #define m_canseeu(m) \
:     ((!Invis || perceives((m)->data))                      \
:      && !Underwater                                        \
:      && couldsee((m)->mx, (m)->my))

static boolean
watchman_canseeu(struct monst *mtmp)
{
    if (is_watch(mtmp->data) && mtmp->mcansee && m_canseeu(mtmp)
        && couldsee(mtmp->mx, mtmp->my) && mtmp->mpeaceful)
        return TRUE;
    return FALSE;
}
2022-09-07 07:52:33 -04:00
nhmall 4f2996758b follow-up 2022-09-06 10:12:19 -04:00
nhmall 0086e01967 return legal indexes for some display.h macros
Some static analyzers flagged the last-resort values as
out of bounds (which they were).

There's a small number of other complaint-suppression items in here too,
but nothing drastic.
2022-09-06 10:00:07 -04:00
nhmall 817b4686ce Revert "move struct propname to a header file"
This reverts commit 402b2bf5c8.
2022-09-06 08:01:50 -04:00
nhmall 402b2bf5c8 move struct propname to a header file
In doing so, avoid repeated layout declaration in cmd.c
2022-09-06 07:22:55 -04:00
nhmall c825e6839f redundant comparison code
: #define is_weptool(o) \
:    ((o)->oclass == TOOL_CLASS && objects[(o)->otyp].oc_skill != P_NONE)
2022-09-05 11:16:43 -04:00
nhmall 26e61f30c8 follow-up
Revert the sys/unix/hints/include/compiler.370 for now
while a couple of warnings still exist in role.c
2022-08-29 14:35:39 -04:00
nhmall 443dc429e7 warning-free build without -Wno-missing-field-initializers
Also removes a GCC_WARN usage and the need for
#pragma GCC diagnostic ignored "-Wmissing-braces"
for src/decl.c when using gcc.
2022-08-29 14:06:12 -04:00
nhmall a932841fc0 follow-up on display macro tests 2022-08-27 08:40:05 -04:00
nhmall c92a3b0653 fix glyph_to_cmap() odd macro results
Some discrepencies between glyph_is_cmap and glyph_to_cmap
arose after b14b830b because the change resulted in
glyph_is_cmap matching on zap beams which weren't accounted
for in the glyph_to_cmap macro. It is unlikely that
glyph_to_cmap will ever be used on such a glyph, but at least
have glyph_to_cmap return a sane value rather than drop through
to the last-resort value (currently NO_GLYPH) which is far
outside the range of the defsyms[] array indices.
2022-08-27 08:23:24 -04:00
nhmall d5abf903fa Revert "fix some (not all) glyph_to_cmap odd ret"
This reverts commit bb4474bbaf.
2022-08-26 15:06:59 -04:00
nhmall 4e8935ab9c extraneous line 2022-08-26 14:25:09 -04:00
nhmall bb4474bbaf fix some (not all) glyph_to_cmap odd returns
I think some of these discrepencies between glyph_is_cmap and
glyph_to_cmap started after b14b830b because the additional
ranges added by that didn't have a corresponding return in
glyph_to_cmap.
2022-08-26 14:08:03 -04:00
nhmall dcf9fce803 debug code to check some display macros 2022-08-26 14:01:52 -04:00
nhmall 25fc7ea2f5 update tested versions of Visual Studio 2022-08-21 11:51:15 -04:00
nhmall dd791cdcb7 update Guidebook 2022-08-21 10:20:32 -04:00
nhmall 017ad88d13 grammar 2022-08-19 10:47:52 -04:00
nhmall d5eaee6c2e comment typo fix 2022-08-19 10:13:16 -04:00
nhmall 8fb6e0be83 fix comment 2022-08-19 10:00:47 -04:00
nhmall 10101cf1da CI build failure following 694a7418
CI reported a problem with the documentation job.
2022-08-17 21:32:24 -04:00
nhmall ef6fde88ea redundant code warning line 400 src/apply.c
if (odummy->otyp == SLIME_MOLD
400 ->                    && has_mcorpsenm(mtmp) && MCORPSENM(mtmp) != NON_PM)

The definition of has_mcorpsenm macro is:
include/mextra.h:#define has_mcorpsenm(mon) ((mon)->mextra && MCORPSENM(mon) != NON_PM)

Remove the redundant code.
2022-08-17 21:16:23 -04:00
nhmall d3208fa1c3 correct an rng mistake in 6e0d55df from Jan 2019
Reported by entrez
2022-08-17 20:32:07 -04:00
nhmall 607774367a CI warning caused by deprecation of ubuntu-18.04 there
[warning]The ubuntu-18.04 environment is deprecated, consider switching to ubuntu-20.04(ubuntu-latest), or ubuntu-22.04 instead. For more details see https://github.com/actions/virtual-environments/issues/6002
2022-08-13 10:08:39 -04:00
nhmall c0d636fe32 a couple of warnings
invent.c: In function 'getobj':
invent.c:1579:29: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
 1579 |                 if (cnt < 1 || otmp->quan <= cnt)
      |                     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
invent.c:1529:10: note: 'cnt' was declared here
 1529 |     long cnt;
      |          ^~~

../win/X11/winstat.c: In function 'update_fancy_status_field':
../win/X11/winstat.c:1920:28: warning: declaration of 'active' shadows a global declaration [-Wshadow]
 1920 |             static boolean active = FALSE;
      |                            ^~~~~~
In file included from ../include/hack.h:196,
                 from ../win/X11/winstat.c:36:
../include/wintype.h:180:5: note: shadowed declaration is here
  180 |     active           = 0x001,
      |     ^~~~~~
2022-08-13 09:09:10 -04:00
nhmall 958a8aa297 quiet a warning that appeared today
src/cmd.c(2867) : warning C4701: potentially uninitialized local variable 'win' used
2022-08-05 10:31:54 -04:00
nhmall cf352377a9 Windows stubs.c follow-up 2022-08-01 02:03:38 -04:00
nhmall 174a7e5e78 Windows stubs.c fix 2022-08-01 01:52:55 -04:00
nhmall b56e70fa93 remove Catalina build in CI
macOS 10.15 builds have been deprecated and are triggering a warning
2022-07-16 21:06:27 -04:00
nhmall 0649783a6d some windows startup
noticed that "do you want to destroy the savefile" was not being
handled correctly in Windows startup.
2022-07-16 20:43:24 -04:00
nhmall 3fb45dfa4c comment typo 2022-07-16 20:38:00 -04:00
nhmall cb036d11e2 update tested versions of visual studio 2022-07-16 09:19:03 -04:00
nhmall 29afd90bad Merge branch 'quiet-vlen-unused-but-set' of https://github.com/entrez/NetHack into NetHack-3.7 2022-07-16 08:05:41 -04:00
nhmall 7e6fc4e4ed autodescribe fix follow-up 2022-07-04 01:14:34 -04:00
nhmall 15602af8b4 autodescribe fix for 'I'
> Attempting to look at 'I' (remembered, unseen monster)
> with farlook/quicklook/getpos autodescribe mis-reports it
> as "unexplored area".
2022-07-03 22:26:21 -04:00
nhmall 42acc36a40 consistency bit 2022-07-03 21:23:13 -04:00
nhmall c84e0ba6e1 rework TTY_PERM_INVENT; update window port interface
Change the inner workings of the experimental TTY_PERM_INVENT.

Switch to delivering the content to tty for the experimental perm_invent
via the existing window port interface (start_menu(), add_menu(), end_menu).

This also adds a new window port interface call ctrl_nhwindow() for
delivering information to the window port, and/or obtaining specific
information from the window port. The information and requests can
be extended as required. To be documented later once the changes settle
down.

Due to the intrusive nature of these changes and the possibility of
some bugs in the new code, I'm going to leave TTY_PERM_INVENT commented
out in the repository for a day or two.  Anyone wishing to test it out
can do so by uncommenting TTY_PERM_INVENT in config.h.
2022-07-03 00:35:32 -04:00
nhmall 75c5f3713f a couple of follow-ups 2022-07-02 09:21:58 -04:00
nhmall 3004cf2d34 be more consistent with coordinates 2022-07-02 09:10:03 -04:00
nhmall aebf77ada1 update visual studio project files 2022-07-01 11:47:02 -04:00
nhmall 1e17efe143 Windows console limits 2022-07-01 08:37:10 -04:00
nhmall 1de758179b don't alter perm_invent during fuzzer 2022-07-01 08:36:33 -04:00
nhmall 84baa5d7d4 comment update 2022-07-01 08:36:03 -04:00
nhmall 465db21c79 typedef follow-up 2022-07-01 08:23:31 -04:00
nhmall 30b557f7d5 change xchar to other typedefs
One of the drivers of this change was that screen coordinates require a
type that can hold values greater than 127. Parameters to the window
port routines require a large type in order to be able to have values
a fair bit larger than COLNO and ROWNO passed to them, particularly for
their use to the right of the map window.

This splits the uses of xchar into 3 different situations, and adjusts
their type and size:

                        xchar
                          |
               -----------------------
               |          |          |
            coordxy     xint16     xint8

coordxy: Actual x or y coordinates for various things (moved to 16-bits).

xint16:  Same data size as coordxy, but for non-coordinate use (16-bits).

xint8:   There are only a few use cases initially, where it was very
         plain to see that the variable could remain as 8-bits, rather
         than be bumped to 16-bits.  There are probably more such cases
         that could be changed after additional review.

Note: This first changed all xchar variables to coordxy. Some were
reviewed and got changed to xint16 or xint8 when it became apparent that
their usage was not for coordinates.

This increments EDITLEVEL in patchlevel.h
2022-06-30 23:48:18 -04:00
nhmall 751b6e646f Revert "follow-up: use only the memory that's required"
This reverts commit 4a0654c708.
2022-06-30 22:38:14 -04:00
nhmall 66a1e19d26 Revert "follow-up 2: follow the conventional approach"
This reverts commit 6920632df0.
2022-06-30 22:37:12 -04:00
nhmall 43941afe19 Revert "follow-up 3"
This reverts commit cd57dfa5ff.
2022-06-30 22:36:45 -04:00
nhmall e2b77e51ad Revert "follow-up 4"
This reverts commit 9e38fb661d.
2022-06-30 22:36:21 -04:00
nhmall 9e38fb661d follow-up 4 2022-06-30 13:43:44 -04:00
nhmall cd57dfa5ff follow-up 3 2022-06-30 13:27:46 -04:00