From 4b0edb61153aa71dea42c1f6e270daf72753384e Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 9 Feb 2021 10:56:27 +0000 Subject: [PATCH] * switched the fv units to objfpc mode git-svn-id: branches/unicodekvm@48549 - --- packages/fv/src/platform.inc | 2 +- packages/fv/src/stddlg.pas | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/fv/src/platform.inc b/packages/fv/src/platform.inc index c523629802..cc90bafbab 100644 --- a/packages/fv/src/platform.inc +++ b/packages/fv/src/platform.inc @@ -175,7 +175,7 @@ FOR FPC THESE ARE THE TRANSLATIONS { FPC 64 BIT COMPILER added - Update 28Nov2010 PM } {---------------------------------------------------------------------------} {$IFDEF FPC} - {$mode fpc} + {$mode objfpc} {$UNDEF PROC_Real} {$DEFINE PROC_Protected} diff --git a/packages/fv/src/stddlg.pas b/packages/fv/src/stddlg.pas index 8c31399aaf..3eebbf5ffe 100644 --- a/packages/fv/src/stddlg.pas +++ b/packages/fv/src/stddlg.pas @@ -2485,31 +2485,29 @@ end; function IsDir(const S: String): Boolean; var SR: SearchRec; - Is: boolean; begin - Is:=false; + Result:=false; {$ifdef Unix} - Is:=(S=DirSeparator); { handle root } + Result:=(S=DirSeparator); { handle root } {$else} {$ifdef HASAMIGA} - Is := (Length(S) > 0) and (S[Length(S)] = DriveSeparator); + Result := (Length(S) > 0) and (S[Length(S)] = DriveSeparator); {$else} - Is:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator); + Result:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator); {$endif} { handle root dirs } {$endif} - if Is=false then + if Result=false then begin FindFirst(S, Directory, SR); if DosError = 0 then - Is := (SR.Attr and Directory) <> 0 + Result := (SR.Attr and Directory) <> 0 else - Is := False; + Result := False; {$ifdef fpc} FindClose(SR); {$endif} end; - IsDir:=Is; end; {****************************************************************************}