Bladeren bron

FIX: Free Pascal >= 3.0 compatibility

Alexander Koblov 1 jaar geleden
bovenliggende
commit
f462a30d51
1 gewijzigde bestanden met toevoegingen van 8 en 7 verwijderingen
  1. 8 7
      components/doublecmd/dcclassesutf8.pas

+ 8 - 7
components/doublecmd/dcclassesutf8.pas

@@ -3,7 +3,7 @@
    -------------------------------------------------------------------------
    This module contains classes with UTF8 file names support.
 
-   Copyright (C) 2008-2022 Alexander Koblov ([email protected])
+   Copyright (C) 2008-2024 Alexander Koblov ([email protected])
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -71,8 +71,8 @@ type
   private
     FReadOnly: Boolean;
   public
-    constructor Create(const AFileName: String; Mode: Word); virtual;
-    constructor Create(const AFileName: String; AEscapeLineFeeds : Boolean = False); override;
+    constructor Create(const AFileName: String; Mode: Word; AOptions: TIniFileOptions = []); virtual;
+    constructor Create(const AFileName: String; AOptions: TIniFileOptions = []); override;
     procedure UpdateFile; override;
   public
     property ReadOnly: Boolean read FReadOnly;
@@ -270,13 +270,14 @@ end;
 
 { TIniFileEx }
 
-constructor TIniFileEx.Create(const AFileName: String; Mode: Word);
+constructor TIniFileEx.Create(const AFileName: String; Mode: Word;
+  AOptions: TIniFileOptions);
 var
   slLines : TStringListEx;
 begin
   FReadOnly := ((Mode and $03) = fmOpenRead);
 
-  inherited Create(EmptyStr);
+  inherited Create(EmptyStr, AOptions);
 
   if ((Mode and $03) <> fmOpenWrite) then
   begin
@@ -294,7 +295,7 @@ begin
   Rename(AFileName, False);
 end;
 
-constructor TIniFileEx.Create(const AFileName: String; AEscapeLineFeeds: Boolean);
+constructor TIniFileEx.Create(const AFileName: String; AOptions: TIniFileOptions);
 var
   Mode: Word;
 begin
@@ -305,7 +306,7 @@ begin
   else begin
     Mode := fmOpenRead or fmShareDenyNone;
   end;
-  Create(AFileName, Mode);
+  Create(AFileName, Mode, AOptions);
 end;
 
 procedure TIniFileEx.UpdateFile;