try harder to have --showpaths succeed
This helps avoid a potential chicken-and-egg scenario
with the system configuration file (sysconf).
If sysconf wasn't accessible at the expected location, it
caused an immediate exit, without relaying any helpful
information. That happened even when using:
'nethack --showpaths'
That's particularly unhelpful, because the --showpaths
output might have been useful towards understanding where
NetHack was looking for such things.
That left you without an easy recourse to identify where
the game is looking for the sysconf file. That might be
especially troublesome if you didn't build the game
yourself.
This commit is contained in:
@@ -340,6 +340,10 @@ struct instance_globals_d {
|
||||
boolean decor_fumble_override;
|
||||
boolean decor_levitate_override;
|
||||
|
||||
/* new */
|
||||
boolean deferred_showpaths;
|
||||
const char *deferred_showpaths_dir;
|
||||
|
||||
boolean havestate;
|
||||
unsigned long magic; /* validate that structure layout is preserved */
|
||||
};
|
||||
|
||||
@@ -1072,11 +1072,12 @@ extern int nhclose(int);
|
||||
#ifdef DEBUG
|
||||
extern boolean debugcore(const char *, boolean);
|
||||
#endif
|
||||
extern void reveal_paths(void);
|
||||
extern void reveal_paths(int);
|
||||
extern boolean read_tribute(const char *, const char *, int, char *, int,
|
||||
unsigned);
|
||||
extern boolean Death_quote(char *, int) NONNULLARG1;
|
||||
extern void livelog_add(long ll_type, const char *) NONNULLARG2;
|
||||
ATTRNORETURN extern void do_deferred_showpaths(int) NORETURN;
|
||||
|
||||
/* ### fountain.c ### */
|
||||
|
||||
@@ -3379,6 +3380,7 @@ extern void append_slash(char *) NONNULLARG1;
|
||||
extern boolean check_user_string(const char *) NONNULLARG1;
|
||||
extern char *get_login_name(void);
|
||||
extern unsigned long sys_random_seed(void);
|
||||
ATTRNORETURN extern void after_opt_showpaths(const char *) NORETURN;
|
||||
#endif /* UNIX */
|
||||
|
||||
/* ### unixtty.c ### */
|
||||
|
||||
Reference in New Issue
Block a user