option fixes and missing prototypes

I added -Wmissing-prototypes to my CFLAGS and got a bunch of warnings.
This fixes the core ones (there are more for X11 that I haven't looked
at yet).  While fixing these, I discovered a few option processing
issues:  the non-Amiga 'altmeta' should be settable while the game is
in progress (not sure about the Amiga variation so left that as-is),
'altmeta' and 'menucolor' are booleans so shouldn't have had optfn_XXX
functions; 'MACgraphics' and 'subkeyvalue' were conditionally defined
differently in options.c than in optlist.h.
This commit is contained in:
PatR
2020-04-22 13:39:38 -07:00
parent f9f423b385
commit 0ae84411a0
6 changed files with 22 additions and 96 deletions
+3 -5
View File
@@ -69,7 +69,7 @@ pfx_##a,
al, z, #a, Off, h, 0 },
#endif
/* B:nm, ln, opt_*, setwhere?, on?, negat?, val?, dup?, hndlr? Alias, boolptr */
/* B:nm, ln, opt_*, setwhere?, on?, negat?, val?, dup?, hndlr? Alias, bool_p */
/* C:nm, ln, opt_*, setwhere?, negateok?, valok?, dupok?, hndlr? Alias, desc */
/* P:pfx, ln, opt_*, setwhere?, negateok?, valok?, dupok?, hndlr? Alias, desc*/
@@ -88,7 +88,7 @@ pfx_##a,
&sysflags.altmeta)
#else
#ifdef ALTMETA
NHOPTB(altmeta, 0, opt_out, set_in_config, Off, No, No, No, NoAlias,
NHOPTB(altmeta, 0, opt_out, set_in_game, Off, No, No, No, NoAlias,
&iflags.altmeta)
#else
NHOPTB(altmeta, 0, opt_out, set_in_config, Off, No, No, No, NoAlias,
@@ -248,11 +248,9 @@ pfx_##a,
&flags.lit_corridor)
NHOPTB(lootabc, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&flags.lootabc)
#ifdef BACKWARD_COMPAT
#ifdef MAC_GRAPHICS_ENV
#if defined(BACKWARD_COMPAT) && defined(MAC_GRAPHICS_ENV)
NHOPTC(Macgraphics, 70, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"load MACGraphics display symbols")
#endif
#endif
NHOPTB(mail, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.biff)