Browse Source

* PChar -> PAnsichar

Michaël Van Canneyt 2 years ago
parent
commit
98ea5cddda
61 changed files with 348 additions and 283 deletions
  1. 6 6
      packages/ide/fakegdb/gdbcon.pas
  2. 11 11
      packages/ide/fakegdb/gdbint.pas
  3. 1 1
      packages/ide/fp.pas
  4. 2 2
      packages/ide/fpcalc.pas
  5. 1 0
      packages/ide/fpcodcmp.pas
  6. 1 0
      packages/ide/fpcodtmp.pas
  7. 2 0
      packages/ide/fpconst.pas
  8. 2 2
      packages/ide/fpcygwin.pas
  9. 14 12
      packages/ide/fpdebug.pas
  10. 6 4
      packages/ide/fpdesk.pas
  11. 3 1
      packages/ide/fpdpansi.pas
  12. 2 0
      packages/ide/fpevalw.pas
  13. 2 1
      packages/ide/fphelp.pas
  14. 2 2
      packages/ide/fpide.pas
  15. 2 2
      packages/ide/fpini.pas
  16. 1 0
      packages/ide/fpintf.pas
  17. 2 0
      packages/ide/fpkeys.pas
  18. 11 3
      packages/ide/fpmake.pp
  19. 1 0
      packages/ide/fpmtools.inc
  20. 1 0
      packages/ide/fpredir.pas
  21. 10 9
      packages/ide/fpregs.pas
  22. 9 8
      packages/ide/fpswitch.pas
  23. 5 5
      packages/ide/fpsymbol.pas
  24. 3 1
      packages/ide/fptemplt.pas
  25. 7 7
      packages/ide/fptools.pas
  26. 3 3
      packages/ide/fpusrscr.pas
  27. 6 4
      packages/ide/fputils.pas
  28. 18 18
      packages/ide/fpviews.pas
  29. 3 3
      packages/ide/gdbmicon.pas
  30. 24 24
      packages/ide/gdbmiint.pas
  31. 3 3
      packages/ide/gdbmiproc.pas
  32. 4 2
      packages/ide/gdbmiwrap.pas
  33. 2 0
      packages/ide/globdir.inc
  34. 2 0
      packages/ide/pmode.pas
  35. 3 2
      packages/ide/test.pas
  36. 1 0
      packages/ide/test1.pas
  37. 1 0
      packages/ide/test2.pas
  38. 3 2
      packages/ide/vesa.pas
  39. 22 20
      packages/ide/wansi.pas
  40. 1 1
      packages/ide/wcedit.pas
  41. 1 1
      packages/ide/wchmhwrap.pas
  42. 2 0
      packages/ide/wconsole.pas
  43. 2 1
      packages/ide/wconsts.pas
  44. 36 36
      packages/ide/weditor.pas
  45. 6 5
      packages/ide/whelp.pas
  46. 2 1
      packages/ide/whlpview.pas
  47. 6 5
      packages/ide/whtml.pas
  48. 10 9
      packages/ide/whtmlhlp.pas
  49. 3 2
      packages/ide/whtmlscn.pas
  50. 12 12
      packages/ide/winclip.pas
  51. 4 2
      packages/ide/windebug.pas
  52. 6 5
      packages/ide/wini.pas
  53. 7 6
      packages/ide/wnghelp.pas
  54. 8 7
      packages/ide/woahelp.pas
  55. 8 6
      packages/ide/wos2help.pas
  56. 1 0
      packages/ide/wresourc.pas
  57. 2 0
      packages/ide/wtphwrit.pas
  58. 16 15
      packages/ide/wutils.pas
  59. 6 6
      packages/ide/wviews.pas
  60. 2 1
      packages/ide/wvphelp.pas
  61. 5 4
      packages/ide/wwinhelp.pas

+ 6 - 6
packages/ide/fakegdb/gdbcon.pas

@@ -11,8 +11,8 @@ uses
 type
 type
   PGDBController=^TGDBController;
   PGDBController=^TGDBController;
   TGDBController=object(TGDBInterface)
   TGDBController=object(TGDBInterface)
-    progname   : pchar;
-    progargs   : pchar;
+    progname   : PAnsiChar;
+    progargs   : PAnsiChar;
     in_command,
     in_command,
     init_count : longint;
     init_count : longint;
     constructor Init;
     constructor Init;
@@ -31,8 +31,8 @@ type
     { needed for dos because newlines are only #10 (PM) }
     { needed for dos because newlines are only #10 (PM) }
     procedure WriteErrorBuf;
     procedure WriteErrorBuf;
     procedure WriteOutputBuf;
     procedure WriteOutputBuf;
-    function  GetOutput : Pchar;
-    function  GetError : Pchar;
+    function  GetOutput : PAnsiChar;
+    function  GetError : PAnsiChar;
     function  LoadFile(const fn:string):boolean;
     function  LoadFile(const fn:string):boolean;
     procedure SetDir(const s : string);
     procedure SetDir(const s : string);
     procedure SetArgs(const s : string);
     procedure SetArgs(const s : string);
@@ -151,13 +151,13 @@ begin
 end;
 end;
 
 
 
 
-function  TGDBController.GetOutput : Pchar;
+function  TGDBController.GetOutput : PAnsiChar;
 begin
 begin
   GetOutput:=nil;
   GetOutput:=nil;
 end;
 end;
 
 
 
 
-function  TGDBController.GetError : Pchar;
+function  TGDBController.GetError : PAnsiChar;
 begin
 begin
   GetError:=nil;
   GetError:=nil;
 end;
 end;

+ 11 - 11
packages/ide/fakegdb/gdbint.pas

@@ -15,15 +15,15 @@ type
   psyminfo=^tsyminfo;
   psyminfo=^tsyminfo;
   tsyminfo=record
   tsyminfo=record
     address  : longint;
     address  : longint;
-    fname    : pchar;
+    fname    : PAnsiChar;
     line     : longint;
     line     : longint;
-    funcname : pchar;
+    funcname : PAnsiChar;
   end;
   end;
 
 
   tframeentry = object
   tframeentry = object
-    file_name : pchar;
-    function_name : pchar;
-    args : pchar;
+    file_name : PAnsiChar;
+    function_name : PAnsiChar;
+    args : PAnsiChar;
     line_number : longint;
     line_number : longint;
     address : longint;
     address : longint;
     constructor init;
     constructor init;
@@ -35,14 +35,14 @@ type
   ppframeentry=^pframeentry;
   ppframeentry=^pframeentry;
 
 
   tgdbbuffer=object
   tgdbbuffer=object
-    buf   : pchar;
+    buf   : PAnsiChar;
     size,
     size,
     idx   : longint;
     idx   : longint;
     constructor Init;
     constructor Init;
     destructor  Done;
     destructor  Done;
     procedure Reset;
     procedure Reset;
     procedure Resize(nsize : longint);
     procedure Resize(nsize : longint);
-    procedure Append(p:pchar);
+    procedure Append(p:PAnsiChar);
   end;
   end;
 
 
   PGDBInterface=^TGDBInterface;
   PGDBInterface=^TGDBInterface;
@@ -76,13 +76,13 @@ type
     line_start,
     line_start,
     line_end : longint;
     line_end : longint;
     signal_name,
     signal_name,
-    signal_string : pchar;
+    signal_string : PAnsiChar;
     current_pc      : CORE_ADDR;
     current_pc      : CORE_ADDR;
     { breakpoint }
     { breakpoint }
     last_breakpoint_number,
     last_breakpoint_number,
     last_breakpoint_address,
     last_breakpoint_address,
     last_breakpoint_line : longint;
     last_breakpoint_line : longint;
-    last_breakpoint_file : pchar;
+    last_breakpoint_file : PAnsiChar;
     invalid_breakpoint_line : boolean;
     invalid_breakpoint_line : boolean;
     { Highlevel }
     { Highlevel }
     user_screen_shown,
     user_screen_shown,
@@ -274,7 +274,7 @@ begin
 end;
 end;
 
 
 
 
-procedure tgdbbuffer.append(p:pchar);
+procedure tgdbbuffer.append(p:PAnsiChar);
 var
 var
   len : longint;
   len : longint;
 begin
 begin
@@ -291,7 +291,7 @@ end;
 
 
 procedure tgdbbuffer.resize(nsize : longint);
 procedure tgdbbuffer.resize(nsize : longint);
 var
 var
-  np    : pchar;
+  np    : PAnsiChar;
 begin
 begin
   nsize:=((nsize+blocksize-1) div blocksize)*blocksize;
   nsize:=((nsize+blocksize-1) div blocksize)*blocksize;
   getmem(np,nsize);
   getmem(np,nsize);

+ 1 - 1
packages/ide/fp.pas

@@ -151,7 +151,7 @@ procedure ProcessParams(BeforeINI: boolean);
   function IsSwitch(const Param: string): boolean;
   function IsSwitch(const Param: string): boolean;
   begin
   begin
     IsSwitch:=(Param<>'') and (Param[1]<>DirSep) { <- allow UNIX root-relative paths            }
     IsSwitch:=(Param<>'') and (Param[1]<>DirSep) { <- allow UNIX root-relative paths            }
-          and (Param[1] in ['-','/']);           { <- but still accept dos switch char, eg. '/' }
+          and (Param[1] in ['-','/']);           { <- but still accept dos switch AnsiChar, eg. '/' }
   end;
   end;
 
 
 var I: Sw_integer;
 var I: Sw_integer;

+ 2 - 2
packages/ide/fpcalc.pas

@@ -40,9 +40,9 @@ type
   TCalcDisplay = object(TView)
   TCalcDisplay = object(TView)
     Status: TCalcState;
     Status: TCalcState;
     Number: string[MaxDigits];
     Number: string[MaxDigits];
-    Sign: Char;
+    Sign: AnsiChar;
     LastOperator,
     LastOperator,
-    _Operator: Char;
+    _Operator: AnsiChar;
     LastR,
     LastR,
     Operand: extended;
     Operand: extended;
     Memory: extended;
     Memory: extended;

+ 1 - 0
packages/ide/fpcodcmp.pas

@@ -19,6 +19,7 @@ unit FPCodCmp; { CodeComplete }
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 

+ 1 - 0
packages/ide/fpcodtmp.pas

@@ -18,6 +18,7 @@ unit FPCodTmp; { Code Templates }
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 

+ 2 - 0
packages/ide/fpconst.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit FPConst;
 unit FPConst;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses Views,App,
 uses Views,App,

+ 2 - 2
packages/ide/fpcygwin.pas

@@ -1,5 +1,5 @@
 unit fpcygwin;
 unit fpcygwin;
-
+{$H-}
 interface
 interface
 
 
 function GetCygwinVersionString : string;
 function GetCygwinVersionString : string;
@@ -16,7 +16,7 @@ uses
 
 
 var
 var
   ModuleH,DummyH : Handle;
   ModuleH,DummyH : Handle;
-  CygwinFullName : pchar;
+  CygwinFullName : PAnsiChar;
   fileinfosize : cardinal;
   fileinfosize : cardinal;
   size : longint;
   size : longint;
   InfoData : pointer;
   InfoData : pointer;

+ 14 - 12
packages/ide/fpdebug.pas

@@ -13,7 +13,9 @@
 
 
  **********************************************************************}
  **********************************************************************}
 unit FPDebug;
 unit FPDebug;
+
 {$ifdef NODEBUG}
 {$ifdef NODEBUG}
+{$H-}
 interface
 interface
 implementation
 implementation
 end.
 end.
@@ -74,7 +76,7 @@ type
     procedure DoEndSession(code:longint);virtual;
     procedure DoEndSession(code:longint);virtual;
     procedure DoUserSignal;virtual;
     procedure DoUserSignal;virtual;
     procedure FlushAll; virtual;
     procedure FlushAll; virtual;
-    function Query(question : pchar; args : pchar) : longint; virtual;
+    function Query(question : PAnsiChar; args : PAnsiChar) : longint; virtual;
 
 
     procedure AnnotateError;
     procedure AnnotateError;
     procedure InsertBreakpoints;
     procedure InsertBreakpoints;
@@ -93,7 +95,7 @@ type
     procedure CommandEnd(const s:string);virtual;
     procedure CommandEnd(const s:string);virtual;
     function  IsRunning : boolean;
     function  IsRunning : boolean;
     function  AllowQuit : boolean;virtual;
     function  AllowQuit : boolean;virtual;
-    function  GetValue(Const expr : string) : pchar;
+    function  GetValue(Const expr : string) : PAnsiChar;
     function  GetFramePointer : CORE_ADDR;
     function  GetFramePointer : CORE_ADDR;
     function  GetLongintAt(addr : CORE_ADDR) : longint;
     function  GetLongintAt(addr : CORE_ADDR) : longint;
     function  GetPointerAt(addr : CORE_ADDR) : CORE_ADDR;
     function  GetPointerAt(addr : CORE_ADDR) : CORE_ADDR;
@@ -117,7 +119,7 @@ type
      Line : Longint; { only used for bt_file_line type }
      Line : Longint; { only used for bt_file_line type }
      Conditions : PString; { conditions relative to that breakpoint }
      Conditions : PString; { conditions relative to that breakpoint }
      IgnoreCount : Longint; { how many counts should be ignored }
      IgnoreCount : Longint; { how many counts should be ignored }
-     Commands : pchar; { commands that should be executed on breakpoint }
+     Commands : PAnsiChar; { commands that should be executed on breakpoint }
      GDBIndex : longint;
      GDBIndex : longint;
      GDBState : BreakpointState;
      GDBState : BreakpointState;
      constructor Init_function(Const AFunc : String);
      constructor Init_function(Const AFunc : String);
@@ -213,7 +215,7 @@ type
     PWatch = ^TWatch;
     PWatch = ^TWatch;
     TWatch =  Object(TObject)
     TWatch =  Object(TObject)
       expr : pstring;
       expr : pstring;
-      last_value,current_value : pchar;
+      last_value,current_value : PAnsiChar;
       constructor Init(s : string);
       constructor Init(s : string);
       constructor Load(var S: TStream);
       constructor Load(var S: TStream);
       procedure   Store(var S: TStream);
       procedure   Store(var S: TStream);
@@ -1040,9 +1042,9 @@ begin
     GDBWindow^.WriteString(S);
     GDBWindow^.WriteString(S);
 end;
 end;
 
 
-function TDebugController.Query(question : pchar; args : pchar) : longint;
+function TDebugController.Query(question : PAnsiChar; args : PAnsiChar) : longint;
 var
 var
-  c : char;
+  c : AnsiChar;
   WasModal : boolean;
   WasModal : boolean;
   ModalView : PView;
   ModalView : PView;
   res : longint;
   res : longint;
@@ -1213,9 +1215,9 @@ begin
     end;
     end;
 end;
 end;
 
 
-function TDebugController.GetValue(Const expr : string) : pchar;
+function TDebugController.GetValue(Const expr : string) : PAnsiChar;
 begin
 begin
-  GetValue:=StrNew(PChar(PrintCommand(expr)));
+  GetValue:=StrNew(PAnsiChar(PrintCommand(expr)));
 end;
 end;
 
 
 function TDebugController.GetFramePointer : CORE_ADDR;
 function TDebugController.GetFramePointer : CORE_ADDR;
@@ -1542,7 +1544,7 @@ begin
 {$ifdef Windows}
 {$ifdef Windows}
    if NoSwitch then
    if NoSwitch then
      begin
      begin
-       { Ctrl-C as normal char }
+       { Ctrl-C as normal AnsiChar }
        GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
        GetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), @IdeMode);
        IdeMode:=(IdeMode or ENABLE_MOUSE_INPUT or ENABLE_WINDOW_INPUT) and not ENABLE_PROCESSED_INPUT;
        IdeMode:=(IdeMode or ENABLE_MOUSE_INPUT or ENABLE_WINDOW_INPUT) and not ENABLE_PROCESSED_INPUT;
        SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
        SetConsoleMode(GetStdHandle(cardinal(Std_Input_Handle)), IdeMode);
@@ -1766,7 +1768,7 @@ end;
 
 
 procedure TBreakpoint.Insert;
 procedure TBreakpoint.Insert;
   var
   var
-    p,p2 : pchar;
+    p,p2 : PAnsiChar;
     st : string;
     st : string;
     bkpt_no: LongInt = 0;
     bkpt_no: LongInt = 0;
 begin
 begin
@@ -2934,9 +2936,9 @@ procedure TWatch.Get_new_value;
            loop_higher:=false;
            loop_higher:=false;
       end;
       end;
     if found then
     if found then
-      current_value:=StrNew(PChar('= ' + s))
+      current_value:=StrNew(PAnsiChar('= ' + s))
     else
     else
-      current_value:=StrNew(PChar(orig_s_result));
+      current_value:=StrNew(PAnsiChar(orig_s_result));
     Debugger^.got_error:=false;
     Debugger^.got_error:=false;
     { We should try here to find the expr in parent
     { We should try here to find the expr in parent
       procedure if there are
       procedure if there are

+ 6 - 4
packages/ide/fpdesk.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit FPDesk;
 unit FPDesk;
 
 
+{$H-}
+
 interface
 interface
 
 
 const
 const
@@ -382,7 +384,7 @@ procedure ProcessWindowInfo;
 var W: PWindow;
 var W: PWindow;
     SW: PSourceWindow absolute W;
     SW: PSourceWindow absolute W;
     St: string;
     St: string;
-    Ch: char;
+    Ch: AnsiChar;
     TP,TP2: TPoint;
     TP,TP2: TPoint;
     L: longint;
     L: longint;
     R: TRect;
     R: TRect;
@@ -510,7 +512,7 @@ begin
          W:=ASCIIChart;
          W:=ASCIIChart;
          if DV>=$A then
          if DV>=$A then
            begin
            begin
-             GetData(ch,sizeof(char));
+             GetData(ch,sizeof(AnsiChar));
              AsciiChart^.Report^.AsciiChar:=ord(ch);
              AsciiChart^.Report^.AsciiChar:=ord(ch);
              AsciiChart^.Table^.SetCursor(
              AsciiChart^.Table^.SetCursor(
                ord(ch) mod AsciiChart^.Table^.Size.X,
                ord(ch) mod AsciiChart^.Table^.Size.X,
@@ -638,7 +640,7 @@ var W: PWindow;
     XDataOfs: word;
     XDataOfs: word;
     XData: array[0..1024] of byte;
     XData: array[0..1024] of byte;
     St: string;
     St: string;
-    Ch: char;
+    Ch: AnsiChar;
     TP: TPoint;
     TP: TPoint;
     L: longint;
     L: longint;
 procedure AddData(const B; Size: word);
 procedure AddData(const B; Size: word);
@@ -693,7 +695,7 @@ begin
     hcAsciiTableWindow :
     hcAsciiTableWindow :
       begin
       begin
         ch:=chr(PFPAsciiChart(P)^.Report^.AsciiChar);
         ch:=chr(PFPAsciiChart(P)^.Report^.AsciiChar);
-        AddData(ch,sizeof(char));
+        AddData(ch,sizeof(AnsiChar));
       end;
       end;
   end;
   end;
 
 

+ 3 - 1
packages/ide/fpdpansi.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit fpdpansi;
 unit fpdpansi;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses
 uses
@@ -88,7 +90,7 @@ var
       CurColor:=NewColor;
       CurColor:=NewColor;
     end;
     end;
 var
 var
-  Ch : char;
+  Ch : AnsiChar;
   textAttr : byte;
   textAttr : byte;
   i, j : sw_integer;
   i, j : sw_integer;
 begin
 begin

+ 2 - 0
packages/ide/fpevalw.pas

@@ -13,6 +13,8 @@
  **********************************************************************}
  **********************************************************************}
 unit fpevalw;
 unit fpevalw;
 
 
+{$H-}
+
 {****************************************************************************}
 {****************************************************************************}
                                   interface
                                   interface
 {****************************************************************************}
 {****************************************************************************}

+ 2 - 1
packages/ide/fphelp.pas

@@ -17,6 +17,7 @@ unit FPHelp;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 
@@ -634,7 +635,7 @@ begin
   FPHTMLGetSectionColor:=OK;
   FPHTMLGetSectionColor:=OK;
 end;
 end;
 
 
-function FPNGGetAttrColor(Attr: char; var Color: byte): boolean;
+function FPNGGetAttrColor(Attr: AnsiChar; var Color: byte): boolean;
 var OK: boolean;
 var OK: boolean;
 begin
 begin
   OK:=false;
   OK:=false;

+ 2 - 2
packages/ide/fpide.pas

@@ -438,7 +438,7 @@ resourcestring  menu_local_gotosource = '~G~oto source';
                 status_compile         = '~Alt+F9~ Compile';
                 status_compile         = '~Alt+F9~ Compile';
                 status_make            = '~F9~ Make';
                 status_make            = '~F9~ Make';
                 status_localmenu       = '~Alt+F10~ Local menu';
                 status_localmenu       = '~Alt+F10~ Local menu';
-                status_transferchar    = '~Ctrl+Enter~ Transfer char';
+                status_transferchar    = '~Ctrl+Enter~ Transfer AnsiChar';
                 status_msggotosource   = '~'+EnterSign+'~ Goto source';
                 status_msggotosource   = '~'+EnterSign+'~ Goto source';
                 status_msgtracksource  = '~Space~ Track source';
                 status_msgtracksource  = '~Space~ Track source';
                 status_close           = '~Esc~ Close';
                 status_close           = '~Esc~ Close';
@@ -1561,7 +1561,7 @@ begin
 {$else}
 {$else}
 {$ifndef Unix}
 {$ifndef Unix}
     posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
     posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
-    { if programpath was three char long => bug }
+    { if programpath was three AnsiChar long => bug }
     if (posexe>0) and (posexe=Length(ProgramPath)-3) then
     if (posexe>0) and (posexe=Length(ProgramPath)-3) then
       begin
       begin
 {$endif Unix}
 {$endif Unix}

+ 2 - 2
packages/ide/fpini.pas

@@ -293,10 +293,10 @@ begin
       if code<>0 then
       if code<>0 then
         break;
         break;
       inc(len);
       inc(len);
-      strtopalette[len]:=char(X);
+      strtopalette[len]:=AnsiChar(X);
       inc(i,p);
       inc(i,p);
     end;
     end;
-  strtopalette[0]:=char(len);
+  strtopalette[0]:=AnsiChar(len);
 end;
 end;
 
 
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}

+ 1 - 0
packages/ide/fpintf.pas

@@ -17,6 +17,7 @@
 unit FPIntf;
 unit FPIntf;
 
 
 {$mode objfpc}
 {$mode objfpc}
+{$H-}
 
 
 interface
 interface
 
 

+ 2 - 0
packages/ide/fpkeys.pas

@@ -15,6 +15,8 @@
 
 
 unit fpkeys;
 unit fpkeys;
 
 
+{$H-}
+
 interface
 interface
 
 
   uses
   uses

+ 11 - 3
packages/ide/fpmake.pp

@@ -143,8 +143,11 @@ begin
     end;
     end;
 end;
 end;
 
 
+
 procedure add_ide_comandlineoptions();
 procedure add_ide_comandlineoptions();
 begin
 begin
+  if SameText(Defaults.SubTarget,'unicodertl') then
+    exit;
   AddCustomFpmakeCommandlineOption('CompilerTarget','Target CPU for the IDE''s compiler');
   AddCustomFpmakeCommandlineOption('CompilerTarget','Target CPU for the IDE''s compiler');
   AddCustomFpmakeCommandlineOption('NoGDB','If value=1 or ''Y'', no GDB support');
   AddCustomFpmakeCommandlineOption('NoGDB','If value=1 or ''Y'', no GDB support');
   AddCustomFpmakeCommandlineOption('NoGDBMI','If value=1 or ''Y'', explicitly disable GDB/MI option');
   AddCustomFpmakeCommandlineOption('NoGDBMI','If value=1 or ''Y'', explicitly disable GDB/MI option');
@@ -166,6 +169,8 @@ Var
   llvm: boolean;
   llvm: boolean;
 
 
 begin
 begin
+  if SameText(Defaults.SubTarget,'unicodertl') then
+    exit;
   With Installer do
   With Installer do
     begin
     begin
     s := GetCustomFpmakeCommandlineOptionValue('NoIDE');
     s := GetCustomFpmakeCommandlineOptionValue('NoIDE');
@@ -372,9 +377,12 @@ end;
 
 
 {$ifndef ALLPACKAGES}
 {$ifndef ALLPACKAGES}
 begin
 begin
-  add_ide_comandlineoptions();
-  add_ide('');
-  Installer.Run;
+  If Assigned(Installer) then
+    begin
+    add_ide_comandlineoptions();
+    add_ide('');
+    Installer.Run;
+    end;
 end.
 end.
 {$endif ALLPACKAGES}
 {$endif ALLPACKAGES}
 
 

+ 1 - 0
packages/ide/fpmtools.inc

@@ -1,3 +1,4 @@
+{MainUnit fpide.pas}
 {
 {
     This file is part of the Free Pascal Integrated Development Environment
     This file is part of the Free Pascal Integrated Development Environment
     Copyright (c) 1998 by Berczi Gabor
     Copyright (c) 1998 by Berczi Gabor

+ 1 - 0
packages/ide/fpredir.pas

@@ -45,6 +45,7 @@ Interface
 {$ifdef netware_clib}
 {$ifdef netware_clib}
 {$define implemented}
 {$define implemented}
 {$endif}
 {$endif}
+{$H-}
 
 
 Var
 Var
   IOStatus                   : Integer;
   IOStatus                   : Integer;

+ 10 - 9
packages/ide/fpregs.pas

@@ -13,6 +13,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 unit FPRegs;
 unit FPRegs;
+{$H-}
 {$ifdef NODEBUG}
 {$ifdef NODEBUG}
 interface
 interface
 implementation
 implementation
@@ -290,9 +291,9 @@ const
   function GetIntRegs(var rs : TIntRegs) : boolean;
   function GetIntRegs(var rs : TIntRegs) : boolean;
 
 
     var
     var
-       p,po : pchar;
-       p1 : pchar;
-       buffer : array[0..255] of char;
+       p,po : PAnsiChar;
+       p1 : PAnsiChar;
+       buffer : array[0..255] of AnsiChar;
        i : byte;
        i : byte;
 
 
     begin
     begin
@@ -857,11 +858,11 @@ const
              ) : boolean;
              ) : boolean;
 
 
     var
     var
-       p,po : pchar;
-       p1 : pchar;
+       p,po : PAnsiChar;
+       p1 : PAnsiChar;
     {$ifndef NODEBUG}
     {$ifndef NODEBUG}
        reg,value : string;
        reg,value : string;
-       buffer : array[0..255] of char;
+       buffer : array[0..255] of AnsiChar;
        v : string;
        v : string;
        res : cardinal;
        res : cardinal;
        i : longint;
        i : longint;
@@ -1287,11 +1288,11 @@ const
              ) : boolean;
              ) : boolean;
 
 
     var
     var
-       p,po : pchar;
-       p1 : pchar;
+       p,po : PAnsiChar;
+       p1 : PAnsiChar;
     {$ifndef NODEBUG}
     {$ifndef NODEBUG}
        reg,value : string;
        reg,value : string;
-       buffer : array[0..255] of char;
+       buffer : array[0..255] of AnsiChar;
        v : string;
        v : string;
        res : cardinal;
        res : cardinal;
        i : longint;
        i : longint;

+ 9 - 8
packages/ide/fpswitch.pas

@@ -17,6 +17,7 @@ unit FPSwitch;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 
@@ -115,8 +116,8 @@ type
 
 
     PSwitches = ^TSwitches;
     PSwitches = ^TSwitches;
     TSwitches = object
     TSwitches = object
-      constructor Init(ch:char);
-      constructor InitSelect(ch:char);
+      constructor Init(ch:AnsiChar);
+      constructor InitSelect(ch:AnsiChar);
       destructor  Done;
       destructor  Done;
       { general items }
       { general items }
       function  ItemCount:integer;
       function  ItemCount:integer;
@@ -146,7 +147,7 @@ type
       function  ReadItemsCfg(const s:string):boolean;
       function  ReadItemsCfg(const s:string):boolean;
     private
     private
       IsSel  : boolean;
       IsSel  : boolean;
-      Prefix : char;
+      Prefix : AnsiChar;
       SelNr  : array[TSwitchMode] of integer;
       SelNr  : array[TSwitchMode] of integer;
       Items  : PCollection;
       Items  : PCollection;
     end;
     end;
@@ -573,7 +574,7 @@ end;
                TSwitch
                TSwitch
 *****************************************************************************}
 *****************************************************************************}
 
 
-constructor TSwitches.Init(ch:char);
+constructor TSwitches.Init(ch:AnsiChar);
 begin
 begin
   new(Items,Init(10,5));
   new(Items,Init(10,5));
   Prefix:=ch;
   Prefix:=ch;
@@ -582,7 +583,7 @@ begin
 end;
 end;
 
 
 
 
-constructor TSwitches.InitSelect(ch:char);
+constructor TSwitches.InitSelect(ch:AnsiChar);
 begin
 begin
   new(Items,Init(10,5));
   new(Items,Init(10,5));
   Prefix:=ch;
   Prefix:=ch;
@@ -821,7 +822,7 @@ end;
 
 
 procedure TSwitches.WriteItemsCfg;
 procedure TSwitches.WriteItemsCfg;
 var
 var
-  Pref : char;
+  Pref : AnsiChar;
 
 
   procedure writeitem(P:PSwitchItem);
   procedure writeitem(P:PSwitchItem);
   var
   var
@@ -987,7 +988,7 @@ end;
 
 
 procedure ReadSwitches(const fn:string);
 procedure ReadSwitches(const fn:string);
 var
 var
-  c : char;
+  c : AnsiChar;
   s : string;
   s : string;
   res : boolean;
   res : boolean;
   OldSwitchesMode,i : TSwitchMode;
   OldSwitchesMode,i : TSwitchMode;
@@ -1070,7 +1071,7 @@ function  GetSourceDirectories : string;
 var
 var
   P : PStringItem;
   P : PStringItem;
   S : String;
   S : String;
-  c : char;
+  c : AnsiChar;
   function checkitem(P:PSwitchItem):boolean;
   function checkitem(P:PSwitchItem):boolean;
   begin
   begin
     CheckItem:=(P^.Typ=ot_string) and (P^.Param=c);
     CheckItem:=(P^.Typ=ot_string) and (P^.Param=c);

+ 5 - 5
packages/ide/fpsymbol.pas

@@ -160,7 +160,7 @@ type
 
 
     PBrowserTabItem = ^TBrowserTabItem;
     PBrowserTabItem = ^TBrowserTabItem;
     TBrowserTabItem = record
     TBrowserTabItem = record
-      Sign  : char;
+      Sign  : AnsiChar;
       Link  : PView;
       Link  : PView;
       Next  : PBrowserTabItem;
       Next  : PBrowserTabItem;
     end;
     end;
@@ -276,7 +276,7 @@ const
                 dialog_browse = 'Browse: %s';
                 dialog_browse = 'Browse: %s';
 
 
 const           { Symbol browser tabs }
 const           { Symbol browser tabs }
-                { must be char constants (so cannot be resourcestring)}
+                { must be AnsiChar constants (so cannot be resourcestring)}
                 label_browsertab_scope = 'S';
                 label_browsertab_scope = 'S';
                 label_browsertab_reference = 'R';
                 label_browsertab_reference = 'R';
                 label_browsertab_inheritance = 'I';
                 label_browsertab_inheritance = 'I';
@@ -323,7 +323,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-function NewBrowserTabItem(ASign: char; ALink: PView; ANext: PBrowserTabItem): PBrowserTabItem;
+function NewBrowserTabItem(ASign: AnsiChar; ALink: PView; ANext: PBrowserTabItem): PBrowserTabItem;
 var P: PBrowserTabItem;
 var P: PBrowserTabItem;
 begin
 begin
   New(P); FillChar(P^,SizeOf(P^),0);
   New(P); FillChar(P^,SizeOf(P^),0);
@@ -537,7 +537,7 @@ end;
 
 
 procedure TGDBValue.GetValue;
 procedure TGDBValue.GetValue;
 var
 var
-  p : pchar;
+  p : PAnsiChar;
 begin
 begin
 {$ifdef BROWSERCOL}
 {$ifdef BROWSERCOL}
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
@@ -1466,7 +1466,7 @@ procedure TBrowserTab.Draw;
 var B: TDrawBuffer;
 var B: TDrawBuffer;
     SelColor, NormColor, C: word;
     SelColor, NormColor, C: word;
     I,CurX,Count: Sw_integer;
     I,CurX,Count: Sw_integer;
-function Names(Idx: integer): char;
+function Names(Idx: integer): AnsiChar;
 begin
 begin
   Names:=GetItem(Idx)^.Sign;
   Names:=GetItem(Idx)^.Sign;
 end;
 end;

+ 3 - 1
packages/ide/fptemplt.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit FPTemplt;
 unit FPTemplt;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses FPViews;
 uses FPViews;
@@ -135,7 +137,7 @@ end;
 function ReadStringPos(const InS: string; StartP: sw_integer; var Expr: string; var EndPos: sw_integer): sw_integer;
 function ReadStringPos(const InS: string; StartP: sw_integer; var Expr: string; var EndPos: sw_integer): sw_integer;
 const Enclosers : string[2] = '''"';
 const Enclosers : string[2] = '''"';
 var OK: boolean;
 var OK: boolean;
-    Encloser: char;
+    Encloser: AnsiChar;
     P: sw_integer;
     P: sw_integer;
 begin
 begin
   OK:=false; Expr:=''; P:=StartP; EndPos:=-1;
   OK:=false; Expr:=''; P:=StartP; EndPos:=-1;

+ 7 - 7
packages/ide/fptools.pas

@@ -883,7 +883,7 @@ begin
 end;
 end;
 var OptName: string;
 var OptName: string;
     OK: boolean;
     OK: boolean;
-    C: char;
+    C: AnsiChar;
     OptStart: integer;
     OptStart: integer;
     InOpt: boolean;
     InOpt: boolean;
     I,Idx: integer;
     I,Idx: integer;
@@ -1043,7 +1043,7 @@ var Err: integer;
     W: PSourceWindow;
     W: PSourceWindow;
 procedure ParseParams(Pass: sw_integer);
 procedure ParseParams(Pass: sw_integer);
 var I: sw_integer;
 var I: sw_integer;
-function IsAlpha(Ch: char): boolean;
+function IsAlpha(Ch: AnsiChar): boolean;
 begin
 begin
   IsAlpha:=(Upcase(Ch) in['A'..'Z','_','$']);
   IsAlpha:=(Upcase(Ch) in['A'..'Z','_','$']);
 end;
 end;
@@ -1052,14 +1052,14 @@ begin
   Params:=copy(Params,1,StartP-1)+S+copy(Params,EndP+1,255);
   Params:=copy(Params,1,StartP-1)+S+copy(Params,EndP+1,255);
   ReplacePart:=length(S)-(EndP-StartP+1);
   ReplacePart:=length(S)-(EndP-StartP+1);
 end;
 end;
-function Consume(Ch: char): boolean;
+function Consume(Ch: AnsiChar): boolean;
 var OK: boolean;
 var OK: boolean;
 begin
 begin
   OK:=Params[I]=Ch;
   OK:=Params[I]=Ch;
   if OK then Inc(I);
   if OK then Inc(I);
   Consume:=OK;
   Consume:=OK;
 end;
 end;
-function ReadTill(var S: string; C: char): boolean;
+function ReadTill(var S: string; C: AnsiChar): boolean;
 var Found: boolean;
 var Found: boolean;
 begin
 begin
   Found:=false; S:='';
   Found:=false; S:='';
@@ -1074,7 +1074,7 @@ begin
     end;
     end;
   ReadTill:=Found;
   ReadTill:=Found;
 end;
 end;
-var C,PrevC: char;
+var C,PrevC: AnsiChar;
     WordS: string;
     WordS: string;
     LastWordStart: sw_integer;
     LastWordStart: sw_integer;
     L: longint;
     L: longint;
@@ -1354,8 +1354,8 @@ end;
 function ProcessMessageFile(const MsgFileName: string): boolean;
 function ProcessMessageFile(const MsgFileName: string): boolean;
 var OK,Done: boolean;
 var OK,Done: boolean;
     S: PBufStream;
     S: PBufStream;
-    C: char;
-    Sign: array[1..10] of char;
+    C: AnsiChar;
+    Sign: array[1..10] of AnsiChar;
     InFileName,InReference: boolean;
     InFileName,InReference: boolean;
     AddChar: boolean;
     AddChar: boolean;
     FileName,Line: string;
     FileName,Line: string;

+ 3 - 3
packages/ide/fpusrscr.pas

@@ -1125,11 +1125,11 @@ begin
   for i:=1 to LineSize do
   for i:=1 to LineSize do
     begin
     begin
       Text[i]:=LineBuf^[i-1].AsciiChar;
       Text[i]:=LineBuf^[i-1].AsciiChar;
-      Attr[i]:=char(byte(LineBuf^[i-1].Attributes));
+      Attr[i]:=AnsiChar(byte(LineBuf^[i-1].Attributes));
     end;
     end;
   FreeMem(LineBuf,SizeOf(CharInfoArray));
   FreeMem(LineBuf,SizeOf(CharInfoArray));
-  Text[0]:=char(byte(LineSize));
-  Attr[0]:=char(byte(LineSize));
+  Text[0]:=AnsiChar(byte(LineSize));
+  Attr[0]:=AnsiChar(byte(LineSize));
 end;
 end;
 
 
 
 

+ 6 - 4
packages/ide/fputils.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit FPUtils;
 unit FPUtils;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses
 uses
@@ -70,7 +72,7 @@ function GetStr(const P: PString): string;
 procedure ReplaceStr(var S: string; const What,NewS: string);
 procedure ReplaceStr(var S: string; const What,NewS: string);
 procedure ReplaceStrI(var S: string; What: string; const NewS: string);
 procedure ReplaceStrI(var S: string; What: string; const NewS: string);
 
 
-const ListSeparator      : char = ';';
+const ListSeparator      : AnsiChar = ';';
 
 
 implementation
 implementation
 
 
@@ -153,13 +155,13 @@ begin
               NoPath:=false; {Skip lowercasing path: 'X11'<>'x11' }
               NoPath:=false; {Skip lowercasing path: 'X11'<>'x11' }
             end;
             end;
  'A'..'Z' : if NoPath then
  'A'..'Z' : if NoPath then
-             FixFileName[i]:=char(byte(s[i])+ord('a')-ord('A'))
+             FixFileName[i]:=AnsiChar(byte(s[i])+ord('a')-ord('A'))
             else
             else
              FixFileName[i]:=s[i];
              FixFileName[i]:=s[i];
  {$else}
  {$else}
  {$ifndef hasamiga}
  {$ifndef hasamiga}
       '/' : FixFileName[i]:='\';
       '/' : FixFileName[i]:='\';
- 'A'..'Z' : FixFileName[i]:=char(byte(s[i])+32);
+ 'A'..'Z' : FixFileName[i]:=AnsiChar(byte(s[i])+32);
  {$else}
  {$else}
       '\' : FixFileName[i]:='/';
       '\' : FixFileName[i]:='/';
  {$endif}
  {$endif}
@@ -272,7 +274,7 @@ function MatchesMask(What, Mask: string): boolean;
   begin
   begin
      for i:=1 to length(s) do
      for i:=1 to length(s) do
       if s[i] in ['a'..'z'] then
       if s[i] in ['a'..'z'] then
-       upper[i]:=char(byte(s[i])-32)
+       upper[i]:=AnsiChar(byte(s[i])-32)
       else
       else
        upper[i]:=s[i];
        upper[i]:=s[i];
      upper[0]:=s[0];
      upper[0]:=s[0];

+ 18 - 18
packages/ide/fpviews.pas

@@ -218,11 +218,11 @@ type
       Indicator : PIndicator;
       Indicator : PIndicator;
       constructor Init(var Bounds: TRect);
       constructor Init(var Bounds: TRect);
       procedure   HandleEvent(var Event: TEvent); virtual;
       procedure   HandleEvent(var Event: TEvent); virtual;
-      procedure   WriteText(Buf : pchar;IsError : boolean);
+      procedure   WriteText(Buf : PAnsiChar;IsError : boolean);
       procedure   WriteString(Const S : string);
       procedure   WriteString(Const S : string);
       procedure   WriteErrorString(Const S : string);
       procedure   WriteErrorString(Const S : string);
-      procedure   WriteOutputText(Buf : pchar);
-      procedure   WriteErrorText(Buf : pchar);
+      procedure   WriteOutputText(Buf : PAnsiChar);
+      procedure   WriteErrorText(Buf : PAnsiChar);
       function    GetPalette: PPalette;virtual;
       function    GetPalette: PPalette;virtual;
       constructor Load(var S: TStream);
       constructor Load(var S: TStream);
       procedure   Store(var S: TStream);
       procedure   Store(var S: TStream);
@@ -266,7 +266,7 @@ type
       constructor Init(var Bounds: TRect);
       constructor Init(var Bounds: TRect);
       procedure   LoadFunction(Const FuncName : string);
       procedure   LoadFunction(Const FuncName : string);
       procedure   LoadAddress(Addr : CORE_ADDR);
       procedure   LoadAddress(Addr : CORE_ADDR);
-      function    ProcessPChar(p : pchar) : boolean;
+      function    ProcessPChar(p : PAnsiChar) : boolean;
       procedure   HandleEvent(var Event: TEvent); virtual;
       procedure   HandleEvent(var Event: TEvent); virtual;
       procedure   WriteSourceString(Const S : string;line : longint);
       procedure   WriteSourceString(Const S : string;line : longint);
       procedure   WriteDisassemblyString(Const S : string;address : CORE_ADDR);
       procedure   WriteDisassemblyString(Const S : string;address : CORE_ADDR);
@@ -341,7 +341,7 @@ type
       Name     : PString;
       Name     : PString;
       Items    : PTabItem;
       Items    : PTabItem;
       DefItem  : PView;
       DefItem  : PView;
-      ShortCut : char;
+      ShortCut : AnsiChar;
     end;
     end;
 
 
     PTab = ^TTab;
     PTab = ^TTab;
@@ -853,13 +853,13 @@ function GetEditorCurWord(Editor: PEditor; ValidSpecChars: TCharSet): string;
 var S: string;
 var S: string;
     PS,PE: byte;
     PS,PE: byte;
 function Trim(S: string): string;
 function Trim(S: string): string;
-const TrimChars : set of char = [#0,#9,' ',#255];
+const TrimChars : set of AnsiChar = [#0,#9,' ',#255];
 begin
 begin
   while (length(S)>0) and (S[1] in TrimChars) do Delete(S,1,1);
   while (length(S)>0) and (S[1] in TrimChars) do Delete(S,1,1);
   while (length(S)>0) and (S[length(S)] in TrimChars) do Delete(S,length(S),1);
   while (length(S)>0) and (S[length(S)] in TrimChars) do Delete(S,length(S),1);
   Trim:=S;
   Trim:=S;
 end;
 end;
-const AlphaNum : set of char = ['A'..'Z','0'..'9','_'];
+const AlphaNum : set of AnsiChar = ['A'..'Z','0'..'9','_'];
 begin
 begin
   with Editor^ do
   with Editor^ do
   begin
   begin
@@ -1119,7 +1119,7 @@ end;
 function IsFPAsmReservedWord(S: string): boolean;
 function IsFPAsmReservedWord(S: string): boolean;
 var _Is: boolean;
 var _Is: boolean;
     Idx,Item,Len: sw_integer;
     Idx,Item,Len: sw_integer;
-    LastC : Char;
+    LastC : AnsiChar;
     LastTwo : String[2];
     LastTwo : String[2];
 begin
 begin
   Idx:=length(S); _Is:=false;
   Idx:=length(S); _Is:=false;
@@ -2555,13 +2555,13 @@ begin
   GetPalette:=@P;
   GetPalette:=@P;
 end;
 end;
 
 
-procedure TGDBWindow.WriteOutputText(Buf : pchar);
+procedure TGDBWindow.WriteOutputText(Buf : PAnsiChar);
 begin
 begin
   {selected normal color ?}
   {selected normal color ?}
   WriteText(Buf,false);
   WriteText(Buf,false);
 end;
 end;
 
 
-procedure TGDBWindow.WriteErrorText(Buf : pchar);
+procedure TGDBWindow.WriteErrorText(Buf : PAnsiChar);
 begin
 begin
   {selected normal color ?}
   {selected normal color ?}
   WriteText(Buf,true);
   WriteText(Buf,true);
@@ -2577,8 +2577,8 @@ begin
   Editor^.AddErrorLine(S);
   Editor^.AddErrorLine(S);
 end;
 end;
 
 
-procedure TGDBWindow.WriteText(Buf : pchar;IsError : boolean);
-  var p,pe : pchar;
+procedure TGDBWindow.WriteText(Buf : PAnsiChar;IsError : boolean);
+  var p,pe : PAnsiChar;
       s : string;
       s : string;
 begin
 begin
   p:=buf;
   p:=buf;
@@ -2767,7 +2767,7 @@ end;
 
 
 procedure   TDisassemblyWindow.LoadFunction(Const FuncName : string);
 procedure   TDisassemblyWindow.LoadFunction(Const FuncName : string);
 var
 var
-   p : pchar;
+   p : PAnsiChar;
 begin
 begin
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
   If not assigned(Debugger) then Exit;
   If not assigned(Debugger) then Exit;
@@ -2783,7 +2783,7 @@ end;
 
 
 procedure   TDisassemblyWindow.LoadAddress(Addr : CORE_ADDR);
 procedure   TDisassemblyWindow.LoadAddress(Addr : CORE_ADDR);
 var
 var
-   p : pchar;
+   p : PAnsiChar;
 begin
 begin
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
   If not assigned(Debugger) then Exit;
   If not assigned(Debugger) then Exit;
@@ -2800,10 +2800,10 @@ begin
 end;
 end;
 
 
 
 
-function TDisassemblyWindow.ProcessPChar(p : pchar) : boolean;
+function TDisassemblyWindow.ProcessPChar(p : PAnsiChar) : boolean;
 var
 var
-  p1: pchar;
-  pline : pchar;
+  p1: PAnsiChar;
+  pline : PAnsiChar;
   pos1, pos2, CurLine, PrevLine : longint;
   pos1, pos2, CurLine, PrevLine : longint;
   CurAddr : CORE_ADDR;
   CurAddr : CORE_ADDR;
   err : word;
   err : word;
@@ -3630,7 +3630,7 @@ var B     : TDrawBuffer;
     Name       : PString;
     Name       : PString;
     ActiveKPos : integer;
     ActiveKPos : integer;
     ActiveVPos : integer;
     ActiveVPos : integer;
-    FC   : char;
+    FC   : AnsiChar;
     ClipR      : TRect;
     ClipR      : TRect;
 procedure SWriteBuf(X,Y,W,H: integer; var Buf);
 procedure SWriteBuf(X,Y,W,H: integer; var Buf);
 var i: integer;
 var i: integer;

+ 3 - 3
packages/ide/gdbmicon.pas

@@ -464,9 +464,9 @@ begin
     if Assigned(FrameList.ValueAt[I].AsTuple['line']) then
     if Assigned(FrameList.ValueAt[I].AsTuple['line']) then
       frames[I]^.line_number := FrameList.ValueAt[I].AsTuple['line'].AsLongInt;
       frames[I]^.line_number := FrameList.ValueAt[I].AsTuple['line'].AsLongInt;
     if Assigned(FrameList.ValueAt[I].AsTuple['func']) then
     if Assigned(FrameList.ValueAt[I].AsTuple['func']) then
-      frames[I]^.function_name := StrNew(PChar(FrameList.ValueAt[I].AsTuple['func'].AsString));
+      frames[I]^.function_name := StrNew(PAnsiChar(FrameList.ValueAt[I].AsTuple['func'].AsString));
     if Assigned(FrameList.ValueAt[I].AsTuple['fullname']) then
     if Assigned(FrameList.ValueAt[I].AsTuple['fullname']) then
-      frames[I]^.file_name := StrNew(PChar(FrameList.ValueAt[I].AsTuple['fullname'].AsString));
+      frames[I]^.file_name := StrNew(PAnsiChar(FrameList.ValueAt[I].AsTuple['fullname'].AsString));
   end;
   end;
   Command('-stack-list-arguments 1');
   Command('-stack-list-arguments 1');
   if not GDB.ResultRecord.Success then
   if not GDB.ResultRecord.Success then
@@ -488,7 +488,7 @@ begin
           s:=s+':='+ArgList.ValueAt[J].AsTuple['value'].ASString;
           s:=s+':='+ArgList.ValueAt[J].AsTuple['value'].ASString;
       end;
       end;
     s:=s+')';
     s:=s+')';
-    frames[I]^.args:=StrNew(pchar(s));
+    frames[I]^.args:=StrNew(PAnsiChar(s));
   end;
   end;
 end;
 end;
 
 

+ 24 - 24
packages/ide/gdbmiint.pas

@@ -36,9 +36,9 @@ type
     procedure Reset;
     procedure Reset;
     procedure Clear;
     procedure Clear;
   public
   public
-    file_name: PChar;
-    function_name: PChar;
-    args: PChar;
+    file_name: PAnsiChar;
+    function_name: PAnsiChar;
+    args: PAnsiChar;
     line_number: LongInt;
     line_number: LongInt;
     address: CORE_ADDR;
     address: CORE_ADDR;
     level : longint;
     level : longint;
@@ -48,11 +48,11 @@ type
 
 
   TGDBBuffer = object
   TGDBBuffer = object
   private
   private
-    buf: PChar;
+    buf: PAnsiChar;
     size, idx: LongInt;
     size, idx: LongInt;
     procedure Resize(nsize: LongInt);
     procedure Resize(nsize: LongInt);
-    procedure Append(p: PChar);
-    procedure LAppend(p: PChar; len: LongInt);
+    procedure Append(p: PAnsiChar);
+    procedure LAppend(p: PAnsiChar; len: LongInt);
   public
   public
     constructor Init;
     constructor Init;
     destructor Done;
     destructor Done;
@@ -87,8 +87,8 @@ type
     frames: PPFrameEntry;
     frames: PPFrameEntry;
     frame_count: LongInt;
     frame_count: LongInt;
     command_level: LongInt;
     command_level: LongInt;
-    signal_name: PChar;
-    signal_string: PChar;
+    signal_name: PAnsiChar;
+    signal_string: PAnsiChar;
     current_pc: CORE_ADDR;
     current_pc: CORE_ADDR;
     switch_to_user: Boolean;
     switch_to_user: Boolean;
 
 
@@ -96,10 +96,10 @@ type
     constructor Init;
     constructor Init;
     destructor Done;
     destructor Done;
     { from gdbcon }
     { from gdbcon }
-    function GetOutput: PChar;
-    function GetError: PChar;
+    function GetOutput: PAnsiChar;
+    function GetError: PAnsiChar;
 {$ifdef DEBUG}
 {$ifdef DEBUG}
-    function GetRaw: PChar;
+    function GetRaw: PAnsiChar;
 {$endif DEBUG}
 {$endif DEBUG}
     { Lowlevel }
     { Lowlevel }
     procedure Set_debuggee_started;
     procedure Set_debuggee_started;
@@ -112,7 +112,7 @@ type
     procedure DebuggerScreen;
     procedure DebuggerScreen;
     procedure UserScreen;
     procedure UserScreen;
     procedure FlushAll; virtual;
     procedure FlushAll; virtual;
-    function Query(question: PChar; args: PChar): LongInt; virtual;
+    function Query(question: PAnsiChar; args: PAnsiChar): LongInt; virtual;
     { Hooks }
     { Hooks }
     function DoSelectSourceline(const fn: string; line, BreakIndex: longint): Boolean;virtual;
     function DoSelectSourceline(const fn: string; line, BreakIndex: longint): Boolean;virtual;
     procedure DoStartSession; virtual;
     procedure DoStartSession; virtual;
@@ -200,7 +200,7 @@ end;
 
 
 procedure TGDBBuffer.Resize(nsize: LongInt);
 procedure TGDBBuffer.Resize(nsize: LongInt);
 var
 var
-  np: PChar;
+  np: PAnsiChar;
 begin
 begin
   nsize := ((nsize + BlockSize - 1) div BlockSize) * BlockSize;
   nsize := ((nsize + BlockSize - 1) div BlockSize) * BlockSize;
   GetMem(np, nsize);
   GetMem(np, nsize);
@@ -213,7 +213,7 @@ begin
   size := nsize;
   size := nsize;
 end;
 end;
 
 
-procedure TGDBBuffer.Append(p: PChar);
+procedure TGDBBuffer.Append(p: PAnsiChar);
 var
 var
   len: LongInt;
   len: LongInt;
 begin
 begin
@@ -223,7 +223,7 @@ begin
   LAppend(p, len);
   LAppend(p, len);
 end;
 end;
 
 
-procedure TGDBBuffer.LAppend(p: PChar; len: LongInt);
+procedure TGDBBuffer.LAppend(p: PAnsiChar; len: LongInt);
 begin
 begin
   if not Assigned(p) then
   if not Assigned(p) then
     exit;
     exit;
@@ -266,25 +266,25 @@ begin
 {$endif GDB_RAW_OUTPUT}
 {$endif GDB_RAW_OUTPUT}
 end;
 end;
 
 
-function TGDBInterface.GetOutput: PChar;
+function TGDBInterface.GetOutput: PAnsiChar;
 begin
 begin
   GetOutput := GDBOutputBuf.buf;
   GetOutput := GDBOutputBuf.buf;
 end;
 end;
 
 
 {$ifdef GDB_RAW_OUTPUT}
 {$ifdef GDB_RAW_OUTPUT}
-function TGDBInterface.GetRaw: PChar;
+function TGDBInterface.GetRaw: PAnsiChar;
 begin
 begin
   GetRaw := GDBRawBuf.buf;
   GetRaw := GDBRawBuf.buf;
 end;
 end;
 {$endif GDB_RAW_OUTPUT}
 {$endif GDB_RAW_OUTPUT}
 
 
-function TGDBInterface.GetError: PChar;
+function TGDBInterface.GetError: PAnsiChar;
 var
 var
-  p: PChar;
+  p: PAnsiChar;
 begin
 begin
   p := GDBErrorBuf.buf;
   p := GDBErrorBuf.buf;
   if (p^=#0) and got_error then
   if (p^=#0) and got_error then
-    GetError := PChar(PtrInt(GDBOutputBuf.buf) + GDBOutputBuf.idx)
+    GetError := PAnsiChar(PtrInt(GDBOutputBuf.buf) + GDBOutputBuf.idx)
   else
   else
     GetError := p;
     GetError := p;
 end;
 end;
@@ -308,16 +308,16 @@ begin
 {$ifdef GDB_RAW_OUTPUT}
 {$ifdef GDB_RAW_OUTPUT}
   if output_raw then
   if output_raw then
     for I := 0 to GDB.RawResponse.Count - 1 do
     for I := 0 to GDB.RawResponse.Count - 1 do
-      GDBRawBuf.Append(PChar(GDB.RawResponse[I]));
+      GDBRawBuf.Append(PAnsiChar(GDB.RawResponse[I]));
 {$endif GDB_RAW_OUTPUT}
 {$endif GDB_RAW_OUTPUT}
 
 
   for I := 0 to GDB.ConsoleStream.Count - 1 do
   for I := 0 to GDB.ConsoleStream.Count - 1 do
-    GDBOutputBuf.Append(PChar(GDB.ConsoleStream[I]));
+    GDBOutputBuf.Append(PAnsiChar(GDB.ConsoleStream[I]));
   if GDB.ResultRecord.AsyncClass='error' then
   if GDB.ResultRecord.AsyncClass='error' then
   begin
   begin
     got_error := True;
     got_error := True;
     if Assigned(GDB.ResultRecord.Parameters['msg']) then
     if Assigned(GDB.ResultRecord.Parameters['msg']) then
-      GDBErrorBuf.Append(PChar(GDB.ResultRecord.Parameters['msg'].AsString));
+      GDBErrorBuf.Append(PAnsiChar(GDB.ResultRecord.Parameters['msg'].AsString));
   end;
   end;
   ProcessResponse;
   ProcessResponse;
   Dec(command_level);
   Dec(command_level);
@@ -556,7 +556,7 @@ procedure TGDBInterface.FlushAll;
 begin
 begin
 end;
 end;
 
 
-function TGDBInterface.Query(question: PChar; args: PChar): LongInt;
+function TGDBInterface.Query(question: PAnsiChar; args: PAnsiChar): LongInt;
 begin
 begin
   Query := 0;
   Query := 0;
 end;
 end;

+ 3 - 3
packages/ide/gdbmiproc.pas

@@ -15,9 +15,9 @@
 
 
 unit GDBMIProc;
 unit GDBMIProc;
 
 
-{$MODE objfpc}{$H+}
-
+{$MODE objfpc}
 {$I globdir.inc}
 {$I globdir.inc}
+{$H+}
 
 
 interface
 interface
 
 
@@ -60,7 +60,7 @@ end;
 
 
 function TGDBProcess.GDBReadLn: string;
 function TGDBProcess.GDBReadLn: string;
 var
 var
-  C: Char;
+  C: AnsiChar;
 begin
 begin
   Result := '';
   Result := '';
   while FProcess.Running do
   while FProcess.Running do

+ 4 - 2
packages/ide/gdbmiwrap.pas

@@ -15,10 +15,12 @@
 
 
 unit gdbmiwrap;
 unit gdbmiwrap;
 
 
-{$MODE objfpc}{$H+}
+{$MODE objfpc}
 {$ASSERTIONS on}
 {$ASSERTIONS on}
 
 
 {$I globdir.inc}
 {$I globdir.inc}
+// Needs to be on
+{$H+}
 
 
 interface
 interface
 
 
@@ -368,7 +370,7 @@ var
   CStr: string;
   CStr: string;
   ////  Tuple: TGDBMI_TupleValue;
   ////  Tuple: TGDBMI_TupleValue;
   List: TGDBMI_TupleOrListValue;
   List: TGDBMI_TupleOrListValue;
-  end_c : char;
+  end_c : AnsiChar;
   Name: string;
   Name: string;
   Value: TGDBMI_Value;
   Value: TGDBMI_Value;
 begin
 begin

+ 2 - 0
packages/ide/globdir.inc

@@ -231,3 +231,5 @@
 {$ifdef TYPED_LOCAL_CALLBACKS}
 {$ifdef TYPED_LOCAL_CALLBACKS}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+
+{$h-}

+ 2 - 0
packages/ide/pmode.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit PMode;
 unit PMode;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses Dos;
 uses Dos;

+ 3 - 2
packages/ide/test.pas

@@ -1,5 +1,6 @@
 {$mode objfpc}
 {$mode objfpc}
 {$R-}
 {$R-}
+{$H-}
 
 
 program TestProgram;
 program TestProgram;
 uses
 uses
@@ -78,7 +79,7 @@ var Hello : word;
     ProcVar: procedure;
     ProcVar: procedure;
     ProcVarD: function(X: real): boolean;
     ProcVarD: function(X: real): boolean;
     ProcVarI: ProcTyp;
     ProcVarI: ProcTyp;
-    SetVarD: set of char;
+    SetVarD: set of AnsiChar;
     SetVarI: SetTyp;
     SetVarI: SetTyp;
     Float1: real;
     Float1: real;
     Float2: double;
     Float2: double;
@@ -90,7 +91,7 @@ var Hello : word;
     ClassVar2: TClass2;
     ClassVar2: TClass2;
     Obj1: TObj;
     Obj1: TObj;
     Obj2: TObj2;
     Obj2: TObj2;
-    CharArray : Array[1..2000] of char;
+    CharArray : Array[1..2000] of AnsiChar;
     ExtendedArray : Array[1..2000] of extended;
     ExtendedArray : Array[1..2000] of extended;
     ExtendedPackedArray : packed Array[1..2000] of extended;
     ExtendedPackedArray : packed Array[1..2000] of extended;
     SingleArrayArray : Array[1..10,1..10] of single;
     SingleArrayArray : Array[1..10,1..10] of single;

+ 1 - 0
packages/ide/test1.pas

@@ -1,6 +1,7 @@
 unit test1;
 unit test1;
 
 
 {$mode objfpc}
 {$mode objfpc}
+{$H-}
 
 
 { dummy unit for test of dbx stabs info PM }
 { dummy unit for test of dbx stabs info PM }
 
 

+ 1 - 0
packages/ide/test2.pas

@@ -1,4 +1,5 @@
 {$L+}
 {$L+}
+{$H-}
 unit Test2;
 unit Test2;
 
 
 interface
 interface

+ 3 - 2
packages/ide/vesa.pas

@@ -17,6 +17,7 @@ unit VESA;
 {$ifdef DEBUG}
 {$ifdef DEBUG}
 {$define TESTGRAPHIC}
 {$define TESTGRAPHIC}
 {$endif DEBUG}
 {$endif DEBUG}
+{$H-}
 
 
 interface
 interface
 
 
@@ -248,7 +249,7 @@ end;
 function VESAGetOemString: string;
 function VESAGetOemString: string;
 var OK: boolean;
 var OK: boolean;
     VI: TVESAInfoBlock;
     VI: TVESAInfoBlock;
-    S: array[0..256] of char;
+    S: array[0..256] of AnsiChar;
 begin
 begin
   if disableVESA then
   if disableVESA then
     begin
     begin
@@ -574,7 +575,7 @@ var
   w, prevcolor,
   w, prevcolor,
   prevbkcolor, StoreCursorType : word;
   prevbkcolor, StoreCursorType : word;
   Color,BkCol,Col : byte;
   Color,BkCol,Col : byte;
-  Ch : char;
+  Ch : AnsiChar;
 {$endif TESTGRAPHIC}
 {$endif TESTGRAPHIC}
 begin
 begin
 {$ifdef TESTGRAPHIC}
 {$ifdef TESTGRAPHIC}

+ 22 - 20
packages/ide/wansi.pas

@@ -15,6 +15,8 @@
 {.$DEFINE DEBUG}
 {.$DEFINE DEBUG}
 unit WANSI;
 unit WANSI;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses Objects,Drivers,
 uses Objects,Drivers,
@@ -91,8 +93,8 @@ type
        procedure   GotoXY(X,Y: integer); virtual;
        procedure   GotoXY(X,Y: integer); virtual;
        procedure   Write(Const S: string); virtual;
        procedure   Write(Const S: string); virtual;
        procedure   WriteLn(Const S: string); virtual;
        procedure   WriteLn(Const S: string); virtual;
-       procedure   WriteChar(C: char); virtual;
-       procedure   WriteCharRaw(C: char); virtual;
+       procedure   WriteChar(C: AnsiChar); virtual;
+       procedure   WriteCharRaw(C: AnsiChar); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   HighVideo; virtual;
        procedure   HighVideo; virtual;
@@ -112,7 +114,7 @@ type
        procedure   PutKey(S: string); virtual;
        procedure   PutKey(S: string); virtual;
        destructor  Done; virtual;
        destructor  Done; virtual;
        private
        private
-       procedure   ProcessChar(C: char); virtual;
+       procedure   ProcessChar(C: AnsiChar); virtual;
      end;
      end;
 
 
      PANSIConsole = ^TANSIConsole;
      PANSIConsole = ^TANSIConsole;
@@ -122,7 +124,7 @@ type
        ANSICurPosStack    : array[1..ANSICurPosStackSize] of TPoint;
        ANSICurPosStack    : array[1..ANSICurPosStackSize] of TPoint;
        ANSICurPosStackPtr : byte;
        ANSICurPosStackPtr : byte;
        constructor Init(AReplyHook, AKeyHook, AWriteHook: PHookProc);
        constructor Init(AReplyHook, AKeyHook, AWriteHook: PHookProc);
-       procedure   ProcessChar(C: char); virtual;
+       procedure   ProcessChar(C: AnsiChar); virtual;
        function    GetANSIParam: integer; virtual;
        function    GetANSIParam: integer; virtual;
        { --- ANSI functions --- }
        { --- ANSI functions --- }
        procedure   PushCurPos; virtual;
        procedure   PushCurPos; virtual;
@@ -142,7 +144,7 @@ type
        procedure   CursorOff; virtual;
        procedure   CursorOff; virtual;
        procedure   ClrScr; virtual;
        procedure   ClrScr; virtual;
        procedure   ClrEol; virtual;
        procedure   ClrEol; virtual;
-       procedure   WriteChar(C: char); virtual;
+       procedure   WriteChar(C: AnsiChar); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   UpdateCursor; virtual;
        procedure   UpdateCursor; virtual;
@@ -168,8 +170,8 @@ type
        procedure   CursorOff; virtual;
        procedure   CursorOff; virtual;
        procedure   ClrScr; virtual;
        procedure   ClrScr; virtual;
        procedure   ClrEol; virtual;
        procedure   ClrEol; virtual;
-       procedure   WriteChar(C: char); virtual;
-       procedure   WriteCharRaw(C: char); virtual;
+       procedure   WriteChar(C: AnsiChar); virtual;
+       procedure   WriteCharRaw(C: AnsiChar); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   UpdateCursor; virtual;
        procedure   UpdateCursor; virtual;
@@ -203,7 +205,7 @@ type
        procedure   CursorOff; virtual;
        procedure   CursorOff; virtual;
        procedure   ClrScr; virtual;
        procedure   ClrScr; virtual;
        procedure   ClrEol; virtual;
        procedure   ClrEol; virtual;
-       procedure   WriteChar(C: char); virtual;
+       procedure   WriteChar(C: AnsiChar); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   DelLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   InsLine(LineCount: integer); virtual;
        procedure   UpdateCursor; virtual;
        procedure   UpdateCursor; virtual;
@@ -285,17 +287,17 @@ begin
   UpdateCursor;
   UpdateCursor;
 end;
 end;
 
 
-procedure TConsoleObject.ProcessChar(C: char);
+procedure TConsoleObject.ProcessChar(C: AnsiChar);
 begin
 begin
   WriteChar(C);
   WriteChar(C);
 end;
 end;
 
 
-procedure TConsoleObject.WriteChar(C: char);
+procedure TConsoleObject.WriteChar(C: AnsiChar);
 begin
 begin
   Abstract;
   Abstract;
 end;
 end;
 
 
-procedure TConsoleObject.WriteCharRaw(C: char);
+procedure TConsoleObject.WriteCharRaw(C: AnsiChar);
 begin
 begin
   Abstract;
   Abstract;
 end;
 end;
@@ -452,7 +454,7 @@ begin
   GotoXY(Crt.WhereX,Crt.WhereY);
   GotoXY(Crt.WhereX,Crt.WhereY);
 end;
 end;
 
 
-procedure TCrtConsole.WriteChar(C: char);
+procedure TCrtConsole.WriteChar(C: AnsiChar);
 {var OK: boolean;}
 {var OK: boolean;}
 begin
 begin
 {  OK:=((C>=#32) and (WhereX<Size.X)) or (C<#32);
 {  OK:=((C>=#32) and (WhereX<Size.X)) or (C<#32);
@@ -501,7 +503,7 @@ begin
   ANSIParam:=''; ANSILevel:=0; ANSICurPosStackPtr:=0;
   ANSIParam:=''; ANSILevel:=0; ANSICurPosStackPtr:=0;
 end;
 end;
 
 
-procedure TANSIConsole.ProcessChar(C: char);
+procedure TANSIConsole.ProcessChar(C: AnsiChar);
 var SkipThis : boolean;
 var SkipThis : boolean;
     ANSIDone : boolean;
     ANSIDone : boolean;
     X,Y,Z    : integer;
     X,Y,Z    : integer;
@@ -509,7 +511,7 @@ begin
   SkipThis:=false;
   SkipThis:=false;
   if C=Esc then
   if C=Esc then
     begin
     begin
-       { Treat EscEsc as a request to print a single Escape #27 char PM }
+       { Treat EscEsc as a request to print a single Escape #27 AnsiChar PM }
       if AnsiLevel=0 then
       if AnsiLevel=0 then
         begin
         begin
           ANSILevel:=1;
           ANSILevel:=1;
@@ -531,7 +533,7 @@ begin
                     SkipThis:=true;
                     SkipThis:=true;
                   end;
                   end;
        else
        else
-       { Treat Esc+ AnyChar as a request to print that single char raw PM }
+       { Treat Esc+ AnyChar as a request to print that single AnsiChar raw PM }
          begin
          begin
            WriteCharRaw(c);
            WriteCharRaw(c);
            SkipThis:=true;
            SkipThis:=true;
@@ -712,7 +714,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TANSIViewConsole.WriteChar(C: char);
+procedure TANSIViewConsole.WriteChar(C: AnsiChar);
 var Pos: longint;
 var Pos: longint;
 begin
 begin
   case C of
   case C of
@@ -738,7 +740,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TANSIViewConsole.WriteCharRaw(C: char);
+procedure TANSIViewConsole.WriteCharRaw(C: AnsiChar);
 var Pos: longint;
 var Pos: longint;
 begin
 begin
   Pos:=(CurPos.Y-1)*MaxViewWidth+(WhereX-1);
   Pos:=(CurPos.Y-1)*MaxViewWidth+(WhereX-1);
@@ -793,7 +795,7 @@ end;
 function TANSIView.LoadFile(const FileName: string): boolean;
 function TANSIView.LoadFile(const FileName: string): boolean;
 var S: PBufStream;
 var S: PBufStream;
     OK: boolean;
     OK: boolean;
-    B: array[0..1023] of char;
+    B: array[0..1023] of AnsiChar;
     I,FragSize: integer;
     I,FragSize: integer;
 begin
 begin
 {$I-}
 {$I-}
@@ -930,7 +932,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TANSIBackgroundConsole.WriteChar(C: char);
+procedure TANSIBackgroundConsole.WriteChar(C: AnsiChar);
 var Pos: longint;
 var Pos: longint;
 begin
 begin
   case C of
   case C of
@@ -1000,7 +1002,7 @@ end;
 function TANSIBackground.LoadFile(const FileName: string): boolean;
 function TANSIBackground.LoadFile(const FileName: string): boolean;
 var S: PBufStream;
 var S: PBufStream;
     OK: boolean;
     OK: boolean;
-    B: array[0..1023] of char;
+    B: array[0..1023] of AnsiChar;
     I,FragSize: integer;
     I,FragSize: integer;
 begin
 begin
 {$I-}
 {$I-}

+ 1 - 1
packages/ide/wcedit.pas

@@ -777,7 +777,7 @@ end;
 procedure TIndicator.Draw;
 procedure TIndicator.Draw;
 var
 var
   Color: Byte;
   Color: Byte;
-  Frame: Char;
+  Frame: AnsiChar;
   L: array[0..1] of PtrInt;
   L: array[0..1] of PtrInt;
   S: String[15];
   S: String[15];
   B: TDrawBuffer;
   B: TDrawBuffer;

+ 1 - 1
packages/ide/wchmhwrap.pas

@@ -187,7 +187,7 @@ end;
 
 
 procedure splitline(idestream:PMemoryTextFile;s:ansistring);
 procedure splitline(idestream:PMemoryTextFile;s:ansistring);
 
 
-function scanvalue:integer; // searches for a possible breaking point left of char 255.
+function scanvalue:integer; // searches for a possible breaking point left of AnsiChar 255.
 var n,i  : integer;
 var n,i  : integer;
     lastpoint:integer;
     lastpoint:integer;
     inquote : boolean;
     inquote : boolean;

+ 2 - 0
packages/ide/wconsole.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit WConsole;
 unit WConsole;
 
 
+{$H-}
+
 interface
 interface
 {$ifdef UNIX}
 {$ifdef UNIX}
    uses
    uses

+ 2 - 1
packages/ide/wconsts.pas

@@ -10,8 +10,9 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$i globdir.inc}
 {$i globdir.inc}
-
 {$mode objfpc}
 {$mode objfpc}
+{$H-}
+
 unit wconsts;
 unit wconsts;
 
 
   interface
   interface

+ 36 - 36
packages/ide/weditor.pas

@@ -68,7 +68,7 @@ const
       MaxLineLength     = 255;
       MaxLineLength     = 255;
       MaxLineCount      = 2000000;
       MaxLineCount      = 2000000;
 
 
-      CodeTemplateCursorChar = '|'; { char to signal cursor pos in templates }
+      CodeTemplateCursorChar = '|'; { AnsiChar to signal cursor pos in templates }
 
 
       efBackupFiles         = $00000001;
       efBackupFiles         = $00000001;
       efInsertMode          = $00000002;
       efInsertMode          = $00000002;
@@ -691,7 +691,7 @@ type
       procedure ReadBlock; virtual;
       procedure ReadBlock; virtual;
       procedure PrintBlock; virtual;
       procedure PrintBlock; virtual;
       procedure ExpandCodeTemplate; virtual;
       procedure ExpandCodeTemplate; virtual;
-      procedure AddChar(C: char); virtual;
+      procedure AddChar(C: AnsiChar); virtual;
 {$ifdef WinClipSupported}
 {$ifdef WinClipSupported}
       function  ClipCopyWin: Boolean; virtual;
       function  ClipCopyWin: Boolean; virtual;
       function  ClipPasteWin: Boolean; virtual;
       function  ClipPasteWin: Boolean; virtual;
@@ -757,13 +757,13 @@ const
 {$ifndef NO_UNTYPEDSET}
 {$ifndef NO_UNTYPEDSET}
   {$define USE_UNTYPEDSET}
   {$define USE_UNTYPEDSET}
 {$endif ndef NO_UNTYPEDSET}
 {$endif ndef NO_UNTYPEDSET}
-     WhiteSpaceChars    {$ifdef USE_UNTYPEDSET}: set of char {$endif} = [#0,#32,#255];
-     TabChars           {$ifdef USE_UNTYPEDSET}: set of char {$endif} = [#9];
-     HashChars          {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['#'];
-     AlphaChars         {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['A'..'Z','a'..'z','_'];
-     NumberChars        {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['0'..'9'];
-     HexNumberChars     {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['0'..'9','A'..'F','a'..'f'];
-     RealNumberChars    {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['E','e','.'{,'+','-'}];
+     WhiteSpaceChars    {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = [#0,#32,#255];
+     TabChars           {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = [#9];
+     HashChars          {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['#'];
+     AlphaChars         {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['A'..'Z','a'..'z','_'];
+     NumberChars        {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['0'..'9'];
+     HexNumberChars     {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['0'..'9','A'..'F','a'..'f'];
+     RealNumberChars    {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['E','e','.'{,'+','-'}];
 
 
 procedure RegisterWEditor;
 procedure RegisterWEditor;
 
 
@@ -906,7 +906,7 @@ begin
   scankeymap:=0;
   scankeymap:=0;
 end;
 end;
 
 
-function IsWordSeparator(C: char): boolean;
+function IsWordSeparator(C: AnsiChar): boolean;
 begin
 begin
   IsWordSeparator:=C in
   IsWordSeparator:=C in
       [' ',#0,#255,':','=','''','"',
       [' ',#0,#255,':','=','''','"',
@@ -917,7 +917,7 @@ begin
       '!'];
       '!'];
 end;
 end;
 
 
-{function IsSpace(C: char): boolean;
+{function IsSpace(C: AnsiChar): boolean;
 begin
 begin
   IsSpace:=C in[' ',#0,#255];
   IsSpace:=C in[' ',#0,#255];
 end;}
 end;}
@@ -989,7 +989,7 @@ var
 begin
 begin
   for i:=1 to length(s) do
   for i:=1 to length(s) do
    if s[i] in ['a'..'z'] then
    if s[i] in ['a'..'z'] then
-    upper[i]:=char(byte(s[i])-32)
+    upper[i]:=AnsiChar(byte(s[i])-32)
    else
    else
     upper[i]:=s[i];
     upper[i]:=s[i];
   upper[0]:=s[0];
   upper[0]:=s[0];
@@ -1112,13 +1112,13 @@ end;
 
 
 function BMFIScan(var Block; Size: Sw_Word;const Str: String;const bt:BTable): Sw_Integer;
 function BMFIScan(var Block; Size: Sw_Word;const Str: String;const bt:BTable): Sw_Integer;
 Var
 Var
-  buffer : Array[0..MaxBufLength-1] of Char Absolute block;
+  buffer : Array[0..MaxBufLength-1] of AnsiChar Absolute block;
   len,
   len,
   numb,
   numb,
   x      : Sw_Word;
   x      : Sw_Word;
   found  : Boolean;
   found  : Boolean;
-  p      : pchar;
-  c      : char;
+  p      : PAnsiChar;
+  c      : AnsiChar;
 begin
 begin
   len:=length(str);
   len:=length(str);
   if (len=0) or (len>size) then
   if (len=0) or (len>size) then
@@ -1221,13 +1221,13 @@ end;
 
 
 function BMBIScan(var Block; Size: Sw_Word;const Str: String;const bt:BTable): Sw_Integer;
 function BMBIScan(var Block; Size: Sw_Word;const Str: String;const bt:BTable): Sw_Integer;
 Var
 Var
-  buffer : Array[0..MaxBufLength-1] of Char Absolute block;
+  buffer : Array[0..MaxBufLength-1] of AnsiChar Absolute block;
   len,
   len,
   x      : Sw_Word;
   x      : Sw_Word;
   numb   : Sw_Integer;
   numb   : Sw_Integer;
   found  : Boolean;
   found  : Boolean;
-  p      : pchar;
-  c      : char;
+  p      : PAnsiChar;
+  c      : AnsiChar;
 begin
 begin
   len:=length(str);
   len:=length(str);
   if (len=0) or (len>size) then
   if (len=0) or (len>size) then
@@ -2225,17 +2225,17 @@ var
     {MatchedSymbol:=StoredMatchedSymbol;}
     {MatchedSymbol:=StoredMatchedSymbol;}
   end;
   end;
 
 
-  function GetCharClass(C: char): TCharClass;
+  function GetCharClass(C: AnsiChar): TCharClass;
   var CC: TCharClass;
   var CC: TCharClass;
   begin
   begin
   (*
   (*
-     WhiteSpaceChars    {$ifdef USE_UNTYPEDSET}: set of char {$endif} = [#0,#32,#255];
-     TabChars           {$ifdef USE_UNTYPEDSET}: set of char {$endif} = [#9];
-     HashChars          {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['#'];
-     AlphaChars         {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['A'..'Z','a'..'z','_'];
-     NumberChars        {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['0'..'9'];
-     HexNumberChars     {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['0'..'9','A'..'F','a'..'f'];
-     RealNumberChars    {$ifdef USE_UNTYPEDSET}: set of char {$endif} = ['E','e','.'{,'+','-'}];
+     WhiteSpaceChars    {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = [#0,#32,#255];
+     TabChars           {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = [#9];
+     HashChars          {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['#'];
+     AlphaChars         {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['A'..'Z','a'..'z','_'];
+     NumberChars        {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['0'..'9'];
+     HexNumberChars     {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['0'..'9','A'..'F','a'..'f'];
+     RealNumberChars    {$ifdef USE_UNTYPEDSET}: set of AnsiChar {$endif} = ['E','e','.'{,'+','-'}];
   *)
   *)
     if C in {$ifdef USE_UNTYPEDSET}[#0,#32,#255]{$else}WhiteSpaceChars{$endif} then
     if C in {$ifdef USE_UNTYPEDSET}[#0,#32,#255]{$else}WhiteSpaceChars{$endif} then
       CC:=ccWhiteSpace
       CC:=ccWhiteSpace
@@ -2320,7 +2320,7 @@ var
       InAsm:=true;
       InAsm:=true;
   end;
   end;
 
 
-  procedure ProcessChar(C: char);
+  procedure ProcessChar(C: AnsiChar);
   var CC: TCharClass;
   var CC: TCharClass;
       EX: Sw_integer;
       EX: Sw_integer;
       EndComment: pstring;
       EndComment: pstring;
@@ -3478,7 +3478,7 @@ begin
           which are normally interpreted as control chars. So, when you enter
           which are normally interpreted as control chars. So, when you enter
           Alt+24 (on the numeric pad) then this will normally move the cursor
           Alt+24 (on the numeric pad) then this will normally move the cursor
           one line down, but if you do it in ASCII mode (also after Ctrl+B)
           one line down, but if you do it in ASCII mode (also after Ctrl+B)
-          then this will insert the ASCII #24 char (upper arrow) in the
+          then this will insert the ASCII #24 AnsiChar (upper arrow) in the
           source code. - Gabor }
           source code. - Gabor }
         if InASCIIMode {and (Event.CharCode<>0)} then
         if InASCIIMode {and (Event.CharCode<>0)} then
           begin
           begin
@@ -3753,7 +3753,7 @@ var SelectColor,
     Line: PCustomLine;
     Line: PCustomLine;
     LineText,Format: string;
     LineText,Format: string;
     isBreak : boolean;
     isBreak : boolean;
-    C: char;
+    C: AnsiChar;
     FreeFormat: array[0..MaxLineLength] of boolean;
     FreeFormat: array[0..MaxLineLength] of boolean;
     Color: word;
     Color: word;
     ColorTab: array[coFirstColor..coLastColor] of word;
     ColorTab: array[coFirstColor..coLastColor] of word;
@@ -4045,7 +4045,7 @@ end;
 
 
 procedure TCustomCodeEditor.GetFoldStrings(EditorLine: sw_integer; var Prefix, Suffix: openstring);
 procedure TCustomCodeEditor.GetFoldStrings(EditorLine: sw_integer; var Prefix, Suffix: openstring);
 var F: PFold;
 var F: PFold;
-    C: char;
+    C: AnsiChar;
 begin
 begin
   Prefix:=CharStr(' ',GetFoldStringWidth); Suffix:='';
   Prefix:=CharStr(' ',GetFoldStringWidth); Suffix:='';
   F:=GetLineFold(EditorLine);
   F:=GetLineFold(EditorLine);
@@ -4471,7 +4471,7 @@ procedure TCustomCodeEditor.ChangeCaseArea(StartP,EndP: TPoint; CaseAction: TCas
 var Y,X: sw_integer;
 var Y,X: sw_integer;
     X1,X2: sw_integer;
     X1,X2: sw_integer;
     S: string;
     S: string;
-    C: char;
+    C: AnsiChar;
     StartPos : TPoint;
     StartPos : TPoint;
     HoldUndo : boolean;
     HoldUndo : boolean;
 begin
 begin
@@ -4636,7 +4636,7 @@ const OpenSymbols  : string[6] = '[{(<''"';
       CloseSymbols : string[6] = ']})>''"';
       CloseSymbols : string[6] = ']})>''"';
 var SymIdx: integer;
 var SymIdx: integer;
     LineText,LineAttr: string;
     LineText,LineAttr: string;
-    CurChar: char;
+    CurChar: AnsiChar;
     X,Y: sw_integer;
     X,Y: sw_integer;
     LineCount: sw_integer;
     LineCount: sw_integer;
     JumpPos: TPoint;
     JumpPos: TPoint;
@@ -5643,7 +5643,7 @@ begin
   UnLock;
   UnLock;
 end;
 end;
 
 
-procedure TCustomCodeEditor.AddChar(C: char);
+procedure TCustomCodeEditor.AddChar(C: AnsiChar);
 const OpenBrackets  : string[10] = '[({';
 const OpenBrackets  : string[10] = '[({';
       CloseBrackets : string[10] = '])}';
       CloseBrackets : string[10] = '])}';
 var S,SC,TabS: string;
 var S,SC,TabS: string;
@@ -5773,7 +5773,7 @@ end;
 var
 var
     OK: boolean;
     OK: boolean;
     l,i,len,len10 : longint;
     l,i,len,len10 : longint;
-    p,p10,p2,p13 : pchar;
+    p,p10,p2,p13 : PAnsiChar;
     s : string;
     s : string;
 begin
 begin
   Lock;
   Lock;
@@ -5845,7 +5845,7 @@ end;
 
 
 function TCustomCodeEditor.ClipCopyWin: Boolean;
 function TCustomCodeEditor.ClipCopyWin: Boolean;
 var OK,ShowInfo: boolean;
 var OK,ShowInfo: boolean;
-    p,p2 : pchar;
+    p,p2 : PAnsiChar;
     s : string;
     s : string;
     i,str_begin,str_end,NumLines,PcLength : longint;
     i,str_begin,str_end,NumLines,PcLength : longint;
 begin
 begin
@@ -6112,7 +6112,7 @@ var S: string;
     RegExpEngine : TRegExprEngine;
     RegExpEngine : TRegExprEngine;
     RegExpFlags : tregexprflags;
     RegExpFlags : tregexprflags;
     regexpindex,regexplen : longint;
     regexpindex,regexplen : longint;
-    findstrpchar : pchar;
+    findstrpchar : PAnsiChar;
 {$endif TEST_REGEXP}
 {$endif TEST_REGEXP}
     LeftOK,RightOK: boolean;
     LeftOK,RightOK: boolean;
     FoundCount: sw_integer;
     FoundCount: sw_integer;

+ 6 - 5
packages/ide/whelp.pas

@@ -13,6 +13,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$R-}
 {$R-}
+{$H-}
 unit WHelp;
 unit WHelp;
 
 
 {$ifdef cpullvm}
 {$ifdef cpullvm}
@@ -35,7 +36,7 @@ const
       hscLink        = #2;
       hscLink        = #2;
       hscLineStart   = #3;
       hscLineStart   = #3;
       hscCode        = #5;
       hscCode        = #5;
-      hscDirect      = #6; { add the next char directly }
+      hscDirect      = #6; { add the next AnsiChar directly }
       hscCenter      = #10;
       hscCenter      = #10;
       hscRight       = #11;
       hscRight       = #11;
       hscNamedMark   = #12;
       hscNamedMark   = #12;
@@ -593,7 +594,7 @@ begin
       T1:=HelpFacility^.LoadTopic(K1^.FileID,K1^.HelpCtx);
       T1:=HelpFacility^.LoadTopic(K1^.FileID,K1^.HelpCtx);
       T2:=HelpFacility^.LoadTopic(K2^.FileID,K2^.HelpCtx);
       T2:=HelpFacility^.LoadTopic(K2^.FileID,K2^.HelpCtx);
       if assigned(T1^.Text) and assigned(T2^.Text) then
       if assigned(T1^.Text) and assigned(T2^.Text) then
-        r:=strcomp(pchar(T1^.Text),pchar(T2^.Text))
+        r:=strcomp(PAnsiChar(T1^.Text),PAnsiChar(T2^.Text))
       else
       else
         r:=0;
         r:=0;
       if r>0 then
       if r>0 then
@@ -864,8 +865,8 @@ begin
   if Line<>'' then AddLine(Line); Line:='';
   if Line<>'' then AddLine(Line); Line:='';
 end;
 end;
 var KWCount,NLFlag: sw_integer;
 var KWCount,NLFlag: sw_integer;
-    LastFirstChar: char;
-procedure NewSection(FirstChar: char);
+    LastFirstChar: AnsiChar;
+procedure NewSection(FirstChar: AnsiChar);
 begin
 begin
   if FirstChar<=#64 then FirstChar:=#32;
   if FirstChar<=#64 then FirstChar:=#32;
   FlushLine;
   FlushLine;
@@ -948,7 +949,7 @@ begin
       if IsMultiple then
       if IsMultiple then
         Begin
         Begin
           Inc(MultiCount);
           Inc(MultiCount);
-          (* St:=Trim(strpas(pchar(HelpFacility^.LoadTopic(KW^.FileID,KW^.HelpCtx)^.Text))); *)
+          (* St:=Trim(strpas(PAnsiChar(HelpFacility^.LoadTopic(KW^.FileID,KW^.HelpCtx)^.Text))); *)
           St:=KW^.Tag^+' ['+IntToStr(MultiCount)+']';
           St:=KW^.Tag^+' ['+IntToStr(MultiCount)+']';
           (* { Remove all special chars }
           (* { Remove all special chars }
           for p:=1 to Length(st) do
           for p:=1 to Length(st) do

+ 2 - 1
packages/ide/whlpview.pas

@@ -13,6 +13,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 unit WHlpView;
 unit WHlpView;
+{$H-}
 
 
 interface
 interface
 
 
@@ -430,7 +431,7 @@ end;
 procedure THelpTopic.ReBuild;
 procedure THelpTopic.ReBuild;
 var TextPos,LinePos,LinkNo,NamedMarkNo: sw_word;
 var TextPos,LinePos,LinkNo,NamedMarkNo: sw_word;
     Line,CurWord: string;
     Line,CurWord: string;
-    C: char;
+    C: AnsiChar;
     InLink,InCodeArea,InColorArea,InImage: boolean;
     InLink,InCodeArea,InColorArea,InImage: boolean;
     LinkStart,LinkEnd,CodeAreaStart,CodeAreaEnd: TPoint;
     LinkStart,LinkEnd,CodeAreaStart,CodeAreaEnd: TPoint;
     ColorAreaStart,ColorAreaEnd: TPoint;
     ColorAreaStart,ColorAreaEnd: TPoint;

+ 6 - 5
packages/ide/whtml.pas

@@ -13,6 +13,7 @@
 unit WHTML;
 unit WHTML;
 
 
 {$I globdir.inc}
 {$I globdir.inc}
+{$H-}
 
 
 interface
 interface
 
 
@@ -55,7 +56,7 @@ type
       Line,LinePos: sw_integer;
       Line,LinePos: sw_integer;
       procedure   DocSoftBreak; virtual;
       procedure   DocSoftBreak; virtual;
       function    GetFileName : string;
       function    GetFileName : string;
-      function    DocAddTextChar(C: char): boolean; virtual;
+      function    DocAddTextChar(C: AnsiChar): boolean; virtual;
       procedure   DocAddText(S: string); virtual;
       procedure   DocAddText(S: string); virtual;
       procedure   DocProcessTag(Tag: string); virtual;
       procedure   DocProcessTag(Tag: string); virtual;
       procedure   DocProcessComment(Comment: string); virtual;
       procedure   DocProcessComment(Comment: string); virtual;
@@ -69,7 +70,7 @@ type
     PHTMLParser = ^THTMLParser;
     PHTMLParser = ^THTMLParser;
     THTMLParser = object(TSGMLParser)
     THTMLParser = object(TSGMLParser)
       procedure   DocSoftBreak; virtual;
       procedure   DocSoftBreak; virtual;
-      function    DocAddTextChar(C: char): boolean; virtual;
+      function    DocAddTextChar(C: AnsiChar): boolean; virtual;
       procedure   DocProcessTag(Tag: string); virtual;
       procedure   DocProcessTag(Tag: string); virtual;
       function    DocGetTagParam(Name: string; var Value: string): boolean; virtual;
       function    DocGetTagParam(Name: string; var Value: string): boolean; virtual;
       procedure   DocProcessComment(Comment: string); virtual;
       procedure   DocProcessComment(Comment: string); virtual;
@@ -251,7 +252,7 @@ end;
 
 
 function TSGMLParser.ProcessLine(LineText: string): boolean;
 function TSGMLParser.ProcessLine(LineText: string): boolean;
 var OK: boolean;
 var OK: boolean;
-    C: char;
+    C: AnsiChar;
     NewInString: boolean;
     NewInString: boolean;
     OldInComment: boolean;
     OldInComment: boolean;
     WasThereAnyText: boolean;
     WasThereAnyText: boolean;
@@ -351,7 +352,7 @@ begin
   Abstract;
   Abstract;
 end;
 end;
 
 
-function TSGMLParser.DocAddTextChar(C: char): boolean;
+function TSGMLParser.DocAddTextChar(C: AnsiChar): boolean;
 begin
 begin
   Abstract;
   Abstract;
   DocAddTextChar:=false;
   DocAddTextChar:=false;
@@ -388,7 +389,7 @@ procedure THTMLParser.DocSoftBreak;
 begin
 begin
 end;
 end;
 
 
-function THTMLParser.DocAddTextChar(C: char): boolean;
+function THTMLParser.DocAddTextChar(C: AnsiChar): boolean;
 begin
 begin
   { Abstract }
   { Abstract }
   DocAddTextChar:=false;
   DocAddTextChar:=false;

+ 10 - 9
packages/ide/whtmlhlp.pas

@@ -15,6 +15,7 @@ unit WHTMLHlp;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 
@@ -76,7 +77,7 @@ type
     THTMLTopicRenderer = object(THTMLParser)
     THTMLTopicRenderer = object(THTMLParser)
       function  BuildTopic(P: PTopic; AURL: string; HTMLFile: PTextFile; ATopicLinks: PTopicLinkCollection): boolean;
       function  BuildTopic(P: PTopic; AURL: string; HTMLFile: PTextFile; ATopicLinks: PTopicLinkCollection): boolean;
     public
     public
-      function  DocAddTextChar(C: char): boolean; virtual;
+      function  DocAddTextChar(C: AnsiChar): boolean; virtual;
       procedure DocSoftBreak; virtual;
       procedure DocSoftBreak; virtual;
       procedure DocTYPE; virtual;
       procedure DocTYPE; virtual;
       procedure DocHTML(Entered: boolean); virtual;
       procedure DocHTML(Entered: boolean); virtual;
@@ -140,13 +141,13 @@ type
       LinkIndexes: array[0..MaxTopicLinks] of sw_integer;
       LinkIndexes: array[0..MaxTopicLinks] of sw_integer;
       FileIDLinkIndexes: array[0..MaxTopicLinks] of sw_integer;
       FileIDLinkIndexes: array[0..MaxTopicLinks] of sw_integer;
       LinkPtr: sw_integer;
       LinkPtr: sw_integer;
-      LastTextChar: char;
+      LastTextChar: AnsiChar;
 {      Anchor: TAnchor;}
 {      Anchor: TAnchor;}
       { Table stuff }
       { Table stuff }
       CurrentTable : PTable;
       CurrentTable : PTable;
       procedure AddText(const S: string);
       procedure AddText(const S: string);
-      procedure AddChar(C: char);
-      procedure AddCharAt(C: char;AtPtr : sw_word);
+      procedure AddChar(C: AnsiChar);
+      procedure AddCharAt(C: AnsiChar;AtPtr : sw_word);
       function AddTextAt(const S: string;AtPtr : sw_word) : sw_word;
       function AddTextAt(const S: string;AtPtr : sw_word) : sw_word;
       function ComputeTextLength(TStart,TEnd : sw_word) : sw_word;
       function ComputeTextLength(TStart,TEnd : sw_word) : sw_word;
     end;
     end;
@@ -508,7 +509,7 @@ end;
 procedure THTMLAnsiView.CopyToHTML;
 procedure THTMLAnsiView.CopyToHTML;
 var
 var
   Attr,NewAttr : byte;
   Attr,NewAttr : byte;
-  c : char;
+  c : AnsiChar;
   X,Y,Pos : longint;
   X,Y,Pos : longint;
 begin
 begin
    Attr:=(Buffer^[1] shr 8);
    Attr:=(Buffer^[1] shr 8);
@@ -548,7 +549,7 @@ begin
   DefHTMLGetSectionColor:=false;
   DefHTMLGetSectionColor:=false;
 end;
 end;
 
 
-function CharStr(C: char; Count: byte): string;
+function CharStr(C: AnsiChar; Count: byte): string;
 var S: string;
 var S: string;
 begin
 begin
   setlength(s,count);
   setlength(s,count);
@@ -557,7 +558,7 @@ begin
 end;
 end;
 
 
 
 
-function THTMLTopicRenderer.DocAddTextChar(C: char): boolean;
+function THTMLTopicRenderer.DocAddTextChar(C: AnsiChar): boolean;
 var Added: boolean;
 var Added: boolean;
 begin
 begin
   Added:=false;
   Added:=false;
@@ -1188,7 +1189,7 @@ begin
   PAlign:=OAlign;
   PAlign:=OAlign;
 end;
 end;
 
 
-procedure THTMLTopicRenderer.AddChar(C: char);
+procedure THTMLTopicRenderer.AddChar(C: AnsiChar);
 begin
 begin
   if (Topic=nil) or (TextPtr=MaxBytes) or SuppressOutput then Exit;
   if (Topic=nil) or (TextPtr=MaxBytes) or SuppressOutput then Exit;
   Topic^.Text^[TextPtr]:=ord(C);
   Topic^.Text^[TextPtr]:=ord(C);
@@ -1197,7 +1198,7 @@ begin
     AnyCharsInLine:=true;
     AnyCharsInLine:=true;
 end;
 end;
 
 
-procedure THTMLTopicRenderer.AddCharAt(C: char;AtPtr : sw_word);
+procedure THTMLTopicRenderer.AddCharAt(C: AnsiChar;AtPtr : sw_word);
 begin
 begin
   if (Topic=nil) or (TextPtr=MaxBytes) or SuppressOutput then Exit;
   if (Topic=nil) or (TextPtr=MaxBytes) or SuppressOutput then Exit;
   if AtPtr>TextPtr then
   if AtPtr>TextPtr then

+ 3 - 2
packages/ide/whtmlscn.pas

@@ -17,6 +17,7 @@ unit WHTMLScn;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 
@@ -32,7 +33,7 @@ type
      PHTMLLinkScanDocument = ^THTMLLinkScanDocument;
      PHTMLLinkScanDocument = ^THTMLLinkScanDocument;
 
 
      TCustomHTMLLinkScanner = object(THTMLParser)
      TCustomHTMLLinkScanner = object(THTMLParser)
-       function    DocAddTextChar(C: char): boolean; virtual;
+       function    DocAddTextChar(C: AnsiChar): boolean; virtual;
        procedure   DocAnchor(Entered: boolean); virtual;
        procedure   DocAnchor(Entered: boolean); virtual;
      public
      public
     {a}function    CheckURL(const URL: string): boolean; virtual;
     {a}function    CheckURL(const URL: string): boolean; virtual;
@@ -202,7 +203,7 @@ const
 const
 const
   CurrentHTMLIndexVersion : sw_integer = HTMLIndexVersion;
   CurrentHTMLIndexVersion : sw_integer = HTMLIndexVersion;
 
 
-function TCustomHTMLLinkScanner.DocAddTextChar(C: char): boolean;
+function TCustomHTMLLinkScanner.DocAddTextChar(C: AnsiChar): boolean;
 var Added: boolean;
 var Added: boolean;
 begin
 begin
   Added:=false;
   Added:=false;

+ 12 - 12
packages/ide/winclip.pas

@@ -24,8 +24,8 @@ function WinClipboardSupported : boolean;
 function OpenWinClipboard : boolean;
 function OpenWinClipboard : boolean;
 function EmptyWinClipboard : boolean;
 function EmptyWinClipboard : boolean;
 function GetTextWinClipboardSize : longint;
 function GetTextWinClipboardSize : longint;
-function GetTextWinClipBoardData(var p : pchar;var l : longint) : boolean;
-function SetTextWinClipBoardData(p : pchar;l : longint) : boolean;
+function GetTextWinClipBoardData(var p : PAnsiChar;var l : longint) : boolean;
+function SetTextWinClipBoardData(p : PAnsiChar;l : longint) : boolean;
 {$endif WinClipSupported}
 {$endif WinClipSupported}
 
 
 implementation
 implementation
@@ -127,7 +127,7 @@ begin
   HC:=GetClipBoardData(CF_OEMTEXT);
   HC:=GetClipBoardData(CF_OEMTEXT);
   if HC<>0 then
   if HC<>0 then
     begin
     begin
-      InternGetDataSize:=strlen(pchar(GlobalLock(HC)))+1;
+      InternGetDataSize:=strlen(PAnsiChar(GlobalLock(HC)))+1;
       GlobalUnlock(HC);
       GlobalUnlock(HC);
     end
     end
   else
   else
@@ -173,7 +173,7 @@ begin
   CloseWinClipboard;
   CloseWinClipboard;
 end;
 end;
 
 
-function GetTextWinClipBoardData(var p : pchar;var l : longint) : boolean;
+function GetTextWinClipBoardData(var p : PAnsiChar;var l : longint) : boolean;
 var
 var
 {$ifdef DOS}
 {$ifdef DOS}
   r : Registers;
   r : Registers;
@@ -181,11 +181,11 @@ var
 {$endif DOS}
 {$endif DOS}
 {$ifdef Windows}
 {$ifdef Windows}
   h : HGlobal;
   h : HGlobal;
-  pp : pchar;
+  pp : PAnsiChar;
 {$endif Windows}
 {$endif Windows}
 {$ifdef HASAMIGA}
 {$ifdef HASAMIGA}
   Text: AnsiString;
   Text: AnsiString;
-  pp: PChar;
+  pp: PAnsiChar;
 {$endif HASAMIGA}
 {$endif HASAMIGA}
 begin
 begin
   p:=nil;
   p:=nil;
@@ -213,7 +213,7 @@ begin
   h:=GetClipboardData(CF_OEMTEXT);
   h:=GetClipboardData(CF_OEMTEXT);
   if h<>0 then
   if h<>0 then
     begin
     begin
-      pp:=pchar(GlobalLock(h));
+      pp:=PAnsiChar(GlobalLock(h));
       l:=strlen(pp)+1;
       l:=strlen(pp)+1;
       getmem(p,l);
       getmem(p,l);
       move(pp^,p^,l);
       move(pp^,p^,l);
@@ -236,7 +236,7 @@ begin
 {$endif DOS}
 {$endif DOS}
 end;
 end;
 
 
-function SetTextWinClipBoardData(p : pchar;l : longint) : boolean;
+function SetTextWinClipBoardData(p : PAnsiChar;l : longint) : boolean;
 var
 var
 {$ifdef DOS}
 {$ifdef DOS}
   r : Registers;
   r : Registers;
@@ -244,11 +244,11 @@ var
 {$endif DOS}
 {$endif DOS}
 {$ifdef Windows}
 {$ifdef Windows}
   h : HGlobal;
   h : HGlobal;
-  pp : pchar;
+  pp : PAnsiChar;
   res : boolean;
   res : boolean;
 {$endif Windows}
 {$endif Windows}
 {$ifdef HASAMIGA}
 {$ifdef HASAMIGA}
-  pp: PChar;
+  pp: PAnsiChar;
   Test: AnsiString;
   Test: AnsiString;
 {$endif HASAMIGA}
 {$endif HASAMIGA}
 begin
 begin
@@ -280,12 +280,12 @@ begin
 {$endif DOS}
 {$endif DOS}
 {$ifdef Windows}
 {$ifdef Windows}
   h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
   h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
-  pp:=pchar(GlobalLock(h));
+  pp:=PAnsiChar(GlobalLock(h));
   move(p^,pp^,l+1);
   move(p^,pp^,l+1);
   GlobalUnlock(h);
   GlobalUnlock(h);
   res:=(SetClipboardData(CF_OEMTEXT,h)=h);
   res:=(SetClipboardData(CF_OEMTEXT,h)=h);
   h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
   h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
-  pp:=pchar(GlobalLock(h));
+  pp:=PAnsiChar(GlobalLock(h));
   OemToCharBuffA(p,pp,l+1);
   OemToCharBuffA(p,pp,l+1);
   SetClipboardData(CF_TEXT,h);
   SetClipboardData(CF_TEXT,h);
   GlobalUnlock(h);
   GlobalUnlock(h);

+ 4 - 2
packages/ide/windebug.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 Unit windebug;
 Unit windebug;
 
 
+{$H-}
+
 interface
 interface
 
 
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
@@ -55,7 +57,7 @@ function CygDrivePrefix : string;
 var
 var
   i : longint;
   i : longint;
   length : dword;
   length : dword;
-  Value : pchar;
+  Value : PAnsiChar;
   _type : dword;
   _type : dword;
   Key,NKey : HKey;
   Key,NKey : HKey;
 begin
 begin
@@ -107,7 +109,7 @@ const
 
 
 
 
 function GetWindowHandle(H : HWND; state : LPARAM) : WINBOOL;stdcall;
 function GetWindowHandle(H : HWND; state : LPARAM) : WINBOOL;stdcall;
-   var pTitle, pEnd, pNewTitle : pchar;
+   var pTitle, pEnd, pNewTitle : PAnsiChar;
        len : longint;
        len : longint;
    begin
    begin
      GetWindowHandle:=true;
      GetWindowHandle:=true;

+ 6 - 5
packages/ide/wini.pas

@@ -17,6 +17,7 @@ unit WINI;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 
@@ -88,8 +89,8 @@ type
     end;
     end;
 
 
 const MainSectionName : string[40] = 'MainSection';
 const MainSectionName : string[40] = 'MainSection';
-      CommentChar     : char = ';';
-      ValidStrDelimiters: set of char = ['''','"'];
+      CommentChar     : AnsiChar = ';';
+      ValidStrDelimiters: set of AnsiChar = ['''','"'];
 
 
 function EscapeIniText(S : string) : String;
 function EscapeIniText(S : string) : String;
 
 
@@ -100,7 +101,7 @@ uses
 
 
 function EscapeIniText(S : string) : String;
 function EscapeIniText(S : string) : String;
 var
 var
-  delimiter : char;
+  delimiter : AnsiChar;
   i: integer;
   i: integer;
 begin
 begin
   delimiter:=#0;
   delimiter:=#0;
@@ -231,9 +232,9 @@ procedure TINIEntry.Split;
 var S,ValueS: string;
 var S,ValueS: string;
     P,P2,StartP: longint;
     P,P2,StartP: longint;
     { using byte for P2 lead to infinite loops PM }
     { using byte for P2 lead to infinite loops PM }
-    C: char;
+    C: AnsiChar;
     InString: boolean;
     InString: boolean;
-    Delimiter: char;
+    Delimiter: AnsiChar;
 begin
 begin
   S:=GetText;
   S:=GetText;
   Delimiter:=#0;
   Delimiter:=#0;

+ 7 - 6
packages/ide/wnghelp.pas

@@ -13,6 +13,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$R-}
 {$R-}
+{$H-}
 unit WNGHelp;
 unit WNGHelp;
 
 
 {$ifdef cpullvm}
 {$ifdef cpullvm}
@@ -35,12 +36,12 @@ const
 
 
 type
 type
       TNGFileHeader = packed record
       TNGFileHeader = packed record
-        Signature     : array[1..2] of char;
+        Signature     : array[1..2] of AnsiChar;
         Unknown       : word;
         Unknown       : word;
         Version       : word;
         Version       : word;
         MenuCount     : word;
         MenuCount     : word;
-        GuideName     : array[8..47] of char;
-        Credits       : array[48..377] of char;
+        GuideName     : array[8..47] of AnsiChar;
+        Credits       : array[48..377] of AnsiChar;
       end;
       end;
 
 
       TNGRecordHeader = packed record
       TNGRecordHeader = packed record
@@ -118,9 +119,9 @@ type
         function ReadRecord(var R: TRecord; ReadData: boolean): boolean;
         function ReadRecord(var R: TRecord; ReadData: boolean): boolean;
       end;
       end;
 
 
-    TNGGetAttrColorProc = function(Attr: char; var Color: byte): boolean;
+    TNGGetAttrColorProc = function(Attr: AnsiChar; var Color: byte): boolean;
 
 
-function DefNGGetAttrColor(Attr: char; var Color: byte): boolean;
+function DefNGGetAttrColor(Attr: AnsiChar; var Color: byte): boolean;
 
 
 const NGGetAttrColor : TNGGetAttrColorProc = {$ifdef fpc}@{$endif}DefNGGetAttrColor;
 const NGGetAttrColor : TNGGetAttrColorProc = {$ifdef fpc}@{$endif}DefNGGetAttrColor;
 
 
@@ -129,7 +130,7 @@ procedure RegisterHelpType;
 implementation
 implementation
 
 
 
 
-function DefNGGetAttrColor(Attr: char; var Color: byte): boolean;
+function DefNGGetAttrColor(Attr: AnsiChar; var Color: byte): boolean;
 begin
 begin
   DefNGGetAttrColor:=false;
   DefNGGetAttrColor:=false;
 end;
 end;

+ 8 - 7
packages/ide/woahelp.pas

@@ -13,6 +13,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$R-}
 {$R-}
+{$H-}
 unit WOAHelp;
 unit WOAHelp;
 
 
 interface
 interface
@@ -41,8 +42,8 @@ const
       ctNibble       = $02;
       ctNibble       = $02;
 
 
 type
 type
-      FileStamp      = array [0..32] of char; {+ null terminator + $1A }
-      FileSignature  = array [0..12] of char; {+ null terminator }
+      FileStamp      = array [0..32] of AnsiChar; {+ null terminator + $1A }
+      FileSignature  = array [0..12] of AnsiChar; {+ null terminator }
 
 
       THLPVersion = packed record
       THLPVersion = packed record
         FormatVersion : byte;
         FormatVersion : byte;
@@ -385,7 +386,7 @@ begin
   Inc(SrcPtr);
   Inc(SrcPtr);
   GetNextNibble:=N;
   GetNextNibble:=N;
 end;
 end;
-procedure RealAddChar(C: char);
+procedure RealAddChar(C: AnsiChar);
 begin
 begin
   if Assigned(NewR.Data) then
   if Assigned(NewR.Data) then
     PByteArray(NewR.Data)^[DestPtr]:=ord(C);
     PByteArray(NewR.Data)^[DestPtr]:=ord(C);
@@ -393,7 +394,7 @@ begin
 end;
 end;
 var CurX,CurY: integer;
 var CurX,CurY: integer;
     InLink: boolean;
     InLink: boolean;
-procedure AddChar(C: char);
+procedure AddChar(C: AnsiChar);
 begin
 begin
   if IsLinkPosStart(CurX+2,CurY) then
   if IsLinkPosStart(CurX+2,CurY) then
     begin
     begin
@@ -421,10 +422,10 @@ begin
     end;
     end;
 end;
 end;
 var OK: boolean;
 var OK: boolean;
-    C: char;
+    C: AnsiChar;
     P: pointer;
     P: pointer;
-function GetNextChar: char;
-var C: char;
+function GetNextChar: AnsiChar;
+var C: AnsiChar;
     I,N,Cnt: byte;
     I,N,Cnt: byte;
 begin
 begin
   N:=GetNextNibble;
   N:=GetNextNibble;

+ 8 - 6
packages/ide/wos2help.pas

@@ -13,10 +13,12 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$R-}
 {$R-}
+{$H-}
 unit WOS2Help;
 unit WOS2Help;
 
 
 interface
 interface
 
 
+
 uses Objects,
 uses Objects,
      WUtils,WHelp;
      WUtils,WHelp;
 
 
@@ -31,7 +33,7 @@ const
 
 
 type
 type
       TINFFileHeader = packed record
       TINFFileHeader = packed record
-        Signature   : array[1..2] of char;{ ID magic word (5348h = "HS")                 }
+        Signature   : array[1..2] of AnsiChar;{ ID magic word (5348h = "HS")                 }
         Unknown1    : byte;      { unknown purpose, could be third letter of ID }
         Unknown1    : byte;      { unknown purpose, could be third letter of ID }
         Flags       : byte;      { probably a flag word...                      }
         Flags       : byte;      { probably a flag word...                      }
                                  {  bit 0: set if INF style file                }
                                  {  bit 0: set if INF style file                }
@@ -68,7 +70,7 @@ type
         NLSTabSize  : longint;   { size of NLS table                            }
         NLSTabSize  : longint;   { size of NLS table                            }
         ExtBlockOfs : longint;   { 32 bit file offset of extended data block    }
         ExtBlockOfs : longint;   { 32 bit file offset of extended data block    }
         Unknown5: array[1..12] of byte;{ unknown purpose                        }
         Unknown5: array[1..12] of byte;{ unknown purpose                        }
-        Title       : array[1..48] of char;{ ASCII title of database            }
+        Title       : array[1..48] of AnsiChar;{ ASCII title of database            }
       end;
       end;
 
 
       PINFTOCArray = ^TINFTOCArray;
       PINFTOCArray = ^TINFTOCArray;
@@ -213,7 +215,7 @@ end;
 function TOS2HelpFile.ReadDictionary: boolean;
 function TOS2HelpFile.ReadDictionary: boolean;
 var OK: boolean;
 var OK: boolean;
     I: longint;
     I: longint;
-    C: array[0..255] of char;
+    C: array[0..255] of AnsiChar;
     B: byte;
     B: byte;
 begin
 begin
   F^.Seek(Header.DictOfs);
   F^.Seek(Header.DictOfs);
@@ -251,7 +253,7 @@ var OK: boolean;
     I,Count: longint;
     I,Count: longint;
     TE: TINFTOCEntry;
     TE: TINFTOCEntry;
     W: word;
     W: word;
-    C: array[0..255] of char;
+    C: array[0..255] of AnsiChar;
     StartOfs: longint;
     StartOfs: longint;
     S: string;
     S: string;
     SubSlots: PWordArray;
     SubSlots: PWordArray;
@@ -326,7 +328,7 @@ begin
   if Line<>'' then Lines^.InsertStr(Line);
   if Line<>'' then Lines^.InsertStr(Line);
   Line:='';
   Line:='';
 end;
 end;
-procedure AddChar(C: char);
+procedure AddChar(C: AnsiChar);
 begin
 begin
   if length(Line)>=255 then FlushLine;
   if length(Line)>=255 then FlushLine;
   Line:=Line+C;
   Line:=Line+C;
@@ -337,7 +339,7 @@ begin
   for I:=1 to length(S) do
   for I:=1 to length(S) do
     AddChar(S[I]);
     AddChar(S[I]);
 end;
 end;
-procedure AddTextChar(C: char);
+procedure AddTextChar(C: AnsiChar);
 begin
 begin
   if (C=hscLineBreak) then
   if (C=hscLineBreak) then
   begin
   begin

+ 1 - 0
packages/ide/wresourc.pas

@@ -17,6 +17,7 @@ unit WResourc;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 

+ 2 - 0
packages/ide/wtphwrit.pas

@@ -14,6 +14,8 @@
  **********************************************************************}
  **********************************************************************}
 unit WTPHWriter;
 unit WTPHWriter;
 
 
+{$H-}
+
 interface
 interface
 
 
 uses
 uses

+ 16 - 15
packages/ide/wutils.pas

@@ -15,6 +15,7 @@ unit WUtils;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$H-}
 
 
 interface
 interface
 
 
@@ -47,7 +48,7 @@ const
 
 
   { Get DirSep and EOL from System unit, instead of redefining 
   { Get DirSep and EOL from System unit, instead of redefining 
     here with tons of $ifdefs (KB) }
     here with tons of $ifdefs (KB) }
-  DirSep : char = System.DirectorySeparator;
+  DirSep : AnsiChar = System.DirectorySeparator;
   EOL : String[2] = System.LineEnding;
   EOL : String[2] = System.LineEnding;
 
 
 
 
@@ -127,9 +128,9 @@ procedure ReadlnFromFile(var f : file; var S:string;
 function Min(A,B: longint): longint;
 function Min(A,B: longint): longint;
 function Max(A,B: longint): longint;
 function Max(A,B: longint): longint;
 
 
-function CharStr(C: char; Count: integer): string;
+function CharStr(C: AnsiChar; Count: integer): string;
 function UpcaseStr(const S: string): string;
 function UpcaseStr(const S: string): string;
-function LowCase(C: char): char;
+function LowCase(C: AnsiChar): AnsiChar;
 function LowcaseStr(S: string): string;
 function LowcaseStr(S: string): string;
 function RExpand(const S: string; MinLen: byte): string;
 function RExpand(const S: string; MinLen: byte): string;
 function LExpand(const S: string; MinLen: byte): string;
 function LExpand(const S: string; MinLen: byte): string;
@@ -144,7 +145,7 @@ function StrToCard(const S: string): cardinal;
 function FloatToStr(D: Double; Decimals: byte): string;
 function FloatToStr(D: Double; Decimals: byte): string;
 function FloatToStrL(D: Double; Decimals: byte; MinLen: byte): string;
 function FloatToStrL(D: Double; Decimals: byte; MinLen: byte): string;
 function GetStr(P: PString): string;
 function GetStr(P: PString): string;
-function GetPChar(P: PChar): string;
+function GetPChar(P: PAnsiChar): string;
 function BoolToStr(B: boolean; const TrueS, FalseS: string): string;
 function BoolToStr(B: boolean; const TrueS, FalseS: string): string;
 function LExtendString(S: string; MinLen: byte): string;
 function LExtendString(S: string; MinLen: byte): string;
 
 
@@ -233,7 +234,7 @@ end;
 
 
 procedure ReadlnFromStream(Stream: PStream; var S:string;var linecomplete,hasCR : boolean);
 procedure ReadlnFromStream(Stream: PStream; var S:string;var linecomplete,hasCR : boolean);
   var
   var
-    c : char;
+    c : AnsiChar;
     i,pos : longint;
     i,pos : longint;
   begin
   begin
     linecomplete:=false;
     linecomplete:=false;
@@ -280,7 +281,7 @@ procedure ReadlnFromFile(var f : file; var S:string;
            var linecomplete,hasCR : boolean;
            var linecomplete,hasCR : boolean;
            BreakOnSpacesOnly : boolean);
            BreakOnSpacesOnly : boolean);
   var
   var
-    c : char;
+    c : AnsiChar;
     i,pos,
     i,pos,
     lastspacepos,LastSpaceFilePos : longint;
     lastspacepos,LastSpaceFilePos : longint;
 {$ifdef DEBUG}
 {$ifdef DEBUG}
@@ -371,7 +372,7 @@ begin
   if A<B then Min:=A else Min:=B;
   if A<B then Min:=A else Min:=B;
 end;
 end;
 
 
-function CharStr(C: char; Count: integer): string;
+function CharStr(C: AnsiChar; Count: integer): string;
 begin
 begin
   if Count<=0 then
   if Count<=0 then
     begin
     begin
@@ -509,7 +510,7 @@ begin
   if P=nil then GetStr:='' else GetStr:=P^;
   if P=nil then GetStr:='' else GetStr:=P^;
 end;
 end;
 
 
-function GetPChar(P: PChar): string;
+function GetPChar(P: PAnsiChar): string;
 begin
 begin
   if P=nil then GetPChar:='' else GetPChar:=StrPas(P);
   if P=nil then GetPChar:='' else GetPChar:=StrPas(P);
 end;
 end;
@@ -617,9 +618,9 @@ function GetLongName(const n:string):string;
 {$ifdef Windows}
 {$ifdef Windows}
 var
 var
   hs : string;
   hs : string;
-  hs2 : Array [0..255] of char;
+  hs2 : Array [0..255] of AnsiChar;
   i : longint;
   i : longint;
-  j : pchar;
+  j : PAnsiChar;
 {$endif}
 {$endif}
 {$ifdef go32v2}
 {$ifdef go32v2}
 var
 var
@@ -650,7 +651,7 @@ begin
 end;
 end;
 
 
 
 
-function LowCase(C: char): char;
+function LowCase(C: AnsiChar): AnsiChar;
 begin
 begin
   if ('A'<=C) and (C<='Z') then C:=chr(ord(C)+32);
   if ('A'<=C) and (C<='Z') then C:=chr(ord(C)+32);
   LowCase:=C;
   LowCase:=C;
@@ -850,7 +851,7 @@ end;
 
 
 procedure TFastBufStream.Readline(var s:string;var linecomplete,hasCR : boolean);
 procedure TFastBufStream.Readline(var s:string;var linecomplete,hasCR : boolean);
   var
   var
-    c : char;
+    c : AnsiChar;
     i,pos,StartPos : longint;
     i,pos,StartPos : longint;
     charsInS : boolean;
     charsInS : boolean;
   begin
   begin
@@ -993,7 +994,7 @@ end;
 
 
 function FormatPath(Path: string): string;
 function FormatPath(Path: string): string;
 var P: sw_integer;
 var P: sw_integer;
-    SC: char;
+    SC: AnsiChar;
 begin
 begin
   if ord(DirSep)=ord('/') then
   if ord(DirSep)=ord('/') then
     SC:='\'
     SC:='\'
@@ -1129,10 +1130,10 @@ end;
 function FormatDateTime(const D: DateTime; const Format: string): string;
 function FormatDateTime(const D: DateTime; const Format: string): string;
 var I: sw_integer;
 var I: sw_integer;
     CurCharStart: sw_integer;
     CurCharStart: sw_integer;
-    CurChar: char;
+    CurChar: AnsiChar;
     CurCharCount: integer;
     CurCharCount: integer;
     DateS: string;
     DateS: string;
-    C: char;
+    C: AnsiChar;
 procedure FlushChars;
 procedure FlushChars;
 var S: string;
 var S: string;
     I: sw_integer;
     I: sw_integer;

+ 6 - 6
packages/ide/wviews.pas

@@ -244,7 +244,7 @@ var  FormatParams     : array[1..20] of ptrint;
 procedure ClearFormatParams;
 procedure ClearFormatParams;
 procedure AddFormatParam(P: pointer);
 procedure AddFormatParam(P: pointer);
 procedure AddFormatParamInt(L: longint);
 procedure AddFormatParamInt(L: longint);
-procedure AddFormatParamChar(C: char);
+procedure AddFormatParamChar(C: AnsiChar);
 procedure AddFormatParamStr(const S: string);
 procedure AddFormatParamStr(const S: string);
 function FormatStrF(const Format: string; var Params): string;
 function FormatStrF(const Format: string; var Params): string;
 function FormatStrStr(const Format, Param: string): string;
 function FormatStrStr(const Format, Param: string): string;
@@ -345,7 +345,7 @@ type
 var
 var
   AutoSelect: Boolean;
   AutoSelect: Boolean;
   Action: MenuAction;
   Action: MenuAction;
-  Ch: Char;
+  Ch: AnsiChar;
   Res: Word;
   Res: Word;
   ItemShown, P: PMenuItem;
   ItemShown, P: PMenuItem;
 {$ifdef WinClipSupported}
 {$ifdef WinClipSupported}
@@ -627,7 +627,7 @@ type
 var
 var
   AutoSelect: Boolean;
   AutoSelect: Boolean;
   Action: MenuAction;
   Action: MenuAction;
-  Ch: Char;
+  Ch: AnsiChar;
   Res: Word;
   Res: Word;
   ItemShown, P: PMenuItem;
   ItemShown, P: PMenuItem;
   Target: PMenuView;
   Target: PMenuView;
@@ -960,7 +960,7 @@ type
 var
 var
   AutoSelect: Boolean;
   AutoSelect: Boolean;
   Action: MenuAction;
   Action: MenuAction;
-  Ch: Char;
+  Ch: AnsiChar;
   Res: Word;
   Res: Word;
   ItemShown, P: PMenuItem;
   ItemShown, P: PMenuItem;
   Target: PMenuView;
   Target: PMenuView;
@@ -2209,7 +2209,7 @@ end;
 procedure TDropDownListBox.Draw;
 procedure TDropDownListBox.Draw;
 var B: TDrawBuffer;
 var B: TDrawBuffer;
     C,TextC: word;
     C,TextC: word;
-    LC: char;
+    LC: AnsiChar;
 begin
 begin
   if GetState(sfFocused)=false then
   if GetState(sfFocused)=false then
     begin
     begin
@@ -2352,7 +2352,7 @@ begin
   FormatParams[FormatParamCount]:=L;
   FormatParams[FormatParamCount]:=L;
 end;
 end;
 
 
-procedure AddFormatParamChar(C: char);
+procedure AddFormatParamChar(C: AnsiChar);
 begin
 begin
   AddFormatParamInt(ord(C));
   AddFormatParamInt(ord(C));
 end;
 end;

+ 2 - 1
packages/ide/wvphelp.pas

@@ -13,6 +13,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {$R-}
 {$R-}
+{$H-}
 unit WVPHelp;
 unit WVPHelp;
 
 
 interface
 interface
@@ -126,7 +127,7 @@ end;
 
 
 function TVPHHelpFile.ReadBlock(Data: pointer; DataSize: longint): boolean;
 function TVPHHelpFile.ReadBlock(Data: pointer; DataSize: longint): boolean;
 var OK: boolean;
 var OK: boolean;
-    C: char;
+    C: AnsiChar;
 begin
 begin
   F^.Read(C,sizeof(C));
   F^.Read(C,sizeof(C));
   OK:=(F^.Status=stOK) and (C='þ');
   OK:=(F^.Status=stOK) and (C='þ');

+ 5 - 4
packages/ide/wwinhelp.pas

@@ -18,6 +18,7 @@ unit WWinHelp;
 {$ifdef cpullvm}
 {$ifdef cpullvm}
 {$modeswitch nestedprocvars}
 {$modeswitch nestedprocvars}
 {$endif}
 {$endif}
+{$h-}
 
 
 interface
 interface
 
 
@@ -79,7 +80,7 @@ type
         Magic            : word;
         Magic            : word;
         Flags            : word; { 0x0002 always set, 0x0400 set if directory }
         Flags            : word; { 0x0002 always set, 0x0400 set if directory }
         PageSize         : word;
         PageSize         : word;
-        DataFormat       : array[1..16] of char;
+        DataFormat       : array[1..16] of AnsiChar;
         MustBeZero       : word; { $0000 }
         MustBeZero       : word; { $0000 }
         PageSplits       : word;
         PageSplits       : word;
         RootPage         : word;
         RootPage         : word;
@@ -242,7 +243,7 @@ uses Strings;
 
 
 function ReadString(F: PStream): string;
 function ReadString(F: PStream): string;
 var S: string;
 var S: string;
-    C: char;
+    C: AnsiChar;
 begin
 begin
   S:='';
   S:='';
   if Assigned(F) then
   if Assigned(F) then
@@ -1272,7 +1273,7 @@ begin
   if length(S)>0 then
   if length(S)>0 then
     LastEmittedChar:=ord(S[length(S)]);
     LastEmittedChar:=ord(S[length(S)]);
 end;
 end;
-procedure EmitTextC(C: PChar);
+procedure EmitTextC(C: PAnsiChar);
 var RemSize,CurOfs,CurFrag: longint;
 var RemSize,CurOfs,CurFrag: longint;
     S: string;
     S: string;
 begin
 begin
@@ -1399,7 +1400,7 @@ var Finished: boolean;
     Len: word;
     Len: word;
     SLen,LinkOfs: longint;
     SLen,LinkOfs: longint;
     SPtr: pointer;
     SPtr: pointer;
-    SBuf: PChar;
+    SBuf: PAnsiChar;
     PictureSize,PictureStartOfs: longint;
     PictureSize,PictureStartOfs: longint;
     FontNumber: integer;
     FontNumber: integer;
 begin
 begin