X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Finterface.c;h=0ac773bdb689c617d90ef9318e5ce8ab8b551c39;hb=706c9bfcdfc8d16c3a65243d708af135c2e7c894;hp=ec156bda512355d2720107c970e14588a0294eab;hpb=f6faf6cb1f47727f8693a0bc4e8b9c6b7aff3817;p=gedcom-parse.git diff --git a/gedcom/interface.c b/gedcom/interface.c index ec156bd..0ac773b 100644 --- a/gedcom/interface.c +++ b/gedcom/interface.c @@ -89,3 +89,15 @@ void end_element(Gedcom_elt elt, Gedcom_ctxt parent, Gedcom_ctxt self, (*cb)(parent, self, parsed_value); } +char* val_type_str[] = { N_("null value"), + N_("character string"), + N_("date") }; + +void gedcom_cast_error(char* file, int line, + Gedcom_val_type tried_type, + Gedcom_val_type real_type) +{ + gedcom_warning + (_("Wrong cast of value in file %s, at line %d: %s instead of %s"), + file, line, _(val_type_str[tried_type]), _(val_type_str[real_type])); +}