Commit Graph
25 Commits
Author SHA1 Message Date
Dean Luick 5eaf028c0f Re-fix altar compiler warning
Implement a better fix for commit 2f4f7d22d ("Fix align type
mixup wth align mask") which was reverted in commit 4e35e8b5a
("Revert "Fix align type mixup wth align mask"").

In the present code, the field align in both struct altar and
struct monster is not an aligntyp, but an align mask with extra flags.
Change the type to match its actual use and improve the naming.

Consolidate duplicated code into a single routine.

Change the return type of induced_align() to be unsigned to match
amask usage.

Change the special level align mask values to be separate from
the normal align mask values.
2021-02-07 22:25:25 -06:00
Dean Luick 7a07125ca3 Add missing fields in shown_stats[] in winstat.c
This eliminates a compiler initializer warning.
2021-01-29 11:44:39 -06:00
Dean Luick 3da8dca836 Add missing fields in extcmdlist[] in cmd.c
This eliminates a compiler initializer warning.
2021-01-29 11:41:12 -06:00
Dean Luick 2f4f7d22d3 Fix align type mixup wth align mask
Fix two cases of missed conversion of an alignment to an align mask.

Change induced_align()'s return type to unsigned int since it returns
an align mask (unsigned), not an align type (signed).
2021-01-29 09:31:08 -06:00
Dean Luick 2c38749cab Update code style for ANSI function prototypes 2021-01-29 09:01:15 -06:00
Dean Luick cf3ad240ac Fix X11 warnings 2021-01-28 21:12:06 -06:00
Dean Luick 8ddab09cab Fix set but not used warnings 2021-01-28 21:11:21 -06:00
Dean Luick 3a30038b49 Add a missing fall-through comment
This eliminates a gcc warning.
2021-01-20 22:39:08 -06:00
Dean Luick f63d435c6d Fix text replacement warning
Using strncpy to cut off copying a terminating NUL yields a gcc
warning.  Just use memcpy instead.
2021-01-20 22:37:37 -06:00
Dean Luick 5dc5ece412 Remove left-over valid file checking
Commit 7054e06e42 ("NetHack minor release checklist items - savefiles")
consolidated valid file checking into the function viable_nhfile().  This
commit removes unused variables left over from that change.
2021-01-20 22:34:07 -06:00
Dean Luick 16ba1a583a Update nhUse
There is no longer any compiler reason to disable nhUse - remove
nhUse's conditional definition.

Update the nhUse definition to "use" a variable without it needing
to be an integer.

This change removes some gcc compiler unused variable and parameter
warnings.
2021-01-20 22:18:34 -06:00
Dean Luick 3ef0f889e6 Fix gcc sprintf warnings
Gcc 9 has become more vocal with sprintf buffer overflow
checking.  Remove these sprintf warnings by changing the
offending calls to a snprintf wrapper that will explicitly
check the result.
2021-01-16 19:44:56 -06:00
Dean Luick 8143d55d76 Create and use a snprintf wrapper in the core code
Use a wrapper around snprintf to consilidate all use, add
error checking, and remove gcc 9 warnings about not checking
the result.

Replace the prevous use of snprintf added to weapon.c with the
new scheme.

Update a second spot that has a gcc sprintf warning.  While
there, simplify the code.
2021-01-15 11:33:47 -06:00
Dean Luick 389f6ca647 Fix sprintf warnings in weapon.c 2021-01-08 20:25:36 -06:00
Dean Luick 3ffd330c31 Remove vision tables from makedefs
Update makdefs source and its man page.

Remove all mentions of the vision table files from:
o .gitattributes
o .gitignore
o Files
o Cross-compiling

Add a brief note in the fixes file.
2021-01-03 13:37:25 -06:00
Dean Luick a4e7646f4c Remove src and unix VISION_TABLES
Remove all references to the unused vision tables in the main source
and unix build.  Leave makedefs able to generate the vision tables.
makdefs will be cleaned up in a different commit, once all ports
are clear of dependencies.
2020-12-29 20:38:37 -06:00
dean 8692d252ac Add fixes entry for unset tty TERM fix. 2002-04-10 22:32:29 +00:00
dean 36964ca72d When using TTY_GRAPHICS, correctly handle an unset TERM environment variable. 2002-04-10 22:30:15 +00:00
dean 36521e6510 MPW build fixes: predefine YY_NEVER_INTERACTIVE in a more ANSI-like manner, do not redefine unlink unless MetroWerks. 2002-04-03 05:58:29 +00:00
dean 78ae08d384 Place finished .lev files in the MPW build's destination directory. 2002-04-03 05:40:29 +00:00
dean eaf680c57d The MPW compilers use WIDENED_PROTOTYPES. 2002-04-03 05:38:04 +00:00
dean d4d051af87 MPW #pragma unused updates 2002-03-09 05:08:27 +00:00
dean 45160f1b46 Remove unused code, fix comment. 2002-03-01 05:29:48 +00:00
dean 007ddef858 Fix a typo. 2002-03-01 05:26:36 +00:00
dean 84b72da0eb update unused pragmas Update some of the mac pragmas for unused variables for the MPW compilers. 2002-01-23 06:14:21 +00:00