X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fgom_internal.h;h=46c42a100815edb60b732c60de7fa25decb014e5;hb=d069cfbd954ca8d53d780ce97d7da1d363bb51fe;hp=b3075501a2541d1c8cc79fbab53904a19a735623;hpb=a5916b907efea6ee54ec1936588c6f32c0d0e548;p=gedcom-parse.git diff --git a/gom/gom_internal.h b/gom/gom_internal.h index b307550..46c42a1 100644 --- a/gom/gom_internal.h +++ b/gom/gom_internal.h @@ -75,6 +75,10 @@ void gom_cast_error(const char* file, int line, void gom_no_context(const char* file, int line); void gom_unexpected_context(const char* file, int line, OBJ_TYPE found); +int gom_write_xref_list(Gedcom_write_hndl hndl, + Gedcom_elt elt, int tag, int parent_rec_or_elt, + struct xref_list* val); + #define MAKE_GOM_CTXT(CTXT_TYPE, STRUCTTYPE, CTXT_PTR) \ make_gom_ctxt(CTXT_TYPE, T_ ## STRUCTTYPE, CTXT_PTR) @@ -105,9 +109,6 @@ 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); - /* Doubly-linked list, but last rec->next is NULL (doesn't go to first rec) */ #define LINK_CHAIN_ELT(STRUCTTYPE, FIRSTVAL, VAL) \ { \ @@ -263,7 +264,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 \ @@ -284,7 +285,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 \