NULL_CB(header, head_plac_start)
STRING_CB(header, head_plac_form_start, place_hierarchy)
NULL_CB(header, head_note_start) /* the end callback will fill the value */
+STRING_END_CB(header, head_note_end, note)
-void head_note_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct header *head = SAFE_CTXT_CAST(header, ctxt);
- if (head) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- head->note = newvalue;
- }
- }
-}
-
void header_add_address(Gom_ctxt ctxt, struct address* addr)
{
struct header *head = SAFE_CTXT_CAST(header, ctxt);
GET_REC_BY_XREF(multimedia, XREF_OBJE, gom_get_multimedia_by_xref)
STRING_CB(multimedia, obje_form_start, form)
STRING_CB(multimedia, obje_titl_start, title)
-NULL_CB(multimedia, obje_blob_start)
+NULL_CB(multimedia, obje_blob_start)
+STRING_END_CB(multimedia, obje_blob_end, data)
XREF_CB(multimedia, obje_obje_start, continued, make_multimedia_record)
-void obje_blob_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct multimedia *obj = SAFE_CTXT_CAST(multimedia, ctxt);
- if (obj) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- obj->data = newvalue;
- }
- }
-}
-
Gedcom_ctxt obje_blob_cont_start(_ELT_PARAMS_)
{
Gom_ctxt ctxt = (Gom_ctxt)parent;
note = make_note_record(xr->string);
xr->object = (Gedcom_ctxt) note;
}
- if (note) {
- note->text = strdup(GEDCOM_STRING(parsed_value));
- if (! note->text)
- MEMORY_ERROR;
- else
- result = MAKE_GOM_CTXT(rec, note, xr->object);
- }
+ if (note)
+ result = MAKE_GOM_CTXT(rec, note, xr->object);
return (Gedcom_ctxt)result;
}
-void note_end(_REC_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct note *note = SAFE_CTXT_CAST(note, ctxt);
- if (note) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- note->text = newvalue;
- }
- }
-}
-
+STRING_END_REC_CB(note, note_end, text)
GET_REC_BY_XREF(note, XREF_NOTE, gom_get_note_by_xref)
Gedcom_ctxt sub_cont_conc_start(_ELT_PARAMS_)
return (Gedcom_ctxt)result;
}
-void sub_note_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct note_sub *note = SAFE_CTXT_CAST(note_sub, ctxt);
- if (note) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- note->text = newvalue;
- }
- }
-}
-
+STRING_END_CB(note_sub, sub_note_end, text)
+
void note_sub_subscribe()
{
gedcom_subscribe_to_element(ELT_SUB_NOTE, sub_note_start, sub_note_end);
NULL_CB(source, sour_data_start)
STRING_CB(source, sour_data_agnc_start, data.agency)
NULL_CB(source, sour_auth_start) /* value set by end callback */
+STRING_END_CB(source, sour_auth_end, author)
NULL_CB(source, sour_titl_start) /* value set by end callback */
+STRING_END_CB(source, sour_titl_end, title)
STRING_CB(source, sour_abbr_start, abbreviation)
NULL_CB(source, sour_publ_start) /* value set by end callback */
+STRING_END_CB(source, sour_publ_end, publication)
NULL_CB(source, sour_text_start) /* value set by end callback */
+STRING_END_CB(source, sour_text_end, text)
XREF_CB(source, sour_repo_start, repository.link, make_repository_record)
-void sour_auth_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct source *sour = SAFE_CTXT_CAST(source, ctxt);
- if (sour) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- sour->author = newvalue;
- }
- }
-}
-
-void sour_titl_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct source *sour = SAFE_CTXT_CAST(source, ctxt);
- if (sour) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- sour->title = newvalue;
- }
- }
-}
-
-void sour_publ_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct source *sour = SAFE_CTXT_CAST(source, ctxt);
- if (sour) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- sour->publication = newvalue;
- }
- }
-}
-
-void sour_text_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- struct source *sour = SAFE_CTXT_CAST(source, ctxt);
- if (sour) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- sour->text = newvalue;
- }
- }
-}
-
void source_subscribe()
{
gedcom_subscribe_to_record(REC_SOUR, sour_start, def_rec_end);
cit->description = newvalue;
}
}
+ destroy_gom_ctxt(ctxt);
}
}
return (Gedcom_ctxt)result;
}
-void sub_cit_text_end(_ELT_END_PARAMS_)
-{
- Gom_ctxt ctxt = (Gom_ctxt)self;
-
- if (! ctxt)
- NO_CONTEXT;
- else {
- if (GEDCOM_IS_STRING(parsed_value)) {
- struct text *t = SAFE_CTXT_CAST(text, ctxt);
- if (t) {
- char *str = GEDCOM_STRING(parsed_value);
- char *newvalue = strdup(str);
- if (! newvalue)
- MEMORY_ERROR;
- else
- t->text = newvalue;
- }
- }
- }
-}
-
STRING_CB(source_citation, sub_cit_page_start, page)
STRING_CB(source_citation, sub_cit_even_start, event)
STRING_CB(source_citation, sub_cit_even_role_start, role)
NULL_CB(source_citation, sub_cit_data_start)
DATE_CB(source_citation, sub_cit_data_date_start, date)
STRING_CB(source_citation, sub_cit_quay_start, quality)
+STRING_END_CB(text, sub_cit_text_end, text)
void citation_subscribe()
{