From ea056f1fbbf062ce6d28d0675062e1d18e07d550 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Wed, 15 Mar 2023 20:42:23 -0500 Subject: [PATCH] Avoid listing the first line twice when a pre-include file is used. --- Scanner.pas | 3 ++- cc.notes | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Scanner.pas b/Scanner.pas index 55f891e..dc6e6df 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -2525,7 +2525,8 @@ if gotName then begin {read the file name from the line} OpenFile := true; {we opened it} if doInclude and progress then {note our progress} writeln('Including ', workString); - WriteLine; {write the source line} + if not default then {write the source line} + WriteLine; wroteLine := false; lineNumber := lineNumber+1; firstPtr := pointer(ord4(chPtr)+2); diff --git a/cc.notes b/cc.notes index d3bb7d7..e947a5d 100644 --- a/cc.notes +++ b/cc.notes @@ -2148,6 +2148,8 @@ int foo(int[42]); 238. If a typedef name declared in an outer scope was used within an inner scope where the same name was declared as a struct/union/enum tag, it would not be properly recognized as a typedef name, leading to spurious errors. +239. If a listing was produced using the +L option when a Defaults.h file was present, an extra blank first line would be listed (in ORCA/C 2.1) or the first line of the source file would be listed twice (in ORCA/C 2.2 betas). + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.