Merge branch 'keni-crdumplog' into NetHack-3.7

This commit is contained in:
nhkeni
2024-02-21 16:27:52 -05:00
14 changed files with 30 additions and 26 deletions

View File

@@ -6611,7 +6611,7 @@ yn_function(
{
char res = '\033', qbuf[QBUFSZ];
struct _cmd_queue cq, *cmdq;
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
unsigned idx = gs.saved_pline_index;
/* buffer to hold query+space+formatted_single_char_response */
char dumplog_buf[QBUFSZ + 1 + 15]; /* [QBUFSZ+1+7] should suffice */
@@ -6653,7 +6653,7 @@ yn_function(
cmdq_add_key(CQ_REPEAT, res);
}
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
if (idx == gs.saved_pline_index) {
/* when idx is still the same as gs.saved_pline_index, the interface
didn't put the prompt into gs.saved_plines[]; we put a simplified

View File

@@ -775,7 +775,7 @@ const struct instance_globals_s g_init_s = {
/* pickup.c */
FALSE, /* shop_filter */
/* pline.c */
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
0U, /* saved_pline_index */
{ NULL }, /* saved_plines */
#endif

View File

@@ -537,7 +537,7 @@ submit_web_report(int cos, const char *msg, const char *why){
#endif // !WIN32
}
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
// config.h turns this on, but make it easy to turn off if needed
if(cos==1) {
int k;
@@ -1191,6 +1191,7 @@ dump_plines(void)
}
}
}
#endif /* DUMPLOG */
#ifdef CRASHREPORT
// lineno==0 gives the most recent message (e.g. "Do you want to call panic..."
@@ -1214,7 +1215,6 @@ get_saved_pline(int lineno){
return NULL;
}
#endif /* CRASHREPORT */
#endif /* DUMPLOG */
/*ARGSUSED*/
static void

View File

@@ -1787,7 +1787,7 @@ do_look(int mode, coord *click_cc)
if (found) {
/* use putmixed() because there may be an encoded glyph present */
putmixed(WIN_MESSAGE, 0, out_str);
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
{
char dmpbuf[BUFSZ];

View File

@@ -17,7 +17,7 @@ static void execplinehandler(const char *);
#ifdef USER_SOUNDS
extern void maybe_play_sound(const char *);
#endif
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
/* keep the most recent DUMPLOG_MSG_COUNT messages */
void
@@ -205,7 +205,7 @@ vpline(const char *line, va_list the_args)
}
msgtyp = MSGTYP_NORMAL;
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
/* We hook here early to have options-agnostic output.
* Unfortunately, that means Norep() isn't honored (general issue) and
* that short lines aren't combined into one longer one (tty behavior).

View File

@@ -1233,7 +1233,7 @@ freedynamicdata(void)
#ifdef USER_SOUNDS
release_sound_mappings();
#endif
#ifdef DUMPLOG
#ifdef DUMPLOG_CORE
dumplogfreemessages();
#endif
discard_gamelog();