From 32002ea8d471295f49c4e7e4789afd9feacc96b5 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sat, 11 Jan 2003 18:41:43 +0000 Subject: [PATCH] Show value that is too long. --- gedcom/gedcom_lex_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gedcom/gedcom_lex_common.c b/gedcom/gedcom_lex_common.c index 779af3b..4949346 100644 --- a/gedcom/gedcom_lex_common.c +++ b/gedcom/gedcom_lex_common.c @@ -91,9 +91,10 @@ int test_loop(ENCODING enc, const char* code) /* 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() @@ -155,7 +156,7 @@ static int dummy_conv = 0; { 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; \ } \ -- 2.30.2