2
0
Michael VAN CANNEYT 2 жил өмнө
parent
commit
a5ad266065

+ 1 - 1
rtl/win16/classes.pp

@@ -58,7 +58,7 @@ type
 {$endif FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
 
 {$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
   Result:=WinProcs.FindResource(hInstance,FarAddr(lpName^),FarAddr(lpType^));
 end;

+ 15 - 15
rtl/win16/dos.pp

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

+ 3 - 3
rtl/win16/sysdir.inc

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

+ 1 - 1
rtl/win16/sysdl.inc

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

+ 7 - 7
rtl/win16/sysfile.inc

@@ -19,7 +19,7 @@
    var
       openfiles : array [0..max_files-1] of boolean;
 {$ifdef SYSTEMDEBUG}
-      opennames : array [0..max_files-1] of pchar;
+      opennames : array [0..max_files-1] of PAnsiChar;
    const
       free_closed_names : boolean = true;
 {$endif SYSTEMDEBUG}
@@ -55,10 +55,10 @@ begin
 end;
 
 
-procedure do_erase(p : pchar; pchangeable: boolean);
+procedure do_erase(p : PAnsiChar; pchangeable: boolean);
 var
   regs : Registers;
-  oldp : pchar;
+  oldp : PAnsiChar;
 begin
   oldp:=p;
   DoDirSeparators(p,pchangeable);
@@ -79,10 +79,10 @@ begin
 end;
 
 
-procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean);
+procedure do_rename(p1,p2 : PAnsiChar; p1changeable, p2changeable: boolean);
 var
   regs : Registers;
-  oldp1, oldp2 : pchar;
+  oldp1, oldp2 : PAnsiChar;
 begin
   oldp1:=p1;
   oldp2:=p2;
@@ -250,7 +250,7 @@ begin
     Increase_file_handle_count:=true;
 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
   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
   regs   : Registers;
   action : word;
-  oldp : pchar;
+  oldp : PAnsiChar;
 begin
   ZeroSegRegs(regs);
 { close first if opened }

+ 15 - 15
rtl/win16/system.pp

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

+ 18 - 18
rtl/win16/sysutils.pp

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

+ 5 - 5
rtl/win16/win31.pp

@@ -112,7 +112,7 @@ type
     flags: UINT;
     dwOptions: DWORD;
     dwFilter: DWORD;
-    achAllocModule: array [0..7] of char;
+    achAllocModule: array [0..7] of AnsiChar;
     dwAllocBreak: DWORD;
     dwAllocCount: DWORD;
   end;
@@ -307,8 +307,8 @@ type
   LPENUMLOGFONT = ^ENUMLOGFONT; far;
   ENUMLOGFONT = record
     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;
   TEnumLogFont = ENUMLOGFONT;
 
@@ -824,7 +824,7 @@ type
     length: UINT;
     hDriver: HDRVR;
     hModule: HINST;
-    szAliasName: array [0..127] of char;
+    szAliasName: array [0..127] of AnsiChar;
   end;
   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 _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';
 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 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';
 
@@ -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 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: 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 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 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 WriteComm(idComDev: SmallInt; lpvBuf: FarPointer; 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 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 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
     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 }
   LPBYTE = ^Byte; far;
@@ -184,7 +184,7 @@ type
     fFixedDisk: BYTE;
     nErrCode: UINT;
     reserved: array [0..3] of BYTE;
-    szPathName: array [0..127] of char;
+    szPathName: array [0..127] of AnsiChar;
   end;
   TOFStruct = OFSTRUCT;
 
@@ -754,7 +754,7 @@ type
     lfClipPrecision: BYTE;
     lfQuality: BYTE;
     lfPitchAndFamily: BYTE;
-    lfFaceName: array [0..LF_FACESIZE-1] of char;
+    lfFaceName: array [0..LF_FACESIZE-1] of AnsiChar;
   end;
   TLogFont = LOGFONT;
 
@@ -1740,7 +1740,7 @@ type
 { Keyboard input support }
   PKeyboardState = ^TKeyboardState;
   LPKeyboardState = ^TKeyboardState; far;
-  TKeyboardState = array [0..255] of Char;
+  TKeyboardState = array [0..255] of AnsiChar;
 
 const
   WM_SETFOCUS    = $0007;
@@ -1763,7 +1763,7 @@ const
   WM_KEYFIRST    = $0100;
   WM_KEYLAST     = $0108;
 
-{ WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags }
+{ WM_KEYUP/DOWN/AnsiChar HIWORD(lParam) flags }
   KF_EXTENDED    = $0100;
   KF_DLGMODE     = $0800;
   KF_MENUMODE    = $1000;
@@ -1941,7 +1941,7 @@ type
   MENUITEMTEMPLATE = record
     mtOption: UINT;
     mtID: UINT;
-    mtString: array [0..0] of Char;
+    mtString: array [0..0] of AnsiChar;
   end;
   TMenuItemTemplate = MENUITEMTEMPLATE;
 
@@ -2723,7 +2723,7 @@ type
     dx: SmallInt;
     dy: SmallInt;
     wMax: SmallInt;
-    rgchMember: array [0..1] of char;
+    rgchMember: array [0..1] of AnsiChar;
   end;
   THelpWinInfo = HELPWININFO;
 
@@ -2867,13 +2867,13 @@ type
     UINT fRtsflow       :1;
     UINT fDummy2        :1;}
 
-    XonChar: char;
-    XoffChar: char;
+    XonChar: AnsiChar;
+    XoffChar: AnsiChar;
     XonLim: UINT;
     XoffLim: UINT;
-    PeChar: char;
-    EofChar: char;
-    EvtChar: char;
+    PeChar: AnsiChar;
+    EofChar: AnsiChar;
+    EvtChar: AnsiChar;
     TxDelay: UINT;
   end;
   TDCB = DCB;