X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fplace.c;h=7385a56f84f1a311a82e621f188c9cc3bc9d5f4c;hb=4946f8418bfa1c41bb410995dbc9c5ac272c4c74;hp=bb6ead6586f43499bea300d1be4047778af01c9c;hpb=bdf47fdee469d5a1d7ddfd06a0e4b26f3b40b0f4;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; +}