8000 FIX: FPC 3.3 compatibility by larinsv · Pull Request #385 · doublecmd/doublecmd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FIX: FPC 3.3 compatibility #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/doublecmd/dcdatetimeutils.pas
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface
{$IF DEFINED(MSWINDOWS)}
, Windows
{$ELSEIF DEFINED(UNIX)}
, UnixUtil, DCUnix
, Unix, UnixUtil, DCUnix
{$ENDIF}
;

Expand Down
3 changes: 3 additions & 0 deletions plugins/wcx/unrar/src/unrarfunc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
unit UnRARFunc;

{$mode objfpc}{$H+}
{$ifndef VER3_2}
{$modeswitch arraytodynarray}
{$endif}
{$include calling.inc}

interface
Expand Down
4 changes: 2 additions & 2 deletions src/dmcommondata.pas
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ TdmComData = class(TDataModule)
SaveDialog: TSaveDialog;
procedure DataModuleCreate(Sender: TObject);
private
procedure LoadImages(Images: TImageList; ANames: TStringArray);
procedure LoadImages(Images: TImageList; const ANames: array of String);
public
{ public declarations }
end;
Expand Down Expand Up @@ -145,7 +145,7 @@ procedure TdmComData.DataModuleCreate(Sender: TObject);
end;
end;

procedure TdmComData.LoadImages(Images: TImageList; ANames: TStringArray);
procedure TdmComData.LoadImages(Images: TImageList; const ANames: array of String);
var
AName: String;
ASize16, ASize24: Integer;
Expand Down
8 changes: 5 additions & 3 deletions src/filesources/filesystem/ufilesystemutil.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1610,20 +1610,22 @@ procedure TFileSystemOperationHelper.QuestionActionHandler(
function TFileSystemOperationHelper.FileExists(aFile: TFile;
var AbsoluteTargetFileName: String; AllowAppend: Boolean
): TFileSourceOperationOptionFileExists;
type
TFileSourceOperationUIResponses = array of TFileSourceOperationUIResponse;
const
Responses: array[0..13] of TFileSourceOperationUIResponse
Responses: TFileSourceOperationUIResponses
= (fsourOverwrite, fsourSkip, fsourRenameSource, fsourOverwriteAll,
fsourSkipAll, fsourResume, fsourOverwriteOlder, fsourCancel,
fsouaCompare, fsourAppend, fsourOverwriteSmaller, fsourOverwriteLarger,
fsourAutoRenameSource, fsourAutoRenameTarget);
ResponsesNoAppend: array[0..11] of TFileSourceOperationUIResponse
ResponsesNoAppend: TFileSourceOperationUIResponses
= (fsourOverwrite, fsourSkip, fsourRenameSource, fsourOverwriteAll,
fsourSkipAll, fsourOverwriteSmaller, fsourOverwriteOlder, fsourCancel,
fsouaCompare, fsourOverwriteLarger, fsourAutoRenameSource, fsourAutoRenameTarget);
var
Answer: Boolean;
Message: String;
PossibleResponses: array of TFileSourceOperationUIResponse;
PossibleResponses: TFileSourceOperationUIResponses;

function RenameTarget: TFileSourceOperationOptionFileExists;
var
Expand Down
8 changes: 5 additions & 3 deletions src/filesources/wcxarchive/uwcxarchivecopyoutoperation.pas
Original file line number Diff line number Diff line change
Expand Up @@ -569,17 +569,19 @@ procedure TWcxArchiveCopyOutOperation.QuestionActionHandler(

function TWcxArchiveCopyOutOperation.DoFileExists(Header: TWcxHeader;
var AbsoluteTargetFileName: String): TFileSourceOperationOptionFileExists;
type
TFileSourceOperationUIResponses = array of TFileSourceOperationUIResponse;
const
Responses: array[0..10] of TFileSourceOperationUIResponse
Responses: TFileSourceOperationUIResponses
= (fsourOverwrite, fsourSkip, fsourOverwriteLarger, fsourOverwriteAll,
fsourSkipAll, fsourOverwriteSmaller, fsourOverwriteOlder, fsourCancel,
fsouaCompare, fsourRenameSource, fsourAutoRenameSource);
ResponsesNoCompare: array[0..9] of TFileSourceOperationUIResponse
ResponsesNoCompare: TFileSourceOperationUIResponses
= (fsourOverwrite, fsourSkip, fsourOverwriteLarger, fsourOverwriteAll,
fsourSkipAll, fsourOverwriteSmaller, fsourOverwriteOlder, fsourCancel,
fsourRenameSource, fsourAutoRenameSource);
var
PossibleResponses: array of TFileSourceOperationUIResponse;
PossibleResponses: TFileSourceOperationUIResponses;
Answer: Boolean;
Message: String;

Expand Down
8 changes: 5 additions & 3 deletions src/filesources/wfxplugin/uwfxpluginutil.pas
Original file line number Diff line number Diff line change
Expand Up @@ -438,16 +438,18 @@ function FileExistsMessage(TargetFile: TFile; SourceFile: TFile): String;
function TWfxPluginOperationHelper.FileExists(aFile: TFile;
AbsoluteTargetFileName: String; AllowResume: Boolean
): TFileSourceOperationOptionFileExists;
type
TFileSourceOperationUIResponses = array of TFileSourceOperationUIResponse;
const
Responses: array[0..6] of TFileSourceOperationUIResponse
Responses: TFileSourceOperationUIResponses
= (fsourOverwrite, fsourSkip, fsourResume, fsourOverwriteAll, fsourSkipAll,
fsouaCompare, fsourCancel);
ResponsesNoResume: array[0..5] of TFileSourceOperationUIResponse
ResponsesNoResume: TFileSourceOperationUIResponses
= (fsourOverwrite, fsourSkip, fsourOverwriteAll, fsourSkipAll, fsouaCompare,
fsourCancel);
var
Message: String;
PossibleResponses: array of TFileSourceOperationUIResponse;
PossibleResponses: TFileSourceOperationUIResponses;
begin
case FFileExistsOption of
fsoofeNone:
Expand Down
2 changes: 1 addition & 1 deletion src/fmain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ procedure TfrmMain.MainToolBarToolButtonDragDrop(Sender, Source: TObject; X, Y:
// Button was moved.
SaveToolBar(Toolbar)
else
if Sender is TKASToolButton and not Draging then
if (Sender is TKASToolButton) and not Draging then
begin
ToolItem := TKASToolButton(Sender).ToolItem;
if ToolItem is TKASProgramItem then
Expand Down
2 changes: 1 addition & 1 deletion src/ufilefunctions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function FormatFileFunction(FuncS: string; AFile: TFile;
fsfAttr:
if fpAttributes in AFile.SupportedProperties then
begin
if AFile.Properties[fpAttributes] is TUnixFileAttributesProperty and (AParam = ATTR_OCTAL) then
if (AFile.Properties[fpAttributes] is TUnixFileAttributesProperty) and (AParam = ATTR_OCTAL) then
Result := FormatUnixModeOctal(AFile.Attributes)
else
Result := AFile.Properties[fpAttributes].Format(DefaultFilePropertyFormatter);
Expand Down
0