From a62cfb0ac108a1237bf0a65bf33e0c1969c9ef72 Mon Sep 17 00:00:00 2001 From: johanknol Date: Fri, 10 Aug 2001 10:37:49 +0000 Subject: [PATCH] fixed the lineno error when using the new sdcpp git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1136 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCC.lex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SDCC.lex b/src/SDCC.lex index 92061f16..425508ad 100644 --- a/src/SDCC.lex +++ b/src/SDCC.lex @@ -281,8 +281,8 @@ int checkCurrFile ( char *s) /* set the current line number to */ /* line number if printFlag is on */ if (!*s) { - yylineno = lNum ; - return 0; + lineno = yylineno = lNum ; + return 0; } /* if we have a filename then check */ @@ -291,8 +291,8 @@ int checkCurrFile ( char *s) s++ ; if ( strncmp(s,fullSrcFileName,strlen(fullSrcFileName)) == 0) { - yylineno = lNum - 2; - currFname = fullSrcFileName ; + lineno = yylineno = lNum; + currFname = fullSrcFileName ; } else { char *sb = s; /* mark the end of the filename */ @@ -300,7 +300,7 @@ int checkCurrFile ( char *s) *s = '\0'; currFname = Safe_calloc(1,strlen(sb)+1); strcpy(currFname,sb); - yylineno = lNum - 2; + lineno = yylineno = lNum; } filename = currFname ; return 0; -- 2.30.2