mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 13:49:44 +01:00
sysutils: enable FINDHANDLE_IS_POINTER for Amiga-like systems and Atari. this allows to remove some Pointer<->THandle casts from the amicommon code
git-svn-id: trunk@35198 -
This commit is contained in:
parent
a4eb61cffb
commit
c7576e4a3f
@ -428,13 +428,13 @@ begin
|
|||||||
|
|
||||||
{ $1e = faHidden or faSysFile or faVolumeID or faDirectory }
|
{ $1e = faHidden or faSysFile or faVolumeID or faDirectory }
|
||||||
Rslt.ExcludeAttr := (not Attr) and ($1e);
|
Rslt.ExcludeAttr := (not Attr) and ($1e);
|
||||||
Rslt.FindHandle := 0;
|
Rslt.FindHandle := nil;
|
||||||
|
|
||||||
new(Anchor);
|
new(Anchor);
|
||||||
FillChar(Anchor^,sizeof(TAnchorPath),#0);
|
FillChar(Anchor^,sizeof(TAnchorPath),#0);
|
||||||
|
|
||||||
if MatchFirst(pchar(tmpStr),Anchor)<>0 then exit;
|
if MatchFirst(pchar(tmpStr),Anchor)<>0 then exit;
|
||||||
Rslt.FindHandle := THandle(Anchor);
|
Rslt.FindHandle := Anchor;
|
||||||
|
|
||||||
with Anchor^.ap_Info do begin
|
with Anchor^.ap_Info do begin
|
||||||
Name := fib_FileName;
|
Name := fib_FileName;
|
||||||
@ -485,7 +485,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Procedure InternalFindClose(var Handle: THandle);
|
Procedure InternalFindClose(var Handle: Pointer);
|
||||||
var
|
var
|
||||||
Anchor: PAnchorPath;
|
Anchor: PAnchorPath;
|
||||||
begin
|
begin
|
||||||
@ -493,7 +493,7 @@ begin
|
|||||||
if not assigned(Anchor) then exit;
|
if not assigned(Anchor) then exit;
|
||||||
MatchEnd(Anchor);
|
MatchEnd(Anchor);
|
||||||
Dispose(Anchor);
|
Dispose(Anchor);
|
||||||
Handle:=THandle(nil);
|
Handle:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Type
|
|||||||
|
|
||||||
|
|
||||||
// Some operating systems need FindHandle to be a Pointer
|
// Some operating systems need FindHandle to be a Pointer
|
||||||
{$if defined(unix) or defined(msdos)}
|
{$if defined(unix) or defined(msdos) or defined(hasamiga) or defined(atari)}
|
||||||
{$define FINDHANDLE_IS_POINTER}
|
{$define FINDHANDLE_IS_POINTER}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user