X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom_lex_common.c;h=6f7a1d3ca15252879dee6aa4259a55795727ad74;hb=b05f7d8ed0b8dbd83e8cc8c0b36e276a5652887b;hp=8e83d04555b2f5cff0e734224238032182551ec5;hpb=8c92a223c34fbd674f26520fb990c64a7b2f9147;p=gedcom-parse.git diff --git a/gedcom/gedcom_lex_common.c b/gedcom/gedcom_lex_common.c index 8e83d04..6f7a1d3 100644 --- a/gedcom/gedcom_lex_common.c +++ b/gedcom/gedcom_lex_common.c @@ -48,7 +48,7 @@ int gedcom_lex(); void message_handler(Gedcom_msg_type type, char *msg) { - fprintf(stderr, msg); + fprintf(stderr, "(%d) %s\n", type, msg); } int test_loop(ENCODING enc, char* code) @@ -284,11 +284,15 @@ int test_loop(ENCODING enc, char* code) return CLOSE; \ } \ else { \ + char* ptr; int size; \ /* Reset our state */ \ current_level = -1; \ level_diff = MAXGEDCLEVEL; \ /* ... then terminate lex */ \ yyterminate(); \ + /* Get rid of f*cking compiler warning from lex generated code */ \ + /* yyterminate does return(), so program will never come here */ \ + yy_flex_realloc(ptr, size); \ } \ }