* merged textfile, readlink and concat ansistring fixes

This commit is contained in:
peter 2001-07-10 18:04:37 +00:00
parent 53e8ce0e1e
commit 5c0d161bef
3 changed files with 18 additions and 8 deletions

View File

@ -164,9 +164,6 @@ Procedure AnsiStr_Concat (S1,S2 : Pointer;var S3 : Pointer);[Public, alias: 'FPC
Var
Size,Location : Longint;
begin
{ create new result }
if S3<>nil then
AnsiStr_Decr_Ref(S3);
{ only assign if s1 or s2 is empty }
if (S1=Nil) then
AnsiStr_Assign(S3,S2)
@ -175,6 +172,9 @@ begin
AnsiStr_Assign(S3,S1)
else
begin
{ create new result }
if S3<>nil then
AnsiStr_Decr_Ref(S3);
Size:=PAnsiRec(S2-FirstOff)^.Len;
Location:=Length(AnsiString(S1));
SetLength (AnsiString(S3),Size+Location);
@ -707,7 +707,10 @@ end;
{
$Log$
Revision 1.15 2001-07-09 21:15:41 peter
Revision 1.16 2001-07-10 18:04:37 peter
* merged textfile, readlink and concat ansistring fixes
Revision 1.15 2001/07/09 21:15:41 peter
* Length made internal
* Add array support for Length

View File

@ -143,6 +143,9 @@ Type
{ procedure type }
TProcedure = Procedure;
{ Text file }
TextFile = Text;
const
{ Maximum value of the biggest signed and unsigned integer type available}
MaxSIntValue = High(ValSInt);
@ -512,7 +515,10 @@ const
{
$Log$
Revision 1.26 2001-07-09 21:15:41 peter
Revision 1.27 2001-07-10 18:04:37 peter
* merged textfile, readlink and concat ansistring fixes
Revision 1.26 2001/07/09 21:15:41 peter
* Length made internal
* Add array support for Length

View File

@ -265,10 +265,8 @@ Function fdSeek (fd,pos,seektype :longint): longint;
Function fdFlush (fd : Longint) : Boolean;
Function Link(OldPath,NewPath:pathstr):boolean;
Function SymLink(OldPath,NewPath:pathstr):boolean;
{$ifndef bsd}
Function ReadLink(name,linkname:pchar;maxlen:longint):longint;
Function ReadLink(name:pathstr):pathstr;
{$endif}
Function UnLink(Path:pathstr):boolean;
Function UnLink(Path:pchar):Boolean;
Function FReName (OldName,NewName : Pchar) : Boolean;
@ -2892,7 +2890,10 @@ End.
{
$Log$
Revision 1.10 2001-06-03 20:19:09 peter
Revision 1.11 2001-07-10 18:04:37 peter
* merged textfile, readlink and concat ansistring fixes
Revision 1.10 2001/06/03 20:19:09 peter
* FSStat to StatFS
* StatFS structure to TStatFS