lev_comp int vs long

Fix lev_comp's variable argument usage by changing it to make
add_opvars() expect an int rather than a long when given the "i"
indicator, and add "l" for really passing a long.  The ints are
conveted to longs when setting up the interpreter.  I think I changed
just about all the integer opvars to int, although there is one use
of "l" in lev_main.c just to make sure it works.  There could be
arguments that really do need to be 'long'; if so, the add_opvars()
calls for them will have to have its indicator string updated and
possibly add or remove some casts.

There's a lot of reformatting included but it's not consistent about
tab replacement.  Some of the changes are due to renaming long-named
'variable_definitions' to 'vardefs' to shorten a bunch of lines.

Updated sys/share/*_yacc.c will be checked in separately.  The ones
currently in the repository won't work with patched lev_main.c due to
that renamed variable.
This commit is contained in:
PatR
2018-11-27 18:21:58 -08:00
parent 554ec17c8b
commit 5d2686e7c1
6 changed files with 242 additions and 171 deletions

View File

@@ -222,6 +222,9 @@ attempting to untrap an adjacent trap while on the edge of--not in--a pit
failed due to not being able to reach the floor
magic trap's deafening roar effect wasn't waking nearby monsters
scattering of objects might leave source location with wrong thing displayed
for configurations with 'long int' larger than 'int', lev_comp wrote some
garbage into the *.lev files, but nethack seemed unaffected by that
(at least on little-endian hardare) and loaded the levels successfully
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository