From: Peter Verthez Date: Sun, 8 Dec 2002 13:13:45 +0000 (+0000) Subject: Moved common code to gom_internal.h X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f8536669a2c38054a067bfe1596f90744b6c58da;p=gedcom-parse.git Moved common code to gom_internal.h --- 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)