From 3d8e32e6fbc8bb038a5a88b13c7098f53212568a Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 14 Apr 2019 14:36:22 +0200 Subject: Count user comment lines The user comment lines were not counted resulting in a wrong line number in case of an error message. --- src/configimpl.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configimpl.l b/src/configimpl.l index 644250f..d114b4a 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -699,12 +699,12 @@ static void readIncludeFile(const char *incName) %% <*>\0x0d -"##".*"\n" { config->appendStartComment(yytext);} +"##".*"\n" { config->appendStartComment(yytext);yyLineNr++;} . { BEGIN(Start); unput(*yytext); } -"##".*"\n" { config->appendUserComment(yytext);} +"##".*"\n" { config->appendUserComment(yytext);yyLineNr++;} "#" { BEGIN(SkipComment); } [a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext; cmd=cmd.left(cmd.length()-1).stripWhiteSpace(); -- cgit v0.12