Browse Source

* use UnicodeString instead of WideString in TEnhancedVideoCell

git-svn-id: branches/unicodekvm@48482 -
nickysn 4 years ago
parent
commit
b13c8e3ef6
2 changed files with 11 additions and 11 deletions
  1. 8 8
      packages/rtl-console/src/inc/video.inc
  2. 3 3
      packages/rtl-console/src/inc/videoh.inc

+ 8 - 8
packages/rtl-console/src/inc/video.inc

@@ -23,22 +23,22 @@ begin
   FAttributes := (FAttributes and $FF00) or Attr;
   FAttributes := (FAttributes and $FF00) or Attr;
 end;
 end;
 
 
-function TEnhancedVideoCell.GetExtendedGraphemeCluster: WideString;
+function TEnhancedVideoCell.GetExtendedGraphemeCluster: UnicodeString;
 begin
 begin
   if (FAttributes and $8000) = 0 then
   if (FAttributes and $8000) = 0 then
     GetExtendedGraphemeCluster := EGC_SingleChar
     GetExtendedGraphemeCluster := EGC_SingleChar
   else
   else
-    GetExtendedGraphemeCluster := WideString(EGC_WideStr);
+    GetExtendedGraphemeCluster := UnicodeString(EGC_WideStr);
 end;
 end;
 
 
-procedure TEnhancedVideoCell.SetExtendedGraphemeCluster(const AExtendedGraphemeCluster: WideString);
+procedure TEnhancedVideoCell.SetExtendedGraphemeCluster(const AExtendedGraphemeCluster: UnicodeString);
 begin
 begin
   if Length(AExtendedGraphemeCluster) = 1 then
   if Length(AExtendedGraphemeCluster) = 1 then
   begin
   begin
     if (FAttributes and $8000) <> 0 then
     if (FAttributes and $8000) <> 0 then
     begin
     begin
       FAttributes := FAttributes and $7FFF;
       FAttributes := FAttributes and $7FFF;
-      WideString(EGC_WideStr) := '';
+      UnicodeString(EGC_WideStr) := '';
     end;
     end;
     EGC_SingleChar := AExtendedGraphemeCluster[1];
     EGC_SingleChar := AExtendedGraphemeCluster[1];
   end
   end
@@ -49,7 +49,7 @@ begin
       FAttributes := FAttributes or $8000;
       FAttributes := FAttributes or $8000;
       EGC_WideStr := nil;
       EGC_WideStr := nil;
     end;
     end;
-    WideString(EGC_WideStr) := AExtendedGraphemeCluster;
+    UnicodeString(EGC_WideStr) := AExtendedGraphemeCluster;
   end;
   end;
 end;
 end;
 
 
@@ -61,15 +61,15 @@ end;
 class operator TEnhancedVideoCell.Finalize(var evc: TEnhancedVideoCell);
 class operator TEnhancedVideoCell.Finalize(var evc: TEnhancedVideoCell);
 begin
 begin
   if (evc.FAttributes and $8000) <> 0 then
   if (evc.FAttributes and $8000) <> 0 then
-    WideString(evc.EGC_WideStr) := '';
+    UnicodeString(evc.EGC_WideStr) := '';
 end;
 end;
 
 
-procedure fpc_WideStr_Incr_Ref(var S: Pointer); external name 'FPC_WIDESTR_INCR_REF';
+Procedure fpc_UnicodeStr_Incr_Ref(S : Pointer); external name 'FPC_UNICODESTR_INCR_REF';
 
 
 class operator TEnhancedVideoCell.AddRef(var evc: TEnhancedVideoCell);
 class operator TEnhancedVideoCell.AddRef(var evc: TEnhancedVideoCell);
 begin
 begin
   if (evc.FAttributes and $8000) <> 0 then
   if (evc.FAttributes and $8000) <> 0 then
-    fpc_WideStr_Incr_Ref(evc.EGC_WideStr);
+    fpc_UnicodeStr_Incr_Ref(evc.EGC_WideStr);
 end;
 end;
 
 
 class operator TEnhancedVideoCell.Copy(constref aSrc: TEnhancedVideoCell; var aDst: TEnhancedVideoCell);
 class operator TEnhancedVideoCell.Copy(constref aSrc: TEnhancedVideoCell; var aDst: TEnhancedVideoCell);

+ 3 - 3
packages/rtl-console/src/inc/videoh.inc

@@ -34,12 +34,12 @@ type
     class operator Finalize(var evc: TEnhancedVideoCell);
     class operator Finalize(var evc: TEnhancedVideoCell);
     class operator AddRef(var evc: TEnhancedVideoCell);
     class operator AddRef(var evc: TEnhancedVideoCell);
     class operator Copy(constref aSrc: TEnhancedVideoCell; var aDst: TEnhancedVideoCell);
     class operator Copy(constref aSrc: TEnhancedVideoCell; var aDst: TEnhancedVideoCell);
-    function GetExtendedGraphemeCluster: WideString;
-    procedure SetExtendedGraphemeCluster(const AExtendedGraphemeCluster: WideString);
+    function GetExtendedGraphemeCluster: UnicodeString;
+    procedure SetExtendedGraphemeCluster(const AExtendedGraphemeCluster: UnicodeString);
     function GetAttribute: Byte;
     function GetAttribute: Byte;
     procedure SetAttribute(Attr: Byte);
     procedure SetAttribute(Attr: Byte);
   public
   public
-    property ExtendedGraphemeCluster: WideString read GetExtendedGraphemeCluster write SetExtendedGraphemeCluster;
+    property ExtendedGraphemeCluster: UnicodeString read GetExtendedGraphemeCluster write SetExtendedGraphemeCluster;
     property Attribute: Byte read GetAttribute write SetAttribute;
     property Attribute: Byte read GetAttribute write SetAttribute;
 
 
   private
   private