mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 18:25:58 +02:00
+ Merged changes, fixed stringstream
This commit is contained in:
parent
88e2b5e2e1
commit
51ae30babb
@ -549,7 +549,7 @@ end;
|
|||||||
procedure TStringStream.SetSize(NewSize: Longint);
|
procedure TStringStream.SetSize(NewSize: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
//!! Setlength(FDataString,NewSize);
|
Setlength(FDataString,NewSize);
|
||||||
If FPosition>NewSize then FPosition:=NewSize;
|
If FPosition>NewSize then FPosition:=NewSize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ begin
|
|||||||
Result:=Length(FDataString)-FPosition;
|
Result:=Length(FDataString)-FPosition;
|
||||||
If Result>Count then Result:=Count;
|
If Result>Count then Result:=Count;
|
||||||
// This supposes FDataString to be of type AnsiString !
|
// This supposes FDataString to be of type AnsiString !
|
||||||
//!! Move (Pchar(FDataString)[FPosition],Buffer,Count);
|
Move (Pchar(FDataString)[FPosition],Buffer,Count);
|
||||||
FPosition:=FPosition+Count;
|
FPosition:=FPosition+Count;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -580,8 +580,8 @@ Var NewLen : Longint;
|
|||||||
begin
|
begin
|
||||||
NewLen:=Length(FDataString)-FPosition;
|
NewLen:=Length(FDataString)-FPosition;
|
||||||
If NewLen>Count then NewLen:=Count;
|
If NewLen>Count then NewLen:=Count;
|
||||||
//!! SetLength(Result,NewLen);
|
SetLength(Result,NewLen);
|
||||||
//!! Read (Pointer(Result)^,NewLen);
|
Read (Pointer(Result)^,NewLen);
|
||||||
ReadString:='';
|
ReadString:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -606,7 +606,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;
|
||||||
|
|
||||||
@ -614,7 +614,7 @@ end;
|
|||||||
procedure TStringStream.WriteString(const AString: string);
|
procedure TStringStream.WriteString(const AString: string);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
//!! Write (PChar(Astring)[0],Length(AString));
|
Write (PChar(Astring)[0],Length(AString));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -656,7 +656,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2000-07-13 11:33:00 michael
|
Revision 1.3 2001-03-08 19:38:32 michael
|
||||||
|
+ Merged changes, fixed stringstream
|
||||||
|
|
||||||
|
Revision 1.2 2000/07/13 11:33:00 michael
|
||||||
+ removed logs
|
+ removed logs
|
||||||
|
}
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user