X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Faddress.c;h=1766d937164677dc659b34dcbddfd9a9b157e896;hb=f8536669a2c38054a067bfe1596f90744b6c58da;hp=ed2ae35a41d70cc4ac452fa215e138ff4a14ab08;hpb=5b045164f4a11b1f4d709820e784e1ca77b61b3f;p=gedcom-parse.git diff --git a/gom/address.c b/gom/address.c index ed2ae35..1766d93 100644 --- a/gom/address.c +++ b/gom/address.c @@ -72,25 +72,6 @@ Gedcom_ctxt sub_addr_start(_ELT_PARAMS_) return (Gedcom_ctxt)result; } -void sub_addr_end(_ELT_END_PARAMS_) -{ - Gom_ctxt ctxt = (Gom_ctxt)self; - - if (! ctxt) - NO_CONTEXT; - else { - struct address *addr = SAFE_CTXT_CAST(address, ctxt); - if (addr) { - char *str = GEDCOM_STRING(parsed_value); - char *newvalue = strdup(str); - if (! newvalue) - MEMORY_ERROR; - else - addr->full_label = newvalue; - } - } -} - Gedcom_ctxt sub_addr_cont_start(_ELT_PARAMS_) { Gom_ctxt ctxt = (Gom_ctxt)parent; @@ -103,6 +84,7 @@ Gedcom_ctxt sub_addr_cont_start(_ELT_PARAMS_) return (Gedcom_ctxt)result; } +STRING_END_CB(address, sub_addr_end, full_label) STRING_CB(address, sub_addr_adr1_start, line1) STRING_CB(address, sub_addr_adr2_start, line2) STRING_CB(address, sub_addr_city_start, city)