+ more unicode fixes

git-svn-id: branches/unicodekvm@48643 -
This commit is contained in:
nickysn 2021-02-10 22:32:51 +00:00
parent d96b84cf1f
commit 9c4d842a6f

View File

@ -3621,8 +3621,10 @@ begin
while (StartSItem <> nil) do begin while (StartSItem <> nil) do begin
S := StartSItem; S := StartSItem;
StartSItem := StartSItem^.Next; StartSItem := StartSItem^.Next;
{$ifndef FV_UNICODE}
if (S^.Value <> nil) then if (S^.Value <> nil) then
DisposeStr(S^.Value); DisposeStr(S^.Value);
{$endif FV_UNICODE}
Dispose(S); Dispose(S);
end; end;
Fail; Fail;
@ -3679,7 +3681,7 @@ end;
{****************************************************************************} {****************************************************************************}
{ TCommandIcon.Init } { TCommandIcon.Init }
{****************************************************************************} {****************************************************************************}
constructor TCommandIcon.Init (var Bounds : TRect; AText : String; constructor TCommandIcon.Init (var Bounds : TRect; AText : Sw_String;
ACommand : Word); ACommand : Word);
begin begin
if not TStaticText.Init(Bounds,AText) then if not TStaticText.Init(Bounds,AText) then
@ -3753,8 +3755,10 @@ begin
while (StartSItem <> nil) do begin while (StartSItem <> nil) do begin
S := StartSItem; S := StartSItem;
StartSItem := StartSItem^.Next; StartSItem := StartSItem^.Next;
{$ifndef FV_UNICODE}
if (S^.Value <> nil) then if (S^.Value <> nil) then
DisposeStr(S^.Value); DisposeStr(S^.Value);
{$endif FV_UNICODE}
Dispose(S); Dispose(S);
end; end;
Fail; Fail;
@ -3925,14 +3929,14 @@ end;
{****************************************************************************} {****************************************************************************}
procedure TEditListBox.SetField (InputLine : PInputLine); procedure TEditListBox.SetField (InputLine : PInputLine);
{ Override this method for field types other than PStrings. } { Override this method for field types other than PStrings. }
var Item : PString; var Item : Sw_PString;
begin begin
Item := NewStr(InputLine^.Data^); Item := Sw_NewStr(InputLine^.Data Sw_PString_DeRef);
if Item <> nil if Item <> Sw_PString_Empty
then begin then begin
List^.AtFree(Focused); List^.AtFree(Focused);
List^.Insert(Item); List^.Insert(Pointer(Item));
SetFocusedItem(Item); SetFocusedItem(Pointer(Item));
end; end;
end; end;
@ -3951,7 +3955,7 @@ end;
{ TListDlg.Init } { TListDlg.Init }
{****************************************************************************} {****************************************************************************}
constructor TListDlg.Init (ATitle : TTitleStr; Items: constructor TListDlg.Init (ATitle : TTitleStr; Items:
String; AButtons: Word; AListBox: PListBox; AEditCommand, ANewCommand : Sw_String; AButtons: Word; AListBox: PListBox; AEditCommand, ANewCommand :
Word); Word);
var var
Bounds: TRect; Bounds: TRect;
@ -4251,11 +4255,11 @@ end;
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
{ NewSItem -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 28Apr98 LdB } { NewSItem -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 28Apr98 LdB }
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
FUNCTION NewSItem (Const Str: String; ANext: PSItem): PSItem; FUNCTION NewSItem (Const Str: Sw_String; ANext: PSItem): PSItem;
VAR Item: PSItem; VAR Item: PSItem;
BEGIN BEGIN
New(Item); { Allocate item } New(Item); { Allocate item }
Item^.Value := NewStr(Str); { Hold item string } Item^.Value := Sw_NewStr(Str); { Hold item string }
Item^.Next := ANext; { Chain the ptr } Item^.Next := ANext; { Chain the ptr }
NewSItem := Item; { Return item } NewSItem := Item; { Return item }
END; END;
@ -4263,7 +4267,7 @@ END;
{****************************************************************************} {****************************************************************************}
{ NewCommandSItem } { NewCommandSItem }
{****************************************************************************} {****************************************************************************}
function NewCommandSItem (Str : String; ACommand : Word; function NewCommandSItem (Str : Sw_String; ACommand : Word;
ANext : PCommandSItem) : PCommandSItem; ANext : PCommandSItem) : PCommandSItem;
var Temp : PCommandSItem; var Temp : PCommandSItem;
begin begin