1
0
mirror of https://github.com/byteworksinc/ORCA-C.git synced 2025-03-07 13:29:24 +00:00

Avoid generating duplicate "Including ..." messages.

This could happen if a header was saved in the sym file, but the sym file data was not actually used because the source code in the main file did not match what was saved.
This commit is contained in:
Stephen Heumann 2022-02-16 21:31:49 -06:00
parent f2d6625300
commit 1e98a63bf4

@ -1195,6 +1195,8 @@ type
var var
done: boolean; {for loop termination test} done: boolean; {for loop termination test}
typeDispList: typeDispPtr; {type displacement/pointer table} typeDispList: typeDispPtr; {type displacement/pointer table}
includeFileName: gsosInStringPtr; {name of include file}
i: 1..maxint; {loop/index variable}
procedure DisposeTypeDispList; procedure DisposeTypeDispList;
@ -1294,6 +1296,7 @@ var
while len > 0 do begin while len > 0 do begin
giRec.pCount := 7; giRec.pCount := 7;
giRec.pathname := pointer(ReadLongString); giRec.pathname := pointer(ReadLongString);
includeFileName := giRec.pathname; {save name to print later}
len := len - (giRec.pathname^.size + 18); len := len - (giRec.pathname^.size + 18);
GetFileInfoGS(giRec); GetFileInfoGS(giRec);
if ToolError = 0 then begin if ToolError = 0 then begin
@ -1306,12 +1309,6 @@ var
match := false; match := false;
len := 0; len := 0;
end; {else} end; {else}
if match and progress then begin
write('Including ');
for i := 1 to giRec.pathname^.size do
write(giRec.pathname^.theString[i]);
writeln;
end; {if}
end; {while} end; {while}
DatesMatch := match; DatesMatch := match;
end; {DatesMatch} end; {DatesMatch}
@ -1963,6 +1960,12 @@ if not ignoreSymbols then begin
while not done do begin while not done do begin
if DatesMatch then begin if DatesMatch then begin
if SourceMatches then begin if SourceMatches then begin
if progress then begin
write('Including ');
for i := 1 to includeFileName^.size do
write(includeFileName^.theString[i]);
writeln;
end; {if}
ReadMacroTable; ReadMacroTable;
ReadSymbolTable; ReadSymbolTable;
ReadPragmas; ReadPragmas;