X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom.y;h=e4482a5bfbaf1183f9ae0716075381d3ca01644b;hb=refs%2Fheads%2Flibiconv-gedcom-1.14;hp=b94f7fa37c612217c3d1c036e5084375037f4bd0;hpb=d41803b9c1bcafabf115a188e3b4a489103bbdca;p=gedcom-parse.git diff --git a/gedcom/gedcom.y b/gedcom/gedcom.y index b94f7fa..e4482a5 100644 --- a/gedcom/gedcom.y +++ b/gedcom/gedcom.y @@ -422,9 +422,13 @@ void clean_up(); %% file : head_sect records trlr_sect - { if (fail == 1) YYABORT; } + { compat_close(); + if (fail == 1) YYABORT; + } | error - { clean_up(); } + { compat_close(); + clean_up(); + } ; records : /* empty */ @@ -4315,26 +4319,13 @@ void cleanup_usertag_buffer() cleanup_buffer(&usertag_buffer); } -/* Enabling debug mode */ -/* level 0: no debugging */ -/* level 1: only internal */ -/* level 2: also bison */ FILE* trace_output; -void gedcom_set_debug_level(int level, FILE* f) +void gedcom_enable_internal_debug() { - if (f != NULL) - trace_output = f; - else - trace_output = stderr; - if (level > 0) { - gedcom_high_level_debug = 1; - } - if (level > 1) { #if YYDEBUG != 0 - gedcom_debug = 1; + gedcom_debug = 1; #endif - } } int gedcom_debug_print(const char* s, ...) @@ -4349,9 +4340,3 @@ int gedcom_debug_print(const char* s, ...) } return(res); } - -/* Setting the error mechanism */ -void gedcom_set_error_handling(Gedcom_err_mech mechanism) -{ - error_mechanism = mechanism; -}