X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fplace.c;fp=gom%2Fplace.c;h=7385a56f84f1a311a82e621f188c9cc3bc9d5f4c;hb=082066d0c776403b70c366f9a7d1333c7a9fac15;hp=bb6ead6586f43499bea300d1be4047778af01c9c;hpb=8a73dd117ad3bf06a89595f7cd8fdef45c231a6e;p=gedcom-parse.git diff --git a/gom/place.c b/gom/place.c index bb6ead6..7385a56 100644 --- a/gom/place.c +++ b/gom/place.c @@ -115,3 +115,24 @@ void place_cleanup(struct place* place) } SAFE_FREE(place); } + +int write_place(Gedcom_write_hndl hndl, int parent, struct place* place) +{ + int result = 0; + + if (!place) return 1; + + result |= gedcom_write_element_str(hndl, ELT_SUB_PLAC, 0, + parent, place->value); + if (place->place_hierarchy) + result |= gedcom_write_element_str(hndl, ELT_SUB_PLAC_FORM, 0, + ELT_SUB_PLAC, place->place_hierarchy); + if (place->citation) + result |= write_citations(hndl, ELT_SUB_PLAC, place->citation); + if (place->note) + result |= write_note_subs(hndl, ELT_SUB_PLAC, place->note); + if (place->extra) + result |= write_user_data(hndl, place->extra); + + return result; +}