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
Definition of SUB_MAKEFUNC.
[gedcom-parse.git]
/
gom
/
note_sub.c
diff --git
a/gom/note_sub.c
b/gom/note_sub.c
index 5af12ca621fe3f83c92329b80f7568cdb0392bdc..2d748a6017ee8be6f77339d3cbbefcbf39889aaf 100644
(file)
--- a/
gom/note_sub.c
+++ b/
gom/note_sub.c
@@
-52,11
+52,8
@@
Gedcom_ctxt sub_note_start(_ELT_PARAMS_)
if (! ctxt)
NO_CONTEXT;
else {
if (! ctxt)
NO_CONTEXT;
else {
- struct note_sub *note = (struct note_sub *)malloc(sizeof(struct note_sub));
- if (! note)
- MEMORY_ERROR;
- else {
- memset (note, 0, sizeof(struct note_sub));
+ struct note_sub *note = SUB_MAKEFUNC(note_sub)();
+ if (note) {
if (GEDCOM_IS_XREF_PTR(parsed_value))
note->reference = GEDCOM_XREF_PTR(parsed_value);
if (GEDCOM_IS_XREF_PTR(parsed_value))
note->reference = GEDCOM_XREF_PTR(parsed_value);
@@
-113,6
+110,8
@@
Gedcom_ctxt sub_note_start(_ELT_PARAMS_)
return (Gedcom_ctxt)result;
}
return (Gedcom_ctxt)result;
}
+DEFINE_SUB_MAKEFUNC(note_sub)
+
DEFINE_STRING_END_CB(note_sub, sub_note_end, text)
DEFINE_ADDFUNC2(note_sub, source_citation, citation)
DEFINE_STRING_END_CB(note_sub, sub_note_end, text)
DEFINE_ADDFUNC2(note_sub, source_citation, citation)