X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fnote_sub.c;h=662cf9fd54c80db5124e0688e8eb845fa10933bf;hb=d7e4149f2d99ab6eed88685eeeaac614b7139a01;hp=221dcfcf2a2f7b14ed41f8f79de976a5b389932a;hpb=5b045164f4a11b1f4d709820e784e1ca77b61b3f;p=gedcom-parse.git diff --git a/gom/note_sub.c b/gom/note_sub.c index 221dcfc..662cf9f 100644 --- a/gom/note_sub.c +++ b/gom/note_sub.c @@ -113,25 +113,8 @@ Gedcom_ctxt sub_note_start(_ELT_PARAMS_) return (Gedcom_ctxt)result; } -void sub_note_end(_ELT_END_PARAMS_) -{ - Gom_ctxt ctxt = (Gom_ctxt)self; - - if (! ctxt) - NO_CONTEXT; - else { - struct note_sub *note = SAFE_CTXT_CAST(note_sub, ctxt); - if (note) { - char *str = GEDCOM_STRING(parsed_value); - char *newvalue = strdup(str); - if (! newvalue) - MEMORY_ERROR; - else - note->text = newvalue; - } - } -} - +STRING_END_CB(note_sub, sub_note_end, text) + void note_sub_subscribe() { gedcom_subscribe_to_element(ELT_SUB_NOTE, sub_note_start, sub_note_end);