From 708abf4997146113a96402227917d727c3860cbf Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 23 Aug 2020 20:19:30 +0200 Subject: [PATCH] CR version 69, new attribute: section MESSAGE.section replaces MESSAGETYPE.section --- src/creport.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/creport.c b/src/creport.c index 45866ae07..f2aed9971 100644 --- a/src/creport.c +++ b/src/creport.c @@ -7,11 +7,10 @@ #include "travelthru.h" /* tweakable features */ -#define RENDER_CRMESSAGES #define RESOURCECOMPAT #define BUFFERSIZE 32768 -/* riesig, wegen spionage-messages :-( */ +/* FIXME: riesig, wegen spionage-messages :-( */ static char g_bigbuf[BUFFERSIZE]; #include @@ -84,7 +83,7 @@ static char g_bigbuf[BUFFERSIZE]; bool opt_cr_absolute_coords = false; /* globals */ -#define C_REPORT_VERSION 68 +#define C_REPORT_VERSION 69 struct locale *crtag_locale(void) { static struct locale * lang; @@ -544,16 +543,17 @@ static void render_messages(FILE * F, faction * f, message_list * msgs) bool printed = false; const struct message_type *mtype = m->msg->type; unsigned int hash = mtype->key; -#ifdef RENDER_CRMESSAGES g_bigbuf[0] = '\0'; if (nr_render(m->msg, f->locale, g_bigbuf, sizeof(g_bigbuf), f) > 0) { fprintf(F, "MESSAGE %d\n", message_id(m->msg)); fprintf(F, "%u;type\n", hash); + if (m->msg->type->section) { + fprintf(F, "\"%s\";section\n", m->msg->type->section); + } fwritestr(F, g_bigbuf); fputs(";rendered\n", F); printed = true; } -#endif g_bigbuf[0] = '\0'; if (cr_render(m->msg, g_bigbuf, (const void *)f) == 0) { if (g_bigbuf[0]) {