X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fnote.c;h=0dd24430501862bc01cd71f800156e0f1c7caecf;hb=082066d0c776403b70c366f9a7d1333c7a9fac15;hp=41dab5f5697bb3df1e6d639c6ed36f6e5ea0590d;hpb=8a73dd117ad3bf06a89595f7cd8fdef45c231a6e;p=gedcom-parse.git diff --git a/gom/note.c b/gom/note.c index 41dab5f..0dd2443 100644 --- a/gom/note.c +++ b/gom/note.c @@ -144,3 +144,28 @@ struct note* make_note_record(const char* xrefstr) } return note; } + +int write_notes(Gedcom_write_hndl hndl) +{ + int result = 0; + struct note* obj; + + for (obj = gom_first_note; obj; obj = obj->next) { + result |= gedcom_write_record_str(hndl, REC_NOTE, 0, + obj->xrefstr, obj->text); + if (obj->citation) + result |= write_citations(hndl, REC_NOTE, obj->citation); + if (obj->ref) + result |= write_user_refs(hndl, REC_NOTE, obj->ref); + if (obj->record_id) + result |= gedcom_write_element_str(hndl, ELT_SUB_IDENT_RIN, 0, + REC_NOTE, obj->record_id); + if (obj->change_date) + result |= write_change_date(hndl, REC_NOTE, obj->change_date); + if (obj->extra) + result |= write_user_data(hndl, obj->extra); + } + + return result; +} +