mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 21:59:47 +02:00
rtl: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts
git-svn-id: trunk@19132 -
This commit is contained in:
parent
aba0106366
commit
fd5a15fda5
@ -1759,13 +1759,7 @@ var
|
||||
begin
|
||||
SetLength(S,Len);
|
||||
If (Buf<>Nil) and (Len>0) then
|
||||
begin
|
||||
BufLen := IndexByte(Buf^, Len+1, 0);
|
||||
If (BufLen>0) and (BufLen < Len) then
|
||||
Len := BufLen;
|
||||
widestringmanager.Ansi2UnicodeMoveProc(Buf,DefaultSystemCodePage,S,Len);
|
||||
//PUnicodeChar(Pointer(S)+Len*sizeof(UnicodeChar))^:=#0;
|
||||
end;
|
||||
widestringmanager.Ansi2UnicodeMoveProc(Buf,DefaultSystemCodePage,S,Len);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1026,18 +1026,10 @@ end;
|
||||
|
||||
|
||||
Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
|
||||
var
|
||||
BufLen : SizeInt;
|
||||
begin
|
||||
SetLength(S,Len);
|
||||
If (Buf<>Nil) and (Len>0) then
|
||||
begin
|
||||
BufLen := IndexByte(Buf^, Len+1, 0);
|
||||
If (BufLen>0) and (BufLen < Len) then
|
||||
Len := BufLen;
|
||||
widestringmanager.Ansi2WideMoveProc(Buf,DefaultSystemCodePage,S,Len);
|
||||
//PWideChar(Pointer(S)+Len*sizeof(WideChar))^:=#0;
|
||||
end;
|
||||
widestringmanager.Ansi2WideMoveProc(Buf,DefaultSystemCodePage,S,Len);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user