Fixed minor and rather obscure problem: When including files, the line after

the .include statement went into the listing file, before the contents of
the include file. The problem was caused by the several levels of lookahead
in the scanner, and the only way to avoid it was to remove the calls to
NextTok () in relevant places - and add compensation for it in others.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3609 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2005-08-31 21:29:11 +00:00
parent c732d3e360
commit 2a19f6b700
2 changed files with 27 additions and 17 deletions

View File

@@ -1106,15 +1106,11 @@ Done:
static void DoInclude (void)
/* Include another file */
{
char Name [MAX_STR_LEN+1];
/* Name must follow */
if (Tok != TOK_STRCON) {
ErrorSkip ("String constant expected");
} else {
strcpy (Name, SVal);
NextTok ();
NewInputFile (Name);
NewInputFile (SVal);
}
}
@@ -1222,9 +1218,6 @@ static void DoMacPack (void)
return;
}
/* Skip the package name */
NextTok ();
/* Insert the package */
MacPackInsert (Package);
}