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
                   Windows CRT unit has with the GO32V2 CRT unit. Not all of them
                   are emulated though, since some of them can be considered
                   are emulated though, since some of them can be considered
                   bugs.
                   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
    set the window title, before calling InitGraph
  - ptcgraph was extended to also support resolutions, different than the ones,
  - ptcgraph was extended to also support resolutions, different than the ones,
    defined by VESA. This means that you can now use ptcgraph with resolutions,
    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
     try
     try
       Writeln('[ptcpas version]');
       Writeln('[ptcpas version]');
-      { print ptcpas version string define }
+      { print ptcpas version AnsiString define }
       Writeln(PTCPAS_VERSION);
       Writeln(PTCPAS_VERSION);
       Writeln;
       Writeln;
 
 

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

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

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

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

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

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

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

@@ -55,7 +55,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: String);
+procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: AnsiString);
 begin
 begin
   try
   try
     TPTCBaseConsole(obj).configure(_file);
     TPTCBaseConsole(obj).configure(_file);
@@ -65,7 +65,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function ptc_console_option(obj: TPTC_CONSOLE; _option: String): Boolean;
+function ptc_console_option(obj: TPTC_CONSOLE; _option: AnsiString): Boolean;
 begin
 begin
   try
   try
     ptc_console_option := TPTCBaseConsole(obj).option(_option);
     ptc_console_option := TPTCBaseConsole(obj).option(_option);
@@ -91,7 +91,7 @@ begin
   end;
   end;
 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
 begin
   try
   try
     TPTCBaseConsole(obj).open(title, pages);
     TPTCBaseConsole(obj).open(title, pages);
@@ -101,7 +101,7 @@ begin
   end;
   end;
 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
 begin
   try
   try
     TPTCBaseConsole(obj).open(title, TPTCFormat(format), pages);
     TPTCBaseConsole(obj).open(title, TPTCFormat(format), pages);
@@ -111,7 +111,7 @@ begin
   end;
   end;
 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
 begin
   try
   try
     TPTCBaseConsole(obj).open(title, width, height, TPTCFormat(format), pages);
     TPTCBaseConsole(obj).open(title, width, height, TPTCFormat(format), pages);
@@ -121,7 +121,7 @@ begin
   end;
   end;
 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
 begin
   try
   try
     TPTCBaseConsole(obj).open(title, TPTCMode(mode), pages);
     TPTCBaseConsole(obj).open(title, TPTCMode(mode), pages);
@@ -448,7 +448,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function ptc_console_name(obj: TPTC_CONSOLE): string;
+function ptc_console_name(obj: TPTC_CONSOLE): AnsiString;
 begin
 begin
   try
   try
     ptc_console_name := TPTCBaseConsole(obj).name;
     ptc_console_name := TPTCBaseConsole(obj).name;
@@ -461,7 +461,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function ptc_console_title(obj: TPTC_CONSOLE): string;
+function ptc_console_title(obj: TPTC_CONSOLE): AnsiString;
 begin
 begin
   try
   try
     ptc_console_title := TPTCBaseConsole(obj).title;
     ptc_console_title := TPTCBaseConsole(obj).title;
@@ -474,7 +474,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function ptc_console_information(obj: TPTC_CONSOLE): string;
+function ptc_console_information(obj: TPTC_CONSOLE): AnsiString;
 begin
 begin
   try
   try
     ptc_console_information := TPTCBaseConsole(obj).information;
     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);
 procedure ptc_console_destroy(obj: TPTC_CONSOLE);
 
 
 { console configuration }
 { console configuration }
-procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: String);
+procedure ptc_console_configure(obj: TPTC_CONSOLE; _file: AnsiString);
 
 
 { console option string }
 { 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 }
 { console modes }
 function ptc_console_mode(obj: TPTC_CONSOLE; index: Integer): TPTC_MODE;
 function ptc_console_mode(obj: TPTC_CONSOLE; index: Integer): TPTC_MODE;
 
 
 { console management }
 { 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);
 procedure ptc_console_close(obj: TPTC_CONSOLE);
 
 
 { synchronization }
 { 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_area(obj: TPTC_CONSOLE): TPTC_AREA;
 function ptc_console_clip(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_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 }
 { extension functions }
 {#ifdef __PTC_WIN32_EXTENSIONS__
 {#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);
                         destination_pixels: Pointer; destination_x, destination_y, destination_width, destination_height, destination_pitch: Integer);
 
 
 { copy option string }
 { 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
     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
 begin
   try
   try
     ptc_error_create := TPTC_ERROR(TPTCError.Create(message));
     ptc_error_create := TPTC_ERROR(TPTCError.Create(message));
@@ -43,7 +43,7 @@ begin
   end;
   end;
 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
 begin
   try
   try
     ptc_error_create_composite := TPTC_ERROR(TPTCError.Create(message, TPTCError(error)));
     ptc_error_create_composite := TPTC_ERROR(TPTCError.Create(message, TPTCError(error)));
@@ -78,7 +78,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function ptc_error_message(obj: TPTC_ERROR): string;
+function ptc_error_message(obj: TPTC_ERROR): AnsiString;
 begin
 begin
   try
   try
     ptc_error_message := TPTCError(obj).message;
     ptc_error_message := TPTCError(obj).message;

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

@@ -33,13 +33,13 @@
 type
 type
   TPTC_ERROR_HANDLER = procedure(error: TPTC_ERROR);
   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_destroy(obj: TPTC_ERROR);
 
 
 procedure ptc_error_report(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);
 procedure ptc_error_assign(obj, error: TPTC_ERROR);
 function ptc_error_equals(obj, error: TPTC_ERROR): Boolean;
 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;
 end;
 end;
 
 
-function ptc_surface_option(obj: TPTC_SURFACE; _option: string): Boolean;
+function ptc_surface_option(obj: TPTC_SURFACE; _option: AnsiString): Boolean;
 begin
 begin
   try
   try
     ptc_surface_option := TPTCBaseSurface(obj).option(_option);
     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;
 function ptc_surface_format(obj: TPTC_SURFACE): TPTC_FORMAT;
 
 
 { surface option string }
 { 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)
   TCocoaConsole = class(TPTCOpenGLLessConsole)
   private
   private
-    FTitle: string;
+    FTitle: AnsiString;
     FWidth, FHeight, FPitch: Integer;
     FWidth, FHeight, FPitch: Integer;
     FFormat: IPTCFormat;
     FFormat: IPTCFormat;
     FCopy: TPTCCopy;
     FCopy: TPTCCopy;
@@ -106,14 +106,14 @@ type
     function GetFormat: IPTCFormat; override;
     function GetFormat: IPTCFormat; override;
 
 
     function GetPages: Integer; 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 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;
     function HandleWindowShouldClose(sender: id): Boolean;
     procedure HandleEvents;
     procedure HandleEvents;
 
 
@@ -151,18 +151,18 @@ type
                     AArea: IPTCArea); override;
                     AArea: IPTCArea); override;
     procedure Palette(APalette: IPTCPalette); override;
     procedure Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); 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 Clip: IPTCArea; override;
     function Palette: IPTCPalette; override;
     function Palette: IPTCPalette; override;
 
 
-    procedure Configure(const AFileName: String); override;
+    procedure Configure(const AFileName: AnsiString); override;
     function Modes: TPTCModeList; 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;
                    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;
                    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;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure Close; override;
 
 

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

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

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

@@ -33,22 +33,22 @@
 type
 type
   IPTCConsole = interface(IPTCSurface)
   IPTCConsole = interface(IPTCSurface)
     function GetPages: Integer;
     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;
     function GetOpenGL_Enabled: Boolean;
     procedure SetOpenGL_Enabled(AValue: Boolean);
     procedure SetOpenGL_Enabled(AValue: Boolean);
     function GetOpenGL_Attributes: IPTCOpenGLAttributes;
     function GetOpenGL_Attributes: IPTCOpenGLAttributes;
 
 
-    procedure Configure(const AFileName: string);
+    procedure Configure(const AFileName: AnsiString);
     function Modes: TPTCModeList;
     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;
                    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;
                    AFormat: IPTCFormat; APages: Integer = 0); overload;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer = 0); overload;
                    APages: Integer = 0); overload;
     procedure Close;
     procedure Close;
     procedure InternalResize(AWidth, AHeight: Integer);
     procedure InternalResize(AWidth, AHeight: Integer);
@@ -74,9 +74,9 @@ type
     function MoveMouseTo(X, Y: Integer): Boolean;
     function MoveMouseTo(X, Y: Integer): Boolean;
 
 
     property Pages: Integer read GetPages;
     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 }
     { OpenGL support }
     property OpenGL_Enabled: Boolean read GetOpenGL_Enabled write SetOpenGL_Enabled;
     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 GetFormat: IPTCFormat; virtual; abstract;
 
 
     function GetPages: Integer; 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;
     function GetOpenGL_Enabled: Boolean; virtual; abstract;
     procedure SetOpenGL_Enabled(AValue: Boolean); virtual; abstract;
     procedure SetOpenGL_Enabled(AValue: Boolean); virtual; abstract;
@@ -86,18 +86,18 @@ type
                     AArea: IPTCArea); virtual; abstract;
                     AArea: IPTCArea); virtual; abstract;
     procedure Palette(APalette: IPTCPalette); virtual; abstract;
     procedure Palette(APalette: IPTCPalette); virtual; abstract;
     procedure Clip(AArea: IPTCArea); 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 Clip: IPTCArea; virtual; abstract;
     function Palette: IPTCPalette; 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;
     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;
                    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;
                    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;
                    APages: Integer = 0); overload; virtual; abstract;
     procedure Close; virtual; abstract;
     procedure Close; virtual; abstract;
     procedure InternalResize(AWidth, AHeight: Integer); virtual;
     procedure InternalResize(AWidth, AHeight: Integer); virtual;
@@ -121,9 +121,9 @@ type
     function MoveMouseTo(X, Y: Integer): Boolean; virtual;
     function MoveMouseTo(X, Y: Integer): Boolean; virtual;
 
 
     property Pages: Integer read GetPages;
     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 Width: Integer read GetWidth;
     property Height: Integer read GetHeight;
     property Height: Integer read GetHeight;

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

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

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

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

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

@@ -35,13 +35,13 @@ begin
   FMessage := '';
   FMessage := '';
 end;
 end;
 
 
-constructor TPTCError.Create(const AMessage: String);
+constructor TPTCError.Create(const AMessage: AnsiString);
 begin
 begin
   FMessage := AMessage;
   FMessage := AMessage;
   LOG('error', Self);
   LOG('error', Self);
 end;
 end;
 
 
-constructor TPTCError.Create(const AMessage: string; const AError: TPTCError);
+constructor TPTCError.Create(const AMessage: AnsiString; const AError: TPTCError);
 begin
 begin
   FMessage := AMessage + #10 + AError.FMessage;
   FMessage := AMessage + #10 + AError.FMessage;
   LOG('composite error', Self);
   LOG('composite error', Self);
@@ -100,7 +100,7 @@ begin
   {$IFDEF Win32}
   {$IFDEF Win32}
 //  Win32Cursor_resurrect;
 //  Win32Cursor_resurrect;
   txt := FMessage;
   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}
   {$ENDIF Win32}
 
 
   {$IFDEF WinCE}
   {$IFDEF WinCE}

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

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

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

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

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

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

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

@@ -34,8 +34,8 @@ type
   private
   private
     { data }
     { data }
     m_modes: array of IPTCMode;
     m_modes: array of IPTCMode;
-    m_title: string;
-    m_information: string;
+    m_title: AnsiString;
+    m_information: AnsiString;
 
 
     { flags }
     { flags }
     m_open: Boolean;
     m_open: Boolean;
@@ -58,7 +58,7 @@ type
     m_primary: TPTCSurface;
     m_primary: TPTCSurface;
 
 
     { internal console management routines }
     { 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_start;
     procedure internal_open_fullscreen(_width, _height: Integer; const _format: IPTCFormat);
     procedure internal_open_fullscreen(_width, _height: Integer; const _format: IPTCFormat);
     procedure internal_open_fullscreen_finish(_pages: Integer);
     procedure internal_open_fullscreen_finish(_pages: Integer);
@@ -74,15 +74,15 @@ type
   public
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
     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;
                    _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;
                    _format: IPTCFormat; _pages: Integer); overload; override;
-    procedure open(const _title: string; _mode: IPTCMode;
+    procedure open(const _title: AnsiString; _mode: IPTCMode;
                    _pages: Integer); overload; override;
                    _pages: Integer); overload; override;
     procedure close; override;
     procedure close; override;
     procedure flush; override;
     procedure flush; override;
@@ -126,9 +126,9 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; 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 NextEvent(out event: IPTCEvent; wait: Boolean; const EventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
   end;
   end;

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

@@ -63,10 +63,10 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 end;
 
 
-procedure TCGAConsole.Configure(const AFileName: string);
+procedure TCGAConsole.Configure(const AFileName: AnsiString);
 var
 var
   F: TextFile;
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
 begin
   AssignFile(F, AFileName);
   AssignFile(F, AFileName);
   {$push}{$I-}
   {$push}{$I-}
@@ -86,7 +86,7 @@ begin
   CloseFile(F);
   CloseFile(F);
 end;
 end;
 
 
-function TCGAConsole.option(const _option: string): Boolean;
+function TCGAConsole.option(const _option: AnsiString): Boolean;
 begin
 begin
   {...}
   {...}
   if _option = 'enable logging' then
   if _option = 'enable logging' then
@@ -110,24 +110,24 @@ begin
   Result := m_modes;
   Result := m_modes;
 end;
 end;
 
 
-procedure TCGAConsole.Open(const _title: string; _pages: Integer); overload;
+procedure TCGAConsole.Open(const _title: AnsiString; _pages: Integer); overload;
 begin
 begin
   open(_title, m_default_format, _pages);
   open(_title, m_default_format, _pages);
 end;
 end;
 
 
-procedure TCGAConsole.open(const _title: string; _format: IPTCFormat;
+procedure TCGAConsole.open(const _title: AnsiString; _format: IPTCFormat;
                            _pages: Integer); overload;
                            _pages: Integer); overload;
 begin
 begin
   open(_title, m_default_width, m_default_height, _format, _pages);
   open(_title, m_default_width, m_default_height, _format, _pages);
 end;
 end;
 
 
-procedure TCGAConsole.open(const _title: string; _width, _height: Integer;
+procedure TCGAConsole.open(const _title: AnsiString; _width, _height: Integer;
                            _format: IPTCFormat; _pages: Integer); overload;
                            _format: IPTCFormat; _pages: Integer); overload;
 begin
 begin
   open(_title, TPTCMode.Create(_width, _height, _format), _pages);
   open(_title, TPTCMode.Create(_width, _height, _format), _pages);
 end;
 end;
 
 
-procedure TCGAConsole.open(const _title: string; _mode: IPTCMode;
+procedure TCGAConsole.open(const _title: AnsiString; _mode: IPTCMode;
                            _pages: Integer); overload;
                            _pages: Integer); overload;
 var
 var
   _width, _height: Integer;
   _width, _height: Integer;
@@ -475,22 +475,22 @@ begin
   Result := m_primary.format;
   Result := m_primary.format;
 end;
 end;
 
 
-function TCGAConsole.GetName: string;
+function TCGAConsole.GetName: AnsiString;
 begin
 begin
   Result := 'CGA';
   Result := 'CGA';
 end;
 end;
 
 
-function TCGAConsole.GetTitle: string;
+function TCGAConsole.GetTitle: AnsiString;
 begin
 begin
   Result := m_title;
   Result := m_title;
 end;
 end;
 
 
-function TCGAConsole.GetInformation: string;
+function TCGAConsole.GetInformation: AnsiString;
 begin
 begin
   Result := m_information;
   Result := m_information;
 end;
 end;
 
 
-procedure TCGAConsole.internal_pre_open_setup(const _title: string);
+procedure TCGAConsole.internal_pre_open_setup(const _title: AnsiString);
 begin
 begin
   m_title := _title;
   m_title := _title;
 end;
 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_lightbase_g(red, green, blue: Real): Word;
 {Function (*calcpal)(float red, float green, float blue): Word;}
 {Function (*calcpal)(float red, float green, float blue): Word;}
 const calcpal: Function(red, green, blue: Real): Word = @calcpal_colorbase;
 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_colorbase is the 'old' calcpal, only "a bit" optimized.
      * calcpal is now function pointer so calcpal function can be changed
      * 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_gscale(light: Real): Word;
 function calc_gscale2(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.
      * gscale2 uses colors 8,7,15, normal just uses 7.
      *}
      *}
 
 
@@ -131,7 +131,7 @@ uses
   go32;
   go32;
 
 
 { $define __USE_178NOT176}
 { $define __USE_178NOT176}
- { uncomment to use 75% char instead of 25% char }
+ { uncomment to use 75% AnsiChar instead of 25% AnsiChar }
 
 
 {$DEFINE __USE_REALIBMPAL}
 {$DEFINE __USE_REALIBMPAL}
  { comment out to use 'clean' truecolor palette for calculations }
  { comment out to use 'clean' truecolor palette for calculations }
@@ -435,7 +435,7 @@ end;
 procedure build_colormap(dots: Integer);
 procedure build_colormap(dots: Integer);
 
 
 const
 const
-  wheel: array [0..3] of Char = ('-', '\', '|', '/');
+  wheel: array [0..3] of AnsiChar = ('-', '\', '|', '/');
 
 
 var
 var
   r, g, b: Integer;
   r, g, b: Integer;

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

@@ -34,8 +34,8 @@ type
   private
   private
     { data }
     { data }
     FModes: array of IPTCMode;
     FModes: array of IPTCMode;
-    FTitle: string;
-    FInformation: string;
+    FTitle: AnsiString;
+    FInformation: AnsiString;
 
 
     { flags }
     { flags }
     FOpen: Boolean;
     FOpen: Boolean;
@@ -59,7 +59,7 @@ type
     F160x100buffer: TPTCSurface;
     F160x100buffer: TPTCSurface;
 
 
     { internal console management routines }
     { 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_start;
     procedure internal_open_fullscreen(_width, _height: Integer; _format: IPTCFormat);
     procedure internal_open_fullscreen(_width, _height: Integer; _format: IPTCFormat);
     procedure internal_open_fullscreen_finish(_pages: Integer);
     procedure internal_open_fullscreen_finish(_pages: Integer);
@@ -75,15 +75,15 @@ type
   public
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
     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;
                    _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;
                    _format: IPTCFormat; _pages: Integer); overload; override;
-    procedure open(const _title: string; _mode: IPTCMode;
+    procedure open(const _title: AnsiString; _mode: IPTCMode;
                    _pages: Integer); overload; override;
                    _pages: Integer); overload; override;
     procedure close; override;
     procedure close; override;
     procedure flush; override;
     procedure flush; override;
@@ -127,9 +127,9 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; 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 NextEvent(out event: IPTCEvent; wait: Boolean; const EventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
   end;
   end;

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

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

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

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

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

@@ -40,8 +40,8 @@ type
       SupportsWindowed: Boolean;
       SupportsWindowed: Boolean;
       SupportsLFB: Boolean;
       SupportsLFB: Boolean;
     end;
     end;
-    FTitle: string;
-    FInformation: string;
+    FTitle: AnsiString;
+    FInformation: AnsiString;
     FCurrentMode: Integer;
     FCurrentMode: Integer;
     FVESACurrentMode: Integer;
     FVESACurrentMode: Integer;
     FWidth, FHeight, FPitch{, FPages}: Integer;
     FWidth, FHeight, FPitch{, FPages}: Integer;
@@ -101,15 +101,15 @@ type
   public
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
     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;
                    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;
                    AFormat: IPTCFormat; APages: Integer); overload; override;
-    procedure Open(const ATitle: string; AMode: IPTCMode;
+    procedure Open(const ATitle: AnsiString; AMode: IPTCMode;
                    APages: Integer); overload; override;
                    APages: Integer); overload; override;
     procedure Close; override;
     procedure Close; override;
     procedure Flush; override;
     procedure Flush; override;
@@ -153,9 +153,9 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; 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 NextEvent(out AEvent: IPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
   end;
   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(32, $00FF0000, $0000FF00, $000000FF)}
 { $DEFINE DEFAULT_FORMAT:=TPTCFormat.Create(24, $00FF0000, $0000FF00, $000000FF)}
 { $DEFINE DEFAULT_FORMAT:=TPTCFormat.Create(24, $00FF0000, $0000FF00, $000000FF)}
 
 
-procedure VESALogProcedure(const S: string);
+procedure VESALogProcedure(const S: AnsiString);
 begin
 begin
   LOG(s);
   LOG(s);
 end;
 end;
@@ -199,10 +199,10 @@ begin
   FModesLast := J;
   FModesLast := J;
 end;
 end;
 
 
-procedure TVESAConsole.Configure(const AFileName: string);
+procedure TVESAConsole.Configure(const AFileName: AnsiString);
 var
 var
   F: TextFile;
   F: TextFile;
-  S: string;
+  S: AnsiString;
 begin
 begin
   AssignFile(F, AFileName);
   AssignFile(F, AFileName);
   {$push}{$I-}
   {$push}{$I-}
@@ -258,7 +258,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TVESAConsole.Option(const AOption: string): Boolean;
+function TVESAConsole.Option(const AOption: AnsiString): Boolean;
 begin
 begin
   {...}
   {...}
   if AOption = 'enable lfb' then
   if AOption = 'enable lfb' then
@@ -452,24 +452,24 @@ begin
   Result := modefound;
   Result := modefound;
 end;
 end;
 
 
-procedure TVESAConsole.Open(const ATitle: string; APages: Integer); overload;
+procedure TVESAConsole.Open(const ATitle: AnsiString; APages: Integer); overload;
 begin
 begin
   Open(ATitle, FDefaultFormat, APages);
   Open(ATitle, FDefaultFormat, APages);
 end;
 end;
 
 
-procedure TVESAConsole.Open(const ATitle: string; AFormat: IPTCFormat;
+procedure TVESAConsole.Open(const ATitle: AnsiString; AFormat: IPTCFormat;
                             APages: Integer); overload;
                             APages: Integer); overload;
 begin
 begin
   Open(ATitle, FDefaultWidth, FDefaultHeight, AFormat, APages);
   Open(ATitle, FDefaultWidth, FDefaultHeight, AFormat, APages);
 end;
 end;
 
 
-procedure TVESAConsole.Open(const ATitle: string; AWidth, AHeight: Integer;
+procedure TVESAConsole.Open(const ATitle: AnsiString; AWidth, AHeight: Integer;
                             AFormat: IPTCFormat; APages: Integer); overload;
                             AFormat: IPTCFormat; APages: Integer); overload;
 begin
 begin
   Open(ATitle, TPTCMode.Create(AWidth, AHeight, AFormat), APages);
   Open(ATitle, TPTCMode.Create(AWidth, AHeight, AFormat), APages);
 end;
 end;
 
 
-procedure TVESAConsole.Open(const ATitle: string; AMode: IPTCMode;
+procedure TVESAConsole.Open(const ATitle: AnsiString; AMode: IPTCMode;
                             APages: Integer); overload;
                             APages: Integer); overload;
 
 
   procedure SetRGB332Palette;
   procedure SetRGB332Palette;
@@ -952,17 +952,17 @@ begin
   Result := FModes[FCurrentMode].Format;
   Result := FModes[FCurrentMode].Format;
 end;
 end;
 
 
-function TVESAConsole.GetName: string;
+function TVESAConsole.GetName: AnsiString;
 begin
 begin
   Result := 'VESA';
   Result := 'VESA';
 end;
 end;
 
 
-function TVESAConsole.GetTitle: string;
+function TVESAConsole.GetTitle: AnsiString;
 begin
 begin
   Result := FTitle;
   Result := FTitle;
 end;
 end;
 
 
-function TVESAConsole.GetInformation: string;
+function TVESAConsole.GetInformation: AnsiString;
 begin
 begin
   Result := FInformation;
   Result := FInformation;
 end;
 end;

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

@@ -34,8 +34,8 @@ type
   private
   private
     { data }
     { data }
     m_modes: array of IPTCMode;
     m_modes: array of IPTCMode;
-    m_title: string;
-    m_information: string;
+    m_title: AnsiString;
+    m_information: AnsiString;
     m_CurrentMode: Integer;
     m_CurrentMode: Integer;
     m_faketype: Integer;
     m_faketype: Integer;
     m_width, m_height, m_pitch: Integer;
     m_width, m_height, m_pitch: Integer;
@@ -65,7 +65,7 @@ type
     FMouse: TDosMouse;
     FMouse: TDosMouse;
 
 
     { internal console management routines }
     { 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_start;
     procedure internal_open_fullscreen(ModeType: Integer);
     procedure internal_open_fullscreen(ModeType: Integer);
     procedure internal_open_fullscreen_finish(_pages: Integer);
     procedure internal_open_fullscreen_finish(_pages: Integer);
@@ -85,15 +85,15 @@ type
   public
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
     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;
                    _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;
                    _format: IPTCFormat; _pages: Integer); overload; override;
-    procedure open(const _title: string; _mode: IPTCMode;
+    procedure open(const _title: AnsiString; _mode: IPTCMode;
                    _pages: Integer); overload; override;
                    _pages: Integer); overload; override;
     procedure close; override;
     procedure close; override;
     procedure flush; override;
     procedure flush; override;
@@ -137,9 +137,9 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; 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 NextEvent(out event: IPTCEvent; wait: Boolean; const EventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
     function PeekEvent(wait: Boolean; const EventMask: TPTCEventMask): IPTCEvent; override;
   end;
   end;

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

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

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

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

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

@@ -43,7 +43,7 @@ type
   TPTCWrapperOpenType = (pwotDefault, pwotFormat, pwotWidthHeightFormat, pwotMode);
   TPTCWrapperOpenType = (pwotDefault, pwotFormat, pwotWidthHeightFormat, pwotMode);
   TPTCWrapperOpenRequest = record
   TPTCWrapperOpenRequest = record
     OpenType: TPTCWrapperOpenType;
     OpenType: TPTCWrapperOpenType;
-    Title: string;
+    Title: AnsiString;
     SurfaceWidth, SurfaceHeight: Integer;
     SurfaceWidth, SurfaceHeight: Integer;
     Width, Height: Integer;
     Width, Height: Integer;
     Format: IPTCFormat;
     Format: IPTCFormat;
@@ -61,7 +61,7 @@ type
   end;
   end;
 
 
   TPTCWrapperOptionRequest = record
   TPTCWrapperOptionRequest = record
-    Option: string;
+    Option: AnsiString;
 
 
     Processed: Boolean;
     Processed: Boolean;
     Result: Boolean;
     Result: Boolean;
@@ -109,13 +109,13 @@ type
     constructor Create;
     constructor Create;
     destructor Destroy; override;
     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;
     procedure Close;
 
 
-    function Option(const AOption: string): Boolean;
+    function Option(const AOption: AnsiString): Boolean;
 
 
     function Modes: TPTCModeList;
     function Modes: TPTCModeList;
 
 
@@ -307,7 +307,7 @@ begin
   end;
   end;
 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
 begin
   FSurfaceCriticalSection.Acquire;
   FSurfaceCriticalSection.Acquire;
   try
   try
@@ -328,7 +328,7 @@ begin
   until FOpenRequest.Processed;
   until FOpenRequest.Processed;
 end;
 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
 begin
   FSurfaceCriticalSection.Acquire;
   FSurfaceCriticalSection.Acquire;
   try
   try
@@ -350,7 +350,7 @@ begin
   until FOpenRequest.Processed;
   until FOpenRequest.Processed;
 end;
 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
 begin
   FSurfaceCriticalSection.Acquire;
   FSurfaceCriticalSection.Acquire;
   try
   try
@@ -376,7 +376,7 @@ begin
   until FOpenRequest.Processed;
   until FOpenRequest.Processed;
 end;
 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
 begin
   FSurfaceCriticalSection.Acquire;
   FSurfaceCriticalSection.Acquire;
   try
   try
@@ -417,7 +417,7 @@ begin
   until FCloseRequest.Processed;
   until FCloseRequest.Processed;
 end;
 end;
 
 
-function TPTCWrapperThread.Option(const AOption: string): Boolean;
+function TPTCWrapperThread.Option(const AOption: AnsiString): Boolean;
 begin
 begin
   FSurfaceCriticalSection.Acquire;
   FSurfaceCriticalSection.Acquire;
   try
   try

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

@@ -69,13 +69,13 @@ type
     procedure Terminate;
     procedure Terminate;
     procedure WaitFor;
     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;
     procedure Close;
 
 
-    function Option(const AOption: string): Boolean;
+    function Option(const AOption: AnsiString): Boolean;
 
 
     function Modes: TPTCModeList;
     function Modes: TPTCModeList;
 
 
@@ -171,7 +171,7 @@ begin
   end;
   end;
 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
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -190,7 +190,7 @@ begin
   FOpen := True;
   FOpen := True;
 end;
 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
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -209,7 +209,7 @@ begin
   FOpen := True;
   FOpen := True;
 end;
 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
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -228,7 +228,7 @@ begin
   FOpen := True;
   FOpen := True;
 end;
 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
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -259,7 +259,7 @@ begin
   FOpen := False;
   FOpen := False;
 end;
 end;
 
 
-function TPTCWrapperThread.Option(const AOption: string): Boolean;
+function TPTCWrapperThread.Option(const AOption: AnsiString): Boolean;
 begin
 begin
   Result := FConsole.Option(AOption);
   Result := FConsole.Option(AOption);
 end;
 end;

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

@@ -4,7 +4,7 @@ unit TinyPTC;
 
 
 interface
 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;
 function ptc_update(ABuffer: Pointer): Boolean;
 procedure ptc_close;
 procedure ptc_close;
 
 
@@ -19,7 +19,7 @@ var
   Palette: TPTCPalette = nil;
   Palette: TPTCPalette = nil;
   Width, Height: Integer;
   Width, Height: Integer;
 
 
-function ptc_open(const ATitle: string; AWidth, AHeight: Integer): Boolean;
+function ptc_open(const ATitle: AnsiString; AWidth, AHeight: Integer): Boolean;
 begin
 begin
   try
   try
     if Console = nil then
     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 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;
 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,
                                 AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded,
                                 ACursor, AInterceptClose: Boolean);
                                 ACursor, AInterceptClose: Boolean);
 var
 var
@@ -110,7 +110,7 @@ begin
     begin
     begin
       wc.cbSize := SizeOf(wc);
       wc.cbSize := SizeOf(wc);
       wc.hInstance := program_instance;
       wc.hInstance := program_instance;
-      wc.lpszClassName := PChar(AWndClass);
+      wc.lpszClassName := PAnsiChar(AWndClass);
       wc.style := AClassStyle;
       wc.style := AClassStyle;
       wc.hIcon := 0{LoadIcon(library_instance, 'IDI_PTC_ICON')};
       wc.hIcon := 0{LoadIcon(library_instance, 'IDI_PTC_ICON')};
       wc.hIconSm := 0;
       wc.hIconSm := 0;
@@ -162,7 +162,7 @@ begin
       if IsUnicode then
       if IsUnicode then
         FWindow := CreateWindowExW(FExtra, PWideChar(AWndClassW), PWideChar(ATitleW), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, Self)
         FWindow := CreateWindowExW(FExtra, PWideChar(AWndClassW), PWideChar(ATitleW), FStyle, FX, FY, FWidth, FHeight, 0, 0, 0, Self)
       else
       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
       if not IsWindow(FWindow) then
         raise TPTCError.Create('could not create window');
         raise TPTCError.Create('could not create window');
       ShowWindow(FWindow, FShow);
       ShowWindow(FWindow, FShow);
@@ -478,7 +478,7 @@ begin
     FEvent := 0;
     FEvent := 0;
     FThread := 0;
     FThread := 0;
     FID := 0;
     FID := 0;
-    UnregisterClassA(PChar(FName), GetModuleHandle(Nil));
+    UnregisterClassA(PAnsiChar(FName), GetModuleHandle(Nil));
   end;
   end;
 end;
 end;
 
 
@@ -488,7 +488,7 @@ var
 begin
 begin
   with AOwner do
   with AOwner do
   begin
   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
     if IsWindow(FWindow) then
     begin
     begin
       ShowWindow(FWindow, FShow);
       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;
     function WMDestroy(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; virtual;
   public
   public
     constructor Create(window: HWND);
     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);
                        AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded, ACursor, AInterceptClose: Boolean);
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Cursor(AFlag: Boolean);
     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
      * drivers, since this is unreliable and many different strings may be associated with the same
      * device, and the same driver from different vendors.
      * 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
      * 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
      * drivers, since this is unreliable and many different strings may be associated with the same
      * device, and the same driver from different vendors.
      * 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
      * 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;
     dwSize: DWORD;
     GuidEffect: GUID;
     GuidEffect: GUID;
     lpDiEffect: LPCDIEFFECT;
     lpDiEffect: LPCDIEFFECT;
-    szFriendlyName: array [0..MAX_PATH-1] of CHAR;
+    szFriendlyName: array [0..MAX_PATH-1] of AnsiChar;
   end;
   end;
 //typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
 //typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
   LPDIENUMEFFECTSINFILECALLBACK = function(lpDiFileEf: LPCDIFILEEFFECT; pvRef: LPVOID): BOOL; stdcall;
   LPDIENUMEFFECTSINFILECALLBACK = function(lpDiFileEf: LPCDIFILEEFFECT; pvRef: LPVOID): BOOL; stdcall;
@@ -824,7 +824,7 @@ type
     hInstString: HINST;  {OPTIONAL}
     hInstString: HINST;  {OPTIONAL}
     ftTimeStamp: FILETIME;
     ftTimeStamp: FILETIME;
     dwCRC: DWORD;
     dwCRC: DWORD;
-    tszActionMap: array [0..MAX_PATH-1] of CHAR;
+    tszActionMap: array [0..MAX_PATH-1] of AnsiChar;
   end;
   end;
   LPDIACTIONFORMATW = ^TDIACTIONFORMATW;
   LPDIACTIONFORMATW = ^TDIACTIONFORMATW;
   PDIACTIONFORMATW = ^TDIACTIONFORMATW;
   PDIACTIONFORMATW = ^TDIACTIONFORMATW;
@@ -970,7 +970,7 @@ type
   LPDIDEVICEIMAGEINFOA = ^TDIDEVICEIMAGEINFOA;
   LPDIDEVICEIMAGEINFOA = ^TDIDEVICEIMAGEINFOA;
   PDIDEVICEIMAGEINFOA = ^TDIDEVICEIMAGEINFOA;
   PDIDEVICEIMAGEINFOA = ^TDIDEVICEIMAGEINFOA;
   TDIDEVICEIMAGEINFOA = record
   TDIDEVICEIMAGEINFOA = record
-    tszImagePath: array [0..MAX_PATH-1] of CHAR;
+    tszImagePath: array [0..MAX_PATH-1] of AnsiChar;
     dwFlags: DWORD;
     dwFlags: DWORD;
     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
     dwViewID: DWORD;
     dwViewID: DWORD;
@@ -1077,7 +1077,7 @@ type
     dwOfs: DWORD;
     dwOfs: DWORD;
     dwType: DWORD;
     dwType: DWORD;
     dwFlags: DWORD;
     dwFlags: DWORD;
-    tszName: array [0..MAX_PATH-1] of CHAR;
+    tszName: array [0..MAX_PATH-1] of AnsiChar;
   end;
   end;
   LPDIDEVICEOBJECTINSTANCE_DX3W = ^TDIDEVICEOBJECTINSTANCE_DX3W;
   LPDIDEVICEOBJECTINSTANCE_DX3W = ^TDIDEVICEOBJECTINSTANCE_DX3W;
   PDIDEVICEOBJECTINSTANCE_DX3W = ^TDIDEVICEOBJECTINSTANCE_DX3W;
   PDIDEVICEOBJECTINSTANCE_DX3W = ^TDIDEVICEOBJECTINSTANCE_DX3W;
@@ -1111,7 +1111,7 @@ type
     dwOfs: DWORD;
     dwOfs: DWORD;
     dwType: DWORD;
     dwType: DWORD;
     dwFlags: DWORD;
     dwFlags: DWORD;
-    tszName: array [0..MAX_PATH-1] of CHAR;
+    tszName: array [0..MAX_PATH-1] of AnsiChar;
 {$IF DIRECTINPUT_VERSION >= $0500}
 {$IF DIRECTINPUT_VERSION >= $0500}
     dwFFMaxForce: DWORD;
     dwFFMaxForce: DWORD;
     dwFFForceResolution: DWORD;
     dwFFForceResolution: DWORD;
@@ -1469,8 +1469,8 @@ type
     guidInstance: GUID;
     guidInstance: GUID;
     guidProduct: GUID;
     guidProduct: GUID;
     dwDevType: DWORD;
     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;
   end;
   LPDIDEVICEINSTANCE_DX3W = ^TDIDEVICEINSTANCE_DX3W;
   LPDIDEVICEINSTANCE_DX3W = ^TDIDEVICEINSTANCE_DX3W;
   PDIDEVICEINSTANCE_DX3W = ^TDIDEVICEINSTANCE_DX3W;
   PDIDEVICEINSTANCE_DX3W = ^TDIDEVICEINSTANCE_DX3W;
@@ -1506,8 +1506,8 @@ type
     guidInstance: GUID;
     guidInstance: GUID;
     guidProduct: GUID;
     guidProduct: GUID;
     dwDevType: DWORD;
     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}
 {$IF DIRECTINPUT_VERSION >= $0500}
     guidFFDriver: GUID;
     guidFFDriver: GUID;
     wUsagePage: WORD;
     wUsagePage: WORD;
@@ -1697,7 +1697,7 @@ type
     dwEffType: DWORD;
     dwEffType: DWORD;
     dwStaticParams: DWORD;
     dwStaticParams: DWORD;
     dwDynamicParams: DWORD;
     dwDynamicParams: DWORD;
-    tszName: array [0..MAX_PATH-1] of CHAR;
+    tszName: array [0..MAX_PATH-1] of AnsiChar;
   end;
   end;
   LPDIEFFECTINFOW = ^TDIEFFECTINFOW;
   LPDIEFFECTINFOW = ^TDIEFFECTINFOW;
   PDIEFFECTINFOW = ^TDIEFFECTINFOW;
   PDIEFFECTINFOW = ^TDIEFFECTINFOW;
@@ -4762,7 +4762,7 @@ function DIDFT_ENUMCOLLECTION(n: WORD): DWORD; inline;
 {$IF DIRECTINPUT_VERSION >= $050a}
 {$IF DIRECTINPUT_VERSION >= $050a}
 function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD; inline;
 function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD; inline;
 {$ENDIF} { DIRECTINPUT_VERSION >= $050a }
 {$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;
 function DIBUTTON_ANY(instance: Byte): DWORD; inline;
 
 
 implementation
 implementation
@@ -4802,7 +4802,7 @@ end;
 
 
 //#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
 //#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
 //                        ((int)((dwSequence1) - (dwSequence2)) cmp 0)
 //                        ((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
 begin
 {$PUSH}{$Q-,R-}
 {$PUSH}{$Q-,R-}
   if (cmp = '==') or (cmp = '=') then
   if (cmp = '==') or (cmp = '=') then

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

@@ -35,7 +35,7 @@ type
   TDirectXConsole = class(TPTCOpenGLLessConsole)
   TDirectXConsole = class(TPTCOpenGLLessConsole)
   private
   private
     { title data }
     { title data }
-{    FTitle: array [0..1023] of Char;}
+{    FTitle: array [0..1023] of AnsiChar;}
     FTitle: AnsiString;
     FTitle: AnsiString;
 
 
     { flags }
     { flags }
@@ -79,13 +79,13 @@ type
     FPrimary: TDirectXPrimary;
     FPrimary: TDirectXPrimary;
 
 
     { internal console management routines }
     { 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_close;
     procedure internal_shutdown;
     procedure internal_shutdown;
 
 
     { internal console open management routines }
     { 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_finish;
     procedure internal_open_reset;
     procedure internal_open_reset;
 
 
@@ -102,13 +102,13 @@ type
     procedure internal_open_windowed_finish;
     procedure internal_open_windowed_finish;
 
 
     { internal console open recycling routines }
     { 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}
 {$IFDEF DEBUG}
     { debug }
     { debug }
-    procedure CHECK_OPEN(AMsg: String);
-    procedure CHECK_LOCK(AMsg: String);
+    procedure CHECK_OPEN(AMsg: AnsiString);
+    procedure CHECK_LOCK(AMsg: AnsiString);
 {$ENDIF}
 {$ENDIF}
 
 
     { painting }
     { painting }
@@ -122,15 +122,15 @@ type
   public
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
     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;
                    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;
                    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;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure Close; override;
     procedure InternalResize(AWidth, AHeight: Integer); override;
     procedure InternalResize(AWidth, AHeight: Integer); override;
@@ -175,9 +175,9 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function Clip: IPTCArea; override;
     function Clip: IPTCArea; override;
     function GetFormat: IPTCFormat; 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 NextEvent(out AEvent: IPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
     function PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): IPTCEvent; override;
     function MoveMouseTo(X, Y: Integer): Boolean; override;
     function MoveMouseTo(X, Y: Integer): Boolean; override;

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

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

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

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

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

@@ -58,7 +58,7 @@ type
     FCursor: Boolean;
     FCursor: Boolean;
     FCursorMode: TWin32CursorMode;
     FCursorMode: TWin32CursorMode;
 
 
-    FTitle: string;
+    FTitle: AnsiString;
 
 
     FDisplayWidth: Integer;
     FDisplayWidth: Integer;
     FDisplayHeight: Integer;
     FDisplayHeight: Integer;
@@ -79,15 +79,15 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; 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;
     function GetOpenGL_Enabled: Boolean; override;
     procedure SetOpenGL_Enabled(AValue: 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);
     procedure SetInterceptClose(AInterceptClose: Boolean);
     property InterceptClose: Boolean read FInterceptClose write SetInterceptClose;
     property InterceptClose: Boolean read FInterceptClose write SetInterceptClose;
@@ -95,12 +95,12 @@ type
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
                    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;
                    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;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure Close; override;
 
 
@@ -137,8 +137,8 @@ type
     procedure Clear(AColor: IPTCColor;
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
                     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 Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;
     procedure Clip(AArea: IPTCArea); override;

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

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

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

@@ -138,7 +138,7 @@ end;
 
 
 procedure TWin32ModeSetter.DispChangeCheck(ADispChangeResult: LONG);
 procedure TWin32ModeSetter.DispChangeCheck(ADispChangeResult: LONG);
 
 
-  function DispChangeResult2String(ADispChangeResult: LONG): string;
+  function DispChangeResult2String(ADispChangeResult: LONG): AnsiString;
   begin
   begin
     case ADispChangeResult of
     case ADispChangeResult of
       DISP_CHANGE_SUCCESSFUL:  Result := 'DISP_CHANGE_SUCCESSFUL';
       DISP_CHANGE_SUCCESSFUL:  Result := 'DISP_CHANGE_SUCCESSFUL';
@@ -162,7 +162,7 @@ end;
 
 
 procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
 procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
 
 
-  function Fields2String(dmFields: DWORD): string;
+  function Fields2String(dmFields: DWORD): AnsiString;
   begin
   begin
     Result := '';
     Result := '';
     if (dmFields and DM_ORIENTATION) <> 0 then
     if (dmFields and DM_ORIENTATION) <> 0 then
@@ -232,7 +232,7 @@ procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
     Result := IntToStr(dmFields) + ' (' + Result + ')';
     Result := IntToStr(dmFields) + ' (' + Result + ')';
   end;
   end;
 
 
-  function DisplayOrientation2String(dmDisplayOrientation: DWORD): string;
+  function DisplayOrientation2String(dmDisplayOrientation: DWORD): AnsiString;
   begin
   begin
     case dmDisplayOrientation of
     case dmDisplayOrientation of
       DMDO_DEFAULT: Result := 'DMDO_DEFAULT';
       DMDO_DEFAULT: Result := 'DMDO_DEFAULT';
@@ -245,7 +245,7 @@ procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
     Result := IntToStr(dmDisplayOrientation) + ' (' + Result + ')';
     Result := IntToStr(dmDisplayOrientation) + ' (' + Result + ')';
   end;
   end;
 
 
-  function DisplayFixedOutput2String(dmDisplayFixedOutput: DWORD): string;
+  function DisplayFixedOutput2String(dmDisplayFixedOutput: DWORD): AnsiString;
   begin
   begin
     case dmDisplayFixedOutput of
     case dmDisplayFixedOutput of
       DMDFO_DEFAULT: Result := 'DMDFO_DEFAULT';
       DMDFO_DEFAULT: Result := 'DMDFO_DEFAULT';
@@ -257,7 +257,7 @@ procedure TWin32ModeSetter.LogDevMode(const ADevMode: TDEVMODE);
     Result := IntToStr(dmDisplayFixedOutput) + ' (' + Result + ')';
     Result := IntToStr(dmDisplayFixedOutput) + ' (' + Result + ')';
   end;
   end;
 
 
-  function DisplayFlags2String(dmDisplayFlags: DWORD): string;
+  function DisplayFlags2String(dmDisplayFlags: DWORD): AnsiString;
   begin
   begin
     Result := '';
     Result := '';
     if (dmDisplayFlags and DM_GRAYSCALE) <> 0 then
     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 WMCreate(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; override;
     function WMDestroy(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; override;
     function WMDestroy(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; override;
   public
   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,
                        AShow, AX, AY, AWidth, AHeight: Integer; ACenter, AMultithreaded,
                        ACursor, AInterceptClose: Boolean; const AOpenGLAttributes: IPTCOpenGLAttributes);
                        ACursor, AInterceptClose: Boolean; const AOpenGLAttributes: IPTCOpenGLAttributes);
   end;
   end;

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

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

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

@@ -50,7 +50,7 @@ type
 
 
     FGXDisplayIsOpen: Boolean;
     FGXDisplayIsOpen: Boolean;
 
 
-    FTitle: string;
+    FTitle: AnsiString;
 
 
     FDisplayWidth: Integer;
     FDisplayWidth: Integer;
     FDisplayHeight: Integer;
     FDisplayHeight: Integer;
@@ -65,22 +65,22 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; 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
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
                    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;
                    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;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure Close; override;
 
 
@@ -115,8 +115,8 @@ type
     procedure Clear(AColor: IPTCColor;
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
                     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 Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;
     procedure Clip(AArea: IPTCArea); override;

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

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

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

@@ -49,7 +49,7 @@ type
     FOpen: Boolean;
     FOpen: Boolean;
     FLocked: Boolean;
     FLocked: Boolean;
 
 
-    FTitle: string;
+    FTitle: AnsiString;
 
 
     FDisplayWidth: Integer;
     FDisplayWidth: Integer;
     FDisplayHeight: Integer;
     FDisplayHeight: Integer;
@@ -63,22 +63,22 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; 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
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
                    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;
                    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;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure Close; override;
 
 
@@ -113,8 +113,8 @@ type
     procedure Clear(AColor: IPTCColor;
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
                     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 Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;
     procedure Clip(AArea: IPTCArea); override;

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

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

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

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

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

@@ -34,7 +34,7 @@ type
   TX11Console = class(TPTCBaseConsole)
   TX11Console = class(TPTCBaseConsole)
   private
   private
     FX11Display: TX11Display;
     FX11Display: TX11Display;
-    FTitle: string;
+    FTitle: AnsiString;
     FFlags: TX11Flags;
     FFlags: TX11Flags;
     FModes: array of IPTCMode;
     FModes: array of IPTCMode;
 
 
@@ -50,21 +50,21 @@ type
     function GetArea: IPTCArea; override;
     function GetArea: IPTCArea; override;
     function GetFormat: IPTCFormat; override;
     function GetFormat: IPTCFormat; override;
     function GetPages: Integer; 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;
     function GetOpenGL_Enabled: Boolean; override;
     procedure SetOpenGL_Enabled(AValue: Boolean); override;
     procedure SetOpenGL_Enabled(AValue: Boolean); override;
   public
   public
     constructor Create; override;
     constructor Create; override;
     destructor Destroy; 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;
                    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;
                    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;
                    APages: Integer = 0); overload; override;
     procedure Close; override;
     procedure Close; override;
 
 
@@ -101,8 +101,8 @@ type
     procedure Clear(AColor: IPTCColor;
     procedure Clear(AColor: IPTCColor;
                     AArea: IPTCArea); override;
                     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 Palette(APalette: IPTCPalette); override;
     procedure Clip(AArea: IPTCArea); override;
     procedure Clip(AArea: IPTCArea); override;

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

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

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

@@ -61,7 +61,7 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 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
 var
   vml: PXF86VidModeModeLine;
   vml: PXF86VidModeModeLine;
   dotclock: Integer;
   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;
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); override;
     destructor Destroy; 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(w: TWindow; _format: IPTCFormat); override;
     procedure Open(_window: TWindow; _format: IPTCFormat; x, y, w, h: Integer); override;
     procedure Open(_window: TWindow; _format: IPTCFormat; x, y, w, h: Integer); override;
     procedure Close; override;
     procedure Close; override;

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

@@ -61,9 +61,9 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 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
   begin
     Result := '';
     Result := '';
     if (AFlags and XDGAConcurrentAccess) <> 0 then
     if (AFlags and XDGAConcurrentAccess) <> 0 then
@@ -84,7 +84,7 @@ procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat
       Delete(Result, 1, 1);
       Delete(Result, 1, 1);
   end;
   end;
   
   
-  function ViewportFlagsToString(AViewportFlags: cint): string;
+  function ViewportFlagsToString(AViewportFlags: cint): AnsiString;
   begin
   begin
     Result := '';
     Result := '';
     if (AViewportFlags and XDGAFlipRetrace) <> 0 then
     if (AViewportFlags and XDGAFlipRetrace) <> 0 then
@@ -95,7 +95,7 @@ procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat
       Delete(Result, 1, 1);
       Delete(Result, 1, 1);
   end;
   end;
   
   
-  function ByteOrderToString(AByteOrder: cint): string;
+  function ByteOrderToString(AByteOrder: cint): AnsiString;
   begin
   begin
     case AByteOrder of
     case AByteOrder of
       LSBFirst: Result := ' (LSBFirst)';
       LSBFirst: Result := ' (LSBFirst)';
@@ -105,7 +105,7 @@ procedure TX11DGA2Display.Open(ATitle: string; AWidth, AHeight: Integer; AFormat
     end;
     end;
   end;
   end;
 
 
-  function VisualClassToString(AVisualClass: cshort): string;
+  function VisualClassToString(AVisualClass: cshort): AnsiString;
   begin
   begin
     case AVisualClass of
     case AVisualClass of
       StaticGray: Result := ' (StaticGray)';
       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;
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); virtual;
     destructor Destroy; override;
     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
     { This will always return a windowed console. The first version
       fills the whole window, the second one has a custom size }
       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;
   modkeys: TPTCModifierKeys;
   uni: Integer;
   uni: Integer;
   key: TPTCKeyEvent;
   key: TPTCKeyEvent;
-  buf: array [1..16] of Char;
+  buf: array [1..16] of AnsiChar;
   lslen: cint;
   lslen: cint;
   status: TStatus;
   status: TStatus;
   eaten_by_im: Boolean = False;
   eaten_by_im: Boolean = False;

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

@@ -154,7 +154,7 @@ end;
 
 
 procedure TX11GLXFBConfig.SetSwapInterval(AInterval: Integer);
 procedure TX11GLXFBConfig.SetSwapInterval(AInterval: Integer);
 
 
-  function GlxResult2String(AGlxResult: cint): string;
+  function GlxResult2String(AGlxResult: cint): AnsiString;
   begin
   begin
     case AGlxResult of
     case AGlxResult of
       GLX_BAD_VALUE:   Result := 'GLX_BAD_VALUE';
       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;
                   AWidth, AHeight: Integer); virtual; abstract;
     function Lock: Pointer; virtual; abstract;
     function Lock: Pointer; virtual; abstract;
     function Pitch: Integer; virtual; abstract;
     function Pitch: Integer; virtual; abstract;
-    function Name: string; virtual; abstract;
+    function Name: AnsiString; virtual; abstract;
   end;
   end;
 
 
   TX11NormalImage = class(TX11Image)
   TX11NormalImage = class(TX11Image)
@@ -57,7 +57,7 @@ type
                   AWidth, AHeight: Integer); override;
                   AWidth, AHeight: Integer); override;
     function Lock: Pointer; override;
     function Lock: Pointer; override;
     function Pitch: Integer; override;
     function Pitch: Integer; override;
-    function Name: string; override;
+    function Name: AnsiString; override;
   end;
   end;
 
 
 {$IFDEF ENABLE_X11_EXTENSION_XSHM}
 {$IFDEF ENABLE_X11_EXTENSION_XSHM}
@@ -73,6 +73,6 @@ type
                   AWidth, AHeight: Integer); override;
                   AWidth, AHeight: Integer); override;
     function Lock: Pointer; override;
     function Lock: Pointer; override;
     function Pitch: Integer; override;
     function Pitch: Integer; override;
-    function Name: string; override;
+    function Name: AnsiString; override;
   end;
   end;
 {$ENDIF ENABLE_X11_EXTENSION_XSHM}
 {$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);
 constructor TX11NormalImage.Create(ADisplay: PDisplay; AScreen, AWidth, AHeight: Integer; AFormat: IPTCFormat);
 var
 var
   xpad, xpitch: Integer;
   xpad, xpitch: Integer;
-  tmp_FPixels: PChar;
+  tmp_FPixels: PAnsiChar;
 begin
 begin
   inherited;
   inherited;
 
 
@@ -98,7 +98,7 @@ begin
   Result := FImage^.bytes_per_line;
   Result := FImage^.bytes_per_line;
 end;
 end;
 
 
-function TX11NormalImage.Name: string;
+function TX11NormalImage.Name: AnsiString;
 begin
 begin
   Result := 'XImage';
   Result := 'XImage';
 end;
 end;
@@ -201,7 +201,7 @@ begin
   Result := FImage^.bytes_per_line;
   Result := FImage^.bytes_per_line;
 end;
 end;
 
 
-function TX11ShmImage.Name: string;
+function TX11ShmImage.Name: AnsiString;
 begin
 begin
   Result := 'MIT-Shm';
   Result := 'MIT-Shm';
 end;
 end;

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

@@ -89,7 +89,7 @@ type
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); override;
     constructor Create(ADisplay: PDisplay; AScreen: Integer; const AFlags: TX11Flags); override;
     destructor Destroy; 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); override;
     procedure Open(AWindow: TWindow; AFormat: IPTCFormat; AX, AY, AWidth, AHeight: Integer); override;
     procedure Open(AWindow: TWindow; AFormat: IPTCFormat; AX, AY, AWidth, AHeight: Integer); override;
     procedure Close; override;
     procedure Close; override;

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

@@ -80,10 +80,10 @@ begin
 end;
 end;
 
 
 {$warning remove, when fix added to xlib}
 {$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
 const
   LC_ALL = 6;}
   LC_ALL = 6;}
 
 
@@ -96,7 +96,7 @@ var
   attr: TXSetWindowAttributes;
   attr: TXSetWindowAttributes;
   AttrMask: culong;
   AttrMask: culong;
   size_hints: PXSizeHints;
   size_hints: PXSizeHints;
-  tmppchar: PChar;
+  tmppchar: PAnsiChar;
   tmpArrayOfCLong: array [1..1] of clong;
   tmpArrayOfCLong: array [1..1] of clong;
   tmpPixmap: TPixmap;
   tmpPixmap: TPixmap;
   BlackColor: TXColor;
   BlackColor: TXColor;
@@ -108,8 +108,9 @@ var
 {$ENDIF ENABLE_X11_EXTENSION_XINPUT2}
 {$ENDIF ENABLE_X11_EXTENSION_XINPUT2}
   selected_im_style: TXIMStyle = 0;
   selected_im_style: TXIMStyle = 0;
   im_event_mask: clong = 0;
   im_event_mask: clong = 0;
+  lTitle : UTF8String;
 
 
-  function IMStyleToStr(style: TXIMStyle): string;
+  function IMStyleToStr(style: TXIMStyle): AnsiString;
   begin
   begin
     Result := '';
     Result := '';
     if (style and XIMPreeditArea) <> 0 then
     if (style and XIMPreeditArea) <> 0 then
@@ -141,7 +142,7 @@ var
 {    PreferredStyle = XIMPreeditNone or XIMStatusNone;}
 {    PreferredStyle = XIMPreeditNone or XIMStatusNone;}
   var
   var
     im_supported_styles: PXIMStyles;
     im_supported_styles: PXIMStyles;
-    locale_modifiers: PChar;
+    locale_modifiers: PAnsiChar;
     I: Integer;
     I: Integer;
   begin
   begin
 {    LOG('setting locale');
 {    LOG('setting locale');
@@ -298,7 +299,12 @@ begin
   end;
   end;
 
 
   { Set window title }
   { 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');
   X11Check(XStringListToTextProperty(@tmppchar, 1, @textprop), 'XStringListToTextProperty');
   try
   try
     XSetWMName(FDisplay, FWindow, @textprop);
     XSetWMName(FDisplay, FWindow, @textprop);

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

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

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

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

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

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