#include "gedcom_internal.h"
#include "sdncal.h"
#include "buffer.h"
+#include "compat.h"
+#include <string.h>
#include "date.h"
struct date_value dv_s;
init_date(&date_s);
init_date(&def_date);
curr_line_value = line_value;
- init_gedcom_date_lex(line_value);
- gedcom_date_parse();
- close_gedcom_date_lex();
- if (dv_s.date1.cal != CAL_UNKNOWN)
- numbers_to_sdn(&dv_s.date1);
- if (dv_s.date2.cal != CAL_UNKNOWN)
- numbers_to_sdn(&dv_s.date2);
+ if (compat_mode(C_NO_REQUIRED_VALUES)
+ && !strncmp(curr_line_value, "-", 2)) {
+ gedcom_date_error(_("Empty value changed to '-'"));
+ gedcom_date_error(_("Putting date in 'phrase' member"));
+ make_date_value(DV_PHRASE, &def_date, &def_date, curr_line_value);
+ }
+ else {
+ init_gedcom_date_lex(line_value);
+ gedcom_date_parse();
+ close_gedcom_date_lex();
+ if (dv_s.date1.cal != CAL_UNKNOWN)
+ numbers_to_sdn(&dv_s.date1);
+ if (dv_s.date2.cal != CAL_UNKNOWN)
+ numbers_to_sdn(&dv_s.date2);
+ }
return dv_s;
}
Family start, xref is @F1@
== 1 HUSB (330) @I7@ (ctxt is 1, conversion failures: 0)
== 1 MARR (339) (null) (ctxt is 1, conversion failures: 0)
+WARNING: Warning on line 9: Empty value changed to '-'
+WARNING: Warning on line 9: Putting date in 'phrase' member
Contents of the date_value:
- raw value:
+ raw value: -
type: 11
date1:
calendar type: 4
date type: 0
sdn1: -1
sdn2: -1
- phrase:
+ phrase: -
== 2 PLAC (358) - (ctxt is 1, conversion failures: 0)
== 2 SOUR (377) name@domain.be (reclame voor genealogie boeken) (ctxt is 1, conversion failures: 0)
Family end, xref is @F1@
== 2 PLAC (358) - (ctxt is 333, conversion failures: 0)
== 2 SOUR (377) ongeveer 1360 (ctxt is 333, conversion failures: 0)
== 1 DEAT (307) (null) (ctxt is 333, conversion failures: 0)
+WARNING: Warning on line 21: Empty value changed to '-'
+WARNING: Warning on line 21: Putting date in 'phrase' member
Contents of the date_value:
- raw value:
+ raw value: -
type: 11
date1:
calendar type: 4
date type: 0
sdn1: -1
sdn2: -1
- phrase:
+ phrase: -
== 2 PLAC (358) - (ctxt is 333, conversion failures: 0)
== 2 SOUR (377) - (ctxt is 333, conversion failures: 0)
== 1 NOTE (348) Hij bouwde het Brusselse stadhuis in 1402. Hij bouwde ook kerken in (ctxt is 333, conversion failures: 0)
Family start, xref is @F1@
== 1 HUSB (330) @I7@ (ctxt is 2, conversion failures: 0)
== 1 MARR (339) (null) (ctxt is 2, conversion failures: 0)
+WARNING: Warning on line 9: Empty value changed to '-'
+WARNING: Warning on line 9: Putting date in 'phrase' member
Contents of the date_value:
- raw value:
+ raw value: -
type: 11
date1:
calendar type: 4
date type: 0
sdn1: -1
sdn2: -1
- phrase:
+ phrase: -
== 2 PLAC (358) - (ctxt is 2, conversion failures: 0)
== 2 SOUR (377) name@domain.be (reclame voor genealogie boeken) (ctxt is 2, conversion failures: 0)
Family end, xref is @F1@
== 2 PLAC (358) - (ctxt is 333, conversion failures: 0)
== 2 SOUR (377) ongeveer 1360 (ctxt is 333, conversion failures: 0)
== 1 DEAT (307) (null) (ctxt is 333, conversion failures: 0)
+WARNING: Warning on line 21: Empty value changed to '-'
+WARNING: Warning on line 21: Putting date in 'phrase' member
Contents of the date_value:
- raw value:
+ raw value: -
type: 11
date1:
calendar type: 4
date type: 0
sdn1: -1
sdn2: -1
- phrase:
+ phrase: -
== 2 PLAC (358) - (ctxt is 333, conversion failures: 0)
== 2 SOUR (377) - (ctxt is 333, conversion failures: 0)
== 1 NOTE (348) Hij bouwde het Brusselse stadhuis in 1402. Hij bouwde ook kerken in (ctxt is 333, conversion failures: 0)