enc = determine_encoding(file);
if (lexer_init(enc, file)) {
- line_no = 1;
+ line_no = 0;
make_xref_table();
result = gedcom_parse();
line_no = 0;
}
return result;
}
+
+int gedcom_check_version(int major, int minor, int patch)
+{
+ if (major < GEDCOM_PARSE_VERSION_MAJOR)
+ return 1;
+ else if (major > GEDCOM_PARSE_VERSION_MAJOR)
+ return 0;
+ else if (minor < GEDCOM_PARSE_VERSION_MINOR)
+ return 1;
+ else if (minor > GEDCOM_PARSE_VERSION_MINOR)
+ return 0;
+ else if (patch <= GEDCOM_PARSE_VERSION_PATCH)
+ return 1;
+ else
+ return 0;
+}