From 4b83412ea7b31c503da2a1279362d90bc61eeecc Mon Sep 17 00:00:00 2001 From: Mark Kim Date: Thu, 23 Sep 2021 17:07:40 -0400 Subject: [PATCH] IM debugging updates - Control debugging via debug.h (previously im.c had its own defined constant to control this.) - Remove reference to an undefined symbol im_event_fp within a DEBUG block. Also: - Explicitly include i18n.h required by im.c (though it appears to be getting included by another file indirectly.) This should be a no-op change. --- src/im.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/im.c b/src/im.c index ac7d5862b..f960ab9cd 100644 --- a/src/im.c +++ b/src/im.c @@ -43,6 +43,12 @@ #include #include "im.h" +#include "i18n.h" +#include "debug.h" + +#ifdef DEBUG +#include +#endif /* *************************************************************************** @@ -94,7 +100,9 @@ static const char *const im_tip_text[NUM_IM_TIPS] = { * CONSTANTS */ -/* #define IM_DEBUG 1 */ +#ifdef DEBUG +#define IM_DEBUG 1 +#endif #define MAX_SECTIONS 8 /* Maximum numbers of sections in *.im file */ #define MAX_UNICODE_SEQ 16 /* Output of state machine, including NUL */ @@ -1876,8 +1884,7 @@ void im_init(IM_DATA * im, int lang) #ifdef DEBUG assert(0 <= im->lang && im->lang < NUM_LANGS); - if (im_event_fp) - printf("Initializing IM for %s...\n", lang_prefixes[im->lang]); + printf("Initializing IM for %s...\n", lang_prefixes[im->lang]); #endif /* Initialize the individual IM */