X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Finterface.c;h=5f7ceee13c06398cf0b90d399490155ecccb8548;hb=d831ac6ddba5b5940e0c3a7a1581e57188d84053;hp=265c28f9dbf5886dd012ef8cf6423b2bbd4ed4e6;hpb=40ff55f97de314e09359361d83f7eacd47fa3bce;p=gedcom-parse.git diff --git a/gedcom/interface.c b/gedcom/interface.c index 265c28f..5f7ceee 100644 --- a/gedcom/interface.c +++ b/gedcom/interface.c @@ -24,11 +24,11 @@ #include "gedcom_internal.h" #include "interface.h" -static Gedcom_rec_start_cb record_start_callback [LAST_REC] = { NULL }; -static Gedcom_rec_end_cb record_end_callback [LAST_REC] = { NULL }; -static Gedcom_elt_start_cb element_start_callback[LAST_ELT] = { NULL }; -static Gedcom_elt_end_cb element_end_callback [LAST_ELT] = { NULL }; -static Gedcom_def_cb default_cb = NULL; +static Gedcom_rec_start_cb record_start_callback [NR_OF_RECS] = { NULL }; +static Gedcom_rec_end_cb record_end_callback [NR_OF_RECS] = { NULL }; +static Gedcom_elt_start_cb element_start_callback[NR_OF_ELTS] = { NULL }; +static Gedcom_elt_end_cb element_end_callback [NR_OF_ELTS] = { NULL }; +static Gedcom_def_cb default_cb = NULL; void gedcom_set_default_callback(Gedcom_def_cb func) { @@ -89,3 +89,7 @@ void end_element(Gedcom_elt elt, Gedcom_ctxt parent, Gedcom_ctxt self, (*cb)(parent, self, parsed_value); } +void gedcom_cast_error(char* file, int line) +{ + gedcom_warning(_("Wrong cast of value in file %s, at line %d"), file, line); +}