improved #line handling

This commit is contained in:
ceriel 1989-11-17 14:53:05 +00:00
parent 9ad5d4b5e0
commit c4ca7db14f
2 changed files with 8 additions and 6 deletions

View file

@ -695,9 +695,10 @@ do_line(l)
unsigned int l;
{
struct token tk;
int t = GetToken(&tk);
LineNumber = l - 1; /* the number of the next input line */
if (GetToken(&tk) == STRING) /* is there a filespecifier? */
FileName = tk.tk_bts;
SkipRestOfLine();
LineNumber = l - 1; /* the number of the next input line */
if (t == STRING) /* is there a filespecifier? */
FileName = tk.tk_bts;
}

View file

@ -444,12 +444,13 @@ do_line(l)
unsigned int l;
{
struct token tk;
int t = GetToken(&tk);
LineNumber = l - 1; /* the number of the next input line */
if (GetToken(&tk) == STRING) /* is there a filespecifier? */
FileName = tk.tk_str;
PushBack();
skipline();
LineNumber = l - 1; /* the number of the next input line */
if (t == STRING) /* is there a filespecifier? */
FileName = tk.tk_str;
}
PRIVATE int