split DUMPLOG
DUMPLOG requests the DUMPLOG feature as it does now DUMPLOG_CORE requests the internal buffering only (used for CRASHREPORT) This allows CRASHREPORT to access recent messages without performing any file I/O.
This commit is contained in:
@@ -262,8 +262,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef CRASHREPORT
|
||||
# ifndef DUMPLOG
|
||||
# define DUMPLOG // required to get ^P info
|
||||
# ifndef DUMPLOG_CORE
|
||||
# define DUMPLOG_CORE // required to get ^P info
|
||||
# endif
|
||||
# ifdef MACOS
|
||||
# define PANICTRACE
|
||||
@@ -726,9 +726,7 @@ typedef unsigned char uchar;
|
||||
#endif /* LIVELOG */
|
||||
|
||||
#ifdef DUMPLOG
|
||||
#ifndef DUMPLOG_MSG_COUNT
|
||||
#define DUMPLOG_MSG_COUNT 50
|
||||
#endif /* DUMPLOG_MSG_COUNT */
|
||||
#define DUMPLOG_CORE
|
||||
#ifndef DUMPLOG_FILE
|
||||
#define DUMPLOG_FILE "/tmp/nethack.%n.%d.log"
|
||||
/* DUMPLOG_FILE allows following placeholders:
|
||||
@@ -745,5 +743,10 @@ typedef unsigned char uchar;
|
||||
*/
|
||||
#endif /* DUMPLOG_FILE */
|
||||
#endif /* DUMPLOG */
|
||||
#ifdef DUMPLOG_CORE
|
||||
#ifndef DUMPLOG_MSG_COUNT
|
||||
#define DUMPLOG_MSG_COUNT 50
|
||||
#endif /* DUMPLOG_MSG_COUNT */
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
@@ -917,7 +917,7 @@ struct instance_globals_s {
|
||||
boolean shop_filter;
|
||||
|
||||
/* pline.c */
|
||||
#ifdef DUMPLOG
|
||||
#ifdef DUMPLOG_CORE
|
||||
unsigned saved_pline_index; /* slot in saved_plines[] to use next */
|
||||
char *saved_plines[DUMPLOG_MSG_COUNT];
|
||||
#endif
|
||||
|
||||
@@ -2356,7 +2356,7 @@ extern boolean autopick_testobj(struct obj *, boolean) NONNULLARG1;
|
||||
|
||||
/* ### pline.c ### */
|
||||
|
||||
#ifdef DUMPLOG
|
||||
#ifdef DUMPLOG_CORE
|
||||
extern void dumplogmsg(const char *);
|
||||
extern void dumplogfreemessages(void);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user