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
Updated documentation with new features in 0.90.0.
[gedcom-parse.git]
/
gedcom
/
date.c
diff --git
a/gedcom/date.c
b/gedcom/date.c
index 40cb18a7115eca0c5a86f2600e6c73b54b311dee..4f9878fb624553fd7255fce6ad84a1bcf15b86da 100644
(file)
--- a/
gedcom/date.c
+++ b/
gedcom/date.c
@@
-336,7
+336,7
@@
int numbers_to_strings(struct date *d)
if (d->day != -1)
sprintf(d->day_str, "%d", d->day);
if (d->day != -1)
sprintf(d->day_str, "%d", d->day);
- if (d->month
!= -1
)
+ if (d->month
> 0 && d->month <= max_month[d->cal]
)
strcpy(d->month_str, month_name[d->cal][d->month - 1]);
if (d->year_type == YEAR_SINGLE)
strcpy(d->month_str, month_name[d->cal][d->month - 1]);
if (d->year_type == YEAR_SINGLE)
@@
-409,8
+409,8
@@
struct date_value gedcom_parse_date(const char* line_value)
init_date(&def_date);
curr_line_value = line_value;
if (compat_mode(C_NO_REQUIRED_VALUES)
init_date(&def_date);
curr_line_value = line_value;
if (compat_mode(C_NO_REQUIRED_VALUES)
- && !strncmp(curr_line_value,
"-"
, 2)) {
- gedcom_date_error(_("Empty value changed to '
-'")
);
+ && !strncmp(curr_line_value,
VALUE_IF_MISSING
, 2)) {
+ gedcom_date_error(_("Empty value changed to '
%s'"), VALUE_IF_MISSING
);
result = 1;
}
else {
result = 1;
}
else {