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
Use preprocessor symbol VALUE_IF_MISSING.
[gedcom-parse.git]
/
gedcom
/
gedcom.y
diff --git
a/gedcom/gedcom.y
b/gedcom/gedcom.y
index c047b6130ecd2eeb43275e7669343abd269d48f1..f6d281e0811eeea3ae84323d71476920a279486a 100644
(file)
--- a/
gedcom/gedcom.y
+++ b/
gedcom/gedcom.y
@@
-178,7
+178,7
@@
Gedcom_ctxt get_parentctxt(int offset);
void pop_countarray();
int count_tag(int tag);
int check_occurrence(int tag);
void pop_countarray();
int count_tag(int tag);
int check_occurrence(int tag);
-void clean_up();
+void clean_up();
#define HANDLE_ERROR \
{ if (error_mechanism == IMMED_FAIL) { \
#define HANDLE_ERROR \
{ if (error_mechanism == IMMED_FAIL) { \
@@
-1423,7
+1423,7
@@
note_line_item : /* empty */
gedcom_error(_("Missing value")); YYERROR;
}
else {
gedcom_error(_("Missing value")); YYERROR;
}
else {
- $$ =
"-"
;
+ $$ =
VALUE_IF_MISSING
;
}
}
| DELIM line_item
}
}
| DELIM line_item
@@
-2281,12
+2281,13
@@
continuation_sub : cont_sect /* 0:M */
| conc_sect /* 0:M */
;
| conc_sect /* 0:M */
;
-cont_sect : OPEN DELIM TAG_CONT
mand
_line_item
+cont_sect : OPEN DELIM TAG_CONT
opt
_line_item
{ $<ctxt>$ = start_element(ELT_SUB_CONT,
PARENT, $1, $3, $4,
{ $<ctxt>$ = start_element(ELT_SUB_CONT,
PARENT, $1, $3, $4,
- GEDCOM_MAKE_STRING(val1, $4));
+ GEDCOM_MAKE_
NULL_OR_
STRING(val1, $4));
SAFE_BUF_ADDCHAR(&concat_buffer, '\n');
SAFE_BUF_ADDCHAR(&concat_buffer, '\n');
- safe_buf_append(&concat_buffer, $4);
+ if (GEDCOM_IS_STRING(&val1))
+ safe_buf_append(&concat_buffer, $4);
START(CONT, $1, $<ctxt>$)
}
no_std_subs
START(CONT, $1, $<ctxt>$)
}
no_std_subs
@@
-3744,7
+3745,7
@@
mand_pointer : /* empty */ { gedcom_error(_("Missing pointer")); YYERROR; }
mand_line_item : /* empty */
{ if (compat_mode(C_NO_REQUIRED_VALUES)) {
gedcom_debug_print("==Val: ==");
mand_line_item : /* empty */
{ if (compat_mode(C_NO_REQUIRED_VALUES)) {
gedcom_debug_print("==Val: ==");
- $$ =
"-"
;
+ $$ =
VALUE_IF_MISSING
;
}
else {
gedcom_error(_("Missing value")); YYERROR;
}
else {
gedcom_error(_("Missing value")); YYERROR;