From: Peter Verthez Date: Sun, 26 Jan 2003 18:08:58 +0000 (+0000) Subject: Use preprocessor symbol VALUE_IF_MISSING. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=000f15140c4e0f209994cdc579a677e29ae3e807;p=gedcom-parse.git Use preprocessor symbol VALUE_IF_MISSING. --- diff --git a/gedcom/date.c b/gedcom/date.c index a485392..4f9878f 100644 --- a/gedcom/date.c +++ b/gedcom/date.c @@ -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) - && !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 { diff --git a/gedcom/gedcom_internal.h b/gedcom/gedcom_internal.h index 7e4fc78..804959a 100644 --- a/gedcom/gedcom_internal.h +++ b/gedcom/gedcom_internal.h @@ -70,6 +70,7 @@ int gedcom_check_token(const char* str, ParseState state, int check_token); void gedcom_mem_error(const char *filename, int line); #define MEMORY_ERROR gedcom_mem_error(__FILE__, __LINE__) +#define VALUE_IF_MISSING "-" extern int line_no; extern int init_called;