dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved context handling, to allow elements out of context.
[gedcom-parse.git]
/
gom
/
lds_event.c
diff --git
a/gom/lds_event.c
b/gom/lds_event.c
index b922bd258992e95faed426cca02caa58877db402..5e287e46ef9ed2256682d9fbbddac50e3584a91f 100644
(file)
--- a/
gom/lds_event.c
+++ b/
gom/lds_event.c
@@
-50,13
+50,14
@@
Gedcom_ctxt sub_lds_event_start(_ELT_PARAMS_)
free(lds_evt);
}
else {
free(lds_evt);
}
else {
- switch (ctxt->ctxt_type) {
+ int type = ctxt_type(ctxt);
+ switch (type) {
case REC_FAM:
ADDFUNC2(family,lds_event)(ctxt, lds_evt); break;
case REC_INDI:
ADDFUNC2(individual,lds_event)(ctxt, lds_evt); break;
default:
case REC_FAM:
ADDFUNC2(family,lds_event)(ctxt, lds_evt); break;
case REC_INDI:
ADDFUNC2(individual,lds_event)(ctxt, lds_evt); break;
default:
- UNEXPECTED_CONTEXT(
ctxt->ctxt_
type);
+ UNEXPECTED_CONTEXT(type);
}
result = MAKE_GOM_CTXT(elt, lds_event, lds_evt);
}
}
result = MAKE_GOM_CTXT(elt, lds_event, lds_evt);
}
@@
-67,6
+68,10
@@
Gedcom_ctxt sub_lds_event_start(_ELT_PARAMS_)
}
DEFINE_SUB_MAKEFUNC(lds_event)
}
DEFINE_SUB_MAKEFUNC(lds_event)
+DEFINE_SUB_ADDFUNC(lds_event)
+DEFINE_SUB_FINDFUNC(lds_event)
+DEFINE_SUB_REMOVEFUNC(lds_event)
+DEFINE_SUB_MOVEFUNC(lds_event)
DEFINE_STRING_CB(lds_event, sub_lds_event_stat_start, date_status)
DEFINE_DATE_CB(lds_event, sub_lds_event_date_start, date)
DEFINE_STRING_CB(lds_event, sub_lds_event_stat_start, date_status)
DEFINE_DATE_CB(lds_event, sub_lds_event_date_start, date)