mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 15:47:51 +02:00
removed seek64bit define
git-svn-id: trunk@1704 -
This commit is contained in:
parent
0362fa505d
commit
353f623f1f
@ -14,7 +14,6 @@
|
|||||||
{* TStream *}
|
{* TStream *}
|
||||||
{****************************************************************************}
|
{****************************************************************************}
|
||||||
|
|
||||||
{$ifdef seek64bit}
|
|
||||||
function TStream.GetPosition: Int64;
|
function TStream.GetPosition: Int64;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -101,40 +100,6 @@
|
|||||||
Result:=Seek(longint(Offset),ord(Origin));
|
Result:=Seek(longint(Offset),ord(Origin));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else seek64bit}
|
|
||||||
|
|
||||||
function TStream.GetPosition: Longint;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Result:=Seek(0,soFromCurrent);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TStream.SetPosition(Pos: Longint);
|
|
||||||
|
|
||||||
begin
|
|
||||||
Seek(pos,soFromBeginning);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TStream.GetSize: Longint;
|
|
||||||
|
|
||||||
var
|
|
||||||
p : longint;
|
|
||||||
|
|
||||||
begin
|
|
||||||
p:=GetPosition;
|
|
||||||
GetSize:=Seek(0,soFromEnd);
|
|
||||||
Seek(p,soFromBeginning);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TStream.SetSize(NewSize: Longint);
|
|
||||||
|
|
||||||
begin
|
|
||||||
// We do nothing. Pipe streams don't support this
|
|
||||||
// As wel as possible read-ony streams !!
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$endif seek64bit}
|
|
||||||
|
|
||||||
procedure TStream.ReadBuffer(var Buffer; Count: Longint);
|
procedure TStream.ReadBuffer(var Buffer; Count: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -421,8 +386,6 @@ begin
|
|||||||
If Result=-1 then Result:=0;
|
If Result=-1 then Result:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef seek64bit}
|
|
||||||
|
|
||||||
Procedure THandleStream.SetSize(NewSize: Longint);
|
Procedure THandleStream.SetSize(NewSize: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -443,21 +406,6 @@ begin
|
|||||||
Result:=FileSeek(FHandle,Offset,ord(Origin));
|
Result:=FileSeek(FHandle,Offset,ord(Origin));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else seek64bit}
|
|
||||||
|
|
||||||
Procedure THandleStream.SetSize(NewSize: Longint);
|
|
||||||
begin
|
|
||||||
FileTruncate(FHandle,NewSize);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function THandleStream.Seek(Offset: Longint; Origin: Word): Longint;
|
|
||||||
begin
|
|
||||||
Result:=FileSeek(FHandle,Offset,Origin);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$endif seek64bit}
|
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************}
|
{****************************************************************************}
|
||||||
{* TFileStream *}
|
{* TFileStream *}
|
||||||
@ -512,14 +460,12 @@ begin
|
|||||||
FSize:=ASize;
|
FSize:=ASize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef seek64bit}
|
|
||||||
function TCustomMemoryStream.GetSize: Int64;
|
function TCustomMemoryStream.GetSize: Int64;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=FSize;
|
Result:=FSize;
|
||||||
end;
|
end;
|
||||||
{$endif seek64bit}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function TCustomMemoryStream.Read(var Buffer; Count: Longint): Longint;
|
function TCustomMemoryStream.Read(var Buffer; Count: Longint): Longint;
|
||||||
@ -738,7 +684,7 @@ begin
|
|||||||
Result:=Count;
|
Result:=Count;
|
||||||
SetSize(FPosition+Count);
|
SetSize(FPosition+Count);
|
||||||
// This supposes that FDataString is of type AnsiString)
|
// This supposes that FDataString is of type AnsiString)
|
||||||
Move (Buffer,PCHar(FDataString)[Fposition],Count);
|
Move (Buffer,PChar(FDataString)[Fposition],Count);
|
||||||
FPosition:=FPosition+Count;
|
FPosition:=FPosition+Count;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user