mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 23:27:23 +01:00
amicommon: backported seeking fixes from AROS branch, which actually apply to all Am*ga platforms
git-svn-id: trunk@28516 -
This commit is contained in:
parent
0539923b68
commit
cba1962284
@ -273,7 +273,7 @@ begin
|
||||
if dosResult<0 then begin
|
||||
dosError2InOut(IoErr);
|
||||
end else begin
|
||||
do_seekend:=dosResult;
|
||||
do_seekend:=dosSeek(handle,0,OFFSET_CURRENT);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -286,8 +286,6 @@ begin
|
||||
if CheckInList(ASYS_fileList,handle)<>nil then begin
|
||||
|
||||
currfilepos:=do_filepos(handle);
|
||||
{ We have to do this twice, because seek returns the OLD position }
|
||||
do_filesize:=do_seekend(handle);
|
||||
do_filesize:=do_seekend(handle);
|
||||
do_seek(handle,currfilepos);
|
||||
|
||||
|
||||
@ -267,7 +267,10 @@ begin
|
||||
fsFromEnd : seekMode:=OFFSET_END;
|
||||
end;
|
||||
|
||||
FileSeek:=dosSeek(Handle, FOffset, seekMode);
|
||||
dosSeek(Handle, FOffset, seekMode);
|
||||
{ get the current position when FileSeek ends, which should return
|
||||
the *NEW* position, while Amiga Seek() returns the old one }
|
||||
FileSeek:=dosSeek(Handle, 0, OFFSET_CURRENT);
|
||||
end;
|
||||
|
||||
function FileSeek(Handle: LongInt; FOffset: Int64; Origin: Longint): Int64;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user