#ifdef LEXER_TEST
YYSTYPE gedcom_lval;
int line_no = 1;
-int compat_at = 0;
int gedcom_lex();
/* These are defined as functions here, because xgettext has trouble
extracting the strings out of long pre-processor defined */
-static void error_line_too_long()
+static void error_line_too_long(const char *line)
{
- gedcom_error(_("Line too long, max %d characters allowed"), MAXGEDCLINELEN);
+ gedcom_error(_("Line too long, max %d characters allowed: %s"),
+ MAXGEDCLINELEN, line);
}
static void error_level_leading_zero()
{ if (line_len != (size_t)-1) { \
line_len += strlen(yytext); \
if (line_len > MAXGEDCLINELEN * encoding_width) { \
- error_line_too_long(); \
+ error_line_too_long(yytext); \
line_len = (size_t)-1; \
return BADTOKEN; \
} \
}
#define ACTION_NORMAL_AT \
- { if (compat_at) { \
+ { if (compat_mode(C_NO_DOUBLE_AT)) { \
int i, j; \
char *yycopy = strdup(yytext); \
if (yycopy) { \