Avoid spurious subsequent errors if an include file wasn't found.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3908 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-01-18 15:07:55 +00:00
parent df341b6551
commit 30f88d2646
5 changed files with 47 additions and 13 deletions

View File

@@ -1146,7 +1146,10 @@ static void DoInclude (void)
ErrorSkip ("String constant expected");
} else {
SB_Terminate (&SVal);
NewInputFile (SB_GetConstBuf (&SVal));
if (NewInputFile (SB_GetConstBuf (&SVal)) == 0) {
/* Error opening the file, skip remainder of line */
SkipUntilSep ();
}
}
}
@@ -1258,8 +1261,12 @@ static void DoMacPack (void)
return;
}
/* Insert the package */
MacPackInsert (Package);
/* Insert the package. If this fails, skip the remainder of the line to
* avoid additional error messages.
*/
if (MacPackInsert (Package) == 0) {
SkipUntilSep ();
}
}