Commit a6e8021e by Per Bothner

Fix line number counting.

From-SVN: r7036
parent 058acefd
......@@ -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,9 +229,13 @@ get_token (fp, s)
if (c == EOF)
return EOF;
if (c == '\n')
{
source_lineno++;
lineno++;
goto retry;
}
}
}
if (c == EOF)
return EOF;
if (isdigit (c))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment