mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-27 18:21:19 +02:00
* More fixes and optimizing for ansistr_concat
This commit is contained in:
parent
814a03ee84
commit
66bb181cf5
@ -169,11 +169,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
Size:=PAnsiRec(S2-FirstOff)^.Len;
|
Size:=PAnsiRec(S2-FirstOff)^.Len;
|
||||||
Location:=Length(AnsiString(S1));
|
Location:=Length(AnsiString(S1));
|
||||||
{ Setlength takes case of uniqueness
|
|
||||||
and allocated memory. We need to use length,
|
|
||||||
to take into account possibility of S1=Nil }
|
|
||||||
SetLength (AnsiString(S3),Size+Location);
|
SetLength (AnsiString(S3),Size+Location);
|
||||||
Move (S1^,S3^,PAnsiRec(S1-FirstOff)^.Len);
|
Move (S1^,S3^,Location);
|
||||||
Move (S2^,(S3+location)^,Size+1);
|
Move (S2^,(S3+location)^,Size+1);
|
||||||
end;
|
end;
|
||||||
AnsiStr_Concat:=S3;
|
AnsiStr_Concat:=S3;
|
||||||
@ -764,7 +761,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.19 1999-04-08 15:57:53 peter
|
Revision 1.20 1999-04-09 07:33:15 michael
|
||||||
|
* More fixes and optimizing for ansistr_concat
|
||||||
|
|
||||||
|
Revision 1.19 1999/04/08 15:57:53 peter
|
||||||
+ subrange checking for readln()
|
+ subrange checking for readln()
|
||||||
|
|
||||||
Revision 1.18 1999/04/08 10:19:55 peter
|
Revision 1.18 1999/04/08 10:19:55 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user