From 21b0a7e7c7b6a4adf3a6c2bbc6ec847d255947e7 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Mon, 10 Dec 2001 19:59:06 +0000 Subject: [PATCH] Implement a message handler for the LEXER_TEST programs. --- gedcom/gedcom_lex_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gedcom/gedcom_lex_common.c b/gedcom/gedcom_lex_common.c index f9fa955..d528b02 100644 --- a/gedcom/gedcom_lex_common.c +++ b/gedcom/gedcom_lex_common.c @@ -46,11 +46,17 @@ int line_no = 1; int gedcom_lex(); +void message_handler(Gedcom_msg_type type, char *msg) +{ + fprintf(stderr, msg); +} + int test_loop(ENCODING enc, char* code) { int tok, res; init_encodings(); set_encoding_width(enc); + gedcom_set_message_handler(message_handler); res = open_conv_to_internal(code); if (!res) { gedcom_error("Unable to open conversion context: %s", -- 2.30.2