Fix line number counting.

From-SVN: r7036
This commit is contained in:
Per Bothner 1994-04-11 14:26:48 -07:00
parent 058acefd54
commit a6e8021ecf

View File

@ -220,7 +220,7 @@ get_token (fp, s)
c = get_token (fp, s);
if (c == INT_TOKEN)
{
source_lineno = atoi (s->base);
source_lineno = atoi (s->base) - 1; /* '\n' will add 1 */
get_token (fp, &source_filename);
}
for (;;)
@ -229,7 +229,11 @@ get_token (fp, s)
if (c == EOF)
return EOF;
if (c == '\n')
{
source_lineno++;
lineno++;
goto retry;
}
}
}
if (c == EOF)