X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fheader.c;h=c5360012f37b1acc42cc6ec19f7f8b52cbfbcb41;hb=f8536669a2c38054a067bfe1596f90744b6c58da;hp=69fb4dff4c33bc9a0a1070f96bbdc495a2f72714;hpb=5b045164f4a11b1f4d709820e784e1ca77b61b3f;p=gedcom-parse.git diff --git a/gom/header.c b/gom/header.c index 69fb4df..c536001 100644 --- a/gom/header.c +++ b/gom/header.c @@ -61,26 +61,8 @@ STRING_CB(header, head_lang_start, language) NULL_CB(header, head_plac_start) STRING_CB(header, head_plac_form_start, place_hierarchy) NULL_CB(header, head_note_start) /* the end callback will fill the value */ +STRING_END_CB(header, head_note_end, note) -void head_note_end(_ELT_END_PARAMS_) -{ - Gom_ctxt ctxt = (Gom_ctxt)self; - - if (! ctxt) - NO_CONTEXT; - else { - struct header *head = SAFE_CTXT_CAST(header, ctxt); - if (head) { - char *str = GEDCOM_STRING(parsed_value); - char *newvalue = strdup(str); - if (! newvalue) - MEMORY_ERROR; - else - head->note = newvalue; - } - } -} - void header_add_address(Gom_ctxt ctxt, struct address* addr) { struct header *head = SAFE_CTXT_CAST(header, ctxt);