X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fsource_citation.c;fp=gom%2Fsource_citation.c;h=8aa6b51687a1311ad2bdaf8b9ff82acce69aeb6e;hb=d7e4149f2d99ab6eed88685eeeaac614b7139a01;hp=ef03835b47075e031df5f5024e2d7cb7e12dab9d;hpb=3cf0076cf503588c0c229179bae98373188d2c47;p=gedcom-parse.git diff --git a/gom/source_citation.c b/gom/source_citation.c index ef03835..8aa6b51 100644 --- a/gom/source_citation.c +++ b/gom/source_citation.c @@ -113,6 +113,7 @@ void sub_citation_end(_ELT_END_PARAMS_) cit->description = newvalue; } } + destroy_gom_ctxt(ctxt); } } @@ -136,33 +137,13 @@ Gedcom_ctxt sub_cit_text_start(_ELT_PARAMS_) return (Gedcom_ctxt)result; } -void sub_cit_text_end(_ELT_END_PARAMS_) -{ - Gom_ctxt ctxt = (Gom_ctxt)self; - - if (! ctxt) - NO_CONTEXT; - else { - if (GEDCOM_IS_STRING(parsed_value)) { - struct text *t = SAFE_CTXT_CAST(text, ctxt); - if (t) { - char *str = GEDCOM_STRING(parsed_value); - char *newvalue = strdup(str); - if (! newvalue) - MEMORY_ERROR; - else - t->text = newvalue; - } - } - } -} - STRING_CB(source_citation, sub_cit_page_start, page) STRING_CB(source_citation, sub_cit_even_start, event) STRING_CB(source_citation, sub_cit_even_role_start, role) NULL_CB(source_citation, sub_cit_data_start) DATE_CB(source_citation, sub_cit_data_date_start, date) STRING_CB(source_citation, sub_cit_quay_start, quality) +STRING_END_CB(text, sub_cit_text_end, text) void citation_subscribe() {