From 050dfa38846be2e661a8bbfcb5d14ff9d9509fcf Mon Sep 17 00:00:00 2001 From: Abou Al Montacir Date: Sat, 27 May 2023 12:18:24 +0200 Subject: [PATCH] gir2pascal: Small code improvements. These changes are: 1. Added line break to last line of generated files. 2. Removed unused field `FEnumImpl` from `TGirConsoleConverter`. 3. Moved command line from .lpi to .lps as this depends on the path of the user debugging the program. --- tools/gir2pascal/gir2pascal.lpi | 12 ------------ tools/gir2pascal/gir2pascal.lpr | 1 - tools/gir2pascal/girpascalwritertypes.pas | 4 ++-- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/gir2pascal/gir2pascal.lpi b/tools/gir2pascal/gir2pascal.lpi index 6dd373b444..9da34d667a 100644 --- a/tools/gir2pascal/gir2pascal.lpi +++ b/tools/gir2pascal/gir2pascal.lpi @@ -25,19 +25,7 @@ - - - - - - - - - - - - diff --git a/tools/gir2pascal/gir2pascal.lpr b/tools/gir2pascal/gir2pascal.lpr index 11fcf9a141..c0ea18c64a 100644 --- a/tools/gir2pascal/gir2pascal.lpr +++ b/tools/gir2pascal/gir2pascal.lpr @@ -45,7 +45,6 @@ type FUnitPrefix: String; FOverWriteFiles: Boolean; FOptions: TgirOptions; - FEnumImpl: TgirEnumImpl; procedure AddDefaultPaths; procedure AddPaths(APaths: String); procedure VerifyOptions; diff --git a/tools/gir2pascal/girpascalwritertypes.pas b/tools/gir2pascal/girpascalwritertypes.pas index 9be43f9b47..73da5888f0 100644 --- a/tools/gir2pascal/girpascalwritertypes.pas +++ b/tools/gir2pascal/girpascalwritertypes.pas @@ -2623,7 +2623,7 @@ begin if FinalizeSection.Declarations.Count > 0 then Str.WriteString(FinalizeSection.AsString); - Str.WriteString('end.'); + Str.WriteString('end.' + LineEnding); Result.Position:=0; end; @@ -2633,7 +2633,7 @@ begin if (goWantTest in FOptions) then begin FTestPascalFile.WriteString(FTestPascalBody.Text); - FTestPascalFile.WriteString('end.'); + FTestPascalFile.WriteString('end.' + LineEnding); //FTestCFile.Position:=0; FTestPascalFile.Position:=0; end;