浏览代码

* PChar -> PAnsiChar

Michaël Van Canneyt 2 年之前
父节点
当前提交
6a92202ce5

+ 6 - 6
packages/ami-extra/src/amsgbox.pas

@@ -28,8 +28,8 @@ interface
 
 
 FUNCTION MessageBox(const tit,txt,gad:RawByteString): LongInt;
-FUNCTION MessageBox(const tit,txt,gad:string): LongInt;
-function MessageBox(const tit,txt,gad:pchar): LongInt;
+FUNCTION MessageBox(const tit,txt,gad:AnsiString): LongInt;
+function MessageBox(const tit,txt,gad:PAnsiChar): LongInt;
 
 implementation
 
@@ -38,15 +38,15 @@ uses
 
 FUNCTION MessageBox(const tit,txt,gad:RawByteString): LongInt;
 begin
-  MessageBox:=MessageBox(PChar(tit),PChar(txt),PChar(gad));
+  MessageBox:=MessageBox(PAnsiChar(tit),PAnsiChar(txt),PAnsiChar(gad));
 end;
 
-FUNCTION MessageBox(const tit,txt,gad:string) : LONGint;
+FUNCTION MessageBox(const tit,txt,gad:AnsiString) : LONGint;
 begin
-  MessageBox := MessageBox(PChar(RawByteString(tit)),PChar(RawByteString(txt)),PChar(RawByteString(gad)));
+  MessageBox := MessageBox(PAnsiChar(RawByteString(tit)),PAnsiChar(RawByteString(txt)),PAnsiChar(RawByteString(gad)));
 end;
 
-FUNCTION MessageBox(const tit,txt,gad:pchar) : LONGint;
+FUNCTION MessageBox(const tit,txt,gad:PAnsiChar) : LONGint;
 VAR
   MyStruct : tEasyStruct;
 BEGIN

+ 7 - 7
packages/ami-extra/src/cliputils.pas

@@ -19,8 +19,8 @@ unit cliputils;
 
 interface
 
-function GetTextFromClip(ClipUnit: Byte): string;
-function PutTextToClip(ClipUnit: Byte; Text: string): Boolean;
+function GetTextFromClip(ClipUnit: Byte): AnsiString;
+function PutTextToClip(ClipUnit: Byte; Text: AnsiString): Boolean;
 
 implementation
 
@@ -31,12 +31,12 @@ const
   ID_FTXT = 1179932756;
   ID_CHRS = 1128813139;
 
-function GetTextFromClip(ClipUnit: Byte): string;
+function GetTextFromClip(ClipUnit: Byte): AnsiString;
 var
   Iff: PIffHandle;
   Error: LongInt;
   Cn: PContextNode;
-  Buf: PChar;
+  Buf: PAnsiChar;
   Len: Integer;
   Cu: LongInt;
 begin
@@ -70,7 +70,7 @@ begin
               FillChar(Buf^, Len + 1, #0);
               try
                 ReadChunkBytes(Iff, Buf, Len);
-                Result := Result + string(Buf);
+                Result := Result + AnsiString(Buf);
               finally
                 FreeMem(Buf);
               end;
@@ -85,10 +85,10 @@ begin
   end;
 end;
 
-function PutTextToClip(ClipUnit: Byte; Text: string): Boolean;
+function PutTextToClip(ClipUnit: Byte; Text: AnsiString): Boolean;
 var
   Iff: PIffHandle;
-  TText: string;
+  TText: AnsiString;
   Len: Integer;
 begin
   Result := False;

+ 155 - 155
packages/ami-extra/src/muihelper.pas

@@ -59,8 +59,8 @@ function MH_Menustrip(var MenuStrip; const Tags: array of PtrUInt): PObject_;
 // Creates a MUI menu
 function MH_Menu(const Tags: array of PtrUInt): PObject_;
 function MH_Menu(var Menu; const Tags: array of PtrUInt): PObject_;
-function MH_Menu(Name: PChar; const Tags: array of PtrUInt): PObject_;
-function MH_Menu(var Menu; Name: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_Menu(Name: PAnsiChar; const Tags: array of PtrUInt): PObject_;
+function MH_Menu(var Menu; Name: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 // Creates a MUI menuitem
 function MH_Menuitem(const Tags: array of PtrUInt): PObject_;
 function MH_Menuitem(var Menuitem; const Tags: array of PtrUInt): PObject_;
@@ -83,10 +83,10 @@ function MH_Notify(var Notify; const Tags: array of PtrUInt): PObject_;
 function MH_Application(const Tags: array of PtrUInt): PObject_;
 function MH_Application(var App; const Tags: array of PtrUInt): PObject_;
 // Creates a MUI Text area
-function MH_Text(Contents: PChar): PObject_;
-function MH_Text(Contents: PChar; const Tags: array of PtrUInt): PObject_;
-function MH_Text(var Text_; Contents: PChar): PObject_;
-function MH_Text(var Text_; Contents: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_Text(Contents: PAnsiChar): PObject_;
+function MH_Text(Contents: PAnsiChar; const Tags: array of PtrUInt): PObject_;
+function MH_Text(var Text_; Contents: PAnsiChar): PObject_;
+function MH_Text(var Text_; Contents: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 function MH_Text(const Tags: array of PtrUInt): PObject_;
 function MH_Text(var NText; const Tags: array of PtrUInt): PObject_;
 // Creates a MUI Rectangle
@@ -202,17 +202,17 @@ function MH_Scrmodelist(var Scrmodelist; const Tags: array of PtrUInt): PObject_
 // Creates MUI V/HGroup
 function MH_VGroup(const Tags: array of PtrUInt): pObject_;
 function MH_VGroup(Frame: LongWord; const Tags: array of PtrUInt): PObject_;
-function MH_VGroup(Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_VGroup(Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 function MH_HGroup(const Tags: array of PtrUInt): PObject_;
 function MH_HGroup(Frame: LongWord; const Tags: array of PtrUInt): PObject_;
-function MH_HGroup(Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_HGroup(Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 // Creates MUI Col/RowGroup
 function MH_ColGroup(Cols: LongWord; const Tags: array of PtrUInt): PObject_;
 function MH_ColGroup(Cols: LongWord; Frame: Longword; const Tags: array of PtrUInt): PObject_;
-function MH_ColGroup(Cols: LongWord; Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_ColGroup(Cols: LongWord; Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 function MH_RowGroup(Rows: LongWord; const Tags: array of PtrUInt): PObject_;
 function MH_RowGroup(Rows: LongWord; Frame: LongWord; const Tags: array of PtrUInt): PObject_;
-function MH_RowGroup(Rows: LongWord; Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_RowGroup(Rows: LongWord; Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 // Creates a MUI Pagegroup
 function MH_Pagegroup(const Tags: array of PtrUInt): PObject_;
 function MH_Pagegroup(var Pagegroup; const Tags: array of PtrUInt): PObject_;
@@ -226,8 +226,8 @@ function MH_RowGroupV(Rows: LongWord; const Tags: array of PtrUInt): PObject_;
 function MH_PagegroupV(const Tags: array of PtrUInt): PObject_;
 function MH_PagegroupV(var Pagegroup; const Tags: array of PtrUInt): PObject_;
 // Creates a MUI RegisterGroup
-function MH_RegisterGroup(Titles: PPChar; const Tags: array of PtrUInt): PObject_;
-function MH_RegisterGroup(var RegisterGroup; Titles: PPChar; const Tags: array of PtrUInt): PObject_;
+function MH_RegisterGroup(Titles: PPAnsiChar; const Tags: array of PtrUInt): PObject_;
+function MH_RegisterGroup(var RegisterGroup; Titles: PPAnsiChar; const Tags: array of PtrUInt): PObject_;
 //Spacing Macros
 function MH_HVSpace: PObject_;
 function MH_HSpace(x: LongWord): PObject_;
@@ -235,67 +235,67 @@ function MH_VSpace(x: LongWord): PObject_;
 function MH_HCenter(Obj: PObject_): PObject_;
 function MH_VCenter(Obj: PObject_): PObject_;
 // Creates a MUI button
-function MH_Button(BLabel: PChar): PObject_;
-function MH_Button(var Button; BLabel: PChar): PObject_;
-function MH_SimpleButton(BLabel: PChar): PObject_;
-function MH_SimpleButton(var Button; BLabel: PChar): PObject_;
+function MH_Button(BLabel: PAnsiChar): PObject_;
+function MH_Button(var Button; BLabel: PAnsiChar): PObject_;
+function MH_SimpleButton(BLabel: PAnsiChar): PObject_;
+function MH_SimpleButton(var Button; BLabel: PAnsiChar): PObject_;
 // Creates a MUI PopButton
-function MH_PopButton(Img: PChar): PObject_;
-function MH_PopButton(var PopButton; img: PChar): PObject_;
+function MH_PopButton(Img: PAnsiChar): PObject_;
+function MH_PopButton(var PopButton; img: PAnsiChar): PObject_;
 // Creates a MUI label
-function MH_Label(BLabel: PChar): PObject_;
-function MH_Label(var OLabel; BLabel: PChar): PObject_;
+function MH_Label(BLabel: PAnsiChar): PObject_;
+function MH_Label(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI label with single Frame border
-function MH_Label1(BLabel: PChar): PObject_;
-function MH_Label1(var OLabel; BLabel: PChar): PObject_;
+function MH_Label1(BLabel: PAnsiChar): PObject_;
+function MH_Label1(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI label with double Frame border
-function MH_Label2(BLabel: PChar): PObject_;
-function MH_Label2(var OLabel; BLabel: PChar): PObject_;
+function MH_Label2(BLabel: PAnsiChar): PObject_;
+function MH_Label2(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI left aligned label
-function MH_LLabel(BLabel: PChar): PObject_;
-function MH_LLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_LLabel(BLabel: PAnsiChar): PObject_;
+function MH_LLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI left aligned label with single Frame border
-function MH_LLabel1(BLabel: PChar): PObject_;
-function MH_LLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_LLabel1(BLabel: PAnsiChar): PObject_;
+function MH_LLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI left aligned label with double Frame border
-function MH_LLabel2(BLabel: PChar): PObject_;
-function MH_LLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_LLabel2(BLabel: PAnsiChar): PObject_;
+function MH_LLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI centered label
-function MH_CLabel(BLabel: PChar): PObject_;
-function MH_CLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_CLabel(BLabel: PAnsiChar): PObject_;
+function MH_CLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI centered label with single Frame border
-function MH_CLabel1(BLabel: PChar): PObject_;
-function MH_CLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_CLabel1(BLabel: PAnsiChar): PObject_;
+function MH_CLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI centered label with double Frame border
-function MH_CLabel2(BLabel: PChar): PObject_;
-function MH_CLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_CLabel2(BLabel: PAnsiChar): PObject_;
+function MH_CLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI label
-function MH_FreeLabel(BLabel: PChar): PObject_;
-function MH_FreeLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLabel(BLabel: PAnsiChar): PObject_;
+function MH_FreeLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI label with single Frame border
-function MH_FreeLabel1(BLabel: PChar): PObject_;
-function MH_FreeLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLabel1(BLabel: PAnsiChar): PObject_;
+function MH_FreeLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI label with double Frame border
-function MH_FreeLabel2(BLabel: PChar): PObject_;
-function MH_FreeLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLabel2(BLabel: PAnsiChar): PObject_;
+function MH_FreeLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI left aligned label
-function MH_FreeLLabel(BLabel: PChar): PObject_;
-function MH_FreeLLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLLabel(BLabel: PAnsiChar): PObject_;
+function MH_FreeLLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI left aligned label with single Frame border
-function MH_FreeLLabel1(BLabel: PChar): PObject_;
-function MH_FreeLLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLLabel1(BLabel: PAnsiChar): PObject_;
+function MH_FreeLLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI left aligned label with double Frame border
-function MH_FreeLLabel2(BLabel: PChar): PObject_;
-function MH_FreeLLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLLabel2(BLabel: PAnsiChar): PObject_;
+function MH_FreeLLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI centered label
-function MH_FreeCLabel(BLabel: PChar): PObject_;
-function MH_FreeCLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeCLabel(BLabel: PAnsiChar): PObject_;
+function MH_FreeCLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI centered label with single Frame border
-function MH_FreeCLabel1(BLabel: PChar): PObject_;
-function MH_FreeCLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeCLabel1(BLabel: PAnsiChar): PObject_;
+function MH_FreeCLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI centered label with double Frame border
-function MH_FreeCLabel2(BLabel: PChar): PObject_;
-function MH_FreeCLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeCLabel2(BLabel: PAnsiChar): PObject_;
+function MH_FreeCLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 // Creates a MUI HBar
 function MH_HBar(Space: LongWord): PObject_;
 function MH_HBar(var HBar; Space: LongWord): PObject_;
@@ -303,61 +303,61 @@ function MH_HBar(var HBar; Space: LongWord): PObject_;
 function MH_VBar(Space: LongWord): PObject_;
 function MH_VBar(var VBar; Space: LongWord): PObject_;
 
-function MAKE_ID(c1, c2, c3, c4: char): LongWord; inline;
+function MAKE_ID(c1, c2, c3, c4: AnsiChar): LongWord; inline;
 
 procedure MH_Set(Obj: PObject_; Tag, Data: PtrUInt);
 function MH_Get(Obj: PObject_; Tag: PtrUInt): PtrUInt;
 procedure MH_SetMutex(Obj: PObject_; n: Integer);
 procedure MH_SetCycle(Obj: PObject_; n: Integer);
-procedure MH_SetString(Obj: PObject_; s: PChar);
+procedure MH_SetString(Obj: PObject_; s: PAnsiChar);
 procedure MH_SetCheckmark(Obj: PObject_; b: Boolean);
 procedure MH_SetSlider(Obj: PObject_; l: LongInt);
 
 // deprecated but widely used macros
-function MH_String(Contents: PChar; MaxLen: Integer): PObject_;
-function MH_String(var NString: PObject_; Contents: PChar; MaxLen: Integer): PObject_;
+function MH_String(Contents: PAnsiChar; MaxLen: Integer): PObject_;
+function MH_String(var NString: PObject_; Contents: PAnsiChar; MaxLen: Integer): PObject_;
 
-function MH_KeyString(Contents: PChar; MaxLen: Integer; ControlChar: Char): PObject_;
-function MH_KeyString(var NString: PObject_; Contents: PChar; MaxLen: Integer; ControlChar: Char): PObject_;
+function MH_KeyString(Contents: PAnsiChar; MaxLen: Integer; ControlChar: AnsiChar): PObject_;
+function MH_KeyString(var NString: PObject_; Contents: PAnsiChar; MaxLen: Integer; ControlChar: AnsiChar): PObject_;
 
 function MH_CheckMark(Selected: Boolean): PObject_;
 function MH_CheckMark(var CM: PObject_; Selected: Boolean): PObject_;
 
-function MH_KeyCheckMark(Selected: Boolean; ControlChar: Char): PObject_;
-function MH_KeyCheckMark(var CM: PObject_; Selected: Boolean; ControlChar: Char): PObject_;
+function MH_KeyCheckMark(Selected: Boolean; ControlChar: AnsiChar): PObject_;
+function MH_KeyCheckMark(var CM: PObject_; Selected: Boolean; ControlChar: AnsiChar): PObject_;
 
-function MH_KeyButton(Name: PChar; Key: Char): PObject_;
-function MH_KeyButton(var KB: PObject_; Name: PChar; Key: Char): PObject_;
+function MH_KeyButton(Name: PAnsiChar; Key: AnsiChar): PObject_;
+function MH_KeyButton(var KB: PObject_; Name: PAnsiChar; Key: AnsiChar): PObject_;
 
-function MH_Cycle(Entries: PPChar): PObject_;
-function MH_Cycle(var CY: PObject_; Entries: PPChar): PObject_;
+function MH_Cycle(Entries: PPAnsiChar): PObject_;
+function MH_Cycle(var CY: PObject_; Entries: PPAnsiChar): PObject_;
 
-function MH_KeyCycle(Entries: PPChar; Key: Char): PObject_;
-function MH_KeyCycle(var KC: PObject_; Entries: PPChar; Key: Char): PObject_;
+function MH_KeyCycle(Entries: PPAnsiChar; Key: AnsiChar): PObject_;
+function MH_KeyCycle(var KC: PObject_; Entries: PPAnsiChar; Key: AnsiChar): PObject_;
 
-function MH_Radio(Name: PChar; Rarray: PPChar): PObject_;
-function MH_Radio(var RA: PObject_; Name: PChar; Rarray: PPChar): PObject_;
+function MH_Radio(Name: PAnsiChar; Rarray: PPAnsiChar): PObject_;
+function MH_Radio(var RA: PObject_; Name: PAnsiChar; Rarray: PPAnsiChar): PObject_;
 
-function MH_KeyRadio(Name: PChar; Rarray: PPChar; Key: Char): PObject_;
-function MH_KeyRadio(var KR: PObject_; Name: PChar; Rarray: PPChar; Key: Char): PObject_;
+function MH_KeyRadio(Name: PAnsiChar; Rarray: PPAnsiChar; Key: AnsiChar): PObject_;
+function MH_KeyRadio(var KR: PObject_; Name: PAnsiChar; Rarray: PPAnsiChar; Key: AnsiChar): PObject_;
 
 function MH_Slider(MinS, MaxS, Level: Integer): PObject_;
 function MH_Slider(var SL: PObject_; MinS, MaxS, Level: Integer): PObject_;
 
-function MH_KeySlider(MinS, MaxS, Level: Integer; Key: Char): PObject_;
-function MH_KeySlider(var KS: PObject_; MinS, MaxS, Level: Integer; Key: Char): PObject_;
+function MH_KeySlider(MinS, MaxS, Level: Integer; Key: AnsiChar): PObject_;
+function MH_KeySlider(var KS: PObject_; MinS, MaxS, Level: Integer; Key: AnsiChar): PObject_;
 
 
 
 
 
-function MH_NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR;
-function MH_NewObject(var Obj; ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR;
+function MH_NewObject(ClassPtr: PIClass; ClassID: PAnsiChar; const Tags: array of PtrUInt): APTR;
+function MH_NewObject(var Obj; ClassPtr: PIClass; ClassID: PAnsiChar; const Tags: array of PtrUInt): APTR;
 
 // Connect a Hook to a hook function, platform specific implementation
 procedure MH_SetHook(var Hook: THook; Func: THookFunc; Data: Pointer);
 
-function MH_CreateCustomClass(Base: PLibrary; Supername: PChar; Supermcc: PMUI_CustomClass; DataSize: LongInt; Dispatcher: TDispatcherFunc): PMUI_CustomClass;
+function MH_CreateCustomClass(Base: PLibrary; Supername: PAnsiChar; Supermcc: PMUI_CustomClass; DataSize: LongInt; Dispatcher: TDispatcherFunc): PMUI_CustomClass;
 
 implementation
 
@@ -422,14 +422,14 @@ end;
 {$FATAL "SetHook not implemented for this platform"}
 {$endif}
 
-function MH_CreateCustomClass(Base: PLibrary; Supername: PChar; Supermcc: PMUI_CustomClass; DataSize: LongInt; Dispatcher: TDispatcherFunc): PMUI_CustomClass;
+function MH_CreateCustomClass(Base: PLibrary; Supername: PAnsiChar; Supermcc: PMUI_CustomClass; DataSize: LongInt; Dispatcher: TDispatcherFunc): PMUI_CustomClass;
 begin
   MH_CreateCustomClass := MUI_CreateCustomClass(Base, Supername, Supermcc, DataSize, nil);
   if Assigned(MH_CreateCustomClass) then
     MH_SetHook(MH_CreateCustomClass^.mcc_Class^.cl_Dispatcher, THookFunc(Dispatcher), nil);
 end;
 
-function MAKE_ID(c1, c2, c3, c4: char): LongWord; inline;
+function MAKE_ID(c1, c2, c3, c4: AnsiChar): LongWord; inline;
 begin
   MAKE_ID := (LongWord(Ord(c1)) shl 24) or
              (LongWord(Ord(c2)) shl 16) or
@@ -461,7 +461,7 @@ begin
   MH_Set(Obj, MUIA_Cycle_Active, n);
 end;
 
-procedure MH_SetString(Obj: PObject_; s: PChar);
+procedure MH_SetString(Obj: PObject_; s: PAnsiChar);
 begin
   MH_Set(Obj, MUIA_String_Contents, AsTag(s));
 end;
@@ -505,12 +505,12 @@ begin
   MH_Menu := PObject_(Menu);
 end;
 
-function MH_Menu(Name: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_Menu(Name: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_Menu := MUI_NewObject(MUIC_Menu, [MUIA_Menu_Title, AsTag(Name), TAG_MORE, AsTag(@Tags)]);
 end;
 
-function MH_Menu(var Menu; Name: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_Menu(var Menu; Name: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   PObject_(Menu) := MUI_NewObject(MUIC_Menu, [MUIA_Menu_Title, AsTag(Name), TAG_MORE, AsTag(@Tags)]);
   MH_Menu := PObject_(Menu);
@@ -609,25 +609,25 @@ end;
 
 // Creates a MUI text area
 // ************************************************************************
-function MH_Text(Contents: PChar): PObject_;
+function MH_Text(Contents: PAnsiChar): PObject_;
 begin
   MH_Text := MUI_NewObject(MUIC_Text,[MUIA_Text_Contents, AsTag(Contents), TAG_DONE]);
 end;
 
-function MH_Text(Contents: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_Text(Contents: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_Text := MUI_NewObject(MUIC_Text,[
     MUIA_Text_Contents, AsTag(Contents),
     TAG_MORE,           AsTag(@Tags)]);
 end;
 
-function MH_Text(var Text_; Contents: PChar): PObject_;
+function MH_Text(var Text_; Contents: PAnsiChar): PObject_;
 begin
   PObject_(Text_) := MUI_NewObject(MUIC_Text,[MUIA_Text_Contents, AsTag(Contents), TAG_DONE]);
   MH_Text := PObject_(Text_);
 end;
 
-function MH_Text(var Text_; Contents: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_Text(var Text_; Contents: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   PObject_(Text_) := MUI_NewObject(MUIC_Text, [
     MUIA_Text_Contents, AsTag(Contents),
@@ -1137,7 +1137,7 @@ begin
   MH_VGroup := MUI_NewObject(MUIC_Group, [MUIA_Frame, Frame, TAG_MORE, AsTag(@Tags)]);
 end;
 
-function MH_VGroup(Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_VGroup(Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_VGroup := MUI_NewObject(MUIC_Group, [
     MUIA_Frame,      MUIV_Frame_Group,
@@ -1161,7 +1161,7 @@ begin
     TAG_MORE,         AsTag(@Tags)]);
 end;
 
-function MH_HGroup(Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_HGroup(Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_HGroup := MUI_NewObject(MUIC_Group, [
     MUIA_Group_Horiz, MUI_TRUE,
@@ -1186,7 +1186,7 @@ begin
     TAG_MORE,           AsTag(@Tags)]);
 end;
 
-function MH_ColGroup(Cols: LongWord; Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_ColGroup(Cols: LongWord; Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_ColGroup := MUI_NewObject(MUIC_Group, [
     MUIA_Group_Columns, Cols,
@@ -1211,7 +1211,7 @@ begin
     TAG_MORE,        AsTag(@Tags)]);
 end;
 
-function MH_RowGroup(Rows: LongWord; Title: PChar; const Tags: array of PtrUInt): PObject_;
+function MH_RowGroup(Rows: LongWord; Title: PAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_RowGroup := MUI_NewObject(MUIC_Group, [
     MUIA_Group_Rows, Rows,
@@ -1287,14 +1287,14 @@ end;
 
 // Creates a MUI RegisterGroup
 // ************************************************************************
-function MH_RegisterGroup(Titles: PPChar; const Tags: array of PtrUInt): PObject_;
+function MH_RegisterGroup(Titles: PPAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   MH_RegisterGroup := MUI_NewObject(MUIC_Register, [
     MUIA_Register_Titles, AsTag(Titles),
     TAG_MORE,             AsTag(@Tags)]);
 end;
 
-function MH_RegisterGroup(var RegisterGroup; Titles: PPChar; const Tags: array of PtrUInt): PObject_;
+function MH_RegisterGroup(var RegisterGroup; Titles: PPAnsiChar; const Tags: array of PtrUInt): PObject_;
 begin
   PObject_(RegisterGroup) := MUI_NewObject(MUIC_Register, [
     MUIA_Register_Titles, AsTag(Titles),
@@ -1341,35 +1341,35 @@ end;
 
 // Creates a MUI button
 // ************************************************************************
-function MH_Button(BLabel: PChar): PObject_;
+function MH_Button(BLabel: PAnsiChar): PObject_;
 begin
   MH_Button := MUI_MakeObject(MUIO_Button, [PtrUInt(BLabel)]);
 end;
 
-function MH_Button(var Button; BLabel: PChar): PObject_;
+function MH_Button(var Button; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(Button) := MUI_MakeObject(MUIO_Button, [PtrUInt(BLabel)]);
   MH_Button := PObject_(Button);
 end;
 
-function MH_SimpleButton(BLabel: PChar): PObject_; inline;
+function MH_SimpleButton(BLabel: PAnsiChar): PObject_; inline;
 begin
   MH_SimpleButton := MH_Button(BLabel);
 end;
 
-function MH_SimpleButton(var Button; BLabel: PChar): PObject_;
+function MH_SimpleButton(var Button; BLabel: PAnsiChar): PObject_;
 begin
   MH_SimpleButton := MH_Button(Button, BLabel);
 end;
 
 // Creates a MUI PopButton
 // ************************************************************************
-function MH_PopButton(Img: PChar): PObject_;
+function MH_PopButton(Img: PAnsiChar): PObject_;
 begin
   MH_PopButton := MUI_MakeObject(MUIO_PopButton, [AsTag(Img)]);
 end;
 
-function MH_PopButton(var PopButton; img: PChar): PObject_;
+function MH_PopButton(var PopButton; img: PAnsiChar): PObject_;
 begin
   PObject_(PopButton) := MUI_MakeObject(MUIO_PopButton, [AsTag(Img)]);
   MH_PopButton := PObject_(PopButton);
@@ -1377,12 +1377,12 @@ end;
 
 // Creates a MUI Label
 // ************************************************************************
-function MH_Label(BLabel: PChar): PObject_;
+function MH_Label(BLabel: PAnsiChar): PObject_;
 begin
   MH_Label := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), 0]);
 end;
 
-function MH_Label(var OLabel; BLabel: PChar): PObject_;
+function MH_Label(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), 0]);
   MH_Label := PObject_(OLabel);
@@ -1390,12 +1390,12 @@ end;
 
 // Creates a MUI label with single Frame border
 // ************************************************************************
-function MH_Label1(BLabel: PChar): PObject_;
+function MH_Label1(BLabel: PAnsiChar): PObject_;
 begin
   MH_Label1 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_SingleFrame]);
 end;
 
-function MH_Label1(var OLabel; BLabel: PChar): PObject_;
+function MH_Label1(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_SingleFrame]);
   MH_Label1 := PObject_(OLabel);
@@ -1403,12 +1403,12 @@ end;
 
 // Creates a MUI label with double Frame border
 // ************************************************************************
-function MH_Label2(BLabel: PChar): PObject_;
+function MH_Label2(BLabel: PAnsiChar): PObject_;
 begin
   MH_Label2 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_DoubleFrame]);
 end;
 
-function MH_Label2(var OLabel; BLabel: PChar): PObject_;
+function MH_Label2(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_DoubleFrame]);
   MH_Label2 := PObject_(OLabel);
@@ -1416,12 +1416,12 @@ end;
 
 // Creates a MUI left aligned label
 // ************************************************************************
-function MH_LLabel(BLabel: PChar): PObject_;
+function MH_LLabel(BLabel: PAnsiChar): PObject_;
 begin
   MH_LLabel := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_LeftAligned]);
 end;
 
-function MH_LLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_LLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_LeftAligned]);
   MH_LLabel := PObject_(OLabel);
@@ -1429,12 +1429,12 @@ end;
 
 // Creates a MUI left aligned label with single Frame border
 // ************************************************************************
-function MH_LLabel1(BLabel: PChar): PObject_;
+function MH_LLabel1(BLabel: PAnsiChar): PObject_;
 begin
   MH_LLabel1 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_LeftAligned or MUIO_Label_SingleFrame]);
 end;
 
-function MH_LLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_LLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_LeftAligned or MUIO_Label_SingleFrame]);
   MH_LLabel1 := PObject_(OLabel);
@@ -1442,12 +1442,12 @@ end;
 
 // Creates a MUI left aligned label with double Frame border
 // ************************************************************************
-function MH_LLabel2(BLabel: PChar): PObject_;
+function MH_LLabel2(BLabel: PAnsiChar): PObject_;
 begin
   MH_LLabel2 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_LeftAligned or MUIO_Label_DoubleFrame]);
 end;
 
-function MH_LLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_LLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_LeftAligned or MUIO_Label_DoubleFrame]);
   MH_LLabel2 := PObject_(OLabel);
@@ -1455,12 +1455,12 @@ end;
 
 // Creates a MUI centered label
 // ************************************************************************
-function MH_CLabel(BLabel: PChar): PObject_;
+function MH_CLabel(BLabel: PAnsiChar): PObject_;
 begin
   MH_CLabel := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_Centered]);
 end;
 
-function MH_CLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_CLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_Centered]);
   MH_CLabel := PObject_(OLabel);
@@ -1468,12 +1468,12 @@ end;
 
 // Creates a MUI centered label with single Frame border
 // ************************************************************************
-function MH_CLabel1(BLabel: PChar): PObject_;
+function MH_CLabel1(BLabel: PAnsiChar): PObject_;
 begin
   MH_CLabel1 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_Centered or MUIO_Label_SingleFrame]);
 end;
 
-function MH_CLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_CLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_Centered or MUIO_Label_SingleFrame]);
   MH_CLabel1 := PObject_(OLabel);
@@ -1481,12 +1481,12 @@ end;
 
 // Creates a MUI centered label with double Frame border
 // ************************************************************************
-function MH_CLabel2(BLabel: PChar): PObject_;
+function MH_CLabel2(BLabel: PAnsiChar): PObject_;
 begin
   MH_CLabel2 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_Centered or MUIO_Label_DoubleFrame]);
 end;
 
-function MH_CLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_CLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_Centered or MUIO_Label_DoubleFrame]);
   MH_CLabel2 := PObject_(OLabel);
@@ -1494,12 +1494,12 @@ end;
 
 // Creates a MUI Label
 // ************************************************************************
-function MH_FreeLabel(BLabel: PChar): PObject_;
+function MH_FreeLabel(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeLabel := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert]);
 end;
 
-function MH_FreeLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert]);
   MH_FreeLabel := PObject_(OLabel);
@@ -1507,12 +1507,12 @@ end;
 
 // Creates a MUI label with single Frame border
 // ************************************************************************
-function MH_FreeLabel1(BLabel: PChar): PObject_;
+function MH_FreeLabel1(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeLabel1 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_SingleFrame]);
 end;
 
-function MH_FreeLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_SingleFrame]);
   MH_FreeLabel1 := PObject_(OLabel);
@@ -1520,12 +1520,12 @@ end;
 
 // Creates a MUI label with double Frame border
 // ************************************************************************
-function MH_FreeLabel2(BLabel: PChar): PObject_;
+function MH_FreeLabel2(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeLabel2 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_DoubleFrame]);
 end;
 
-function MH_FreeLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_DoubleFrame]);
   MH_FreeLabel2 := PObject_(OLabel);
@@ -1533,12 +1533,12 @@ end;
 
 // Creates a MUI left aligned label
 // ************************************************************************
-function MH_FreeLLabel(BLabel: PChar): PObject_;
+function MH_FreeLLabel(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeLLabel := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_LeftAligned]);
 end;
 
-function MH_FreeLLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_LeftAligned]);
   MH_FreeLLabel := PObject_(OLabel);
@@ -1546,12 +1546,12 @@ end;
 
 // Creates a MUI left aligned label with single Frame border
 // ************************************************************************
-function MH_FreeLLabel1(BLabel: PChar): PObject_;
+function MH_FreeLLabel1(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeLLabel1 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_LeftAligned or MUIO_Label_SingleFrame]);
 end;
 
-function MH_FreeLLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_LeftAligned or MUIO_Label_SingleFrame]);
   MH_FreeLLabel1 := PObject_(OLabel);
@@ -1559,12 +1559,12 @@ end;
 
 // Creates a MUI left aligned label with double Frame border
 // ************************************************************************
-function MH_FreeLLabel2(BLabel: PChar): PObject_;
+function MH_FreeLLabel2(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeLLabel2 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_LeftAligned or MUIO_Label_DoubleFrame]);
 end;
 
-function MH_FreeLLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeLLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_LeftAligned or MUIO_Label_DoubleFrame]);
   MH_FreeLLabel2 := PObject_(OLabel);
@@ -1572,12 +1572,12 @@ end;
 
 // Creates a MUI centered label
 // ************************************************************************
-function MH_FreeCLabel(BLabel: PChar): PObject_;
+function MH_FreeCLabel(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeCLabel := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_Centered]);
 end;
 
-function MH_FreeCLabel(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeCLabel(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_Centered]);
   MH_FreeCLabel := PObject_(OLabel);
@@ -1585,12 +1585,12 @@ end;
 
 // Creates a MUI centered label with single Frame border
 // ************************************************************************
-function MH_FreeCLabel1(BLabel: PChar): PObject_;
+function MH_FreeCLabel1(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeCLabel1 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_Centered or MUIO_Label_SingleFrame]);
 end;
 
-function MH_FreeCLabel1(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeCLabel1(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_Centered or MUIO_Label_SingleFrame]);
   MH_FreeCLabel1 := PObject_(OLabel);
@@ -1598,12 +1598,12 @@ end;
 
 // Creates a MUI centered label with double Frame border
 // ************************************************************************
-function MH_FreeCLabel2(BLabel: PChar): PObject_;
+function MH_FreeCLabel2(BLabel: PAnsiChar): PObject_;
 begin
   MH_FreeCLabel2 := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_Centered or MUIO_Label_DoubleFrame]);
 end;
 
-function MH_FreeCLabel2(var OLabel; BLabel: PChar): PObject_;
+function MH_FreeCLabel2(var OLabel; BLabel: PAnsiChar): PObject_;
 begin
   PObject_(OLabel) := MUI_MakeObject(MUIO_Label, [PtrUInt(BLabel), MUIO_Label_FreeVert or MUIO_Label_Centered or MUIO_Label_DoubleFrame]);
   MH_FreeCLabel2 := PObject_(OLabel);
@@ -1637,7 +1637,7 @@ end;
 
 // Creates a MUI object abstract
 // ************************************************************************
-function MH_NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR;
+function MH_NewObject(ClassPtr: PIClass; ClassID: PAnsiChar; const Tags: array of PtrUInt): APTR;
 begin
   {$if defined(AMIGA_V1_2_ONLY)}
   MH_NewObject := nil;
@@ -1646,7 +1646,7 @@ begin
   {$endif}
 end;
 
-function MH_NewObject(var Obj; ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR;
+function MH_NewObject(var Obj; ClassPtr: PIClass; ClassID: PAnsiChar; const Tags: array of PtrUInt): APTR;
 begin
   {$if defined(AMIGA_V1_2_ONLY)}
   MH_NewObject := nil;
@@ -1658,7 +1658,7 @@ end;
 
 // deprecated but widely used macros
 
-function MH_String(Contents: PChar; MaxLen: Integer): PObject_;
+function MH_String(Contents: PAnsiChar; MaxLen: Integer): PObject_;
 begin
   MH_String := MH_String([
     MUIA_Frame, StringFrame,
@@ -1667,13 +1667,13 @@ begin
     TAG_DONE]);
 end;
 
-function MH_String(var NString: PObject_; Contents: PChar; MaxLen: Integer): PObject_;
+function MH_String(var NString: PObject_; Contents: PAnsiChar; MaxLen: Integer): PObject_;
 begin
   NString := MH_String(Contents, MAxLen);
   MH_String := NString;
 end;
 
-function MH_KeyString(Contents: PChar; MaxLen: Integer; ControlChar: Char): PObject_;
+function MH_KeyString(Contents: PAnsiChar; MaxLen: Integer; ControlChar: AnsiChar): PObject_;
 begin
   MH_KeyString := MH_String([
     MUIA_Frame, StringFrame,
@@ -1683,7 +1683,7 @@ begin
     TAG_DONE]);
 end;
 
-function MH_KeyString(var NString: PObject_; Contents: PChar; MaxLen: Integer; ControlChar: Char): PObject_;
+function MH_KeyString(var NString: PObject_; Contents: PAnsiChar; MaxLen: Integer; ControlChar: AnsiChar): PObject_;
 begin
   NString := MH_KeyString(Contents, MaxLen, ControlChar);
   MH_KeyString := NString;
@@ -1708,7 +1708,7 @@ begin
   MH_CheckMark := CM;
 end;
 
-function MH_KeyCheckMark(Selected: Boolean; ControlChar: Char): PObject_;
+function MH_KeyCheckMark(Selected: Boolean; ControlChar: AnsiChar): PObject_;
 begin
   MH_KeyCheckMark := MH_Image([
     MUIA_Frame, ImageButtonFrame,
@@ -1722,19 +1722,19 @@ begin
     TAG_DONE]);
 end;
 
-function MH_KeyCheckMark(var CM: PObject_; Selected: Boolean; ControlChar: Char): PObject_;
+function MH_KeyCheckMark(var CM: PObject_; Selected: Boolean; ControlChar: AnsiChar): PObject_;
 begin
   CM := MH_KeyCheckMark(Selected, ControlChar);
   MH_KeyCheckMark := CM;
 end;
 
-function MH_KeyButton(Name: PChar; Key: Char): PObject_;
+function MH_KeyButton(Name: PAnsiChar; Key: AnsiChar): PObject_;
 begin
   MH_KeyButton := MH_Text([
     MUIA_Frame, ButtonFrame,
     MUIA_Font, MUIV_Font_Button,
     MUIA_Text_Contents, AsTag(Name),
-    MUIA_Text_PreParse, AsTag(PChar(MUIX_C)),
+    MUIA_Text_PreParse, AsTag(PAnsiChar(MUIX_C)),
     MUIA_Text_HiChar  , AsTag(Byte(Key)),
     MUIA_ControlChar  , AsTag(Byte(Key)),
     MUIA_InputMode    , MUIV_InputMode_RelVerify,
@@ -1742,13 +1742,13 @@ begin
     TAG_DONE]);
 end;
 
-function MH_KeyButton(var KB: PObject_; Name: PChar; Key: Char): PObject_;
+function MH_KeyButton(var KB: PObject_; Name: PAnsiChar; Key: AnsiChar): PObject_;
 begin
   KB := MH_KeyButton(Name, Key);
   MH_KeyButton := KB;
 end;
 
-function MH_Cycle(Entries: PPChar): PObject_;
+function MH_Cycle(Entries: PPAnsiChar): PObject_;
 begin
   MH_Cycle := MH_Cycle([
     MUIA_Font, MUIV_Font_Button,
@@ -1756,13 +1756,13 @@ begin
     TAG_DONE]);
 end;
 
-function MH_Cycle(var CY: PObject_; Entries: PPChar): PObject_;
+function MH_Cycle(var CY: PObject_; Entries: PPAnsiChar): PObject_;
 begin
   CY := MH_Cycle(Entries);
   MH_Cycle := CY;
 end;
 
-function MH_KeyCycle(Entries: PPChar; Key: Char): PObject_;
+function MH_KeyCycle(Entries: PPAnsiChar; Key: AnsiChar): PObject_;
 begin
   MH_KeyCycle := MH_Cycle([
     MUIA_Font, MUIV_Font_Button,
@@ -1771,13 +1771,13 @@ begin
     TAG_DONE]);
 end;
 
-function MH_KeyCycle(var KC: PObject_; Entries: PPChar; Key: Char): PObject_;
+function MH_KeyCycle(var KC: PObject_; Entries: PPAnsiChar; Key: AnsiChar): PObject_;
 begin
   KC := MH_KeyCycle(Entries, Key);
   MH_KeyCycle := KC;
 end;
 
-function MH_Radio(Name: PChar; Rarray: PPChar): PObject_;
+function MH_Radio(Name: PAnsiChar; Rarray: PPAnsiChar): PObject_;
 begin
   MH_Radio := MH_Radio([
     MUIA_Frame, MUIV_Frame_Group, MUIA_FrameTitle, AsTag(Name), MUIA_Background, MUII_GroupBack,
@@ -1785,13 +1785,13 @@ begin
     TAG_DONE]);
 end;
 
-function MH_Radio(var RA: PObject_; Name: PChar; Rarray: PPChar): PObject_;
+function MH_Radio(var RA: PObject_; Name: PAnsiChar; Rarray: PPAnsiChar): PObject_;
 begin
   RA := MH_Radio(Name, Rarray);
   MH_Radio := RA;
 end;
 
-function MH_KeyRadio(Name: PChar; Rarray: PPChar; Key: Char): PObject_;
+function MH_KeyRadio(Name: PAnsiChar; Rarray: PPAnsiChar; Key: AnsiChar): PObject_;
 begin
   MH_KeyRadio := MH_Radio([
     MUIA_Frame, MUIV_Frame_Group, MUIA_FrameTitle, AsTag(Name), MUIA_Background, MUII_GroupBack,
@@ -1800,7 +1800,7 @@ begin
     TAG_DONE]);
 end;
 
-function MH_KeyRadio(var KR: PObject_; Name: PChar; Rarray: PPChar; Key: Char): PObject_;
+function MH_KeyRadio(var KR: PObject_; Name: PAnsiChar; Rarray: PPAnsiChar; Key: AnsiChar): PObject_;
 begin
   KR := MH_KeyRadio(Name, Rarray, Key);
   MH_KeyRadio := KR;
@@ -1821,7 +1821,7 @@ begin
   MH_Slider := SL;
 end;
 
-function MH_KeySlider(MinS, MaxS, Level: Integer; Key: Char): PObject_;
+function MH_KeySlider(MinS, MaxS, Level: Integer; Key: AnsiChar): PObject_;
 begin
   MH_KeySlider := MH_Slider([
     MUIA_Numeric_Min, MinS,
@@ -1831,7 +1831,7 @@ begin
     TAG_DONE]);
 end;
 
-function MH_KeySlider(var KS: PObject_; MinS, MaxS, Level: Integer; Key: Char): PObject_;
+function MH_KeySlider(var KS: PObject_; MinS, MaxS, Level: Integer; Key: AnsiChar): PObject_;
 begin
   KS := MH_KeySlider(MinS, MaxS, Level, Key);
   MH_KeySlider := KS;

+ 62 - 62
packages/ami-extra/src/pcq.pas

@@ -20,7 +20,7 @@ unit pcq;
 
      A unit to help port program from pcq pascal.
 
-     These are some of the common C pchar functions.
+     These are some of the common C PAnsiChar functions.
 
      Changed a few of the functions.
 
@@ -58,150 +58,150 @@ uses exec,strings;
 
 function CheckBreak: boolean;
 
-Function isupper(c : Char) : Boolean;
+Function isupper(c : AnsiChar) : Boolean;
 {
     Returns True if the character is in A..Z
 }
 
-Function islower(c : Char) : Boolean;
+Function islower(c : AnsiChar) : Boolean;
 {
     Returns True if the character is in a..z
 }
 
-Function isalpha(c : Char) : Boolean;
+Function isalpha(c : AnsiChar) : Boolean;
 {
     Returns True if the character is in A..Z or a..z
 }
 
-Function isdigit(c : Char) : Boolean;
+Function isdigit(c : AnsiChar) : Boolean;
 {
     Returns True if the character is in 0..9
 }
 
-Function isalnum(c : Char) : Boolean;
+Function isalnum(c : AnsiChar) : Boolean;
 {
     Returns True if isalpha or isdigit is true
 }
 
-Function isspace(c : Char) : Boolean;
+Function isspace(c : AnsiChar) : Boolean;
 {
     Returns true if the character is "white space", like a space,
     form feed, line feed, carraige return, tab, whatever.
 }
 
-Function toupper(c : Char) : Char;
+Function toupper(c : AnsiChar) : AnsiChar;
 {
     If the character is in a..z, the function returns the capital.
     Otherwise it returns c. Not true, this function use the utility.library
     to make the conversion.
 }
 
-Function tolower(c : Char) : Char;
+Function tolower(c : AnsiChar) : AnsiChar;
 {
     If c is in A..Z, the function returns the lower case letter.
     Otherwise it returns c. Not true this function use the utility.library
     to make the conversion.
 }
 
-function lowercase(c : char) : char;
+function lowercase(c : AnsiChar) : AnsiChar;
 {
    If the character is in a..z, the function returns the capital.
    Otherwise it returns c. Not true, this function use the utility.library
    to make the conversion.
 }
 
-function lowercase(c : pchar): pchar;
+function lowercase(c : PAnsiChar): PAnsiChar;
 {
-   Will turn the pchar till lowercase.
+   Will turn the PAnsiChar till lowercase.
 }
 
-function uppercase(c : char): char;
+function uppercase(c : AnsiChar): AnsiChar;
 {
     If the character is in a..z, the function returns the capital.
     Otherwise it returns c. Not true, this function use the utility.library
     to make the conversion.
 }
 
-function uppercase(c: pchar): pchar;
+function uppercase(c: PAnsiChar): PAnsiChar;
 {
-    Will turn the pchar till capital letters.
+    Will turn the PAnsiChar till capital letters.
 }
 
-Function streq(s1, s2 : pchar) : Boolean;
+Function streq(s1, s2 : PAnsiChar) : Boolean;
 {
     Returns True if s1 and s2 are the same.
 }
 
-Function strneq(s1, s2 : pchar; n : longint) : Boolean;
+Function strneq(s1, s2 : PAnsiChar; n : longint) : Boolean;
 {
     Returns True if the first n characters of s1 and s2 are identical.
 }
 
-Function strieq(s1, s2 : pchar) : Boolean;
+Function strieq(s1, s2 : PAnsiChar) : Boolean;
 {
     The same as streq(), but is case insensitive.
 }
 
-Function strnieq(s1, s2 : pchar; n : longint) : Boolean;
+Function strnieq(s1, s2 : PAnsiChar; n : longint) : Boolean;
 {
     The same as strneq(), but case insensitive.
 }
 
-Function strcmp(s1, s2 : pchar) : longint;
+Function strcmp(s1, s2 : PAnsiChar) : longint;
 {
     Returns an longint < 0 if s1 < s2, zero if they are equal, and > 0
     if s1 > s2.
 }
 
-Function stricmp(s1, s2 : pchar) : longint;
+Function stricmp(s1, s2 : PAnsiChar) : longint;
 {
     The same as strcmp, but not case sensitive
 }
 
-Function strncmp(s1, s2 : pchar; n : longint) : longint;
+Function strncmp(s1, s2 : PAnsiChar; n : longint) : longint;
 {
     Same as strcmp(), but only considers the first n characters.
 }
 
-Function strnicmp(s1, s2 : pchar; n : longint) : longint;
+Function strnicmp(s1, s2 : PAnsiChar; n : longint) : longint;
 {
     Same as strncmp, but not case sensitive
 }
 
-Procedure strcpy(s1, s2 : pchar);
+Procedure strcpy(s1, s2 : PAnsiChar);
 {
     Copies s2 into s1, appending a trailing zero.  This is the same
     as C, but opposite from 1.0.
 }
-Procedure strncpy(s1, s2 : pchar; n : smallint);
+Procedure strncpy(s1, s2 : PAnsiChar; n : smallint);
 {
     Copies s2 into s1, with a maximum of n characters.  Appends a
     trailing zero.
 }
 
-Procedure strncat(s1, s2 : pchar; n : smallint);
+Procedure strncat(s1, s2 : PAnsiChar; n : smallint);
 {
     Appends at most n characters from s2 onto s1.
 }
 
-Function strdup(s : pchar) : pchar;
+Function strdup(s : PAnsiChar) : PAnsiChar;
 {
-    This allocates a copy of the pchar 's', and returns a ptr
+    This allocates a copy of the PAnsiChar 's', and returns a ptr
 }
 
-Function strpos(s1 : pchar; c : Char) : longint;
+Function strpos(s1 : PAnsiChar; c : AnsiChar) : longint;
 {
     Return the position, starting at zero, of the first (leftmost)
     occurance of c in s1.  If there is no c, it returns -1.
 }
 
-Function strrpos(s1 : pchar; c : Char) : longint;
+Function strrpos(s1 : PAnsiChar; c : AnsiChar) : longint;
 {
     Returns the longint position of the right-most occurance of c in s1.
     If c is not in s1, it returns -1.
 }
 
-Function AllocString(l : longint) : pchar;
+Function AllocString(l : longint) : PAnsiChar;
 {
     Allocates l bytes, and returns a pointer to the allocated memory.
 This memory is allocated through the new() function, so it will be returned
@@ -209,7 +209,7 @@ to the system at the end of your program.  Note that the proper amount of RAM
 to allocate is strlen(s) + 1.
 }
 
-Procedure FreeString(s : pchar);
+Procedure FreeString(s : PAnsiChar);
 {
     This returns memory allocated by AllocString to the system.  Since
 the Amiga is a multitasking computer, you should always return memory you
@@ -230,21 +230,21 @@ begin
    end else CheckBreak := false;
 end;
 
-Function isupper(c : Char) : Boolean;
+Function isupper(c : AnsiChar) : Boolean;
 begin
      if ((ord(c) >= 192) and (ord(c) <= 223)) or ((c >= 'A') and (c <= 'Z'))
          then isupper := true
      else isupper := false;
 end;
 
-Function islower(c : Char) : Boolean;
+Function islower(c : AnsiChar) : Boolean;
 begin
      if ((ord(c) >= 224) and (ord(c) <= 254)) or ((c >= 'a') and (c <= 'z'))
          then islower := true
      else islower := false;
 end;
 
-Function isalpha(c : Char) : Boolean;
+Function isalpha(c : AnsiChar) : Boolean;
 begin
      if ((ord(c) >= 192) and (ord(c) <= 223)) or ((c >= 'A') and (c <= 'Z'))
      or ((ord(c) >= 224) and (ord(c) <= 254)) or ((c >= 'a') and (c <= 'z'))
@@ -252,44 +252,44 @@ begin
      else isalpha := false;
 end;
 
-Function isdigit(c : Char) : Boolean;
+Function isdigit(c : AnsiChar) : Boolean;
 begin
      if c in ['0'..'9'] then isdigit := true
      else isdigit := false;
 end;
 
-Function isalnum(c : Char) : Boolean;
+Function isalnum(c : AnsiChar) : Boolean;
 begin
      if isalpha(c) or isdigit(c) then isalnum := true
      else isalnum := false;
 end;
 
-Function isspace(c : Char) : Boolean;
+Function isspace(c : AnsiChar) : Boolean;
 begin
      if c in [#9..#13,#32] then isspace := true
      else isspace := false;
 end;
 
-Function toupper(c : Char) : Char;
+Function toupper(c : AnsiChar) : AnsiChar;
 begin
     if ((ord(c) >= 224) and (ord(c) <= 254)) or ((c >= 'a') and (c <= 'z'))
-        then c := char(ord(c)-32);
+        then c := AnsiChar(ord(c)-32);
     toupper := c;
 end;
 
-Function tolower(c : Char) : Char;
+Function tolower(c : AnsiChar) : AnsiChar;
 begin
     if ((ord(c) >= 192) and (ord(c) <= 223)) or ((c >= 'A') and (c <= 'Z'))
-        then c := char(ord(c)+32);
+        then c := AnsiChar(ord(c)+32);
     tolower := c;
 end;
 
-function lowercase(c : char) : char;
+function lowercase(c : AnsiChar) : AnsiChar;
 begin
     lowercase := tolower(c);
 end;
 
-function lowercase(c : pchar): pchar;
+function lowercase(c : PAnsiChar): PAnsiChar;
 var
     i : longint;
 begin
@@ -301,12 +301,12 @@ begin
     lowercase := c;
 end;
 
-function uppercase(c : char): char;
+function uppercase(c : AnsiChar): AnsiChar;
 begin
     uppercase := toupper(c);
 end;
 
-function uppercase(c: pchar): pchar;
+function uppercase(c: PAnsiChar): PAnsiChar;
 var
     i : longint;
 begin
@@ -318,75 +318,75 @@ begin
     uppercase := c;
 end;
 
-Function streq(s1, s2 : pchar) : Boolean;
+Function streq(s1, s2 : PAnsiChar) : Boolean;
 begin
     streq := (strcomp(s1,s2) = 0);
 end;
 
-Function strneq(s1, s2 : pchar; n : longint) : Boolean;
+Function strneq(s1, s2 : PAnsiChar; n : longint) : Boolean;
 begin
     strneq := (strlcomp(s1,s2,n) = 0);
 end;
 
-Function strieq(s1, s2 : pchar) : Boolean;
+Function strieq(s1, s2 : PAnsiChar) : Boolean;
 begin
     s1 := uppercase(s1);
     s2 := uppercase(s2);
     strieq := (strcomp(s1,s2)=0);
 end;
 
-Function strnieq(s1, s2 : pchar; n : longint) : Boolean;
+Function strnieq(s1, s2 : PAnsiChar; n : longint) : Boolean;
 begin
     s1 := uppercase(s1);
     s2 := uppercase(s2);
     strnieq := (strlcomp(s1,s2,n)=0);
 end;
 
-Function strcmp(s1, s2 : pchar) : longint;
+Function strcmp(s1, s2 : PAnsiChar) : longint;
 begin
     strcmp := strcomp(s1,s2);
 end;
 
-Function stricmp(s1, s2 : pchar) : longint;
+Function stricmp(s1, s2 : PAnsiChar) : longint;
 begin
     s1 := uppercase(s1);
     s2 := uppercase(s2);
     stricmp := strcomp(s1,s2);
 end;
 
-Function strncmp(s1, s2 : pchar; n : longint) : longint;
+Function strncmp(s1, s2 : PAnsiChar; n : longint) : longint;
 begin
     strncmp := strlcomp(s1,s2,n);
 end;
 
-Function strnicmp(s1, s2 : pchar; n : longint) : longint;
+Function strnicmp(s1, s2 : PAnsiChar; n : longint) : longint;
 begin
     s1 := uppercase(s1);
     s2 := uppercase(s2);
     strnicmp := strlcomp(s1,s2,n);
 end;
 
-Procedure strcpy(s1, s2 : pchar);
+Procedure strcpy(s1, s2 : PAnsiChar);
 begin
     strcopy(s1,s2)
 end;
 
-Procedure strncpy(s1, s2 : pchar; n : smallint);
+Procedure strncpy(s1, s2 : PAnsiChar; n : smallint);
 begin
     strlcopy(s1,s2,n);
 end;
 
-Procedure strncat(s1, s2 : pchar; n : smallint);
+Procedure strncat(s1, s2 : PAnsiChar; n : smallint);
 begin
     strlcat(s1,s2,n);
 end;
 
-Function strdup(s : pchar) : pchar;
+Function strdup(s : PAnsiChar) : PAnsiChar;
 begin
     strdup := StrNew(s);
 end;
 
-Function strpos(s1 : pchar; c : Char) : longint;
+Function strpos(s1 : PAnsiChar; c : AnsiChar) : longint;
   Var
      count: Longint;
   Begin
@@ -413,7 +413,7 @@ Function strpos(s1 : pchar; c : Char) : longint;
  end;
 
 
-Function strrpos(s1 : pchar; c : Char) : longint;
+Function strrpos(s1 : PAnsiChar; c : AnsiChar) : longint;
 Var
   count: Longint;
   index: Longint;
@@ -439,12 +439,12 @@ Var
  end;
 
 
-Function AllocString(l : longint) : pchar;
+Function AllocString(l : longint) : PAnsiChar;
 begin
     AllocString := StrAlloc(l);
 end;
 
-Procedure FreeString(s : pchar);
+Procedure FreeString(s : PAnsiChar);
 begin
     StrDispose(s);
 end;