nethack --version:dump

Add the 'dump' argument to the existing '--version' command-line
option to display the magic numbers used when validating save and
bones files for compatibility.

Nothing exciting, just a line of 5 hex values.  I was going to also
list the values for however many save and bones files are specified
on the command line but it seems to need more effort than I care to
expend.  And I hadn't made up my mind whether that should be done by
nethack, recover, or some new standalone program.  [Single line of
relatively raw output is so that they could be compared more easily.]

nethack --version:bad-argument was writing a message to stdout and
then starting play--which immediately overwrites stdout.  Have it
quit instead.  Player wasn't trying to start a game and quitting is
what it does with --version:good-argument.
This commit is contained in:
PatR
2024-02-13 15:58:10 -08:00
parent d511944dda
commit bf8a634760
5 changed files with 72 additions and 23 deletions

View File

@@ -3387,6 +3387,7 @@ extern unsigned long get_feature_notice_ver(char *) NO_NNARGS;
extern unsigned long get_current_feature_ver(void);
extern const char *copyright_banner_line(int) NONNULL;
extern void early_version_info(boolean);
extern void dump_version_info(void);
/* ### video.c ### */
@@ -3791,3 +3792,5 @@ extern void port_insert_pastebuf(char *);
#endif /* !MAKEDEFS_C && !MDLIB_C */
#endif /* EXTERN_H */
/*extern.h*/