}
int gedcom_write_record_str(Gedcom_write_hndl hndl,
- Gedcom_rec rec, int tag,
- char* xrefstr, char* val)
+ Gedcom_rec rec, char* xrefstr, char* val)
{
int result = 1;
if (check_type(rec, (val ? GV_CHAR_PTR : GV_NULL)))
- result = _gedcom_write_val(hndl, rec, tag, -1, xrefstr, convert_at(val));
+ result = _gedcom_write_val(hndl, rec, 0, -1, xrefstr, convert_at(val));
return result;
}
return result;
}
-int gedcom_write_record_xref(Gedcom_write_hndl hndl,
- Gedcom_rec rec, int tag,
- char* xrefstr, struct xref_value* val)
-{
- int result = 1;
- if (check_type(rec, (val ? GV_XREF_PTR : GV_NULL)))
- result = _gedcom_write_val(hndl, rec, tag, -1, xrefstr, val->string);
- return result;
-}
-
int gedcom_write_element_xref(Gedcom_write_hndl hndl,
Gedcom_elt elt, int tag, int parent_rec_or_elt,
struct xref_value* val)
struct family* obj;
for (obj = gom_first_family; obj; obj = obj->next) {
- result |= gedcom_write_record_str(hndl, REC_FAM, 0,
- obj->xrefstr, NULL);
+ result |= gedcom_write_record_str(hndl, REC_FAM, obj->xrefstr, NULL);
if (obj->event)
result |= write_events(hndl, REC_FAM, EVT_TYPE_FAMILY, obj->event);
if (obj->husband)
int result = 0;
int i;
- result |= gedcom_write_record_str(hndl, REC_HEAD, 0, NULL, NULL);
+ result |= gedcom_write_record_str(hndl, REC_HEAD, NULL, NULL);
if (gom_header.charset.name)
- result |= gedcom_write_element_str(hndl, ELT_HEAD_CHAR, 0,
- REC_HEAD,
+ result |= gedcom_write_element_str(hndl, ELT_HEAD_CHAR, 0, REC_HEAD,
gom_header.charset.name);
if (gom_header.charset.version)
result |= gedcom_write_element_str(hndl, ELT_HEAD_CHAR_VERS, 0,
struct individual* obj;
for (obj = gom_first_individual; obj; obj = obj->next) {
- result |= gedcom_write_record_str(hndl, REC_INDI, 0,
- obj->xrefstr, NULL);
+ result |= gedcom_write_record_str(hndl, REC_INDI, obj->xrefstr, NULL);
if (obj->restriction_notice)
result |= gedcom_write_element_str(hndl, ELT_INDI_RESN, 0,
REC_INDI, obj->restriction_notice);
struct multimedia* obj;
for (obj = gom_first_multimedia; obj; obj = obj->next) {
- result |= gedcom_write_record_str(hndl, REC_OBJE, 0,
- obj->xrefstr, NULL);
+ result |= gedcom_write_record_str(hndl, REC_OBJE, obj->xrefstr, NULL);
if (obj->form)
result |= gedcom_write_element_str(hndl, ELT_OBJE_FORM, 0,
REC_OBJE, obj->form);
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);
+ result |= gedcom_write_record_str(hndl, REC_NOTE, obj->xrefstr, obj->text);
if (obj->citation)
result |= write_citations(hndl, REC_NOTE, obj->citation);
if (obj->ref)
struct repository* obj;
for (obj = gom_first_repository; obj; obj = obj->next) {
- result |= gedcom_write_record_str(hndl, REC_REPO, 0,
- obj->xrefstr, NULL);
+ result |= gedcom_write_record_str(hndl, REC_REPO, obj->xrefstr, NULL);
if (obj->name)
result |= gedcom_write_element_str(hndl, ELT_REPO_NAME, 0,
REC_REPO, obj->name);
struct source* obj;
for (obj = gom_first_source; obj; obj = obj->next) {
- result |= gedcom_write_record_str(hndl, REC_SOUR, 0,
- obj->xrefstr, NULL);
+ result |= gedcom_write_record_str(hndl, REC_SOUR, obj->xrefstr, NULL);
if (obj->data.event || obj->data.agency || obj->data.note)
result |= gedcom_write_element_str(hndl, ELT_SOUR_DATA, 0,
REC_SOUR, NULL);
int result = 0;
if (gom_submission) {
- result |= gedcom_write_record_str(hndl, REC_SUBN, 0,
+ result |= gedcom_write_record_str(hndl, REC_SUBN,
gom_submission->xrefstr, NULL);
if (gom_submission->submitter)
result |= gedcom_write_element_xref(hndl, ELT_SUBN_SUBM, 0,
struct submitter* obj;
for (obj = gom_first_submitter; obj; obj = obj->next) {
- result |= gedcom_write_record_str(hndl, REC_SUBM, 0,
- obj->xrefstr, NULL);
+ result |= gedcom_write_record_str(hndl, REC_SUBM, obj->xrefstr, NULL);
if (obj->name)
result |= gedcom_write_element_str(hndl, ELT_SUBM_NAME, 0, REC_SUBM,
obj->name);
int gedcom_write_set_line_terminator(Enc_line_end end);
int gedcom_write_record_str(Gedcom_write_hndl hndl,
- Gedcom_rec rec, int parsed_tag,
- char* xrefstr, char* val);
-int gedcom_write_element_str(Gedcom_write_hndl hndl, Gedcom_elt elt,
- int parsed_tag, int parent_rec_or_elt,
- char* val);
-
-int gedcom_write_record_xref(Gedcom_write_hndl hndl,
- Gedcom_rec rec, int parsed_tag,
- char* xrefstr, struct xref_value* val);
+ Gedcom_rec rec, char* xrefstr, char* val);
+
+int gedcom_write_element_str(Gedcom_write_hndl hndl, Gedcom_elt elt,
+ int parsed_tag, int parent_rec_or_elt,
+ char* val);
int gedcom_write_element_xref(Gedcom_write_hndl hndl, Gedcom_elt elt,
int parsed_tag, int parent_rec_or_elt,
struct xref_value* val);