X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fgom_internal.h;h=3b482f22578e628dc21940b41d56b0091e0d1914;hb=0ca6020a6c7426de145c81229250b5692321f2d1;hp=01dde5cad0796b41dd93f5f976505dd18938816c;hpb=082066d0c776403b70c366f9a7d1333c7a9fac15;p=gedcom-parse.git diff --git a/gom/gom_internal.h b/gom/gom_internal.h index 01dde5c..3b482f2 100644 --- a/gom/gom_internal.h +++ b/gom/gom_internal.h @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include #endif @@ -109,8 +110,8 @@ void def_elt_end(Gedcom_elt elt, Gedcom_ctxt parent, Gedcom_ctxt self, Gedcom_val parsed_value); void set_xref_type(struct xref_value *xr, const char* str); -struct date_value* dup_date(struct date_value dv); -struct age_value* dup_age(struct age_value age); +int update_date(struct date_value** dv, struct tm* tm_ptr); +int update_time(char** tv, struct tm* tm_ptr); /* Doubly-linked list, but last rec->next is NULL (doesn't go to first rec) */ #define LINK_CHAIN_ELT(STRUCTTYPE, FIRSTVAL, VAL) \ @@ -267,7 +268,7 @@ void NULL_DESTROY(void* anything); = SAFE_CTXT_CAST(STRUCTTYPE, (Gom_ctxt)parent); \ if (obj) { \ struct date_value dv = GEDCOM_DATE(parsed_value); \ - obj->FIELD = dup_date(dv); \ + obj->FIELD = gedcom_new_date_value(&dv); \ if (! obj->FIELD) \ MEMORY_ERROR; \ else \ @@ -288,7 +289,7 @@ void NULL_DESTROY(void* anything); = SAFE_CTXT_CAST(STRUCTTYPE, (Gom_ctxt)parent); \ if (obj) { \ struct age_value age = GEDCOM_AGE(parsed_value); \ - obj->FIELD = dup_age(age); \ + obj->FIELD = gedcom_new_age_value(&age); \ if (! obj->FIELD) \ MEMORY_ERROR; \ else \