options help

The revamped options handling was't doing dynamic help properly.
After listing the booleans, it listed them again amongest the
compound options.  Since their description field is Null, that
could be a big problem.  sprintf(buf,"%s",NULL) on OSX produces
"(null)" but most sprintf()'s would probably crash instead.

The 'other' options (autopickup exceptions, menucolors, &c) were
not listed at all.  (I don't remember whether that was also the
case before the revamp.)  Now they're listed but not explained.

The 'msg_window' description was unhelpful; this replaces it.
A couple of others were longer than necessary so they've been
shortened.  The rest of optlist.h is reformatting wide lines.

Recently added 'safe_wait' option was included in the Guidebook
but not in dat/opthelp; add it.
This commit is contained in:
PatR
2020-11-26 02:20:00 -08:00
parent 2db51cf8bd
commit ec153a27bd
4 changed files with 94 additions and 54 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.363 $ $NHDT-Date: 1606343573 2020/11/25 22:32:53 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.364 $ $NHDT-Date: 1606385979 2020/11/26 10:19:39 $
General Fixes and Modified Features
-----------------------------------
@@ -398,6 +398,9 @@ fire/frost horn feedback when zapped by monster was inaccurate (falsely
claimed that it was "directed at self" when attacking hero)
tins of spinach and 'dead' eggs could cause out of array bounds access
attempting to index into mons[] by polyfodder() macro
options help ('? g') listed all boolean options, then repeated them among
the compound options; on OSX they showed a description of "(null)"
but for other sprintf implementations they might cause a crash
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support