mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 09:49:50 +02:00
removed seek64bit define
git-svn-id: trunk@1704 -
This commit is contained in:
parent
0362fa505d
commit
353f623f1f
@ -14,7 +14,6 @@
|
||||
{* TStream *}
|
||||
{****************************************************************************}
|
||||
|
||||
{$ifdef seek64bit}
|
||||
function TStream.GetPosition: Int64;
|
||||
|
||||
begin
|
||||
@ -101,40 +100,6 @@
|
||||
Result:=Seek(longint(Offset),ord(Origin));
|
||||
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);
|
||||
|
||||
begin
|
||||
@ -421,8 +386,6 @@ begin
|
||||
If Result=-1 then Result:=0;
|
||||
end;
|
||||
|
||||
{$ifdef seek64bit}
|
||||
|
||||
Procedure THandleStream.SetSize(NewSize: Longint);
|
||||
|
||||
begin
|
||||
@ -443,21 +406,6 @@ begin
|
||||
Result:=FileSeek(FHandle,Offset,ord(Origin));
|
||||
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 *}
|
||||
@ -512,14 +460,12 @@ begin
|
||||
FSize:=ASize;
|
||||
end;
|
||||
|
||||
{$ifdef seek64bit}
|
||||
|
||||
function TCustomMemoryStream.GetSize: Int64;
|
||||
|
||||
begin
|
||||
Result:=FSize;
|
||||
end;
|
||||
{$endif seek64bit}
|
||||
|
||||
|
||||
|
||||
function TCustomMemoryStream.Read(var Buffer; Count: Longint): Longint;
|
||||
@ -738,7 +684,7 @@ begin
|
||||
Result:=Count;
|
||||
SetSize(FPosition+Count);
|
||||
// This supposes that FDataString is of type AnsiString)
|
||||
Move (Buffer,PCHar(FDataString)[Fposition],Count);
|
||||
Move (Buffer,PChar(FDataString)[Fposition],Count);
|
||||
FPosition:=FPosition+Count;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user