From: Peter Verthez Date: Mon, 10 Dec 2001 19:59:06 +0000 (+0000) Subject: Implement a message handler for the LEXER_TEST programs. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=21b0a7e7c7b6a4adf3a6c2bbc6ec847d255947e7;p=gedcom-parse.git Implement a message handler for the LEXER_TEST programs. --- 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",