瀏覽代碼

* Char -> AnsiChar

Michael VAN CANNEYT 2 年之前
父節點
當前提交
a5ad266065
共有 10 個文件被更改,包括 89 次插入89 次删除
  1. 1 1
      rtl/win16/classes.pp
  2. 15 15
      rtl/win16/dos.pp
  3. 3 3
      rtl/win16/sysdir.inc
  4. 1 1
      rtl/win16/sysdl.inc
  5. 7 7
      rtl/win16/sysfile.inc
  6. 15 15
      rtl/win16/system.pp
  7. 18 18
      rtl/win16/sysutils.pp
  8. 5 5
      rtl/win16/win31.pp
  9. 9 9
      rtl/win16/winprocsh.inc
  10. 15 15
      rtl/win16/wintypes.inc

+ 1 - 1
rtl/win16/classes.pp

@@ -58,7 +58,7 @@ type
 {$endif FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
 {$endif FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
 
 
 {$if defined(FPC_MM_TINY) or defined(FPC_MM_SMALL) or defined(FPC_MM_MEDIUM)}
 {$if defined(FPC_MM_TINY) or defined(FPC_MM_SMALL) or defined(FPC_MM_MEDIUM)}
-function FindResource(hInstance: HINST; lpName, lpType: PChar): HRSRC; inline;
+function FindResource(hInstance: HINST; lpName, lpType: PAnsiChar): HRSRC; inline;
 begin
 begin
   Result:=WinProcs.FindResource(hInstance,FarAddr(lpName^),FarAddr(lpType^));
   Result:=WinProcs.FindResource(hInstance,FarAddr(lpName^),FarAddr(lpType^));
 end;
 end;

+ 15 - 15
rtl/win16/dos.pp

@@ -76,7 +76,7 @@ uses
 
 
 type
 type
   PFarByte = ^Byte;far;
   PFarByte = ^Byte;far;
-  PFarChar = ^Char;far;
+  PFarChar = ^AnsiChar;far;
   PFarWord = ^Word;far;
   PFarWord = ^Word;far;
 
 
 {$DEFINE HAS_GETMSCOUNT}
 {$DEFINE HAS_GETMSCOUNT}
@@ -217,7 +217,7 @@ end;
 procedure exec_ansistring(path : string;comline : ansistring);
 procedure exec_ansistring(path : string;comline : ansistring);
 var
 var
   c: ansistring;
   c: ansistring;
-  pc: PChar;
+  pc: PAnsiChar;
   p: string;
   p: string;
   winexec_result: Word;
   winexec_result: Word;
   m: MSG;
   m: MSG;
@@ -230,7 +230,7 @@ begin
     c:='"'+p+'" '+comline
     c:='"'+p+'" '+comline
   else
   else
     c:=p+' '+comline;
     c:=p+' '+comline;
-  pc:=PChar(c);
+  pc:=PAnsiChar(c);
   winexec_result:=WinExec(FarAddr(pc^),SW_SHOW);
   winexec_result:=WinExec(FarAddr(pc^),SW_SHOW);
   if winexec_result<32 then
   if winexec_result<32 then
   begin
   begin
@@ -559,7 +559,7 @@ var
   lfnfile : text;
   lfnfile : text;
 {$endif DEBUG_LFN}
 {$endif DEBUG_LFN}
 
 
-procedure LFNFindFirst(path:pchar;attr:longint;var s:searchrec);
+procedure LFNFindFirst(path:PAnsiChar;attr:longint;var s:searchrec);
 var
 var
   w : LFNSearchRec;
   w : LFNSearchRec;
 begin
 begin
@@ -660,7 +660,7 @@ begin
 end;
 end;
 
 
 
 
-procedure DosFindfirst(path : pchar;attr : word;var f : searchrec);
+procedure DosFindfirst(path : PAnsiChar;attr : word;var f : searchrec);
 begin
 begin
   { allow slash as backslash }
   { allow slash as backslash }
   DoDirSeparators(path);
   DoDirSeparators(path);
@@ -701,7 +701,7 @@ end;
 
 
 procedure findfirst(const path : pathstr;attr : word;var f : searchRec);
 procedure findfirst(const path : pathstr;attr : word;var f : searchRec);
 var
 var
-  path0 : array[0..255] of char;
+  path0 : array[0..255] of AnsiChar;
 begin
 begin
   doserror:=0;
   doserror:=0;
   strpcopy(path0,path);
   strpcopy(path0,path);
@@ -801,7 +801,7 @@ end;
 { change to short filename if successful DOS call PM }
 { change to short filename if successful DOS call PM }
 function GetShortName(var p : String) : boolean;
 function GetShortName(var p : String) : boolean;
 var
 var
-  c : array[0..255] of char;
+  c : array[0..255] of AnsiChar;
 begin
 begin
   move(p[1],c[0],length(p));
   move(p[1],c[0],length(p));
   c[length(p)]:=#0;
   c[length(p)]:=#0;
@@ -817,7 +817,7 @@ begin
   if DosError=0 then
   if DosError=0 then
    begin
    begin
      move(c[0],p[1],strlen(c));
      move(c[0],p[1],strlen(c));
-     p[0]:=char(strlen(c));
+     p[0]:=AnsiChar(strlen(c));
      GetShortName:=true;
      GetShortName:=true;
    end
    end
   else
   else
@@ -828,7 +828,7 @@ end;
 { change to long filename if successful DOS call PM }
 { change to long filename if successful DOS call PM }
 function GetLongName(var p : String) : boolean;
 function GetLongName(var p : String) : boolean;
 var
 var
-  c : array[0..260] of char;
+  c : array[0..260] of AnsiChar;
 begin
 begin
   move(p[1],c[0],length(p));
   move(p[1],c[0],length(p));
   c[length(p)]:=#0;
   c[length(p)]:=#0;
@@ -845,7 +845,7 @@ begin
    begin
    begin
      c[255]:=#0;
      c[255]:=#0;
      move(c[0],p[1],strlen(c));
      move(c[0],p[1],strlen(c));
-     p[0]:=char(strlen(c));
+     p[0]:=AnsiChar(strlen(c));
      GetLongName:=true;
      GetLongName:=true;
    end
    end
   else
   else
@@ -882,7 +882,7 @@ end;
 
 
 procedure getfattr(var f;var attr : word);
 procedure getfattr(var f;var attr : word);
 var
 var
-  path: pchar;
+  path: PAnsiChar;
 {$ifndef FPC_ANSI_TEXTFILEREC}
 {$ifndef FPC_ANSI_TEXTFILEREC}
   r: rawbytestring;
   r: rawbytestring;
 {$endif not FPC_ANSI_TEXTFILEREC}
 {$endif not FPC_ANSI_TEXTFILEREC}
@@ -891,7 +891,7 @@ begin
   path:=@filerec(f).Name;
   path:=@filerec(f).Name;
 {$else}
 {$else}
   r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
   r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
-  path:=pchar(r);
+  path:=PAnsiChar(r);
 {$endif}
 {$endif}
   dosregs.dx:=Ofs(path^);
   dosregs.dx:=Ofs(path^);
   dosregs.ds:=Seg(path^);
   dosregs.ds:=Seg(path^);
@@ -911,7 +911,7 @@ end;
 
 
 procedure setfattr(var f;attr : word);
 procedure setfattr(var f;attr : word);
 var
 var
-  path: pchar;
+  path: PAnsiChar;
 {$ifndef FPC_ANSI_TEXTFILEREC}
 {$ifndef FPC_ANSI_TEXTFILEREC}
   r: rawbytestring;
   r: rawbytestring;
 {$endif not FPC_ANSI_TEXTFILEREC}
 {$endif not FPC_ANSI_TEXTFILEREC}
@@ -926,7 +926,7 @@ begin
   path:=@filerec(f).Name;
   path:=@filerec(f).Name;
 {$else}
 {$else}
   r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
   r:=ToSingleByteFileSystemEncodedFileName(filerec(f).Name);
-  path:=pchar(r);
+  path:=PAnsiChar(r);
 {$endif}
 {$endif}
   dosregs.dx:=Ofs(path);
   dosregs.dx:=Ofs(path);
   dosregs.ds:=Seg(path);
   dosregs.ds:=Seg(path);
@@ -951,7 +951,7 @@ end;
 function GetEnvStr(EnvNo: Integer; var OutEnvStr: string): integer;
 function GetEnvStr(EnvNo: Integer; var OutEnvStr: string): integer;
 var
 var
   dos_env_ptr: LPSTR;
   dos_env_ptr: LPSTR;
-  Ch: Char;
+  Ch: AnsiChar;
 begin
 begin
   dos_env_ptr := GetDOSEnvironment;
   dos_env_ptr := GetDOSEnvironment;
   GetEnvStr := 1;
   GetEnvStr := 1;

+ 3 - 3
rtl/win16/sysdir.inc

@@ -90,7 +90,7 @@ end;
 
 
 procedure do_GetDir (DriveNr: byte; var Dir: RawByteString);
 procedure do_GetDir (DriveNr: byte; var Dir: RawByteString);
 var
 var
-  temp : array[0..260] of char;
+  temp : array[0..260] of AnsiChar;
   i    : integer;
   i    : integer;
   regs : Registers;
   regs : Registers;
 begin
 begin
@@ -106,7 +106,7 @@ begin
   if (regs.Flags and fCarry) <> 0 then
   if (regs.Flags and fCarry) <> 0 then
    Begin
    Begin
      GetInOutRes (regs.AX);
      GetInOutRes (regs.AX);
-     Dir := char (DriveNr + 64) + ':\';
+     Dir := AnsiChar (DriveNr + 64) + ':\';
      SetCodePage (Dir,DefaultFileSystemCodePage,false);
      SetCodePage (Dir,DefaultFileSystemCodePage,false);
      exit;
      exit;
    end
    end
@@ -130,7 +130,7 @@ begin
   if not FileNameCasePreserving then
   if not FileNameCasePreserving then
    dir:=upcase(dir);
    dir:=upcase(dir);
   if drivenr<>0 then   { Drive was supplied. We know it }
   if drivenr<>0 then   { Drive was supplied. We know it }
-   dir[1]:=char(65+drivenr-1)
+   dir[1]:=AnsiChar(65+drivenr-1)
   else
   else
    begin
    begin
    { We need to get the current drive from DOS function 19H  }
    { We need to get the current drive from DOS function 19H  }

+ 1 - 1
rtl/win16/sysdl.inc

@@ -57,7 +57,7 @@ begin
   Result:=true;
   Result:=true;
 end;
 end;
 
 
-function SysGetLoadErrorStr: string;
+function SysGetLoadErrorStr: ansistring;
 var
 var
   rc,c : integer;
   rc,c : integer;
   temp: WideString;
   temp: WideString;

+ 7 - 7
rtl/win16/sysfile.inc

@@ -19,7 +19,7 @@
    var
    var
       openfiles : array [0..max_files-1] of boolean;
       openfiles : array [0..max_files-1] of boolean;
 {$ifdef SYSTEMDEBUG}
 {$ifdef SYSTEMDEBUG}
-      opennames : array [0..max_files-1] of pchar;
+      opennames : array [0..max_files-1] of PAnsiChar;
    const
    const
       free_closed_names : boolean = true;
       free_closed_names : boolean = true;
 {$endif SYSTEMDEBUG}
 {$endif SYSTEMDEBUG}
@@ -55,10 +55,10 @@ begin
 end;
 end;
 
 
 
 
-procedure do_erase(p : pchar; pchangeable: boolean);
+procedure do_erase(p : PAnsiChar; pchangeable: boolean);
 var
 var
   regs : Registers;
   regs : Registers;
-  oldp : pchar;
+  oldp : PAnsiChar;
 begin
 begin
   oldp:=p;
   oldp:=p;
   DoDirSeparators(p,pchangeable);
   DoDirSeparators(p,pchangeable);
@@ -79,10 +79,10 @@ begin
 end;
 end;
 
 
 
 
-procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean);
+procedure do_rename(p1,p2 : PAnsiChar; p1changeable, p2changeable: boolean);
 var
 var
   regs : Registers;
   regs : Registers;
-  oldp1, oldp2 : pchar;
+  oldp1, oldp2 : PAnsiChar;
 begin
 begin
   oldp1:=p1;
   oldp1:=p1;
   oldp2:=p2;
   oldp2:=p2;
@@ -250,7 +250,7 @@ begin
     Increase_file_handle_count:=true;
     Increase_file_handle_count:=true;
 end;
 end;
 
 
-procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);
+procedure do_open(var f;p:PAnsiChar;flags:longint; pchangeable: boolean);
 {
 {
   filerec and textrec have both handle and mode as the first items so
   filerec and textrec have both handle and mode as the first items so
   they could use the same routine for opening/creating.
   they could use the same routine for opening/creating.
@@ -261,7 +261,7 @@ procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);
 var
 var
   regs   : Registers;
   regs   : Registers;
   action : word;
   action : word;
-  oldp : pchar;
+  oldp : PAnsiChar;
 begin
 begin
   ZeroSegRegs(regs);
   ZeroSegRegs(regs);
 { close first if opened }
 { close first if opened }

+ 15 - 15
rtl/win16/system.pp

@@ -35,8 +35,8 @@ const
   DriveSeparator = ':';
   DriveSeparator = ':';
   ExtensionSeparator = '.';
   ExtensionSeparator = '.';
   PathSeparator = ';';
   PathSeparator = ';';
-  AllowDirectorySeparators : set of char = ['\','/'];
-  AllowDriveSeparators : set of char = [':'];
+  AllowDirectorySeparators : set of AnsiChar = ['\','/'];
+  AllowDriveSeparators : set of AnsiChar = [':'];
   { FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
   { FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
   maxExitCode = 255;
   maxExitCode = 255;
   MaxPathLen = 256;
   MaxPathLen = 256;
@@ -62,9 +62,9 @@ const
   segB800: Word = $B800;}
   segB800: Word = $B800;}
 
 
 type
 type
-  LPSTR = ^Char;far;
-  PFarChar = ^Char;far;
-  PHugeChar = ^Char;huge;
+  LPSTR = ^AnsiChar;far;
+  PFarChar = ^AnsiChar;far;
+  PHugeChar = ^AnsiChar;huge;
 
 
 var
 var
 { Mem[] support }
 { Mem[] support }
@@ -73,7 +73,7 @@ var
   meml : array[0..($7fff div sizeof(longint))-1] of longint absolute $0:$0;
   meml : array[0..($7fff div sizeof(longint))-1] of longint absolute $0:$0;
 { C-compatible arguments and environment }
 { C-compatible arguments and environment }
   argc:smallint; //!! public name 'operatingsystem_parameter_argc';
   argc:smallint; //!! public name 'operatingsystem_parameter_argc';
-  argv:PPchar; //!! public name 'operatingsystem_parameter_argv';
+  argv:PPAnsiChar; //!! public name 'operatingsystem_parameter_argv';
 
 
 { The DOS Program Segment Prefix segment (TP7 compatibility) }
 { The DOS Program Segment Prefix segment (TP7 compatibility) }
   PrefixSeg:Word;public name '__fpc_PrefixSeg';
   PrefixSeg:Word;public name '__fpc_PrefixSeg';
@@ -232,14 +232,14 @@ end;
 procedure setup_arguments;
 procedure setup_arguments;
 var
 var
   I: SmallInt;
   I: SmallInt;
-  pc: PChar;
+  pc: PAnsiChar;
   pfc: PFarChar;
   pfc: PFarChar;
-  quote: Char;
+  quote: AnsiChar;
   count: SmallInt;
   count: SmallInt;
   arglen, argv0len: SmallInt;
   arglen, argv0len: SmallInt;
-  argblock: PChar;
-  arg: PChar;
-  argv0_arr: array [0..255] of Char;
+  argblock: PAnsiChar;
+  arg: PAnsiChar;
+  argv0_arr: array [0..255] of AnsiChar;
 {$IfDef SYSTEM_DEBUG_STARTUP}
 {$IfDef SYSTEM_DEBUG_STARTUP}
   debug_output: Text;
   debug_output: Text;
 {$EndIf}
 {$EndIf}
@@ -322,7 +322,7 @@ begin
     end;
     end;
   { set argc and allocate argv }
   { set argc and allocate argv }
   argc:=count;
   argc:=count;
-  argv:=AllocMem((count+1)*SizeOf(PChar));
+  argv:=AllocMem((count+1)*SizeOf(PAnsiChar));
   { allocate a single memory block for all arguments }
   { allocate a single memory block for all arguments }
   argblock:=GetMem(arglen);
   argblock:=GetMem(arglen);
   { create argv[0] }
   { create argv[0] }
@@ -458,7 +458,7 @@ const
   ErrorBufferLength = 1024;
   ErrorBufferLength = 1024;
   ErrorMessageBoxFlags = MB_OK or MB_ICONHAND or MB_TASKMODAL;
   ErrorMessageBoxFlags = MB_OK or MB_ICONHAND or MB_TASKMODAL;
 var
 var
-  ErrorBuf : array[0..ErrorBufferLength] of char;
+  ErrorBuf : array[0..ErrorBufferLength] of AnsiChar;
   ErrorLen : SizeInt;
   ErrorLen : SizeInt;
 
 
 procedure ErrorWrite(Var F: TextRec);
 procedure ErrorWrite(Var F: TextRec);
@@ -583,8 +583,8 @@ end;
 function CheckLFN:boolean;
 function CheckLFN:boolean;
 var
 var
   regs     : Registers;
   regs     : Registers;
-  RootName : pchar;
-  buf      : array [0..31] of char;
+  RootName : PAnsiChar;
+  buf      : array [0..31] of AnsiChar;
 begin
 begin
 { Check LFN API on drive c:\ }
 { Check LFN API on drive c:\ }
   RootName:='C:\';
   RootName:='C:\';

+ 18 - 18
rtl/win16/sysutils.pp

@@ -54,14 +54,14 @@ implementation
 function ExtractShortPathName(Const FileName : RawByteString) : RawByteString;
 function ExtractShortPathName(Const FileName : RawByteString) : RawByteString;
 var
 var
   Regs: registers;
   Regs: registers;
-  c: array [0..255] of Char;
+  c: array [0..255] of AnsiChar;
 begin
 begin
   if LFNSupport then
   if LFNSupport then
     begin
     begin
       Regs.ax:=$7160;
       Regs.ax:=$7160;
       Regs.cx:=1;
       Regs.cx:=1;
-      Regs.ds:=Seg(PChar(FileName)^);
-      Regs.si:=Ofs(PChar(FileName)^);
+      Regs.ds:=Seg(PAnsiChar(FileName)^);
+      Regs.si:=Ofs(PAnsiChar(FileName)^);
       Regs.es:=Seg(c);
       Regs.es:=Seg(c);
       Regs.di:=Ofs(c);
       Regs.di:=Ofs(c);
       MsDos(Regs);
       MsDos(Regs);
@@ -84,7 +84,7 @@ end;
 {$i sysutils.inc}
 {$i sysutils.inc}
 
 
 type
 type
-  PFarChar=^Char;far;
+  PFarChar=^AnsiChar;far;
   PPFarChar=^PFarChar;
   PPFarChar=^PFarChar;
 var
 var
   dos_env_count:smallint;external name '__dos_env_count';
   dos_env_count:smallint;external name '__dos_env_count';
@@ -130,7 +130,7 @@ begin
     begin
     begin
       Regs.ax := $716c;                    { Use LFN Open/Create API }
       Regs.ax := $716c;                    { Use LFN Open/Create API }
       Regs.dx := Action;                   { Action if file does/doesn't exist }
       Regs.dx := Action;                   { Action if file does/doesn't exist }
-      Regs.si := Ofs(PChar(FileName)^);
+      Regs.si := Ofs(PAnsiChar(FileName)^);
       Regs.bx := $2000 + (Mode and $ff);   { File open mode }
       Regs.bx := $2000 + (Mode and $ff);   { File open mode }
     end
     end
   else
   else
@@ -139,9 +139,9 @@ begin
         Regs.ax := $3c00                   { Map to Create/Replace API }
         Regs.ax := $3c00                   { Map to Create/Replace API }
       else
       else
         Regs.ax := $3d00 + (Mode and $ff); { Map to Open_Existing API }
         Regs.ax := $3d00 + (Mode and $ff); { Map to Open_Existing API }
-      Regs.dx := Ofs(PChar(FileName)^);
+      Regs.dx := Ofs(PAnsiChar(FileName)^);
     end;
     end;
-  Regs.Ds := Seg(PChar(FileName)^);
+  Regs.Ds := Seg(PAnsiChar(FileName)^);
   Regs.cx := $20;                          { Attributes }
   Regs.cx := $20;                          { Attributes }
   Regs.Es := 0;  { because protected mode }
   Regs.Es := 0;  { because protected mode }
   MsDos(Regs);
   MsDos(Regs);
@@ -486,8 +486,8 @@ Function FileGetAttr (Const FileName : RawByteString) : Longint;
 var
 var
   Regs: registers;
   Regs: registers;
 begin
 begin
-  Regs.dx := Ofs(PChar(FileName)^);
-  Regs.Ds := Seg(PChar(FileName)^);
+  Regs.dx := Ofs(PAnsiChar(FileName)^);
+  Regs.Ds := Seg(PAnsiChar(FileName)^);
   Regs.Es := 0;  { because protected mode }
   Regs.Es := 0;  { because protected mode }
   if LFNSupport then
   if LFNSupport then
    begin
    begin
@@ -508,8 +508,8 @@ Function FileSetAttr (Const Filename : RawByteString; Attr: longint) : Longint;
 var
 var
   Regs: registers;
   Regs: registers;
 begin
 begin
-  Regs.dx := Ofs(PChar(FileName)^);
-  Regs.Ds := Seg(PChar(FileName)^);
+  Regs.dx := Ofs(PAnsiChar(FileName)^);
+  Regs.Ds := Seg(PAnsiChar(FileName)^);
   Regs.Es := 0;  { because protected mode }
   Regs.Es := 0;  { because protected mode }
   if LFNSupport then
   if LFNSupport then
     begin
     begin
@@ -531,8 +531,8 @@ Function DeleteFile (Const FileName : RawByteString) : Boolean;
 var
 var
   Regs: registers;
   Regs: registers;
 begin
 begin
-  Regs.dx := Ofs(PChar(FileName)^);
-  Regs.Ds := Seg(PChar(FileName)^);
+  Regs.dx := Ofs(PAnsiChar(FileName)^);
+  Regs.Ds := Seg(PAnsiChar(FileName)^);
   Regs.Es := 0;  { because protected mode }
   Regs.Es := 0;  { because protected mode }
   if LFNSupport then
   if LFNSupport then
     Regs.ax := $7141
     Regs.ax := $7141
@@ -549,10 +549,10 @@ Function RenameFile (Const OldName, NewName : RawByteString) : Boolean;
 var
 var
   Regs: registers;
   Regs: registers;
 begin
 begin
-  Regs.dx := Ofs(PChar(OldName)^);
-  Regs.Ds := Seg(PChar(OldName)^);
-  Regs.di := Ofs(PChar(NewName)^);
-  Regs.Es := Seg(PChar(NewName)^);
+  Regs.dx := Ofs(PAnsiChar(OldName)^);
+  Regs.Ds := Seg(PAnsiChar(OldName)^);
+  Regs.di := Ofs(PAnsiChar(NewName)^);
+  Regs.Es := Seg(PAnsiChar(NewName)^);
   if LFNSupport then
   if LFNSupport then
     Regs.ax := $7156
     Regs.ax := $7156
   else
   else
@@ -738,7 +738,7 @@ end;
 
 
 procedure InitAnsi;
 procedure InitAnsi;
 type
 type
-  PFarChar = ^char; far;
+  PFarChar = ^AnsiChar; far;
 var
 var
   CountryInfo: TCountryInfo; i: integer;
   CountryInfo: TCountryInfo; i: integer;
 begin
 begin

+ 5 - 5
rtl/win16/win31.pp

@@ -112,7 +112,7 @@ type
     flags: UINT;
     flags: UINT;
     dwOptions: DWORD;
     dwOptions: DWORD;
     dwFilter: DWORD;
     dwFilter: DWORD;
-    achAllocModule: array [0..7] of char;
+    achAllocModule: array [0..7] of AnsiChar;
     dwAllocBreak: DWORD;
     dwAllocBreak: DWORD;
     dwAllocCount: DWORD;
     dwAllocCount: DWORD;
   end;
   end;
@@ -307,8 +307,8 @@ type
   LPENUMLOGFONT = ^ENUMLOGFONT; far;
   LPENUMLOGFONT = ^ENUMLOGFONT; far;
   ENUMLOGFONT = record
   ENUMLOGFONT = record
     elfLogFont: LOGFONT;
     elfLogFont: LOGFONT;
-    elfFullName: array [0..LF_FULLFACESIZE-1] of char;
-    elfStyle: array [0..LF_FACESIZE-1] of char;
+    elfFullName: array [0..LF_FULLFACESIZE-1] of AnsiChar;
+    elfStyle: array [0..LF_FACESIZE-1] of AnsiChar;
   end;
   end;
   TEnumLogFont = ENUMLOGFONT;
   TEnumLogFont = ENUMLOGFONT;
 
 
@@ -824,7 +824,7 @@ type
     length: UINT;
     length: UINT;
     hDriver: HDRVR;
     hDriver: HDRVR;
     hModule: HINST;
     hModule: HINST;
-    szAliasName: array [0..127] of char;
+    szAliasName: array [0..127] of AnsiChar;
   end;
   end;
   TDriverInfoStruct = DRIVERINFOSTRUCT;
   TDriverInfoStruct = DRIVERINFOSTRUCT;
 
 
@@ -861,7 +861,7 @@ function IsTask(Task: HTASK): BOOL; external 'KERNEL';
 function _hread(FileHandle: HFILE; Buffer: HugePointer; Bytes: LongInt): LongInt; external 'KERNEL';
 function _hread(FileHandle: HFILE; Buffer: HugePointer; Bytes: LongInt): LongInt; external 'KERNEL';
 function _hwrite(FileHandle: HFILE; Buffer: HugePointer; Bytes: LongInt): LongInt; external 'KERNEL';
 function _hwrite(FileHandle: HFILE; Buffer: HugePointer; Bytes: LongInt): LongInt; external 'KERNEL';
 
 
-{ International & Char Translation Support }
+{ International & AnsiChar Translation Support }
 
 
 function lstrcpyn(lpszString1: LPSTR; lpszString2: LPCSTR; cChars: SmallInt): LPSTR; external 'KERNEL';
 function lstrcpyn(lpszString1: LPSTR; lpszString2: LPCSTR; cChars: SmallInt): LPSTR; external 'KERNEL';
 procedure hmemcpy(hpvDest, hpvSource: HugePointer; cbCopy: LongInt); external 'KERNEL';
 procedure hmemcpy(hpvDest, hpvSource: HugePointer; cbCopy: LongInt); external 'KERNEL';

+ 9 - 9
rtl/win16/winprocsh.inc

@@ -193,8 +193,8 @@ function _lwrite(FileHandle: HFILE; Buffer: HugePointer; Bytes: UINT): UINT; ext
 function _lwrite(FileHandle: HFILE; Buffer: FarPointer; Bytes: UINT): UINT; external 'KERNEL';
 function _lwrite(FileHandle: HFILE; Buffer: FarPointer; Bytes: UINT): UINT; external 'KERNEL';
 
 
 function GetTempFileName(DriveLetter: BYTE; PrefixString: LPCSTR; Unique: UINT; TempFileName: LPSTR): SmallInt; external 'KERNEL';
 function GetTempFileName(DriveLetter: BYTE; PrefixString: LPCSTR; Unique: UINT; TempFileName: LPSTR): SmallInt; external 'KERNEL';
-function GetTempFileName(DriveLetter: Char; PrefixString: LPCSTR; Unique: UINT; TempFileName: LPSTR): SmallInt; external 'KERNEL';
-function GetTempDrive(DriveLetter: Char): BYTE; external 'KERNEL';
+function GetTempFileName(DriveLetter: AnsiChar; PrefixString: LPCSTR; Unique: UINT; TempFileName: LPSTR): SmallInt; external 'KERNEL';
+function GetTempDrive(DriveLetter: AnsiChar): BYTE; external 'KERNEL';
 
 
 function GetDriveType(Drive: SmallInt): UINT; external 'KERNEL';
 function GetDriveType(Drive: SmallInt): UINT; external 'KERNEL';
 
 
@@ -246,7 +246,7 @@ function GetAtomHandle(atm: ATOM): HLOCAL; external 'KERNEL';
   function GetPrivateProfileString(lpszSection, lpszEntry, lpszDefault: LPCSTR; lpszReturnBuffer: LPSTR; cbReturnBuffer: SmallInt; lpszFilename: LPCSTR): SmallInt; external 'KERNEL';
   function GetPrivateProfileString(lpszSection, lpszEntry, lpszDefault: LPCSTR; lpszReturnBuffer: LPSTR; cbReturnBuffer: SmallInt; lpszFilename: LPCSTR): SmallInt; external 'KERNEL';
   function WritePrivateProfileString(lpszSection, lpszEntry, lpszString, lpszFilename: LPCSTR): BOOL; external 'KERNEL';
   function WritePrivateProfileString(lpszSection, lpszEntry, lpszString, lpszFilename: LPCSTR): BOOL; external 'KERNEL';
 
 
-{ International & Char Translation Support }
+{ International & AnsiChar Translation Support }
 
 
 procedure AnsiToOem(hpszWindows, hpszOem: PHugeChar); external 'KEYBOARD';
 procedure AnsiToOem(hpszWindows, hpszOem: PHugeChar); external 'KEYBOARD';
 procedure AnsiToOem(hpszWindows, hpszOem: PFarChar); external 'KEYBOARD';
 procedure AnsiToOem(hpszWindows, hpszOem: PFarChar); external 'KEYBOARD';
@@ -266,10 +266,10 @@ function AnsiUpperBuff(lpszString: LPSTR; cbString: UINT): UINT; external 'USER'
 function AnsiLowerBuff(lpszString: LPSTR; cbString: UINT): UINT; external 'USER';
 function AnsiLowerBuff(lpszString: LPSTR; cbString: UINT): UINT; external 'USER';
 
 
 
 
-function IsCharAlpha(chTest: char): BOOL; external 'USER';
-function IsCharAlphaNumeric(chTest: char): BOOL; external 'USER';
-function IsCharUpper(chTest: char): BOOL; external 'USER';
-function IsCharLower(chTest: char): BOOL; external 'USER';
+function IsCharAlpha(chTest: AnsiChar): BOOL; external 'USER';
+function IsCharAlphaNumeric(chTest: AnsiChar): BOOL; external 'USER';
+function IsCharUpper(chTest: AnsiChar): BOOL; external 'USER';
+function IsCharLower(chTest: AnsiChar): BOOL; external 'USER';
 
 
 function lstrcmp(lpszString1, lpszString2: LPCSTR): SmallInt; external 'USER';
 function lstrcmp(lpszString1, lpszString2: LPCSTR): SmallInt; external 'USER';
 function lstrcmpi(lpszString1, lpszString2: LPCSTR): SmallInt; external 'USER';
 function lstrcmpi(lpszString1, lpszString2: LPCSTR): SmallInt; external 'USER';
@@ -1277,9 +1277,9 @@ function ReadComm(idComDev: SmallInt; lpvBuf: FarPointer; cbRead: SmallInt): Sma
 function ReadComm(idComDev: SmallInt; lpvBuf: PFarChar; cbRead: SmallInt): SmallInt; external 'USER';
 function ReadComm(idComDev: SmallInt; lpvBuf: PFarChar; cbRead: SmallInt): SmallInt; external 'USER';
 function WriteComm(idComDev: SmallInt; lpvBuf: FarPointer; cbWrite: SmallInt): SmallInt; external 'USER';
 function WriteComm(idComDev: SmallInt; lpvBuf: FarPointer; cbWrite: SmallInt): SmallInt; external 'USER';
 function WriteComm(idComDev: SmallInt; lpvBuf: PFarChar; cbWrite: SmallInt): SmallInt; external 'USER';
 function WriteComm(idComDev: SmallInt; lpvBuf: PFarChar; cbWrite: SmallInt): SmallInt; external 'USER';
-function UngetCommChar(idComDev: SmallInt; chUnget: char): SmallInt; external 'USER';
+function UngetCommChar(idComDev: SmallInt; chUnget: AnsiChar): SmallInt; external 'USER';
 function FlushComm(idComDev, fnQueue: SmallInt): SmallInt; external 'USER';
 function FlushComm(idComDev, fnQueue: SmallInt): SmallInt; external 'USER';
-function TransmitCommChar(idComDev: SmallInt; chTransmit: char): SmallInt; external 'USER';
+function TransmitCommChar(idComDev: SmallInt; chTransmit: AnsiChar): SmallInt; external 'USER';
 
 
 function SetCommState(lpdcb: LPDCB): SmallInt; external 'USER';
 function SetCommState(lpdcb: LPDCB): SmallInt; external 'USER';
 function GetCommState(idComDev: SmallInt; lpdcb: LPDCB): SmallInt; external 'USER';
 function GetCommState(idComDev: SmallInt; lpdcb: LPDCB): SmallInt; external 'USER';

+ 15 - 15
rtl/win16/wintypes.inc

@@ -16,10 +16,10 @@ type
 
 
     Also, using memory models other than 'large' under win16 is somewhat nasty and
     Also, using memory models other than 'large' under win16 is somewhat nasty and
     is better to be avoided. }
     is better to be avoided. }
-  PSTR = ^Char;
-  NPSTR = ^Char; near;
-//  LPSTR = ^Char; far;
-  LPCSTR = ^Char; far;
+  PSTR = ^AnsiChar;
+  NPSTR = ^AnsiChar; near;
+//  LPSTR = ^AnsiChar; far;
+  LPCSTR = ^AnsiChar; far;
   
   
   { PBYTE is already defined in system }
   { PBYTE is already defined in system }
   LPBYTE = ^Byte; far;
   LPBYTE = ^Byte; far;
@@ -184,7 +184,7 @@ type
     fFixedDisk: BYTE;
     fFixedDisk: BYTE;
     nErrCode: UINT;
     nErrCode: UINT;
     reserved: array [0..3] of BYTE;
     reserved: array [0..3] of BYTE;
-    szPathName: array [0..127] of char;
+    szPathName: array [0..127] of AnsiChar;
   end;
   end;
   TOFStruct = OFSTRUCT;
   TOFStruct = OFSTRUCT;
 
 
@@ -754,7 +754,7 @@ type
     lfClipPrecision: BYTE;
     lfClipPrecision: BYTE;
     lfQuality: BYTE;
     lfQuality: BYTE;
     lfPitchAndFamily: BYTE;
     lfPitchAndFamily: BYTE;
-    lfFaceName: array [0..LF_FACESIZE-1] of char;
+    lfFaceName: array [0..LF_FACESIZE-1] of AnsiChar;
   end;
   end;
   TLogFont = LOGFONT;
   TLogFont = LOGFONT;
 
 
@@ -1740,7 +1740,7 @@ type
 { Keyboard input support }
 { Keyboard input support }
   PKeyboardState = ^TKeyboardState;
   PKeyboardState = ^TKeyboardState;
   LPKeyboardState = ^TKeyboardState; far;
   LPKeyboardState = ^TKeyboardState; far;
-  TKeyboardState = array [0..255] of Char;
+  TKeyboardState = array [0..255] of AnsiChar;
 
 
 const
 const
   WM_SETFOCUS    = $0007;
   WM_SETFOCUS    = $0007;
@@ -1763,7 +1763,7 @@ const
   WM_KEYFIRST    = $0100;
   WM_KEYFIRST    = $0100;
   WM_KEYLAST     = $0108;
   WM_KEYLAST     = $0108;
 
 
-{ WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags }
+{ WM_KEYUP/DOWN/AnsiChar HIWORD(lParam) flags }
   KF_EXTENDED    = $0100;
   KF_EXTENDED    = $0100;
   KF_DLGMODE     = $0800;
   KF_DLGMODE     = $0800;
   KF_MENUMODE    = $1000;
   KF_MENUMODE    = $1000;
@@ -1941,7 +1941,7 @@ type
   MENUITEMTEMPLATE = record
   MENUITEMTEMPLATE = record
     mtOption: UINT;
     mtOption: UINT;
     mtID: UINT;
     mtID: UINT;
-    mtString: array [0..0] of Char;
+    mtString: array [0..0] of AnsiChar;
   end;
   end;
   TMenuItemTemplate = MENUITEMTEMPLATE;
   TMenuItemTemplate = MENUITEMTEMPLATE;
 
 
@@ -2723,7 +2723,7 @@ type
     dx: SmallInt;
     dx: SmallInt;
     dy: SmallInt;
     dy: SmallInt;
     wMax: SmallInt;
     wMax: SmallInt;
-    rgchMember: array [0..1] of char;
+    rgchMember: array [0..1] of AnsiChar;
   end;
   end;
   THelpWinInfo = HELPWININFO;
   THelpWinInfo = HELPWININFO;
 
 
@@ -2867,13 +2867,13 @@ type
     UINT fRtsflow       :1;
     UINT fRtsflow       :1;
     UINT fDummy2        :1;}
     UINT fDummy2        :1;}
 
 
-    XonChar: char;
-    XoffChar: char;
+    XonChar: AnsiChar;
+    XoffChar: AnsiChar;
     XonLim: UINT;
     XonLim: UINT;
     XoffLim: UINT;
     XoffLim: UINT;
-    PeChar: char;
-    EofChar: char;
-    EvtChar: char;
+    PeChar: AnsiChar;
+    EofChar: AnsiChar;
+    EvtChar: AnsiChar;
     TxDelay: UINT;
     TxDelay: UINT;
   end;
   end;
   TDCB = DCB;
   TDCB = DCB;