Add end-of-game dumplogs
This is based on the "new" dumplog patch for 3.6.0, by Maxime Bacoux. Define DUMPLOG to enable. By default only enabled for the TTY linux.
This commit is contained in:
@@ -508,6 +508,32 @@ typedef unsigned char uchar;
|
||||
but it isn't necessary for successful operation of the program */
|
||||
#define FREE_ALL_MEMORY /* free all memory at exit */
|
||||
|
||||
/* #define DUMPLOG */ /* End-of-game dump logs */
|
||||
#ifdef DUMPLOG
|
||||
|
||||
#ifndef DUMPLOG_MSG_COUNT
|
||||
#define DUMPLOG_MSG_COUNT 50
|
||||
#endif
|
||||
|
||||
#ifndef DUMPLOG_FILE
|
||||
#define DUMPLOG_FILE "/tmp/nethack.%n.%d.log"
|
||||
/* DUMPLOG_FILE allows following placeholders:
|
||||
%% literal '%'
|
||||
%v version (eg. "3.6.1-0")
|
||||
%u game UID
|
||||
%t game start time, UNIX timestamp format
|
||||
%T current time, UNIX timestamp format
|
||||
%d game start time, YYYYMMDDhhmmss format
|
||||
%D current time, YYYYMMDDhhmmss format
|
||||
%n player name
|
||||
%N first character of player name
|
||||
DUMPLOG_FILE is not used if SYSCF is defined
|
||||
*/
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
|
||||
@@ -141,6 +141,8 @@ E int NDECL(getbones);
|
||||
|
||||
/* ### botl.c ### */
|
||||
|
||||
E char *NDECL(do_statusline1);
|
||||
E char *NDECL(do_statusline2);
|
||||
E int FDECL(xlev_to_rank, (int));
|
||||
E int FDECL(title_to_mon, (const char *, int *, int *));
|
||||
E void NDECL(max_rank_sz);
|
||||
@@ -268,6 +270,7 @@ E void NDECL(warnreveal);
|
||||
E int FDECL(dosearch0, (int));
|
||||
E int NDECL(dosearch);
|
||||
E void NDECL(sokoban_detect);
|
||||
E void NDECL(dump_map);
|
||||
E void FDECL(reveal_terrain, (int, int));
|
||||
|
||||
/* ### dig.c ### */
|
||||
@@ -2711,6 +2714,11 @@ E void FDECL(genl_status_threshold, (int, int, anything, int, int, int));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
E void FDECL(dump_open_log, (time_t));
|
||||
E void NDECL(dump_close_log);
|
||||
E void FDECL(dump_redirect, (boolean));
|
||||
E void FDECL(dump_forward_putstr, (winid, int, const char*, int));
|
||||
|
||||
/* ### wizard.c ### */
|
||||
|
||||
E void NDECL(amulet);
|
||||
|
||||
@@ -201,6 +201,7 @@ struct instance_flags {
|
||||
boolean vision_inited; /* true if vision is ready */
|
||||
boolean sanity_check; /* run sanity checks */
|
||||
boolean mon_polycontrol; /* debug: control monster polymorphs */
|
||||
boolean in_dumplog; /* doing the dumplog right now? */
|
||||
|
||||
/* stuff that is related to options and/or user or platform preferences
|
||||
*/
|
||||
|
||||
@@ -15,6 +15,9 @@ struct sysopt {
|
||||
char *shellers; /* like wizards, for ! command (-DSHELL); also ^Z */
|
||||
char *genericusers; /* usernames that prompt for user name */
|
||||
char *debugfiles; /* files to show debugplines in. '*' is all. */
|
||||
#ifdef DUMPLOG
|
||||
char *dumplogfile; /* where the dump file is saved */
|
||||
#endif
|
||||
int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES")
|
||||
* so sysconf's DEBUGFILES shouldn't override it;
|
||||
* 0: getenv() hasn't been attempted yet;
|
||||
|
||||
Reference in New Issue
Block a user