+/* This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+
+ (C) 2001 by The Genes Development Team
+ Original author: Peter Verthez (Peter.Verthez@advalvas.be)
+*/
+
/* $Id$ */
/* $Name$ */
-#include "gedcom.h"
+#include "gedcom_internal.h"
#include "multilex.h"
#include "encoding.h"
-int line_no = 1;
+int line_no;
typedef int (*lex_func)(void);
lex_func lf;
ENCODING enc;
int result = 1;
FILE* file = fopen (file_name, "r");
+ line_no = 1;
if (!file) {
gedcom_error("Could not open file '%s'\n", file_name);
return 1;
result = gedcom_parse();
}
lexer_close();
+ fclose(file);
return result;
}