Moved gedcom_set_error_handling to interface.c to make conversion of docs
[gedcom-parse.git] / gedcom / gedcom.y
index b94f7fa37c612217c3d1c036e5084375037f4bd0..5448c74b89e26a3d6207e0fa33b37f9b5cb86aae 100644 (file)
@@ -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 */
@@ -4349,9 +4353,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;
-}