Browse Source

* PChar -> PAnsichar

Michaël Van Canneyt 2 years ago
parent
commit
c8b2b5e060
70 changed files with 472 additions and 466 deletions
  1. 1 1
      packages/ptc/docs/CHANGES.txt
  2. 1 1
      packages/ptc/examples/con_info.pp
  3. 1 1
      packages/ptc/examples/keyboard3.pp
  4. 1 1
      packages/ptc/examples/save.pp
  5. 1 1
      packages/ptc/examples/stretch.pp
  6. 9 9
      packages/ptc/src/c_api/capi_console.inc
  7. 9 9
      packages/ptc/src/c_api/capi_consoled.inc
  8. 1 1
      packages/ptc/src/c_api/capi_copyd.inc
  9. 3 3
      packages/ptc/src/c_api/capi_error.inc
  10. 3 3
      packages/ptc/src/c_api/capi_errord.inc
  11. 1 1
      packages/ptc/src/c_api/capi_surface.inc
  12. 1 1
      packages/ptc/src/c_api/capi_surfaced.inc
  13. 12 12
      packages/ptc/src/cocoa/cocoaconsoled.inc
  14. 12 12
      packages/ptc/src/cocoa/cocoaconsolei.inc
  15. 11 11
      packages/ptc/src/core/baseconsoled.inc
  16. 12 12
      packages/ptc/src/core/baseconsolei.inc
  17. 25 25
      packages/ptc/src/core/consolei.inc
  18. 4 4
      packages/ptc/src/core/errord.inc
  19. 3 3
      packages/ptc/src/core/errori.inc
  20. 11 11
      packages/ptc/src/core/log.inc
  21. 2 2
      packages/ptc/src/core/surfacei.inc
  22. 1 1
      packages/ptc/src/dos/base/kbd.inc
  23. 12 12
      packages/ptc/src/dos/cga/cgaconsoled.inc
  24. 11 11
      packages/ptc/src/dos/cga/cgaconsolei.inc
  25. 4 4
      packages/ptc/src/dos/textfx2/textfx2.pp
  26. 12 12
      packages/ptc/src/dos/textfx2/textfx2consoled.inc
  27. 11 11
      packages/ptc/src/dos/textfx2/textfx2consolei.inc
  28. 23 23
      packages/ptc/src/dos/vesa/vesa.pp
  29. 11 11
      packages/ptc/src/dos/vesa/vesaconsoled.inc
  30. 11 11
      packages/ptc/src/dos/vesa/vesaconsolei.inc
  31. 12 12
      packages/ptc/src/dos/vga/vgaconsoled.inc
  32. 11 11
      packages/ptc/src/dos/vga/vgaconsolei.inc
  33. 3 3
      packages/ptc/src/ptc.pp
  34. 12 12
      packages/ptc/src/ptcwrapper/ptcwrapper_mt.inc
  35. 10 10
      packages/ptc/src/ptcwrapper/ptcwrapper_st.inc
  36. 2 2
      packages/ptc/src/tinyptc/tinyptc.pp
  37. 5 5
      packages/ptc/src/win32/base/win32window.inc
  38. 1 1
      packages/ptc/src/win32/base/win32windowd.inc
  39. 4 4
      packages/ptc/src/win32/directx/p_ddraw.pp
  40. 12 12
      packages/ptc/src/win32/directx/p_dinput.pp
  41. 17 17
      packages/ptc/src/win32/directx/win32directxconsoled.inc
  42. 20 20
      packages/ptc/src/win32/directx/win32directxconsolei.inc
  43. 2 2
      packages/ptc/src/win32/directx/win32directxdisplayd.inc
  44. 12 12
      packages/ptc/src/win32/gdi/win32gdiconsoled.inc
  45. 12 12
      packages/ptc/src/win32/gdi/win32gdiconsolei.inc
  46. 1 1
      packages/ptc/src/win32/gdi/win32gdihooki.inc
  47. 5 5
      packages/ptc/src/win32/gdi/win32modesetteri.inc
  48. 1 1
      packages/ptc/src/win32/gdi/win32openglwindowd.inc
  49. 4 4
      packages/ptc/src/win32/gdi/win32openglwindowi.inc
  50. 12 12
      packages/ptc/src/wince/gapi/wincegapiconsoled.inc
  51. 12 12
      packages/ptc/src/wince/gapi/wincegapiconsolei.inc
  52. 12 12
      packages/ptc/src/wince/gdi/wincegdiconsoled.inc
  53. 12 12
      packages/ptc/src/wince/gdi/wincegdiconsolei.inc
  54. 3 3
      packages/ptc/src/x11/x11check.inc
  55. 10 10
      packages/ptc/src/x11/x11consoled.inc
  56. 10 10
      packages/ptc/src/x11/x11consolei.inc
  57. 1 1
      packages/ptc/src/x11/x11dga1displayd.inc
  58. 1 1
      packages/ptc/src/x11/x11dga1displayi.inc
  59. 1 1
      packages/ptc/src/x11/x11dga2displayd.inc
  60. 5 5
      packages/ptc/src/x11/x11dga2displayi.inc
  61. 1 1
      packages/ptc/src/x11/x11displayd.inc
  62. 1 1
      packages/ptc/src/x11/x11displayi.inc
  63. 1 1
      packages/ptc/src/x11/x11glxfbconfigi.inc
  64. 3 3
      packages/ptc/src/x11/x11imaged.inc
  65. 3 3
      packages/ptc/src/x11/x11imagei.inc
  66. 1 1
      packages/ptc/src/x11/x11windowdisplayd.inc
  67. 13 7
      packages/ptc/src/x11/x11windowdisplayi.inc
  68. 1 1
      packages/ptc/tests/crtkeys/crtkeys.pas
  69. 1 1
      packages/ptc/tests/crtkeys/ptccrtkeys.pas
  70. 2 2
      packages/ptc/tests/event.pp

+ 1 - 1
packages/ptc/docs/CHANGES.txt

@@ -85,7 +85,7 @@ next
                   Windows CRT unit has with the GO32V2 CRT unit. Not all of them
                   are emulated though, since some of them can be considered
                   bugs.
- - ptcgraph now has a global string variable WindowTitle, which allows you to
+ - ptcgraph now has a global AnsiString variable WindowTitle, which allows you to
    set the window title, before calling InitGraph
  - ptcgraph was extended to also support resolutions, different than the ones,
    defined by VESA. This means that you can now use ptcgraph with resolutions,

+ 1 - 1
packages/ptc/examples/con_info.pp

@@ -37,7 +37,7 @@ begin
   try
     try
       Writeln('[ptcpas version]');
-      { print ptcpas version string define }
+      { print ptcpas version AnsiString define }
       Writeln(PTCPAS_VERSION);
       Writeln;
 

+ 1 - 1
packages/ptc/examples/keyboard3.pp

@@ -10,7 +10,7 @@ program KeyboardExample3;
 uses
   ptc;
 
-function KeyCode2String(ACode: Integer): string;
+function KeyCode2String(ACode: Integer): AnsiString;
 begin
   case ACode of
     PTCKEY_UNDEFINED    : Result := 'PTCKEY_UNDEFINED';

+ 1 - 1
packages/ptc/examples/save.pp

@@ -15,7 +15,7 @@ program SaveExample;
 uses
   ptc, Math;
 
-procedure save(surface: IPTCSurface; filename: string);
+procedure save(surface: IPTCSurface; filename: AnsiString);
 var
   F: File;
   width, height: Integer;

+ 1 - 1
packages/ptc/examples/stretch.pp

@@ -15,7 +15,7 @@ program StretchExample;
 uses
   ptc;
 
-procedure load(surface: IPTCSurface; filename: string);
+procedure load(surface: IPTCSurface; filename: AnsiString);
 var
   F: File;
   width, height: Integer;

+ 9 - 9
packages/ptc/src/c_api/capi_console.inc

@@ -55,7 +55,7 @@ begin
   end;
 end;
 
-procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: String);
+procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: AnsiString);
 begin
   try
     TPTCBaseConsole(obj).configure(_file);
@@ -65,7 +65,7 @@ begin
   end;
 end;
 
-function ptc_console_option(obj: TPTC_CONSOLE; _option: String): Boolean;
+function ptc_console_option(obj: TPTC_CONSOLE; _option: AnsiString): Boolean;
 begin
   try
     ptc_console_option := TPTCBaseConsole(obj).option(_option);
@@ -91,7 +91,7 @@ begin
   end;
 end;
 
-procedure ptc_console_open(obj: TPTC_CONSOLE; title: string; pages: Integer);
+procedure ptc_console_open(obj: TPTC_CONSOLE; title: AnsiString; pages: Integer);
 begin
   try
     TPTCBaseConsole(obj).open(title, pages);
@@ -101,7 +101,7 @@ begin
   end;
 end;
 
-procedure ptc_console_open_format(obj: TPTC_CONSOLE; title: string; format: TPTC_FORMAT; pages: Integer);
+procedure ptc_console_open_format(obj: TPTC_CONSOLE; title: AnsiString; format: TPTC_FORMAT; pages: Integer);
 begin
   try
     TPTCBaseConsole(obj).open(title, TPTCFormat(format), pages);
@@ -111,7 +111,7 @@ begin
   end;
 end;
 
-procedure ptc_console_open_resolution(obj: TPTC_CONSOLE; title: string; width, height: Integer; format: TPTC_FORMAT; pages: Integer);
+procedure ptc_console_open_resolution(obj: TPTC_CONSOLE; title: AnsiString; width, height: Integer; format: TPTC_FORMAT; pages: Integer);
 begin
   try
     TPTCBaseConsole(obj).open(title, width, height, TPTCFormat(format), pages);
@@ -121,7 +121,7 @@ begin
   end;
 end;
 
-procedure ptc_console_open_mode(obj: TPTC_CONSOLE; title: string; mode: TPTC_MODE; pages: Integer);
+procedure ptc_console_open_mode(obj: TPTC_CONSOLE; title: AnsiString; mode: TPTC_MODE; pages: Integer);
 begin
   try
     TPTCBaseConsole(obj).open(title, TPTCMode(mode), pages);
@@ -448,7 +448,7 @@ begin
   end;
 end;
 
-function ptc_console_name(obj: TPTC_CONSOLE): string;
+function ptc_console_name(obj: TPTC_CONSOLE): AnsiString;
 begin
   try
     ptc_console_name := TPTCBaseConsole(obj).name;
@@ -461,7 +461,7 @@ begin
   end;
 end;
 
-function ptc_console_title(obj: TPTC_CONSOLE): string;
+function ptc_console_title(obj: TPTC_CONSOLE): AnsiString;
 begin
   try
     ptc_console_title := TPTCBaseConsole(obj).title;
@@ -474,7 +474,7 @@ begin
   end;
 end;
 
-function ptc_console_information(obj: TPTC_CONSOLE): string;
+function ptc_console_information(obj: TPTC_CONSOLE): AnsiString;
 begin
   try
     ptc_console_information := TPTCBaseConsole(obj).information;

+ 9 - 9
packages/ptc/src/c_api/capi_consoled.inc

@@ -35,19 +35,19 @@ function ptc_console_create: TPTC_CONSOLE;
 procedure ptc_console_destroy(obj: TPTC_CONSOLE);
 
 { console configuration }
-procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: String);
+procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: AnsiString);
 
 { console option string }
-function ptc_console_option(obj: TPTC_CONSOLE; _option: String): Boolean;
+function ptc_console_option(obj: TPTC_CONSOLE; _option: AnsiString): Boolean;
 
 { console modes }
 function ptc_console_mode(obj: TPTC_CONSOLE; index: Integer): TPTC_MODE;
 
 { console management }
-procedure ptc_console_open(obj: TPTC_CONSOLE; title: string; pages: Integer);
-procedure ptc_console_open_format(obj: TPTC_CONSOLE; title: string; format: TPTC_FORMAT; pages: Integer);
-procedure ptc_console_open_resolution(obj: TPTC_CONSOLE; title: string; width, height: Integer; format: TPTC_FORMAT; pages: Integer);
-procedure ptc_console_open_mode(obj: TPTC_CONSOLE; title: string; mode: TPTC_MODE; pages: Integer);
+procedure ptc_console_open(obj: TPTC_CONSOLE; title: AnsiString; pages: Integer);
+procedure ptc_console_open_format(obj: TPTC_CONSOLE; title: AnsiString; format: TPTC_FORMAT; pages: Integer);
+procedure ptc_console_open_resolution(obj: TPTC_CONSOLE; title: AnsiString; width, height: Integer; format: TPTC_FORMAT; pages: Integer);
+procedure ptc_console_open_mode(obj: TPTC_CONSOLE; title: AnsiString; mode: TPTC_MODE; pages: Integer);
 procedure ptc_console_close(obj: TPTC_CONSOLE);
 
 { synchronization }
@@ -96,9 +96,9 @@ function ptc_console_pitch(obj: TPTC_CONSOLE): Integer;
 function ptc_console_area(obj: TPTC_CONSOLE): TPTC_AREA;
 function ptc_console_clip(obj: TPTC_CONSOLE): TPTC_AREA;
 function ptc_console_format(obj: TPTC_CONSOLE): TPTC_FORMAT;
-function ptc_console_name(obj: TPTC_CONSOLE): string;
-function ptc_console_title(obj: TPTC_CONSOLE): string;
-function ptc_console_information(obj: TPTC_CONSOLE): string;
+function ptc_console_name(obj: TPTC_CONSOLE): AnsiString;
+function ptc_console_title(obj: TPTC_CONSOLE): AnsiString;
+function ptc_console_information(obj: TPTC_CONSOLE): AnsiString;
 
 { extension functions }
 {#ifdef __PTC_WIN32_EXTENSIONS__

+ 1 - 1
packages/ptc/src/c_api/capi_copyd.inc

@@ -45,4 +45,4 @@ procedure ptc_copy_copy(obj: TPTC_COPY; source_pixels: Pointer; source_x, source
                         destination_pixels: Pointer; destination_x, destination_y, destination_width, destination_height, destination_pitch: Integer);
 
 { copy option string }
-function ptc_copy_option(obj: TPTC_COPY; option: String): Boolean;
+function ptc_copy_option(obj: TPTC_COPY; option: AnsiString): Boolean;

+ 3 - 3
packages/ptc/src/c_api/capi_error.inc

@@ -30,7 +30,7 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 }
 
-function ptc_error_create(message: string): TPTC_ERROR;
+function ptc_error_create(message: AnsiString): TPTC_ERROR;
 begin
   try
     ptc_error_create := TPTC_ERROR(TPTCError.Create(message));
@@ -43,7 +43,7 @@ begin
   end;
 end;
 
-function ptc_error_create_composite(message: string; error: TPTC_ERROR): TPTC_ERROR;
+function ptc_error_create_composite(message: AnsiString; error: TPTC_ERROR): TPTC_ERROR;
 begin
   try
     ptc_error_create_composite := TPTC_ERROR(TPTCError.Create(message, TPTCError(error)));
@@ -78,7 +78,7 @@ begin
   end;
 end;
 
-function ptc_error_message(obj: TPTC_ERROR): string;
+function ptc_error_message(obj: TPTC_ERROR): AnsiString;
 begin
   try
     ptc_error_message := TPTCError(obj).message;

+ 3 - 3
packages/ptc/src/c_api/capi_errord.inc

@@ -33,13 +33,13 @@
 type
   TPTC_ERROR_HANDLER = procedure(error: TPTC_ERROR);
 
-function ptc_error_create(message: string): TPTC_ERROR;
-function ptc_error_create_composite(message: string; error: TPTC_ERROR): TPTC_ERROR;
+function ptc_error_create(message: AnsiString): TPTC_ERROR;
+function ptc_error_create_composite(message: AnsiString; error: TPTC_ERROR): TPTC_ERROR;
 procedure ptc_error_destroy(obj: TPTC_ERROR);
 
 procedure ptc_error_report(obj: TPTC_ERROR);
 
-function ptc_error_message(obj: TPTC_ERROR): string;
+function ptc_error_message(obj: TPTC_ERROR): AnsiString;
 
 procedure ptc_error_assign(obj, error: TPTC_ERROR);
 function ptc_error_equals(obj, error: TPTC_ERROR): Boolean;

+ 1 - 1
packages/ptc/src/c_api/capi_surface.inc

@@ -279,7 +279,7 @@ begin
   end;
 end;
 
-function ptc_surface_option(obj: TPTC_SURFACE; _option: string): Boolean;
+function ptc_surface_option(obj: TPTC_SURFACE; _option: AnsiString): Boolean;
 begin
   try
     ptc_surface_option := TPTCBaseSurface(obj).option(_option);

+ 1 - 1
packages/ptc/src/c_api/capi_surfaced.inc

@@ -71,4 +71,4 @@ function ptc_surface_clip(obj: TPTC_SURFACE): TPTC_AREA;
 function ptc_surface_format(obj: TPTC_SURFACE): TPTC_FORMAT;
 
 { surface option string }
-function ptc_surface_option(obj: TPTC_SURFACE; _option: string): Boolean;
+function ptc_surface_option(obj: TPTC_SURFACE; _option: AnsiString): Boolean;

+ 12 - 12
packages/ptc/src/cocoa/cocoaconsoled.inc

@@ -78,7 +78,7 @@ type
 
   TCocoaConsole = class(TPTCOpenGLLessConsole)
   private
-    FTitle: string;
+    FTitle: AnsiString;
     FWidth, FHeight, FPitch: Integer;
     FFormat: IPTCFormat;
     FCopy: TPTCCopy;
@@ -106,14 +106,14 @@ type
     function GetFormat: IPTCFormat; override;
 
     function GetPages: Integer; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
 
     function TranslateKeyCode(kcode: cushort): Integer;
 
-    function HandleCocoaKeyEvent(theEvent: NSEvent; const Method: string): Boolean;
-    function HandleCocoaMouseEvent(theEvent: NSEvent; const Method: string): Boolean;
+    function HandleCocoaKeyEvent(theEvent: NSEvent; const Method: AnsiString): Boolean;
+    function HandleCocoaMouseEvent(theEvent: NSEvent; const Method: AnsiString): Boolean;
     function HandleWindowShouldClose(sender: id): Boolean;
     procedure HandleEvents;
 
@@ -151,18 +151,18 @@ type
                     AArea: IPTCArea); override;
     procedure Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;
-    function Option(const AOption: String): Boolean; override;
+    function Option(const AOption: AnsiString): Boolean; override;
     function Clip: IPTCArea; override;
     function Palette: IPTCPalette; override;
 
-    procedure Configure(const AFileName: String); override;
+    procedure Configure(const AFileName: AnsiString); override;
     function Modes: TPTCModeList; override;
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
 

+ 12 - 12
packages/ptc/src/cocoa/cocoaconsolei.inc

@@ -190,17 +190,17 @@ begin
   Result := 1;
 end;
 
-function TCocoaConsole.GetName: string;
+function TCocoaConsole.GetName: AnsiString;
 begin
   Result := 'Cocoa';
 end;
 
-function TCocoaConsole.GetTitle: string;
+function TCocoaConsole.GetTitle: AnsiString;
 begin
   Result := FTitle;
 end;
 
-function TCocoaConsole.GetInformation: string;
+function TCocoaConsole.GetInformation: AnsiString;
 begin
   Result := '';
 end;
@@ -323,7 +323,7 @@ begin
 end;
 
 function TCocoaConsole.HandleCocoaKeyEvent(theEvent: NSEvent;
-  const Method: string): Boolean;
+  const Method: AnsiString): Boolean;
 var
   evtype: NSEventType;
   kcode: cushort;
@@ -475,7 +475,7 @@ begin
 end;
 
 function TCocoaConsole.HandleCocoaMouseEvent(theEvent: NSEvent;
-  const Method: string): Boolean;
+  const Method: AnsiString): Boolean;
 begin
   //Writeln('HandleCocoaMouseEvent ', Method, ' ', theEvent.type_);
   Result := False;
@@ -662,7 +662,7 @@ begin
   FClip := AArea;
 end;
 
-function TCocoaConsole.Option(const AOption: String): Boolean;
+function TCocoaConsole.Option(const AOption: AnsiString): Boolean;
 begin
   LOG('console option', AOption);
   Result := True;
@@ -685,10 +685,10 @@ begin
   Result := FPalette;
 end;
 
-procedure TCocoaConsole.Configure(const AFileName: String);
+procedure TCocoaConsole.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -713,18 +713,18 @@ begin
   Result := nil;
 end;
 
-procedure TCocoaConsole.Open(const ATitle: string; APages: Integer);
+procedure TCocoaConsole.Open(const ATitle: AnsiString; APages: Integer);
 begin
   Open(ATitle, TPTCFormatFactory.CreateNew(32, $FF0000, $FF00, $FF), APages);
 end;
 
-procedure TCocoaConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TCocoaConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
   APages: Integer);
 begin
   Open(ATitle, 640, 480, AFormat, APages);
 end;
 
-procedure TCocoaConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TCocoaConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
   AFormat: IPTCFormat; APages: Integer);
 var
   rct: NSRect;
@@ -802,7 +802,7 @@ begin
   end;
 end;
 
-procedure TCocoaConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TCocoaConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
   APages: Integer);
 begin
   Open(ATitle, AMode.Width, AMode.Height, AMode.Format, APages);

+ 11 - 11
packages/ptc/src/core/baseconsoled.inc

@@ -33,22 +33,22 @@
 type
   IPTCConsole = interface(IPTCSurface)
     function GetPages: Integer;
-    function GetName: string;
-    function GetTitle: string;
-    function GetInformation: string;
+    function GetName: AnsiString;
+    function GetTitle: AnsiString;
+    function GetInformation: AnsiString;
 
     function GetOpenGL_Enabled: Boolean;
     procedure SetOpenGL_Enabled(AValue: Boolean);
     function GetOpenGL_Attributes: IPTCOpenGLAttributes;
 
-    procedure Configure(const AFileName: string);
+    procedure Configure(const AFileName: AnsiString);
     function Modes: TPTCModeList;
-    procedure Open(const ATitle: string; APages: Integer = 0); overload;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload;
     procedure Close;
     procedure InternalResize(AWidth, AHeight: Integer);
@@ -74,9 +74,9 @@ type
     function MoveMouseTo(X, Y: Integer): Boolean;
 
     property Pages: Integer read GetPages;
-    property Name: string read GetName;
-    property Title: string read GetTitle;
-    property Information: string read GetInformation;
+    property Name: AnsiString read GetName;
+    property Title: AnsiString read GetTitle;
+    property Information: AnsiString read GetInformation;
 
     { OpenGL support }
     property OpenGL_Enabled: Boolean read GetOpenGL_Enabled write SetOpenGL_Enabled;

+ 12 - 12
packages/ptc/src/core/baseconsolei.inc

@@ -45,9 +45,9 @@ type
     function GetFormat: IPTCFormat; virtual; abstract;
 
     function GetPages: Integer; virtual; abstract;
-    function GetName: string; virtual; abstract;
-    function GetTitle: string; virtual; abstract;
-    function GetInformation: string; virtual; abstract;
+    function GetName: AnsiString; virtual; abstract;
+    function GetTitle: AnsiString; virtual; abstract;
+    function GetInformation: AnsiString; virtual; abstract;
 
     function GetOpenGL_Enabled: Boolean; virtual; abstract;
     procedure SetOpenGL_Enabled(AValue: Boolean); virtual; abstract;
@@ -86,18 +86,18 @@ type
                     AArea: IPTCArea); virtual; abstract;
     procedure Palette(APalette: IPTCPalette); virtual; abstract;
     procedure Clip(AArea: IPTCArea); virtual; abstract;
-    function Option(const AOption: String): Boolean; virtual; abstract;
+    function Option(const AOption: AnsiString): Boolean; virtual; abstract;
     function Clip: IPTCArea; virtual; abstract;
     function Palette: IPTCPalette; virtual; abstract;
 
-    procedure Configure(const AFileName: String); virtual; abstract;
+    procedure Configure(const AFileName: AnsiString); virtual; abstract;
     function Modes: TPTCModeList; virtual; abstract;
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; virtual; abstract;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; virtual; abstract;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; virtual; abstract;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; virtual; abstract;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; virtual; abstract;
     procedure Close; virtual; abstract;
     procedure InternalResize(AWidth, AHeight: Integer); virtual;
@@ -121,9 +121,9 @@ type
     function MoveMouseTo(X, Y: Integer): Boolean; virtual;
 
     property Pages: Integer read GetPages;
-    property Name: string read GetName;
-    property Title: string read GetTitle;
-    property Information: string read GetInformation;
+    property Name: AnsiString read GetName;
+    property Title: AnsiString read GetTitle;
+    property Information: AnsiString read GetInformation;
 
     property Width: Integer read GetWidth;
     property Height: Integer read GetHeight;

+ 25 - 25
packages/ptc/src/core/consolei.inc

@@ -36,15 +36,15 @@ type
   private
     FConsole: IPTCConsole;
     FModes: array of IPTCMode;
-    FOptionsQueue: array of string;
+    FOptionsQueue: array of AnsiString;
     FHackyOptionConsoleFlag: Boolean;
     FUseOpenGL: Boolean;
 
     function ConsoleCreate(AIndex: Integer): IPTCConsole;
-    function ConsoleCreate(const AName: string): IPTCConsole;
+    function ConsoleCreate(const AName: AnsiString): IPTCConsole;
     procedure Check;
 
-    procedure AddOptionToOptionsQueue(const AOption: string);
+    procedure AddOptionToOptionsQueue(const AOption: AnsiString);
     procedure ExecuteOptionsFromOptionsQueue;
     procedure ClearOptionsQueue;
 
@@ -55,15 +55,15 @@ type
   public
     constructor Create; override;
     destructor Destroy; override;
-    procedure Configure(const AFile: string); override;
-    function Option(const AOption: string): Boolean; override;
+    procedure Configure(const AFile: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
     function Modes: TPTCModeList; override;
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
 
     procedure Close; override;
@@ -109,9 +109,9 @@ type
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function NextEvent(out AEvent: IPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
     function MoveMouseTo(X, Y: Integer): Boolean; override;
@@ -144,7 +144,7 @@ const
   ConsoleTypes: array [0..ConsoleTypesNumber - 1] of
     record
       ConsoleClass: TPTCBaseConsoleClass;
-      Names: array [1..2] of string;
+      Names: array [1..2] of AnsiString;
       OpenGL: Boolean;
     end =
   (
@@ -215,10 +215,10 @@ begin
   inherited Destroy;
 end;
 
-procedure TPTCConsole.Configure(const AFile: string);
+procedure TPTCConsole.Configure(const AFile: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFile);
   {$push}{$I-}
@@ -238,7 +238,7 @@ begin
   CloseFile(F);
 end;
 
-procedure TPTCConsole.AddOptionToOptionsQueue(const AOption: string);
+procedure TPTCConsole.AddOptionToOptionsQueue(const AOption: AnsiString);
 begin
   SetLength(FOptionsQueue, Length(FOptionsQueue) + 1);
   FOptionsQueue[High(FOptionsQueue)] := AOption;
@@ -257,7 +257,7 @@ begin
   SetLength(FOptionsQueue, 0);
 end;
 
-function TPTCConsole.Option(const AOption: String): Boolean;
+function TPTCConsole.Option(const AOption: AnsiString): Boolean;
 begin
   if AOption = 'enable logging' then
   begin
@@ -335,7 +335,7 @@ begin
   end;
 end;
 
-procedure TPTCConsole.Open(const ATitle: string; APages: Integer);
+procedure TPTCConsole.Open(const ATitle: AnsiString; APages: Integer);
 var
   composite, tmp: TPTCError;
   index: Integer;
@@ -395,7 +395,7 @@ begin
   end;
 end;
 
-procedure TPTCConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TPTCConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                            APages: Integer);
 var
   composite, tmp: TPTCError;
@@ -456,7 +456,7 @@ begin
   end;
 end;
 
-procedure TPTCConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TPTCConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                            AFormat: IPTCFormat; APages: Integer);
 var
   composite, tmp: TPTCError;
@@ -517,7 +517,7 @@ begin
   end;
 end;
 
-procedure TPTCConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TPTCConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                            APages: Integer);
 var
   composite, tmp: TPTCError;
@@ -753,7 +753,7 @@ begin
   Result := FConsole.GetFormat;
 end;
 
-function TPTCConsole.GetName: string;
+function TPTCConsole.GetName: AnsiString;
 begin
   Result := '';
   if Assigned(FConsole) then
@@ -773,13 +773,13 @@ begin
 {$ENDIF LINUX}
 end;
 
-function TPTCConsole.GetTitle: string;
+function TPTCConsole.GetTitle: AnsiString;
 begin
   Check;
   Result := FConsole.GetTitle;
 end;
 
-function TPTCConsole.GetInformation: string;
+function TPTCConsole.GetInformation: AnsiString;
 begin
   Check;
   Result := FConsole.GetInformation;
@@ -816,7 +816,7 @@ begin
     Result.KeyReleaseEnabled := KeyReleaseEnabled;
 end;
 
-function TPTCConsole.ConsoleCreate(const AName: string): IPTCConsole;
+function TPTCConsole.ConsoleCreate(const AName: AnsiString): IPTCConsole;
 var
   I, J: Integer;
 begin

+ 4 - 4
packages/ptc/src/core/errord.inc

@@ -33,15 +33,15 @@
 type
   TPTCError = class
   private
-    FMessage: string;
+    FMessage: AnsiString;
   public
     constructor Create;
-    constructor Create(const AMessage: String);
-    constructor Create(const AMessage: string; const AError: TPTCError);
+    constructor Create(const AMessage: AnsiString);
+    constructor Create(const AMessage: AnsiString; const AError: TPTCError);
     constructor Create(const AError: TPTCError);
     destructor Destroy; override;
     procedure Assign(const AError: TPTCError);
     function Equals(Obj: TObject): Boolean; override;
     procedure Report;
-    property Message: string read FMessage;
+    property Message: AnsiString read FMessage;
   end;

+ 3 - 3
packages/ptc/src/core/errori.inc

@@ -35,13 +35,13 @@ begin
   FMessage := '';
 end;
 
-constructor TPTCError.Create(const AMessage: String);
+constructor TPTCError.Create(const AMessage: AnsiString);
 begin
   FMessage := AMessage;
   LOG('error', Self);
 end;
 
-constructor TPTCError.Create(const AMessage: string; const AError: TPTCError);
+constructor TPTCError.Create(const AMessage: AnsiString; const AError: TPTCError);
 begin
   FMessage := AMessage + #10 + AError.FMessage;
   LOG('composite error', Self);
@@ -100,7 +100,7 @@ begin
   {$IFDEF Win32}
 //  Win32Cursor_resurrect;
   txt := FMessage;
-  MessageBoxA(0, PChar(txt), 'Error', MB_OK or MB_ICONERROR or MB_SETFOREGROUND or MB_TOPMOST);
+  MessageBoxA(0, PAnsiChar(txt), 'Error', MB_OK or MB_ICONERROR or MB_SETFOREGROUND or MB_TOPMOST);
   {$ENDIF Win32}
 
   {$IFDEF WinCE}

+ 11 - 11
packages/ptc/src/core/log.inc

@@ -89,7 +89,7 @@ begin
   CloseFile(LOG_file);
 end;
 
-procedure LOG(const message: String);
+procedure LOG(const message: AnsiString);
 begin
   if not LOG_enabled then
     exit;
@@ -98,7 +98,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: Boolean);
+procedure LOG(const message: AnsiString; data: Boolean);
 begin
   if not LOG_enabled then
     exit;
@@ -111,7 +111,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: Integer);
+procedure LOG(const message: AnsiString; data: Integer);
 begin
   if not LOG_enabled then
     exit;
@@ -120,7 +120,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: DWord);
+procedure LOG(const message: AnsiString; data: DWord);
 begin
   if not LOG_enabled then
     exit;
@@ -129,7 +129,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: Int64);
+procedure LOG(const message: AnsiString; data: Int64);
 begin
   if not LOG_enabled then
     exit;
@@ -138,7 +138,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: QWord);
+procedure LOG(const message: AnsiString; data: QWord);
 begin
   if not LOG_enabled then
     exit;
@@ -147,7 +147,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: Single);
+procedure LOG(const message: AnsiString; data: Single);
 begin
   if not LOG_enabled then
     exit;
@@ -156,7 +156,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: Double);
+procedure LOG(const message: AnsiString; data: Double);
 begin
   if not LOG_enabled then
     exit;
@@ -165,7 +165,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; const data: String);
+procedure LOG(const message: AnsiString; const data: AnsiString);
 begin
   if not LOG_enabled then
     exit;
@@ -174,7 +174,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: IPTCFormat);
+procedure LOG(const message: AnsiString; data: IPTCFormat);
 begin
   if not LOG_enabled then
     exit;
@@ -196,7 +196,7 @@ begin
   LOG_close;
 end;
 
-procedure LOG(const message: string; data: TPTCError);
+procedure LOG(const message: AnsiString; data: TPTCError);
 begin
   if not LOG_enabled then
     exit;

+ 2 - 2
packages/ptc/src/core/surfacei.inc

@@ -84,7 +84,7 @@ type
     function GetArea: IPTCArea;
     function Clip: IPTCArea;
     function GetFormat: IPTCFormat;
-    function Option(const AOption: string): Boolean;
+    function Option(const AOption: AnsiString): Boolean;
 
     property Width: Integer read GetWidth;
     property Height: Integer read GetHeight;
@@ -310,7 +310,7 @@ begin
   Result := FFormat;
 end;
 
-function TPTCSurface.Option(const AOption: string): Boolean;
+function TPTCSurface.Option(const AOption: AnsiString): Boolean;
 begin
   Result := FCopy.Option(AOption);
 end;

+ 1 - 1
packages/ptc/src/dos/base/kbd.inc

@@ -44,7 +44,7 @@ procedure TDosKeyboard.GetPendingEvents(queue: TEventQueue);
 
 var
   c: Integer;
-  Ch, Ex: Char;
+  Ch, Ex: AnsiChar;
 
 begin
   while KeyPressed do

+ 12 - 12
packages/ptc/src/dos/cga/cgaconsoled.inc

@@ -34,8 +34,8 @@ type
   private
     { data }
     m_modes: array of IPTCMode;
-    m_title: string;
-    m_information: string;
+    m_title: AnsiString;
+    m_information: AnsiString;
 
     { flags }
     m_open: Boolean;
@@ -58,7 +58,7 @@ type
     m_primary: TPTCSurface;
 
     { internal console management routines }
-    procedure internal_pre_open_setup(const _title: string);
+    procedure internal_pre_open_setup(const _title: AnsiString);
     procedure internal_open_fullscreen_start;
     procedure internal_open_fullscreen(_width, _height: Integer; const _format: IPTCFormat);
     procedure internal_open_fullscreen_finish(_pages: Integer);
@@ -74,15 +74,15 @@ type
   public
     constructor Create; override;
     destructor Destroy; override;
-    procedure Configure(const AFileName: string); override;
-    function option(const _option: string): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function option(const _option: AnsiString): Boolean; override;
     function modes: TPTCModeList; override;
-    procedure open(const _title: string; _pages: Integer); overload; override;
-    procedure open(const _title: string; _format: IPTCFormat;
+    procedure open(const _title: AnsiString; _pages: Integer); overload; override;
+    procedure open(const _title: AnsiString; _format: IPTCFormat;
                    _pages: Integer); overload; override;
-    procedure open(const _title: string; _width, _height: Integer;
+    procedure open(const _title: AnsiString; _width, _height: Integer;
                    _format: IPTCFormat; _pages: Integer); overload; override;
-    procedure open(const _title: string; _mode: IPTCMode;
+    procedure open(const _title: AnsiString; _mode: IPTCMode;
                    _pages: Integer); overload; override;
     procedure close; override;
     procedure flush; override;
@@ -126,9 +126,9 @@ type
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function NextEvent(out event: IPTCEvent; wait: Boolean; const EventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
   end;

+ 11 - 11
packages/ptc/src/dos/cga/cgaconsolei.inc

@@ -63,10 +63,10 @@ begin
   inherited Destroy;
 end;
 
-procedure TCGAConsole.Configure(const AFileName: string);
+procedure TCGAConsole.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -86,7 +86,7 @@ begin
   CloseFile(F);
 end;
 
-function TCGAConsole.option(const _option: string): Boolean;
+function TCGAConsole.option(const _option: AnsiString): Boolean;
 begin
   {...}
   if _option = 'enable logging' then
@@ -110,24 +110,24 @@ begin
   Result := m_modes;
 end;
 
-procedure TCGAConsole.Open(const _title: string; _pages: Integer); overload;
+procedure TCGAConsole.Open(const _title: AnsiString; _pages: Integer); overload;
 begin
   open(_title, m_default_format, _pages);
 end;
 
-procedure TCGAConsole.open(const _title: string; _format: IPTCFormat;
+procedure TCGAConsole.open(const _title: AnsiString; _format: IPTCFormat;
                            _pages: Integer); overload;
 begin
   open(_title, m_default_width, m_default_height, _format, _pages);
 end;
 
-procedure TCGAConsole.open(const _title: string; _width, _height: Integer;
+procedure TCGAConsole.open(const _title: AnsiString; _width, _height: Integer;
                            _format: IPTCFormat; _pages: Integer); overload;
 begin
   open(_title, TPTCMode.Create(_width, _height, _format), _pages);
 end;
 
-procedure TCGAConsole.open(const _title: string; _mode: IPTCMode;
+procedure TCGAConsole.open(const _title: AnsiString; _mode: IPTCMode;
                            _pages: Integer); overload;
 var
   _width, _height: Integer;
@@ -475,22 +475,22 @@ begin
   Result := m_primary.format;
 end;
 
-function TCGAConsole.GetName: string;
+function TCGAConsole.GetName: AnsiString;
 begin
   Result := 'CGA';
 end;
 
-function TCGAConsole.GetTitle: string;
+function TCGAConsole.GetTitle: AnsiString;
 begin
   Result := m_title;
 end;
 
-function TCGAConsole.GetInformation: string;
+function TCGAConsole.GetInformation: AnsiString;
 begin
   Result := m_information;
 end;
 
-procedure TCGAConsole.internal_pre_open_setup(const _title: string);
+procedure TCGAConsole.internal_pre_open_setup(const _title: AnsiString);
 begin
   m_title := _title;
 end;

+ 4 - 4
packages/ptc/src/dos/textfx2/textfx2.pp

@@ -87,7 +87,7 @@ function calcpal_lightbase(red, green, blue: Real): Word;
 function calcpal_lightbase_g(red, green, blue: Real): Word;
 {Function (*calcpal)(float red, float green, float blue): Word;}
 const calcpal: Function(red, green, blue: Real): Word = @calcpal_colorbase;
-    {* Finds the closest color/char combo for any 0:63,0:63,0:63 value.
+    {* Finds the closest color/AnsiChar combo for any 0:63,0:63,0:63 value.
      *
      * calcpal_colorbase is the 'old' calcpal, only "a bit" optimized.
      * calcpal is now function pointer so calcpal function can be changed
@@ -97,7 +97,7 @@ const calcpal: Function(red, green, blue: Real): Word = @calcpal_colorbase;
 
 function calc_gscale(light: Real): Word;
 function calc_gscale2(light: Real): Word;
-    {* Finds the closes gscale color/char combo for 0..1 range
+    {* Finds the closes gscale color/AnsiChar combo for 0..1 range
      * gscale2 uses colors 8,7,15, normal just uses 7.
      *}
 
@@ -131,7 +131,7 @@ uses
   go32;
 
 { $define __USE_178NOT176}
- { uncomment to use 75% char instead of 25% char }
+ { uncomment to use 75% AnsiChar instead of 25% AnsiChar }
 
 {$DEFINE __USE_REALIBMPAL}
  { comment out to use 'clean' truecolor palette for calculations }
@@ -435,7 +435,7 @@ end;
 procedure build_colormap(dots: Integer);
 
 const
-  wheel: array [0..3] of Char = ('-', '\', '|', '/');
+  wheel: array [0..3] of AnsiChar = ('-', '\', '|', '/');
 
 var
   r, g, b: Integer;

+ 12 - 12
packages/ptc/src/dos/textfx2/textfx2consoled.inc

@@ -34,8 +34,8 @@ type
   private
     { data }
     FModes: array of IPTCMode;
-    FTitle: string;
-    FInformation: string;
+    FTitle: AnsiString;
+    FInformation: AnsiString;
 
     { flags }
     FOpen: Boolean;
@@ -59,7 +59,7 @@ type
     F160x100buffer: TPTCSurface;
 
     { internal console management routines }
-    procedure internal_pre_open_setup(const _title: String);
+    procedure internal_pre_open_setup(const _title: AnsiString);
     procedure internal_open_fullscreen_start;
     procedure internal_open_fullscreen(_width, _height: Integer; _format: IPTCFormat);
     procedure internal_open_fullscreen_finish(_pages: Integer);
@@ -75,15 +75,15 @@ type
   public
     constructor Create; override;
     destructor Destroy; override;
-    procedure Configure(const AFileName: string); override;
-    function Option(const AOption: string): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
     function Modes: TPTCModeList; override;
-    procedure open(const _title: string; _pages: Integer); overload; override;
-    procedure open(const _title: string; _format: IPTCFormat;
+    procedure open(const _title: AnsiString; _pages: Integer); overload; override;
+    procedure open(const _title: AnsiString; _format: IPTCFormat;
                    _pages: Integer); overload; override;
-    procedure open(const _title: string; _width, _height: Integer;
+    procedure open(const _title: AnsiString; _width, _height: Integer;
                    _format: IPTCFormat; _pages: Integer); overload; override;
-    procedure open(const _title: string; _mode: IPTCMode;
+    procedure open(const _title: AnsiString; _mode: IPTCMode;
                    _pages: Integer); overload; override;
     procedure close; override;
     procedure flush; override;
@@ -127,9 +127,9 @@ type
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function NextEvent(out event: IPTCEvent; wait: Boolean; const EventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
   end;

+ 11 - 11
packages/ptc/src/dos/textfx2/textfx2consolei.inc

@@ -70,10 +70,10 @@ begin
   inherited Destroy;
 end;
 
-procedure TTextFX2Console.Configure(const AFileName: string);
+procedure TTextFX2Console.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -93,7 +93,7 @@ begin
   CloseFile(F);
 end;
 
-function TTextFX2Console.Option(const AOption: string): Boolean;
+function TTextFX2Console.Option(const AOption: AnsiString): Boolean;
 begin
   {...}
   Result := True;
@@ -161,24 +161,24 @@ begin
   Result := FModes;
 end;
 
-procedure TTextFX2Console.Open(const _title: string; _pages: Integer); overload;
+procedure TTextFX2Console.Open(const _title: AnsiString; _pages: Integer); overload;
 begin
   Open(_title, FDefaultFormat, _pages);
 end;
 
-procedure TTextFX2Console.open(const _title: string; _format: IPTCFormat;
+procedure TTextFX2Console.open(const _title: AnsiString; _format: IPTCFormat;
                                _pages: Integer); overload;
 begin
   open(_title, FDefaultWidth, FDefaultHeight, _format, _pages);
 end;
 
-procedure TTextFX2Console.open(const _title: string; _width, _height: Integer;
+procedure TTextFX2Console.open(const _title: AnsiString; _width, _height: Integer;
                                _format: IPTCFormat; _pages: Integer); overload;
 begin
   open(_title, TPTCMode.Create(_width, _height, _format), _pages);
 end;
 
-procedure TTextFX2Console.open(const _title: string; _mode: IPTCMode;
+procedure TTextFX2Console.open(const _title: AnsiString; _mode: IPTCMode;
                                _pages: Integer); overload;
 var
   _width, _height: Integer;
@@ -522,22 +522,22 @@ begin
   Result := FPrimary.format;
 end;
 
-function TTextFX2Console.GetName: string;
+function TTextFX2Console.GetName: AnsiString;
 begin
   Result := 'TextFX2';
 end;
 
-function TTextFX2Console.GetTitle: string;
+function TTextFX2Console.GetTitle: AnsiString;
 begin
   Result := FTitle;
 end;
 
-function TTextFX2Console.GetInformation: string;
+function TTextFX2Console.GetInformation: AnsiString;
 begin
   Result := FInformation;
 end;
 
-procedure TTextFX2Console.internal_pre_open_setup(const _title: string);
+procedure TTextFX2Console.internal_pre_open_setup(const _title: AnsiString);
 begin
   FTitle := _title;
 end;

+ 23 - 23
packages/ptc/src/dos/vesa/vesa.pp

@@ -95,7 +95,7 @@ type
     Reserved4: array [1..189] of Byte; {remainder of ModeInfoBlock}
   end;
 
-  TLogProcedure = procedure(const S: string);
+  TLogProcedure = procedure(const S: AnsiString);
 
   TVBEModeMemoryModel =
    (vmmmTextMode,
@@ -303,20 +303,20 @@ uses
 type
   TVBEInfoBlock = packed record
     {VBE 1.0+}
-    VBESignature: array [1..4] of Char; {'VESA'}
+    VBESignature: array [1..4] of AnsiChar; {'VESA'}
     VBEVersion: Word;
-    OemStringPtr: DWord; {VbeFarPtr to OEM string}
+    OemStringPtr: DWord; {VbeFarPtr to OEM AnsiString}
     Capabilities: DWord; {Capabilities of graphics controller}
     VideoModePtr: DWord; {VbeFarPtr to VideoModeList}
     {added for VBE 1.1+}
     TotalMemory: Word; {Number of 64kb memory blocks}
     {added for VBE 2.0+}
     OemSoftwareRev: Word; {VBE implementation Software revision}
-    OemVendorNamePtr: DWord; {VbeFarPtr to Vendor Name string}
-    OemProductNamePtr: DWord; {VbeFarPtr to Product Name string}
-    OemProductRevPtr: DWord; {VbeFarPtr to Product Revision string}
+    OemVendorNamePtr: DWord; {VbeFarPtr to Vendor Name AnsiString}
+    OemProductNamePtr: DWord; {VbeFarPtr to Product Name AnsiString}
+    OemProductRevPtr: DWord; {VbeFarPtr to Product Revision AnsiString}
     Reserved: array [1..222] of Byte; {Reserved for VBE implementation scratch area}
-    OemData: array [1..256] of Char; {Data Area for OEM Strings}
+    OemData: array [1..256] of AnsiChar; {Data Area for OEM Strings}
   end;
   TVideoModeList = array of Word;
 
@@ -329,10 +329,10 @@ var
   SnowyRAMDAC: Boolean;
   StereoSignalingSupport: Boolean;
   StereoSignalingVesaEVC: Boolean;
-  OEMString: string;
-  OEMVendorName: string;
-  OEMProductName: string;
-  OEMProductRev: string;
+  OEMString: AnsiString;
+  OEMVendorName: AnsiString;
+  OEMProductName: AnsiString;
+  OEMProductRev: AnsiString;
   OEMSoftwareRev: Integer;
   CurrentMode: TVBEMode = nil;
 
@@ -365,7 +365,7 @@ var
 
   VESAInit: Boolean;
 
-procedure Debugln(const S: string);
+procedure Debugln(const S: AnsiString);
 begin
   if Assigned(LogProcedure) then
     LogProcedure(S);
@@ -376,22 +376,22 @@ begin
   Debugln('');
 end;
 
-function IntToStr(Value: Integer): string;
+function IntToStr(Value: Integer): AnsiString;
 begin
   System.Str(Value, Result);
 end;
 
-function IntToStr(Value: Int64): string;
+function IntToStr(Value: Int64): AnsiString;
 begin
   System.Str(Value, Result);
 end;
 
-function IntToStr(Value: QWord): string;
+function IntToStr(Value: QWord): AnsiString;
 begin
   System.Str(Value, Result);
 end;
 
-function BoolToStr(Value: Boolean): string;
+function BoolToStr(Value: Boolean): AnsiString;
 begin
   if Value then
     Result := 'TRUE'
@@ -810,10 +810,10 @@ begin
   MakeMask := Mask;
 end;
 
-function GetRMString(SegOfs: DWord): string;
+function GetRMString(SegOfs: DWord): AnsiString;
 var
-  S: string;
-  C: Char;
+  S: AnsiString;
+  C: AnsiChar;
   Seg, Ofs: Word;
 begin
   if SegOfs = 0 then
@@ -962,7 +962,7 @@ begin
   end;
 end;
 
-function WinAttrib(q: Integer): string;
+function WinAttrib(q: Integer): AnsiString;
 begin
   if (q and 1) <> 0 then
     Result := 'supported'
@@ -974,7 +974,7 @@ begin
     Result := Result + ' writeable';
 end;
 
-function ModeAttrib(AModeAttributes: Integer): string;
+function ModeAttrib(AModeAttributes: Integer): AnsiString;
 begin
   if (AModeAttributes and 1) <> 0 then
     Result := 'supported'
@@ -1019,7 +1019,7 @@ begin
     Result := Result + ' DualDisplayStartAddressSupport';
 end;
 
-function MemoryModelStr(AMemoryModel: Integer): string;
+function MemoryModelStr(AMemoryModel: Integer): AnsiString;
 begin
   case AMemoryModel of
     0: Result := 'Text mode';
@@ -1037,7 +1037,7 @@ begin
   Result := Result + '/' + IntToStr(AMemoryModel);
 end;
 
-function DirectColorModeInfoStr(ADirectColorModeInfo: Integer): string;
+function DirectColorModeInfoStr(ADirectColorModeInfo: Integer): AnsiString;
 begin
   if (ADirectColorModeInfo and 1) <> 0 then
     Result := 'Color_ramp_is_programmable'

+ 11 - 11
packages/ptc/src/dos/vesa/vesaconsoled.inc

@@ -40,8 +40,8 @@ type
       SupportsWindowed: Boolean;
       SupportsLFB: Boolean;
     end;
-    FTitle: string;
-    FInformation: string;
+    FTitle: AnsiString;
+    FInformation: AnsiString;
     FCurrentMode: Integer;
     FVESACurrentMode: Integer;
     FWidth, FHeight, FPitch{, FPages}: Integer;
@@ -101,15 +101,15 @@ type
   public
     constructor Create; override;
     destructor Destroy; override;
-    procedure Configure(const AFileName: string); override;
-    function Option(const AOption: string): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
     function Modes: TPTCModeList; override;
-    procedure Open(const ATitle: string; APages: Integer); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer); overload; override;
     procedure Close; override;
     procedure Flush; override;
@@ -153,9 +153,9 @@ type
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function NextEvent(out AEvent: IPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
   end;

+ 11 - 11
packages/ptc/src/dos/vesa/vesaconsolei.inc

@@ -36,7 +36,7 @@
 {$DEFINE DEFAULT_FORMAT:=TPTCFormat.Create(32, $00FF0000, $0000FF00, $000000FF)}
 { $DEFINE DEFAULT_FORMAT:=TPTCFormat.Create(24, $00FF0000, $0000FF00, $000000FF)}
 
-procedure VESALogProcedure(const S: string);
+procedure VESALogProcedure(const S: AnsiString);
 begin
   LOG(s);
 end;
@@ -199,10 +199,10 @@ begin
   FModesLast := J;
 end;
 
-procedure TVESAConsole.Configure(const AFileName: string);
+procedure TVESAConsole.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -258,7 +258,7 @@ begin
   end;
 end;
 
-function TVESAConsole.Option(const AOption: string): Boolean;
+function TVESAConsole.Option(const AOption: AnsiString): Boolean;
 begin
   {...}
   if AOption = 'enable lfb' then
@@ -452,24 +452,24 @@ begin
   Result := modefound;
 end;
 
-procedure TVESAConsole.Open(const ATitle: string; APages: Integer); overload;
+procedure TVESAConsole.Open(const ATitle: AnsiString; APages: Integer); overload;
 begin
   Open(ATitle, FDefaultFormat, APages);
 end;
 
-procedure TVESAConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TVESAConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                             APages: Integer); overload;
 begin
   Open(ATitle, FDefaultWidth, FDefaultHeight, AFormat, APages);
 end;
 
-procedure TVESAConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TVESAConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                             AFormat: IPTCFormat; APages: Integer); overload;
 begin
   Open(ATitle, TPTCMode.Create(AWidth, AHeight, AFormat), APages);
 end;
 
-procedure TVESAConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TVESAConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                             APages: Integer); overload;
 
   procedure SetRGB332Palette;
@@ -952,17 +952,17 @@ begin
   Result := FModes[FCurrentMode].Format;
 end;
 
-function TVESAConsole.GetName: string;
+function TVESAConsole.GetName: AnsiString;
 begin
   Result := 'VESA';
 end;
 
-function TVESAConsole.GetTitle: string;
+function TVESAConsole.GetTitle: AnsiString;
 begin
   Result := FTitle;
 end;
 
-function TVESAConsole.GetInformation: string;
+function TVESAConsole.GetInformation: AnsiString;
 begin
   Result := FInformation;
 end;

+ 12 - 12
packages/ptc/src/dos/vga/vgaconsoled.inc

@@ -34,8 +34,8 @@ type
   private
     { data }
     m_modes: array of IPTCMode;
-    m_title: string;
-    m_information: string;
+    m_title: AnsiString;
+    m_information: AnsiString;
     m_CurrentMode: Integer;
     m_faketype: Integer;
     m_width, m_height, m_pitch: Integer;
@@ -65,7 +65,7 @@ type
     FMouse: TDosMouse;
 
     { internal console management routines }
-    procedure internal_pre_open_setup(const _title: string);
+    procedure internal_pre_open_setup(const _title: AnsiString);
     procedure internal_open_fullscreen_start;
     procedure internal_open_fullscreen(ModeType: Integer);
     procedure internal_open_fullscreen_finish(_pages: Integer);
@@ -85,15 +85,15 @@ type
   public
     constructor Create; override;
     destructor Destroy; override;
-    procedure Configure(const AFileName: string); override;
-    function Option(const _option: string): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const _option: AnsiString): Boolean; override;
     function modes: TPTCModeList; override;
-    procedure open(const _title: string; _pages: Integer); overload; override;
-    procedure open(const _title: string; _format: IPTCFormat;
+    procedure open(const _title: AnsiString; _pages: Integer); overload; override;
+    procedure open(const _title: AnsiString; _format: IPTCFormat;
                    _pages: Integer); overload; override;
-    procedure open(const _title: string; _width, _height: Integer;
+    procedure open(const _title: AnsiString; _width, _height: Integer;
                    _format: IPTCFormat; _pages: Integer); overload; override;
-    procedure open(const _title: string; _mode: IPTCMode;
+    procedure open(const _title: AnsiString; _mode: IPTCMode;
                    _pages: Integer); overload; override;
     procedure close; override;
     procedure flush; override;
@@ -137,9 +137,9 @@ type
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function NextEvent(out event: IPTCEvent; wait: Boolean; const EventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
   end;

+ 11 - 11
packages/ptc/src/dos/vga/vgaconsolei.inc

@@ -79,10 +79,10 @@ begin
   inherited Destroy;
 end;
 
-procedure TVGAConsole.Configure(const AFileName: string);
+procedure TVGAConsole.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -102,7 +102,7 @@ begin
   CloseFile(F);
 end;
 
-function TVGAConsole.option(const _option: string): Boolean;
+function TVGAConsole.option(const _option: AnsiString): Boolean;
 begin
   {...}
   if (System.Copy(_option, 1, 8) = 'FAKEMODE') and (Length(_option) = 10) and
@@ -155,24 +155,24 @@ begin
   Result := m_modes;
 end;
 
-procedure TVGAConsole.open(const _title: string; _pages: Integer); overload;
+procedure TVGAConsole.open(const _title: AnsiString; _pages: Integer); overload;
 begin
   open(_title, m_default_format, _pages);
 end;
 
-procedure TVGAConsole.open(const _title: string; _format: IPTCFormat;
+procedure TVGAConsole.open(const _title: AnsiString; _format: IPTCFormat;
                            _pages: Integer); overload;
 begin
   open(_title, m_default_width, m_default_height, _format, _pages);
 end;
 
-procedure TVGAConsole.open(const _title: string; _width, _height: Integer;
+procedure TVGAConsole.open(const _title: AnsiString; _width, _height: Integer;
                            _format: IPTCFormat; _pages: Integer); overload;
 begin
   open(_title, TPTCMode.Create(_width, _height, _format), _pages);
 end;
 
-procedure TVGAConsole.open(const _title: string; _mode: IPTCMode;
+procedure TVGAConsole.open(const _title: AnsiString; _mode: IPTCMode;
                            _pages: Integer); overload;
 var
   I: Integer;
@@ -532,22 +532,22 @@ begin
   Result := m_modes[m_CurrentMode].format;
 end;
 
-function TVGAConsole.GetName: string;
+function TVGAConsole.GetName: AnsiString;
 begin
   Result := 'VGA';
 end;
 
-function TVGAConsole.GetTitle: string;
+function TVGAConsole.GetTitle: AnsiString;
 begin
   Result := m_title;
 end;
 
-function TVGAConsole.GetInformation: string;
+function TVGAConsole.GetInformation: AnsiString;
 begin
   Result := m_information;
 end;
 
-procedure TVGAConsole.internal_pre_open_setup(const _title: string);
+procedure TVGAConsole.internal_pre_open_setup(const _title: AnsiString);
 begin
   m_title := _title;
 end;

+ 3 - 3
packages/ptc/src/ptc.pp

@@ -181,17 +181,17 @@ begin
     FreeMem(tmp);
 end;
 
-function IntToStr(Value: Integer): string;
+function IntToStr(Value: Integer): AnsiString;
 begin
   System.Str(Value, Result);
 end;
 
-function IntToStr(Value: Int64): string;
+function IntToStr(Value: Int64): AnsiString;
 begin
   System.Str(Value, Result);
 end;
 
-function IntToStr(Value: QWord): string;
+function IntToStr(Value: QWord): AnsiString;
 begin
   System.Str(Value, Result);
 end;

+ 12 - 12
packages/ptc/src/ptcwrapper/ptcwrapper_mt.inc

@@ -43,7 +43,7 @@ type
   TPTCWrapperOpenType = (pwotDefault, pwotFormat, pwotWidthHeightFormat, pwotMode);
   TPTCWrapperOpenRequest = record
     OpenType: TPTCWrapperOpenType;
-    Title: string;
+    Title: AnsiString;
     SurfaceWidth, SurfaceHeight: Integer;
     Width, Height: Integer;
     Format: IPTCFormat;
@@ -61,7 +61,7 @@ type
   end;
 
   TPTCWrapperOptionRequest = record
-    Option: string;
+    Option: AnsiString;
 
     Processed: Boolean;
     Result: Boolean;
@@ -109,13 +109,13 @@ type
     constructor Create;
     destructor Destroy; override;
 
-    procedure Open(const ATitle: string; AVirtualPages: Integer; APages: Integer = 0);
-    procedure Open(const ATitle: string; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
-    procedure Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
-    procedure Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
     procedure Close;
 
-    function Option(const AOption: string): Boolean;
+    function Option(const AOption: AnsiString): Boolean;
 
     function Modes: TPTCModeList;
 
@@ -307,7 +307,7 @@ begin
   end;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; AVirtualPages: Integer; APages: Integer = 0);
 begin
   FSurfaceCriticalSection.Acquire;
   try
@@ -328,7 +328,7 @@ begin
   until FOpenRequest.Processed;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
 begin
   FSurfaceCriticalSection.Acquire;
   try
@@ -350,7 +350,7 @@ begin
   until FOpenRequest.Processed;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
 begin
   FSurfaceCriticalSection.Acquire;
   try
@@ -376,7 +376,7 @@ begin
   until FOpenRequest.Processed;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
 begin
   FSurfaceCriticalSection.Acquire;
   try
@@ -417,7 +417,7 @@ begin
   until FCloseRequest.Processed;
 end;
 
-function TPTCWrapperThread.Option(const AOption: string): Boolean;
+function TPTCWrapperThread.Option(const AOption: AnsiString): Boolean;
 begin
   FSurfaceCriticalSection.Acquire;
   try

+ 10 - 10
packages/ptc/src/ptcwrapper/ptcwrapper_st.inc

@@ -69,13 +69,13 @@ type
     procedure Terminate;
     procedure WaitFor;
 
-    procedure Open(const ATitle: string; AVirtualPages: Integer; APages: Integer = 0);
-    procedure Open(const ATitle: string; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
-    procedure Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
-    procedure Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+    procedure Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
     procedure Close;
 
-    function Option(const AOption: string): Boolean;
+    function Option(const AOption: AnsiString): Boolean;
 
     function Modes: TPTCModeList;
 
@@ -171,7 +171,7 @@ begin
   end;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; AVirtualPages: Integer; APages: Integer = 0);
 var
   I: Integer;
 begin
@@ -190,7 +190,7 @@ begin
   FOpen := True;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
 var
   I: Integer;
 begin
@@ -209,7 +209,7 @@ begin
   FOpen := True;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight, AWidth, AHeight: Integer; AFormat: IPTCFormat; AVirtualPages: Integer; APages: Integer = 0);
 var
   I: Integer;
 begin
@@ -228,7 +228,7 @@ begin
   FOpen := True;
 end;
 
-procedure TPTCWrapperThread.Open(const ATitle: string; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
+procedure TPTCWrapperThread.Open(const ATitle: AnsiString; ASurfaceWidth, ASurfaceHeight: Integer; AMode: IPTCMode; AVirtualPages: Integer; APages: Integer = 0);
 var
   I: Integer;
 begin
@@ -259,7 +259,7 @@ begin
   FOpen := False;
 end;
 
-function TPTCWrapperThread.Option(const AOption: string): Boolean;
+function TPTCWrapperThread.Option(const AOption: AnsiString): Boolean;
 begin
   Result := FConsole.Option(AOption);
 end;

+ 2 - 2
packages/ptc/src/tinyptc/tinyptc.pp

@@ -4,7 +4,7 @@ unit TinyPTC;
 
 interface
 
-function ptc_open(const ATitle: string; AWidth, AHeight: Integer): Boolean;
+function ptc_open(const ATitle: AnsiString; AWidth, AHeight: Integer): Boolean;
 function ptc_update(ABuffer: Pointer): Boolean;
 procedure ptc_close;
 
@@ -19,7 +19,7 @@ var
   Palette: TPTCPalette = nil;
   Width, Height: Integer;
 
-function ptc_open(const ATitle: string; AWidth, AHeight: Integer): Boolean;
+function ptc_open(const ATitle: AnsiString; AWidth, AHeight: Integer): Boolean;
 begin
   try
     if Console = nil then

+ 5 - 5
packages/ptc/src/win32/base/win32window.inc

@@ -53,7 +53,7 @@ end;
 function WndProcSingleThreaded(hWnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; forward;
 function WndProcMultiThreaded(hWnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; forward;
 
-constructor TWin32Window.Create(const AWndClass, ATitle: string; AExtra, AStyle, AClassStyle: DWord;
+constructor TWin32Window.Create(const AWndClass, ATitle: AnsiString; AExtra, AStyle, AClassStyle: DWord;
                                 AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded,
                                 ACursor, AInterceptClose: Boolean);
 var
@@ -110,7 +110,7 @@ begin
     begin
       wc.cbSize := SizeOf(wc);
       wc.hInstance := program_instance;
-      wc.lpszClassName := PChar(AWndClass);
+      wc.lpszClassName := PAnsiChar(AWndClass);
       wc.style := AClassStyle;
       wc.hIcon := 0{LoadIcon(library_instance, 'IDI_PTC_ICON')};
       wc.hIconSm := 0;
@@ -162,7 +162,7 @@ begin
       if IsUnicode then
         FWindow := CreateWindowExW(FExtra, PWideChar(AWndClassW), PWideChar(ATitleW), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, Self)
       else
-        FWindow := CreateWindowExA(FExtra, PChar(FName), PChar(FTitle), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, Self);
+        FWindow := CreateWindowExA(FExtra, PAnsiChar(FName), PAnsiChar(FTitle), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, Self);
       if not IsWindow(FWindow) then
         raise TPTCError.Create('could not create window');
       ShowWindow(FWindow, FShow);
@@ -478,7 +478,7 @@ begin
     FEvent := 0;
     FThread := 0;
     FID := 0;
-    UnregisterClassA(PChar(FName), GetModuleHandle(Nil));
+    UnregisterClassA(PAnsiChar(FName), GetModuleHandle(Nil));
   end;
 end;
 
@@ -488,7 +488,7 @@ var
 begin
   with AOwner do
   begin
-    FWindow := CreateWindowEx(FExtra, PChar(FName), PChar(FTitle), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, nil);
+    FWindow := CreateWindowEx(FExtra, PAnsiChar(FName), PAnsiChar(FTitle), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, nil);
     if IsWindow(FWindow) then
     begin
       ShowWindow(FWindow, FShow);

+ 1 - 1
packages/ptc/src/win32/base/win32windowd.inc

@@ -62,7 +62,7 @@ type
     function WMDestroy(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; virtual;
   public
     constructor Create(window: HWND);
-    constructor Create(const AWndClass, ATitle: string; AExtra, AStyle, AClassStyle: DWord;
+    constructor Create(const AWndClass, ATitle: AnsiString; AExtra, AStyle, AClassStyle: DWord;
                        AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded, ACursor, AInterceptClose: Boolean);
     destructor Destroy; override;
     procedure Cursor(AFlag: Boolean);

+ 4 - 4
packages/ptc/src/win32/directx/p_ddraw.pp

@@ -912,8 +912,8 @@ type
      * drivers, since this is unreliable and many different strings may be associated with the same
      * device, and the same driver from different vendors.
      *)
-    szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char;
-    szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char;
+    szDriver: array [0..MAX_DDDEVICEID_STRING-1] of AnsiChar;
+    szDescription: array [0..MAX_DDDEVICEID_STRING-1] of AnsiChar;
 
     (*
      * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
@@ -962,8 +962,8 @@ type
      * drivers, since this is unreliable and many different strings may be associated with the same
      * device, and the same driver from different vendors.
      *)
-    szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char;
-    szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char;
+    szDriver: array [0..MAX_DDDEVICEID_STRING-1] of AnsiChar;
+    szDescription: array [0..MAX_DDDEVICEID_STRING-1] of AnsiChar;
 
     (*
      * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons

+ 12 - 12
packages/ptc/src/win32/directx/p_dinput.pp

@@ -319,7 +319,7 @@ type
     dwSize: DWORD;
     GuidEffect: GUID;
     lpDiEffect: LPCDIEFFECT;
-    szFriendlyName: array [0..MAX_PATH-1] of CHAR;
+    szFriendlyName: array [0..MAX_PATH-1] of AnsiChar;
   end;
 //typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
   LPDIENUMEFFECTSINFILECALLBACK = function(lpDiFileEf: LPCDIFILEEFFECT; pvRef: LPVOID): BOOL; stdcall;
@@ -824,7 +824,7 @@ type
     hInstString: HINST;  {OPTIONAL}
     ftTimeStamp: FILETIME;
     dwCRC: DWORD;
-    tszActionMap: array [0..MAX_PATH-1] of CHAR;
+    tszActionMap: array [0..MAX_PATH-1] of AnsiChar;
   end;
   LPDIACTIONFORMATW = ^TDIACTIONFORMATW;
   PDIACTIONFORMATW = ^TDIACTIONFORMATW;
@@ -970,7 +970,7 @@ type
   LPDIDEVICEIMAGEINFOA = ^TDIDEVICEIMAGEINFOA;
   PDIDEVICEIMAGEINFOA = ^TDIDEVICEIMAGEINFOA;
   TDIDEVICEIMAGEINFOA = record
-    tszImagePath: array [0..MAX_PATH-1] of CHAR;
+    tszImagePath: array [0..MAX_PATH-1] of AnsiChar;
     dwFlags: DWORD;
     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
     dwViewID: DWORD;
@@ -1077,7 +1077,7 @@ type
     dwOfs: DWORD;
     dwType: DWORD;
     dwFlags: DWORD;
-    tszName: array [0..MAX_PATH-1] of CHAR;
+    tszName: array [0..MAX_PATH-1] of AnsiChar;
   end;
   LPDIDEVICEOBJECTINSTANCE_DX3W = ^TDIDEVICEOBJECTINSTANCE_DX3W;
   PDIDEVICEOBJECTINSTANCE_DX3W = ^TDIDEVICEOBJECTINSTANCE_DX3W;
@@ -1111,7 +1111,7 @@ type
     dwOfs: DWORD;
     dwType: DWORD;
     dwFlags: DWORD;
-    tszName: array [0..MAX_PATH-1] of CHAR;
+    tszName: array [0..MAX_PATH-1] of AnsiChar;
 {$IF DIRECTINPUT_VERSION >= $0500}
     dwFFMaxForce: DWORD;
     dwFFForceResolution: DWORD;
@@ -1469,8 +1469,8 @@ type
     guidInstance: GUID;
     guidProduct: GUID;
     dwDevType: DWORD;
-    tszInstanceName: array [0..MAX_PATH-1] of CHAR;
-    tszProductName: array [0..MAX_PATH-1] of CHAR;
+    tszInstanceName: array [0..MAX_PATH-1] of AnsiChar;
+    tszProductName: array [0..MAX_PATH-1] of AnsiChar;
   end;
   LPDIDEVICEINSTANCE_DX3W = ^TDIDEVICEINSTANCE_DX3W;
   PDIDEVICEINSTANCE_DX3W = ^TDIDEVICEINSTANCE_DX3W;
@@ -1506,8 +1506,8 @@ type
     guidInstance: GUID;
     guidProduct: GUID;
     dwDevType: DWORD;
-    tszInstanceName: array [0..MAX_PATH-1] of CHAR;
-    tszProductName: array [0..MAX_PATH-1] of CHAR;
+    tszInstanceName: array [0..MAX_PATH-1] of AnsiChar;
+    tszProductName: array [0..MAX_PATH-1] of AnsiChar;
 {$IF DIRECTINPUT_VERSION >= $0500}
     guidFFDriver: GUID;
     wUsagePage: WORD;
@@ -1697,7 +1697,7 @@ type
     dwEffType: DWORD;
     dwStaticParams: DWORD;
     dwDynamicParams: DWORD;
-    tszName: array [0..MAX_PATH-1] of CHAR;
+    tszName: array [0..MAX_PATH-1] of AnsiChar;
   end;
   LPDIEFFECTINFOW = ^TDIEFFECTINFOW;
   PDIEFFECTINFOW = ^TDIEFFECTINFOW;
@@ -4762,7 +4762,7 @@ function DIDFT_ENUMCOLLECTION(n: WORD): DWORD; inline;
 {$IF DIRECTINPUT_VERSION >= $050a}
 function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD; inline;
 {$ENDIF} { DIRECTINPUT_VERSION >= $050a }
-function DISEQUENCE_COMPARE(dwSequence1: DWORD; const cmp: string; dwSequence2: DWORD): Boolean; inline;
+function DISEQUENCE_COMPARE(dwSequence1: DWORD; const cmp: AnsiString; dwSequence2: DWORD): Boolean; inline;
 function DIBUTTON_ANY(instance: Byte): DWORD; inline;
 
 implementation
@@ -4802,7 +4802,7 @@ end;
 
 //#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
 //                        ((int)((dwSequence1) - (dwSequence2)) cmp 0)
-function DISEQUENCE_COMPARE(dwSequence1: DWORD; const cmp: string; dwSequence2: DWORD): Boolean; inline;
+function DISEQUENCE_COMPARE(dwSequence1: DWORD; const cmp: AnsiString; dwSequence2: DWORD): Boolean; inline;
 begin
 {$PUSH}{$Q-,R-}
   if (cmp = '==') or (cmp = '=') then

+ 17 - 17
packages/ptc/src/win32/directx/win32directxconsoled.inc

@@ -35,7 +35,7 @@ type
   TDirectXConsole = class(TPTCOpenGLLessConsole)
   private
     { title data }
-{    FTitle: array [0..1023] of Char;}
+{    FTitle: array [0..1023] of AnsiChar;}
     FTitle: AnsiString;
 
     { flags }
@@ -79,13 +79,13 @@ type
     FPrimary: TDirectXPrimary;
 
     { internal console management routines }
-    procedure internal_open(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
-    procedure internal_recycle(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+    procedure internal_open(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+    procedure internal_recycle(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
     procedure internal_close;
     procedure internal_shutdown;
 
     { internal console open management routines }
-    procedure internal_open_start(const _title: string; window: HWND);
+    procedure internal_open_start(const _title: AnsiString; window: HWND);
     procedure internal_open_finish;
     procedure internal_open_reset;
 
@@ -102,13 +102,13 @@ type
     procedure internal_open_windowed_finish;
 
     { internal console open recycling routines }
-    procedure internal_recycle_fullscreen(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
-    procedure internal_recycle_windowed(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+    procedure internal_recycle_fullscreen(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+    procedure internal_recycle_windowed(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
 
 {$IFDEF DEBUG}
     { debug }
-    procedure CHECK_OPEN(AMsg: String);
-    procedure CHECK_LOCK(AMsg: String);
+    procedure CHECK_OPEN(AMsg: AnsiString);
+    procedure CHECK_LOCK(AMsg: AnsiString);
 {$ENDIF}
 
     { painting }
@@ -122,15 +122,15 @@ type
   public
     constructor Create; override;
     destructor Destroy; override;
-    procedure Configure(const AFileName: String); override;
-    function Option(const AOption: String): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
     function Modes: TPTCModeList; override;
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure InternalResize(AWidth, AHeight: Integer); override;
@@ -175,9 +175,9 @@ type
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function NextEvent(out AEvent: IPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
     function MoveMouseTo(X, Y: Integer): Boolean; override;

+ 20 - 20
packages/ptc/src/win32/directx/win32directxconsolei.inc

@@ -45,10 +45,10 @@
 {$DEFINE CHECK_LOCK:=//}
 {$ENDIF}
 
-function PChar2String(Q: PChar): string;
+function PChar2String(Q: PAnsiChar): AnsiString;
 var
   I: Integer;
-  S: string;
+  S: AnsiString;
 begin
   S := '';
   I := 0;
@@ -120,10 +120,10 @@ begin
   inherited Destroy;
 end;
 
-procedure TDirectXConsole.Configure(const AFileName: String);
+procedure TDirectXConsole.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -143,7 +143,7 @@ begin
   CloseFile(F);
 end;
 
-function TDirectXConsole.Option(const AOption: String): Boolean;
+function TDirectXConsole.Option(const AOption: AnsiString): Boolean;
 var
   tmp, tmp2: Integer;
 begin
@@ -370,18 +370,18 @@ begin
   Result := FDisplay.Modes;
 end;
 
-procedure TDirectXConsole.Open(const ATitle: string; APages: Integer = 0);
+procedure TDirectXConsole.Open(const ATitle: AnsiString; APages: Integer = 0);
 begin
   Open(ATitle, FDefaultFormat, APages);
 end;
 
-procedure TDirectXConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TDirectXConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                            APages: Integer = 0);
 begin
   Open(ATitle, FDefaultWidth, FDefaultHeight, AFormat, APages);
 end;
 
-procedure TDirectXConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TDirectXConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                            AFormat: IPTCFormat; APages: Integer = 0);
 var
   mode: IPTCMode;
@@ -391,7 +391,7 @@ begin
   internal_open(ATitle, 0, mode, APages, False);
 end;
 
-procedure TDirectXConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TDirectXConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                            APages: Integer = 0);
 begin
   { internal open exact mode }
@@ -803,24 +803,24 @@ begin
   Result := FPrimary.format;
 end;
 
-function TDirectXConsole.GetName: string;
+function TDirectXConsole.GetName: AnsiString;
 begin
   Result := 'DirectX';
 end;
 
-function TDirectXConsole.GetTitle: string;
+function TDirectXConsole.GetTitle: AnsiString;
 begin
   CHECK_OPEN('TDirectXConsole.GetTitle');
   Result := FTitle;
 end;
 
-function TDirectXConsole.GetInformation: string;
+function TDirectXConsole.GetInformation: AnsiString;
 begin
   CHECK_OPEN('TDirectXConsole.GetInformation');
   Result := FDisplay.information;
 end;
 
-procedure TDirectXConsole.internal_open(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+procedure TDirectXConsole.internal_open(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
 var
   _width, _height: Integer;
   _format: IPTCFormat;
@@ -912,7 +912,7 @@ begin
   internal_open_finish;
 end;
 
-procedure TDirectXConsole.internal_recycle(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+procedure TDirectXConsole.internal_recycle(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
 begin
   { Check if the console is open }
   if not FOpen then
@@ -962,9 +962,9 @@ begin
   FLibrary.Close;
 end;
 
-procedure TDirectXConsole.internal_open_start(const _title: string; window: HWND);
+procedure TDirectXConsole.internal_open_start(const _title: AnsiString; window: HWND);
 var
-  tmp: array [0..1023] of Char;
+  tmp: array [0..1023] of AnsiChar;
 begin
   { close_down }
   internal_close;
@@ -1183,7 +1183,7 @@ begin
   FHook := TDirectXHook.Create(Self, FWindow.handle, GetCurrentThreadId, FCursor, FWindow.managed, False);
 end;
 
-procedure TDirectXConsole.internal_recycle_fullscreen(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+procedure TDirectXConsole.internal_recycle_fullscreen(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
 begin
   LOG('fullscreen open recycle');
   FPrimary.close;
@@ -1191,7 +1191,7 @@ begin
   internal_open_fullscreen_surface(mode, _pages);
 end;
 
-procedure TDirectXConsole.internal_recycle_windowed(const _title: string; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
+procedure TDirectXConsole.internal_recycle_windowed(const _title: AnsiString; window: HWND; const mode: IPTCMode; _pages: Integer; exact: Boolean);
 begin
   LOG('windowed open recycle');
   FPrimary.close;
@@ -1250,7 +1250,7 @@ begin
 end;
 
 {$IFDEF DEBUG}
-procedure TDirectXConsole.CHECK_OPEN(AMsg: String);
+procedure TDirectXConsole.CHECK_OPEN(AMsg: AnsiString);
 begin
   if not FOpen then
   try
@@ -1261,7 +1261,7 @@ begin
   end;
 end;
 
-procedure TDirectXConsole.CHECK_LOCK(AMsg: String);
+procedure TDirectXConsole.CHECK_LOCK(AMsg: AnsiString);
 begin
   if FLocked then
   try

+ 2 - 2
packages/ptc/src/win32/directx/win32directxdisplayd.inc

@@ -42,7 +42,7 @@ type
     FResolutionsCount: Integer;
     FModes: array of IPTCMode;
     FResolutions: array of IPTCMode;
-    FInformation: string;
+    FInformation: AnsiString;
 
     FCursorSaved: Boolean;
     FCursorX, FCursorY: Integer;
@@ -70,5 +70,5 @@ type
     property Modes: TPTCModeList read GetModes;
     property Mode: IPTCMode read FMode;
     property Fullscreen: Boolean read FFullscreen;
-    property Information: string read FInformation;
+    property Information: AnsiString read FInformation;
   end;

+ 12 - 12
packages/ptc/src/win32/gdi/win32gdiconsoled.inc

@@ -58,7 +58,7 @@ type
     FCursor: Boolean;
     FCursorMode: TWin32CursorMode;
 
-    FTitle: string;
+    FTitle: AnsiString;
 
     FDisplayWidth: Integer;
     FDisplayHeight: Integer;
@@ -79,15 +79,15 @@ type
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
 
     function GetOpenGL_Enabled: Boolean; override;
     procedure SetOpenGL_Enabled(AValue: Boolean); override;
 
-    procedure CheckOpen(const AMessage: string);
-    procedure CheckUnlocked(const AMessage: string);
+    procedure CheckOpen(const AMessage: AnsiString);
+    procedure CheckUnlocked(const AMessage: AnsiString);
 
     procedure SetInterceptClose(AInterceptClose: Boolean);
     property InterceptClose: Boolean read FInterceptClose write SetInterceptClose;
@@ -95,12 +95,12 @@ type
     constructor Create; override;
     destructor Destroy; override;
 
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
 
@@ -137,8 +137,8 @@ type
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
 
-    procedure Configure(const AFileName: String); override;
-    function Option(const AOption: String): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
 
     procedure Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;

+ 12 - 12
packages/ptc/src/win32/gdi/win32gdiconsolei.inc

@@ -83,24 +83,24 @@ begin
   inherited Destroy;
 end;
 
-procedure TGDIConsole.Open(const ATitle: string; APages: Integer = 0);
+procedure TGDIConsole.Open(const ATitle: AnsiString; APages: Integer = 0);
 begin
   Open(ATitle, FDefaultFormat, APages);
 end;
 
-procedure TGDIConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TGDIConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                APages: Integer = 0);
 begin
   Open(ATitle, FDefaultWidth, FDefaultHeight, AFormat, APages);
 end;
 
-procedure TGDIConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TGDIConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                            APages: Integer = 0);
 begin
   Open(ATitle, AMode.Width, AMode.Height, AMode.Format, APages);
 end;
 
-procedure TGDIConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TGDIConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                            AFormat: IPTCFormat; APages: Integer = 0);
 var
   tmpArea: IPTCArea;
@@ -435,10 +435,10 @@ begin
   // todo...
 end;
 
-procedure TGDIConsole.Configure(const AFileName: String);
+procedure TGDIConsole.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -458,7 +458,7 @@ begin
   CloseFile(F);
 end;
 
-function TGDIConsole.Option(const AOption: String): Boolean;
+function TGDIConsole.Option(const AOption: AnsiString): Boolean;
 begin
   LOG('console option', AOption);
   Result := True;
@@ -685,18 +685,18 @@ begin
   Result := 2;
 end;
 
-function TGDIConsole.GetName: string;
+function TGDIConsole.GetName: AnsiString;
 begin
   Result := 'GDI';
 end;
 
-function TGDIConsole.GetTitle: string;
+function TGDIConsole.GetTitle: AnsiString;
 begin
   CheckOpen('TGDIConsole.GetTitle');
   Result := FTitle;
 end;
 
-function TGDIConsole.GetInformation: string;
+function TGDIConsole.GetInformation: AnsiString;
 begin
   CheckOpen('TGDIConsole.GetInformation');
   Result := ''; // todo...
@@ -767,7 +767,7 @@ begin
   Result := FMouse.MoveMouseTo(X, Y);
 end;
 
-procedure TGDIConsole.CheckOpen(const AMessage: String);
+procedure TGDIConsole.CheckOpen(const AMessage: AnsiString);
 begin
   if not FOpen then
   try
@@ -778,7 +778,7 @@ begin
   end;
 end;
 
-procedure TGDIConsole.CheckUnlocked(const AMessage: String);
+procedure TGDIConsole.CheckUnlocked(const AMessage: AnsiString);
 begin
   if FLocked then
   try

+ 1 - 1
packages/ptc/src/win32/gdi/win32gdihooki.inc

@@ -55,7 +55,7 @@ end;
 
 function TGDIHook.WndProc(hWnd: HWND; message: DWord; wParam: WPARAM; lParam: LPARAM): LRESULT;
 
-  function WMSizeWParam2String(wParam: WPARAM): string;
+  function WMSizeWParam2String(wParam: WPARAM): AnsiString;
   begin
     case wParam of
       SIZE_MAXHIDE:   Result := 'SIZE_MAXHIDE';

+ 5 - 5
packages/ptc/src/win32/gdi/win32modesetteri.inc

@@ -138,7 +138,7 @@ end;
 
 procedure TWin32ModeSetter.DispChangeCheck(ADispChangeResult: LONG);
 
-  function DispChangeResult2String(ADispChangeResult: LONG): string;
+  function DispChangeResult2String(ADispChangeResult: LONG): AnsiString;
   begin
     case ADispChangeResult of
       DISP_CHANGE_SUCCESSFUL:  Result := 'DISP_CHANGE_SUCCESSFUL';
@@ -162,7 +162,7 @@ end;
 
 procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
 
-  function Fields2String(dmFields: DWORD): string;
+  function Fields2String(dmFields: DWORD): AnsiString;
   begin
     Result := '';
     if (dmFields and DM_ORIENTATION) <> 0 then
@@ -232,7 +232,7 @@ procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
     Result := IntToStr(dmFields) + ' (' + Result + ')';
   end;
 
-  function DisplayOrientation2String(dmDisplayOrientation: DWORD): string;
+  function DisplayOrientation2String(dmDisplayOrientation: DWORD): AnsiString;
   begin
     case dmDisplayOrientation of
       DMDO_DEFAULT: Result := 'DMDO_DEFAULT';
@@ -245,7 +245,7 @@ procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
     Result := IntToStr(dmDisplayOrientation) + ' (' + Result + ')';
   end;
 
-  function DisplayFixedOutput2String(dmDisplayFixedOutput: DWORD): string;
+  function DisplayFixedOutput2String(dmDisplayFixedOutput: DWORD): AnsiString;
   begin
     case dmDisplayFixedOutput of
       DMDFO_DEFAULT: Result := 'DMDFO_DEFAULT';
@@ -257,7 +257,7 @@ procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
     Result := IntToStr(dmDisplayFixedOutput) + ' (' + Result + ')';
   end;
 
-  function DisplayFlags2String(dmDisplayFlags: DWORD): string;
+  function DisplayFlags2String(dmDisplayFlags: DWORD): AnsiString;
   begin
     Result := '';
     if (dmDisplayFlags and DM_GRAYSCALE) <> 0 then

+ 1 - 1
packages/ptc/src/win32/gdi/win32openglwindowd.inc

@@ -43,7 +43,7 @@ type
     function WMCreate(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; override;
     function WMDestroy(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; override;
   public
-    constructor Create(const AWndClass, ATitle: string; AExtra, AStyle, AClassStyle: DWord;
+    constructor Create(const AWndClass, ATitle: AnsiString; AExtra, AStyle, AClassStyle: DWord;
                        AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded,
                        ACursor, AInterceptClose: Boolean; const AOpenGLAttributes: IPTCOpenGLAttributes);
   end;

+ 4 - 4
packages/ptc/src/win32/gdi/win32openglwindowi.inc

@@ -36,7 +36,7 @@ const
   PFD_SUPPORT_COMPOSITION = $00008000;
 {$endif VER2_6}
 
-constructor TWin32OpenGLWindow.Create(const AWndClass, ATitle: string; AExtra, AStyle, AClassStyle: DWord;
+constructor TWin32OpenGLWindow.Create(const AWndClass, ATitle: AnsiString; AExtra, AStyle, AClassStyle: DWord;
               AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded, ACursor, AInterceptClose: Boolean;
               const AOpenGLAttributes: IPTCOpenGLAttributes);
 begin
@@ -260,7 +260,7 @@ end;
 
 procedure TWin32OpenGLWindow.LogPixelFormatDescriptor(const pfd: PIXELFORMATDESCRIPTOR);
 
-  function dwFlags2String(dwFlags: DWORD): string;
+  function dwFlags2String(dwFlags: DWORD): AnsiString;
   begin
     Result := IntToStr(dwFlags) + ' (';
     if (dwFlags and PFD_DOUBLEBUFFER) <> 0 then
@@ -306,7 +306,7 @@ procedure TWin32OpenGLWindow.LogPixelFormatDescriptor(const pfd: PIXELFORMATDESC
     Result := Result + ')';
   end;
 
-  function iPixelType2String(iPixelType: Byte): string;
+  function iPixelType2String(iPixelType: Byte): AnsiString;
   begin
     case iPixelType of
       PFD_TYPE_RGBA: Result := 'PFD_TYPE_RGBA';
@@ -317,7 +317,7 @@ procedure TWin32OpenGLWindow.LogPixelFormatDescriptor(const pfd: PIXELFORMATDESC
     Result := IntToStr(iPixelType) + ' (' + Result + ')';
   end;
 
-  function iLayerType2String(iLayerType: Byte): string;
+  function iLayerType2String(iLayerType: Byte): AnsiString;
   begin
     case iLayerType of
       PFD_MAIN_PLANE: Result := 'PFD_MAIN_PLANE';

+ 12 - 12
packages/ptc/src/wince/gapi/wincegapiconsoled.inc

@@ -50,7 +50,7 @@ type
 
     FGXDisplayIsOpen: Boolean;
 
-    FTitle: string;
+    FTitle: AnsiString;
 
     FDisplayWidth: Integer;
     FDisplayHeight: Integer;
@@ -65,22 +65,22 @@ type
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
 
-    procedure CheckOpen(    AMessage: string);
-    procedure CheckUnlocked(AMessage: string);
+    procedure CheckOpen(    AMessage: AnsiString);
+    procedure CheckUnlocked(AMessage: AnsiString);
   public
     constructor Create; override;
     destructor Destroy; override;
 
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
 
@@ -115,8 +115,8 @@ type
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
 
-    procedure Configure(const AFileName: string); override;
-    function Option(const AOption: string): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
 
     procedure Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;

+ 12 - 12
packages/ptc/src/wince/gapi/wincegapiconsolei.inc

@@ -84,24 +84,24 @@ begin
   inherited Destroy;
 end;
 
-procedure TWinCEGAPIConsole.Open(const ATitle: string; APages: Integer = 0);
+procedure TWinCEGAPIConsole.Open(const ATitle: AnsiString; APages: Integer = 0);
 begin
   Open(ATitle, FDisplayFormat, APages);
 end;
 
-procedure TWinCEGAPIConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TWinCEGAPIConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                                  APages: Integer = 0);
 begin
   Open(ATitle, FDisplayWidth, FDisplayHeight, AFormat, APages);
 end;
 
-procedure TWinCEGAPIConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TWinCEGAPIConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                                  APages: Integer = 0);
 begin
   Open(ATitle, AMode.Width, AMode.Height, AMode.Format, APages);
 end;
 
-procedure TWinCEGAPIConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TWinCEGAPIConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                                  AFormat: IPTCFormat; APages: Integer = 0);
 begin
   LOG('TWinCEGAPIConsole.Open');
@@ -284,10 +284,10 @@ procedure TWinCEGAPIConsole.Clear(AColor: IPTCColor;
 begin
 end;
 
-procedure TWinCEGAPIConsole.Configure(const AFileName: string);
+procedure TWinCEGAPIConsole.Configure(const AFileName: AnsiString);
 var
   F: Text;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -307,7 +307,7 @@ begin
   CloseFile(F);
 end;
 
-function TWinCEGAPIConsole.Option(const AOption: string): Boolean;
+function TWinCEGAPIConsole.Option(const AOption: AnsiString): Boolean;
 begin
   LOG('console option', AOption);
 
@@ -480,23 +480,23 @@ begin
   Result := 1; {???}
 end;
 
-function TWinCEGAPIConsole.GetName: string;
+function TWinCEGAPIConsole.GetName: AnsiString;
 begin
   Result := 'GAPI';
 end;
 
-function TWinCEGAPIConsole.GetTitle: string;
+function TWinCEGAPIConsole.GetTitle: AnsiString;
 begin
   CheckOpen('TWinCEGAPIConsole.GetTitle');
   Result := FTitle;
 end;
 
-function TWinCEGAPIConsole.GetInformation: string;
+function TWinCEGAPIConsole.GetInformation: AnsiString;
 begin
   Result := ''; // todo...
 end;
 
-procedure TWinCEGAPIConsole.CheckOpen(    AMessage: String);
+procedure TWinCEGAPIConsole.CheckOpen(    AMessage: AnsiString);
 begin
   if not FOpen then
   try
@@ -507,7 +507,7 @@ begin
   end;
 end;
 
-procedure TWinCEGAPIConsole.CheckUnlocked(AMessage: String);
+procedure TWinCEGAPIConsole.CheckUnlocked(AMessage: AnsiString);
 begin
   if FLocked then
   try

+ 12 - 12
packages/ptc/src/wince/gdi/wincegdiconsoled.inc

@@ -49,7 +49,7 @@ type
     FOpen: Boolean;
     FLocked: Boolean;
 
-    FTitle: string;
+    FTitle: AnsiString;
 
     FDisplayWidth: Integer;
     FDisplayHeight: Integer;
@@ -63,22 +63,22 @@ type
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
 
-    procedure CheckOpen(    AMessage: string);
-    procedure CheckUnlocked(AMessage: string);
+    procedure CheckOpen(    AMessage: AnsiString);
+    procedure CheckUnlocked(AMessage: AnsiString);
   public
     constructor Create; override;
     destructor Destroy; override;
 
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
 
@@ -113,8 +113,8 @@ type
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
 
-    procedure Configure(const AFileName: string); override;
-    function Option(const AOption: string): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
 
     procedure Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;

+ 12 - 12
packages/ptc/src/wince/gdi/wincegdiconsolei.inc

@@ -59,24 +59,24 @@ begin
   inherited Destroy;
 end;
 
-procedure TWinCEGDIConsole.Open(const ATitle: string; APages: Integer = 0);
+procedure TWinCEGDIConsole.Open(const ATitle: AnsiString; APages: Integer = 0);
 begin
   Open(ATitle, FDefaultFormat, APages);
 end;
 
-procedure TWinCEGDIConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TWinCEGDIConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                                 APages: Integer = 0);
 begin
   Open(ATitle, FDisplayWidth, FDisplayHeight, AFormat, APages);
 end;
 
-procedure TWinCEGDIConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TWinCEGDIConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                                 APages: Integer = 0);
 begin
   Open(ATitle, AMode.Width, AMode.Height, AMode.Format, APages);
 end;
 
-procedure TWinCEGDIConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TWinCEGDIConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                                 AFormat: IPTCFormat; APages: Integer = 0);
 var
   DeviceContext: HDC;
@@ -269,10 +269,10 @@ begin
   {todo...}
 end;
 
-procedure TWinCEGDIConsole.Configure(const AFileName: string);
+procedure TWinCEGDIConsole.Configure(const AFileName: AnsiString);
 var
   F: Text;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -292,7 +292,7 @@ begin
   CloseFile(F);
 end;
 
-function TWinCEGDIConsole.Option(const AOption: string): Boolean;
+function TWinCEGDIConsole.Option(const AOption: AnsiString): Boolean;
 begin
   LOG('console option', AOption);
 
@@ -474,24 +474,24 @@ begin
   Result := 2;
 end;
 
-function TWinCEGDIConsole.GetName: string;
+function TWinCEGDIConsole.GetName: AnsiString;
 begin
   Result := 'WinCE';
 end;
 
-function TWinCEGDIConsole.GetTitle: string;
+function TWinCEGDIConsole.GetTitle: AnsiString;
 begin
   CheckOpen('TWinCEGDIConsole.GetTitle');
   Result := FTitle;
 end;
 
-function TWinCEGDIConsole.GetInformation: string;
+function TWinCEGDIConsole.GetInformation: AnsiString;
 begin
   CheckOpen('TWinCEGDIConsole.GetInformation');
   Result := ''; // todo...
 end;
 
-procedure TWinCEGDIConsole.CheckOpen(AMessage: string);
+procedure TWinCEGDIConsole.CheckOpen(AMessage: AnsiString);
 begin
   if not FOpen then
   try
@@ -502,7 +502,7 @@ begin
   end;
 end;
 
-procedure TWinCEGDIConsole.CheckUnlocked(AMessage: string);
+procedure TWinCEGDIConsole.CheckUnlocked(AMessage: AnsiString);
 begin
   if FLocked then
   try

+ 3 - 3
packages/ptc/src/x11/x11check.inc

@@ -38,7 +38,7 @@ begin
   raise TPTCError.Create('X11 Error');
 end;
 
-procedure X11Check(AStatus: TStatus; const AMessage: string);
+procedure X11Check(AStatus: TStatus; const AMessage: AnsiString);
 begin
   try
     X11Check(AStatus);
@@ -50,7 +50,7 @@ end;
 
 procedure X11CheckSuccess(AStatus: TStatus);
 var
-  ErrStr: string;
+  ErrStr: AnsiString;
 begin
   if AStatus = Success then
     exit;
@@ -78,7 +78,7 @@ begin
   raise TPTCError.Create('X11 Error: ' + ErrStr);
 end;
 
-procedure X11CheckSuccess(AStatus: TStatus; const AMessage: String);
+procedure X11CheckSuccess(AStatus: TStatus; const AMessage: AnsiString);
 begin
   try
     X11CheckSuccess(AStatus);

+ 10 - 10
packages/ptc/src/x11/x11consoled.inc

@@ -34,7 +34,7 @@ type
   TX11Console = class(TPTCBaseConsole)
   private
     FX11Display: TX11Display;
-    FTitle: string;
+    FTitle: AnsiString;
     FFlags: TX11Flags;
     FModes: array of IPTCMode;
 
@@ -50,21 +50,21 @@ type
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; override;
-    function GetName: string; override;
-    function GetTitle: string; override;
-    function GetInformation: string; override;
+    function GetName: AnsiString; override;
+    function GetTitle: AnsiString; override;
+    function GetInformation: AnsiString; override;
     function GetOpenGL_Enabled: Boolean; override;
     procedure SetOpenGL_Enabled(AValue: Boolean); override;
   public
     constructor Create; override;
     destructor Destroy; override;
 
-    procedure Open(const ATitle: string; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AFormat: IPTCFormat;
+    procedure Open(const ATitle: AnsiString; APages: Integer = 0); overload; override;
+    procedure Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                    APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AWidth, AHeight: Integer;
+    procedure Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                    AFormat: IPTCFormat; APages: Integer = 0); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
 
@@ -101,8 +101,8 @@ type
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
 
-    procedure Configure(const AFileName: String); override;
-    function Option(const AOption: String): Boolean; override;
+    procedure Configure(const AFileName: AnsiString); override;
+    function Option(const AOption: AnsiString): Boolean; override;
 
     procedure Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;

+ 10 - 10
packages/ptc/src/x11/x11consolei.inc

@@ -59,10 +59,10 @@ begin
   inherited Destroy;
 end;
 
-procedure TX11Console.Configure(const AFileName: String);
+procedure TX11Console.Configure(const AFileName: AnsiString);
 var
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
   AssignFile(F, AFileName);
   {$push}{$I-}
@@ -82,7 +82,7 @@ begin
   CloseFile(F);
 end;
 
-function TX11Console.Option(const AOption: string): Boolean;
+function TX11Console.Option(const AOption: AnsiString): Boolean;
 begin
   Result := True;
   if AOption = 'default output' then
@@ -295,18 +295,18 @@ begin
 end;
 
 {TODO: Find current pixel depth}
-procedure TX11Console.Open(const ATitle: string; APages: Integer = 0);
+procedure TX11Console.Open(const ATitle: AnsiString; APages: Integer = 0);
 begin
   Open(ATitle, TPTCFormat.Create(32, $FF0000, $FF00, $FF), APages);
 end;
 
-procedure TX11Console.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TX11Console.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                            APages: Integer = 0);
 begin
   Open(ATitle, 640, 480, AFormat, APages);
 end;
 
-procedure TX11Console.Open(const ATitle: string; AMode: IPTCMode;
+procedure TX11Console.Open(const ATitle: AnsiString; AMode: IPTCMode;
                            APages: Integer = 0);
 begin
   Open(ATitle, AMode.Width, AMode.Height, AMode.Format, APages);
@@ -360,7 +360,7 @@ begin
   Result := TX11WindowDisplay.Create(display, screen, FFlags);
 end;
 
-procedure TX11Console.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TX11Console.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                            AFormat: IPTCFormat; APages: Integer = 0);
 begin
   Close;
@@ -541,17 +541,17 @@ begin
   Result := FX11Display.Format;
 end;
 
-function TX11Console.GetName: string;
+function TX11Console.GetName: AnsiString;
 begin
   Result := 'X11';
 end;
 
-function TX11Console.GetTitle: string;
+function TX11Console.GetTitle: AnsiString;
 begin
   Result := FTitle;
 end;
 
-function TX11Console.GetInformation: string;
+function TX11Console.GetInformation: AnsiString;
 begin
   if FX11Display = nil then
     exit('PTC X11');

+ 1 - 1
packages/ptc/src/x11/x11dga1displayd.inc

@@ -60,7 +60,7 @@ type
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); override;
     destructor Destroy; override;
 
-    procedure Open(ATitle: string; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); override;
+    procedure Open(ATitle: AnsiString; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); override;
     procedure Open(AWindow: TWindow; AFormat: IPTCFormat); override;
     procedure Open(AWindow: TWindow; AFormat: IPTCFormat; AX, AY, AWidth, AHeight: Integer); override;
     procedure Close; override;

+ 1 - 1
packages/ptc/src/x11/x11dga1displayi.inc

@@ -61,7 +61,7 @@ begin
   inherited Destroy;
 end;
 
-procedure TX11DGA1Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes);
+procedure TX11DGA1Display.Open(ATitle: AnsiString; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes);
 var
   vml: PXF86VidModeModeLine;
   dotclock: Integer;

+ 1 - 1
packages/ptc/src/x11/x11dga2displayd.inc

@@ -62,7 +62,7 @@ type
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); override;
     destructor Destroy; override;
 
-    procedure Open(ATitle: string; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); override;
+    procedure Open(ATitle: AnsiString; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); override;
     procedure Open(w: TWindow; _format: IPTCFormat); override;
     procedure Open(_window: TWindow; _format: IPTCFormat; x, y, w, h: Integer); override;
     procedure Close; override;

+ 5 - 5
packages/ptc/src/x11/x11dga2displayi.inc

@@ -61,9 +61,9 @@ begin
   inherited Destroy;
 end;
 
-procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes);
+procedure TX11DGA2Display.Open(ATitle: AnsiString; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes);
 
-  function ModeFlagsToString(AFlags: cint): string;
+  function ModeFlagsToString(AFlags: cint): AnsiString;
   begin
     Result := '';
     if (AFlags and XDGAConcurrentAccess) <> 0 then
@@ -84,7 +84,7 @@ procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat
       Delete(Result, 1, 1);
   end;
   
-  function ViewportFlagsToString(AViewportFlags: cint): string;
+  function ViewportFlagsToString(AViewportFlags: cint): AnsiString;
   begin
     Result := '';
     if (AViewportFlags and XDGAFlipRetrace) <> 0 then
@@ -95,7 +95,7 @@ procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat
       Delete(Result, 1, 1);
   end;
   
-  function ByteOrderToString(AByteOrder: cint): string;
+  function ByteOrderToString(AByteOrder: cint): AnsiString;
   begin
     case AByteOrder of
       LSBFirst: Result := ' (LSBFirst)';
@@ -105,7 +105,7 @@ procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat
     end;
   end;
 
-  function VisualClassToString(AVisualClass: cshort): string;
+  function VisualClassToString(AVisualClass: cshort): AnsiString;
   begin
     case AVisualClass of
       StaticGray: Result := ' (StaticGray)';

+ 1 - 1
packages/ptc/src/x11/x11displayd.inc

@@ -106,7 +106,7 @@ type
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); virtual;
     destructor Destroy; override;
 
-    procedure Open(ATitle: string; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); virtual; abstract;
+    procedure Open(ATitle: AnsiString; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); virtual; abstract;
 
     { This will always return a windowed console. The first version
       fills the whole window, the second one has a custom size }

+ 1 - 1
packages/ptc/src/x11/x11displayi.inc

@@ -475,7 +475,7 @@ var
   modkeys: TPTCModifierKeys;
   uni: Integer;
   key: TPTCKeyEvent;
-  buf: array [1..16] of Char;
+  buf: array [1..16] of AnsiChar;
   lslen: cint;
   status: TStatus;
   eaten_by_im: Boolean = False;

+ 1 - 1
packages/ptc/src/x11/x11glxfbconfigi.inc

@@ -154,7 +154,7 @@ end;
 
 procedure TX11GLXFBConfig.SetSwapInterval(AInterval: Integer);
 
-  function GlxResult2String(AGlxResult: cint): string;
+  function GlxResult2String(AGlxResult: cint): AnsiString;
   begin
     case AGlxResult of
       GLX_BAD_VALUE:   Result := 'GLX_BAD_VALUE';

+ 3 - 3
packages/ptc/src/x11/x11imaged.inc

@@ -43,7 +43,7 @@ type
                   AWidth, AHeight: Integer); virtual; abstract;
     function Lock: Pointer; virtual; abstract;
     function Pitch: Integer; virtual; abstract;
-    function Name: string; virtual; abstract;
+    function Name: AnsiString; virtual; abstract;
   end;
 
   TX11NormalImage = class(TX11Image)
@@ -57,7 +57,7 @@ type
                   AWidth, AHeight: Integer); override;
     function Lock: Pointer; override;
     function Pitch: Integer; override;
-    function Name: string; override;
+    function Name: AnsiString; override;
   end;
 
 {$IFDEF ENABLE_X11_EXTENSION_XSHM}
@@ -73,6 +73,6 @@ type
                   AWidth, AHeight: Integer); override;
     function Lock: Pointer; override;
     function Pitch: Integer; override;
-    function Name: string; override;
+    function Name: AnsiString; override;
   end;
 {$ENDIF ENABLE_X11_EXTENSION_XSHM}

+ 3 - 3
packages/ptc/src/x11/x11imagei.inc

@@ -40,7 +40,7 @@ end;
 constructor TX11NormalImage.Create(ADisplay: PDisplay; AScreen, AWidth, AHeight: Integer; AFormat: IPTCFormat);
 var
   xpad, xpitch: Integer;
-  tmp_FPixels: PChar;
+  tmp_FPixels: PAnsiChar;
 begin
   inherited;
 
@@ -98,7 +98,7 @@ begin
   Result := FImage^.bytes_per_line;
 end;
 
-function TX11NormalImage.Name: string;
+function TX11NormalImage.Name: AnsiString;
 begin
   Result := 'XImage';
 end;
@@ -201,7 +201,7 @@ begin
   Result := FImage^.bytes_per_line;
 end;
 
-function TX11ShmImage.Name: string;
+function TX11ShmImage.Name: AnsiString;
 begin
   Result := 'MIT-Shm';
 end;

+ 1 - 1
packages/ptc/src/x11/x11windowdisplayd.inc

@@ -89,7 +89,7 @@ type
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); override;
     destructor Destroy; override;
 
-    procedure Open(ATitle: string; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); override;
+    procedure Open(ATitle: AnsiString; AWidth, AHeight: Integer; AFormat: IPTCFormat; const AOpenGLAttributes: IPTCOpenGLAttributes); override;
     procedure Open(AWindow: TWindow; AFormat: IPTCFormat); override;
     procedure Open(AWindow: TWindow; AFormat: IPTCFormat; AX, AY, AWidth, AHeight: Integer); override;
     procedure Close; override;

+ 13 - 7
packages/ptc/src/x11/x11windowdisplayi.inc

@@ -80,10 +80,10 @@ begin
 end;
 
 {$warning remove, when fix added to xlib}
-function XGetIMValues(para1:PXIM; dotdotdot:array of const):Pchar;cdecl;external libX11;
-function XGetICValues(para1:PXIC; dotdotdot:array of const):Pchar;cdecl;external libX11;
+function XGetIMValues(para1:PXIM; dotdotdot:array of const):PAnsiChar;cdecl;external libX11;
+function XGetICValues(para1:PXIC; dotdotdot:array of const):PAnsiChar;cdecl;external libX11;
 
-{function fpsetlocale(category: cint; locale: Pchar): PChar;cdecl;external 'c' name 'setlocale';
+{function fpsetlocale(category: cint; locale: PAnsiChar): PAnsiChar;cdecl;external 'c' name 'setlocale';
 const
   LC_ALL = 6;}
 
@@ -96,7 +96,7 @@ var
   attr: TXSetWindowAttributes;
   AttrMask: culong;
   size_hints: PXSizeHints;
-  tmppchar: PChar;
+  tmppchar: PAnsiChar;
   tmpArrayOfCLong: array [1..1] of clong;
   tmpPixmap: TPixmap;
   BlackColor: TXColor;
@@ -108,8 +108,9 @@ var
 {$ENDIF ENABLE_X11_EXTENSION_XINPUT2}
   selected_im_style: TXIMStyle = 0;
   im_event_mask: clong = 0;
+  lTitle : UTF8String;
 
-  function IMStyleToStr(style: TXIMStyle): string;
+  function IMStyleToStr(style: TXIMStyle): AnsiString;
   begin
     Result := '';
     if (style and XIMPreeditArea) <> 0 then
@@ -141,7 +142,7 @@ var
 {    PreferredStyle = XIMPreeditNone or XIMStatusNone;}
   var
     im_supported_styles: PXIMStyles;
-    locale_modifiers: PChar;
+    locale_modifiers: PAnsiChar;
     I: Integer;
   begin
 {    LOG('setting locale');
@@ -298,7 +299,12 @@ begin
   end;
 
   { Set window title }
-  tmppchar := PChar(ATitle);
+  {$IF SIZEOF(CHAR)=2}
+  lTitle:=UTF8Encode(aTitle);
+  {$ELSE}
+  lTitle:=aTitle;
+  {$ENDIF}
+  tmppchar := PAnsiChar(lTitle);
   X11Check(XStringListToTextProperty(@tmppchar, 1, @textprop), 'XStringListToTextProperty');
   try
     XSetWMName(FDisplay, FWindow, @textprop);

+ 1 - 1
packages/ptc/tests/crtkeys/crtkeys.pas

@@ -2,7 +2,7 @@ program crtkeys;
 uses
   crt;
 var
-  Ch, Ex: Char;
+  Ch, Ex: AnsiChar;
   Done: Boolean;
 begin
   Done := False;

+ 1 - 1
packages/ptc/tests/crtkeys/ptccrtkeys.pas

@@ -4,7 +4,7 @@ uses
   ptccrt, ptcgraph;
 var
   Gd, Gm: Integer;
-  Ch, Ex: Char;
+  Ch, Ex: AnsiChar;
   Done: Boolean;
 begin
   Gd := VGA;

+ 2 - 2
packages/ptc/tests/event.pp

@@ -5,7 +5,7 @@ program event;
 uses
   SysUtils, ptc;
 
-function ButtonState2Str(const bs: TPTCMouseButtonState): string;
+function ButtonState2Str(const bs: TPTCMouseButtonState): AnsiString;
 var
   I: TPTCMouseButton;
 begin
@@ -22,7 +22,7 @@ begin
   end;
 end;
 
-function ModifierKeys2Str(const mk: TPTCModifierKeys): string;
+function ModifierKeys2Str(const mk: TPTCModifierKeys): AnsiString;
 var
   I: TPTCModifierKey;
 begin