mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-11-05 02:07:22 +00:00
Fix bug leading to spurious errors in some cases when a sym file is present.
The issue was that invalid sym files could be generated if an #include is encountered within an #if or #ifdef block in the main source file. The fix (for now) is to simply terminate precompiled header generation if such an #include is encountered. Fixes #2.
This commit is contained in:
parent
4db26d14bd
commit
095807517b
13
Scanner.pas
13
Scanner.pas
@ -321,6 +321,16 @@ procedure StartInclude (name: gsosOutStringPtr); extern;
|
||||
{ file. }
|
||||
{ 2. From Header.pas }
|
||||
|
||||
|
||||
procedure TermHeader; extern;
|
||||
|
||||
{ Stop processing the header file }
|
||||
{ }
|
||||
{ Note: This is called when the first code-generating }
|
||||
{ subroutine is found, and again when the compile ends. It }
|
||||
{ closes any open symbol file, and should take no action if }
|
||||
{ called twice. }
|
||||
|
||||
{-- Scanner support --------------------------------------------}
|
||||
|
||||
procedure CheckDelimiters (var name: pString);
|
||||
@ -1234,6 +1244,9 @@ else
|
||||
fp^.lineNumber := lineNumber+1;
|
||||
if OpenFile(true, default) then begin {open a new file and proceed from there}
|
||||
lineNumber := 1;
|
||||
if ifList <> nil then
|
||||
if fp^.next = nil then
|
||||
TermHeader;
|
||||
StartInclude(@includeFileGS);
|
||||
end {if}
|
||||
else begin {handle a file name error}
|
||||
|
Loading…
Reference in New Issue
Block a user