Commit 5b450ae5 by Richard Stallman

(check_newline): #line updates input_file_stack->name.

From-SVN: r3556
parent 89d7540d
...@@ -659,7 +659,13 @@ linenum: ...@@ -659,7 +659,13 @@ linenum:
while (c == ' ' || c == '\t') while (c == ' ' || c == '\t')
c = getc (finput); c = getc (finput);
if (c == '\n') if (c == '\n')
{
/* Update the name in the top element of input_file_stack. */
if (input_file_stack)
input_file_stack->name = input_filename;
return c; return c;
}
ungetc (c, finput); ungetc (c, finput);
token = yylex (); token = yylex ();
...@@ -711,6 +717,11 @@ linenum: ...@@ -711,6 +717,11 @@ linenum:
} }
} }
/* Now that we've pushed or popped the input stack,
update the name in the top element. */
if (input_file_stack)
input_file_stack->name = input_filename;
/* If we have handled a `1' or a `2', /* If we have handled a `1' or a `2',
see if there is another number to read. */ see if there is another number to read. */
if (used_up) if (used_up)
......
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