Browse Source

arosunits: Removed Objfpc in all units, changed "array of const" to "array of PtrUInt"

git-svn-id: trunk@32996 -
marcus 9 years ago
parent
commit
e8cb0d0415

File diff suppressed because it is too large
+ 162 - 194
packages/arosunits/src/agraphics.pas


+ 30 - 46
packages/arosunits/src/amigados.pas

@@ -23,7 +23,7 @@
 {$define AROS_FAST_BPTR}
 {$define AROS_FAST_BPTR}
 
 
 unit amigados;
 unit amigados;
-{$mode objfpc}
+
 interface
 interface
 
 
 uses
 uses
@@ -2418,10 +2418,10 @@ function WriteChar(c: LongInt): LongInt;
 function UnReadChar(c: LongInt): LongInt;
 function UnReadChar(c: LongInt): LongInt;
 
 
 // Special functions for var args
 // Special functions for var args
-function AllocDosObjectTags(const Type_: LongWord; const Tags: array of const): APTR;
-function CreateNewProcTags(const Tags: array of const): PProcess;
-function NewLoadSegTags(const File_: STRPTR; const Tags: array of const): BPTR;
-function SystemTags(const Command: STRPTR; const Tags: array of const): LongInt;
+function AllocDosObjectTags(const Type_: LongWord; const Tags: array of PtrUInt): APTR;
+function CreateNewProcTags(const Tags: array of PtrUInt): PProcess;
+function NewLoadSegTags(const File_: STRPTR; const Tags: array of PtrUInt): BPTR;
+function SystemTags(const Command: STRPTR; const Tags: array of PtrUInt): LongInt;
 
 
 // elf.h
 // elf.h
 
 
@@ -2436,7 +2436,6 @@ function ELF_R_TYPE(i: LongWord): LongWord;
 function ELF_R_INFO(Sym: LongWord; Type_: LongWord): LongWord;
 function ELF_R_INFO(Sym: LongWord; Type_: LongWord): LongWord;
 {$endif}
 {$endif}
 
 
-
 const
 const
   BNULL = nil;
   BNULL = nil;
 
 
@@ -2445,76 +2444,61 @@ function BADDR(a: BPTR): APTR;
 
 
 implementation
 implementation
 
 
-uses
-  tagsarray;
-
-function ELF_ST_TYPE(i: LongWord): LongWord;
+function ELF_ST_TYPE(i: LongWord): LongWord; inline;
 begin
 begin
-  Result := i and $0F;
+  ELF_ST_TYPE := i and $0F;
 end;
 end;
 
 
 {$ifdef ELF_64BIT}
 {$ifdef ELF_64BIT}
-  function ELF_R_SYM(i: QWord): QWord;
+  function ELF_R_SYM(i: QWord): QWord; inline;
   begin
   begin
-    Result := i shr 32;
+    ELF_R_SYM := i shr 32;
   end;
   end;
 
 
-  function ELF_R_TYPE(i: QWord): QWord;
+  function ELF_R_TYPE(i: QWord): QWord; inline;
   begin
   begin
-    Result := i and $ffffffff;
+    ELF_R_TYPE := i and $ffffffff;
   end;
   end;
 
 
-  function ELF_R_INFO(Sym: QWord; Type_: QWord): QWord;
+  function ELF_R_INFO(Sym: QWord; Type_: QWord): QWord; inline;
   begin
   begin
-    Result := Sym shl 32 + Type_;
+    ELF_R_INFO := Sym shl 32 + Type_;
   end;
   end;
 {$else}
 {$else}
-  function ELF_R_SYM(i: LongWord): LongWord;
+  function ELF_R_SYM(i: LongWord): LongWord; inline;
   begin
   begin
-    Result := i shr 8;
+    ELF_R_SYM := i shr 8;
   end;
   end;
 
 
-  function ELF_R_TYPE(i: LongWord): LongWord;
+  function ELF_R_TYPE(i: LongWord): LongWord; inline;
   begin
   begin
-    Result := i and $ff;
+    ELF_R_TYPE := i and $ff;
   end;
   end;
 
 
-  function ELF_R_INFO(Sym: LongWord; Type_: LongWord): LongWord;
+  function ELF_R_INFO(Sym: LongWord; Type_: LongWord): LongWord; inline;
   begin
   begin
-    Result := Sym shl 8 + (Type_ and $ff);
+    ELF_R_INFO := Sym shl 8 + (Type_ and $ff);
   end;
   end;
 {$endif}
 {$endif}
 
 
-function AllocDosObjectTags(const Type_: LongWord; const Tags: array of const): APTR;
-var
-  TagList: TTagsList;
+function AllocDosObjectTags(const Type_: LongWord; const Tags: array of PtrUInt): APTR; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AllocDosObjectTags := AllocDosObject(Type_, GetTagPtr(TagList));
+  AllocDosObjectTags := AllocDosObject(Type_, @Tags);
 end;
 end;
 
 
-function CreateNewProcTags(const Tags: array of const): PProcess;
-var
-  TagList: TTagsList;
+function CreateNewProcTags(const Tags: array of PtrUInt): PProcess; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  CreateNewProcTags := CreateNewProc(GetTagPtr(TagList));
+  CreateNewProcTags := CreateNewProc(@Tags);
 end;
 end;
 
 
-function NewLoadSegTags(const File_: STRPTR; const Tags: array of const): BPTR;
-var
-  TagList: TTagsList;
+function NewLoadSegTags(const File_: STRPTR; const Tags: array of PtrUInt): BPTR; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  NewLoadSegTags := NewLoadSeg(File_, GetTagPtr(TagList));
+  NewLoadSegTags := NewLoadSeg(File_, @Tags);
 end;
 end;
 
 
-function SystemTags(const Command: STRPTR; const Tags: array of const): LongInt;
-var
-  TagList: TTagsList;
+function SystemTags(const Command: STRPTR; const Tags: array of PtrUInt): LongInt; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  SystemTags := SystemTagList(Command, GetTagPtr(TagList));
+  SystemTags := SystemTagList(Command, @Tags);
 end;
 end;
 
 
 function MKBADDR(a: APTR): BPTR; inline;
 function MKBADDR(a: APTR): BPTR; inline;
@@ -2535,17 +2519,17 @@ begin
   {$endif}
   {$endif}
 end;
 end;
 
 
-function ReadChar(): LongInt;
+function ReadChar(): LongInt; inline;
 begin
 begin
   ReadChar := FGetC(DosInput());
   ReadChar := FGetC(DosInput());
 end;
 end;
 
 
-function WriteChar(c: LongInt): LongInt;
+function WriteChar(c: LongInt): LongInt; inline;
 begin
 begin
   WriteChar := FPutC(DosOutput(), c);
   WriteChar := FPutC(DosOutput(), c);
 end;
 end;
 
 
-function UnReadChar(c: LongInt): LongInt;
+function UnReadChar(c: LongInt): LongInt; inline;
 begin
 begin
   UnReadChar := UnGetC(DosInput(),c);
   UnReadChar := UnGetC(DosInput(),c);
 end;
 end;

+ 10 - 21
packages/arosunits/src/asl.pas

@@ -15,12 +15,10 @@
 
 
 unit asl;
 unit asl;
 
 
-{$mode objfpc}
-
 interface
 interface
 
 
 uses
 uses
-  exec, utility, workbench, agraphics, tagsarray;
+  exec, utility, workbench, agraphics;
 
 
 const
 const
   ASLNAME: PChar = 'asl.library';
   ASLNAME: PChar = 'asl.library';
@@ -508,34 +506,25 @@ function RequestFile(FileReq: PFileRequester): LongBool; syscall ASLBase 7;
 procedure AbortAslRequest(Requester: Pointer); syscall ASLBase 13;
 procedure AbortAslRequest(Requester: Pointer); syscall ASLBase 13;
 procedure ActivateAslRequest(Requester: Pointer); syscall ASLBase 14;
 procedure ActivateAslRequest(Requester: Pointer); syscall ASLBase 14;
 
 
-function AllocAslRequest(ReqType: LongWord; const Tags: array of const): Pointer;
-function AslRequest(Requester: Pointer; const Tags: array of const): LongBool;
-function AslRequestTags(Requester: Pointer; const Tags: array of const): LongBool;
+function AllocAslRequest(ReqType: LongWord; const Tags: array of PtrUInt): Pointer;
+function AslRequest(Requester: Pointer; const Tags: array of PtrUInt): LongBool;
+function AslRequestTags(Requester: Pointer; const Tags: array of PtrUInt): LongBool;
 
 
 implementation
 implementation
 
 
-function AllocAslRequest(ReqType: LongWord; const Tags: array of const): Pointer;
-var
-  TagList: TTagsList;
+function AllocAslRequest(ReqType: LongWord; const Tags: array of PtrUInt): Pointer; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AllocAslRequest := AllocAslRequestA(reqType , GetTagPtr(TagList));
+  AllocAslRequest := AllocAslRequestA(reqType, @Tags);
 end;
 end;
 
 
-function AslRequest(Requester: Pointer; const Tags: array of const): LongBool;
-var
-  TagList: TTagsList;
+function AslRequest(Requester: Pointer; const Tags: array of PtrUInt): LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AslRequest := AslRequestA(Requester , GetTagPtr(TagList));
+  AslRequest := AslRequestA(Requester, @Tags);
 end;
 end;
 
 
-function AslRequestTags(Requester: Pointer; const Tags: array of const): LongBool;
-var
-  TagList: TTagsList;
+function AslRequestTags(Requester: Pointer; const Tags: array of PtrUInt): LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AslRequestTags := AslRequestA(Requester , GetTagPtr(TagList));
+  AslRequestTags := AslRequestA(Requester, @Tags);
 end;
 end;
 
 
 initialization
 initialization

+ 12 - 16
packages/arosunits/src/clipboard.pas

@@ -16,8 +16,7 @@
 unit clipboard;
 unit clipboard;
 
 
 interface
 interface
-
-{$mode objfpc}{$H+}
+{$H+}
 
 
 uses exec;
 uses exec;
 
 
@@ -74,8 +73,8 @@ type
     chm_ClipID : LongInt;        { the clip identifier of the new data }
     chm_ClipID : LongInt;        { the clip identifier of the new data }
    END;
    END;
 
 
-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
 implementation
 
 
@@ -87,7 +86,7 @@ const
   ID_FTXT = 1179932756;
   ID_FTXT = 1179932756;
   ID_CHRS = 1128813139;
   ID_CHRS = 1128813139;
 
 
-function GetTextFromClip(ClipUnit: Byte): string;
+function GetTextFromClip(ClipUnit: Byte): AnsiString;
 var
 var
   Iff: PIffHandle;
   Iff: PIffHandle;
   Error: LongInt;
   Error: LongInt;
@@ -96,7 +95,7 @@ var
   Len: Integer;
   Len: Integer;
   Cu: LongInt;
   Cu: LongInt;
 begin
 begin
-  Result := '';
+  GetTextFromClip := '';
   Cu := ClipUnit;
   Cu := ClipUnit;
   Iff := AllocIff;
   Iff := AllocIff;
   if Assigned(Iff) then
   if Assigned(Iff) then
@@ -124,12 +123,9 @@ begin
             begin
             begin
               GetMem(Buf, Len + 1);
               GetMem(Buf, Len + 1);
               FillChar(Buf^, Len + 1, #0);
               FillChar(Buf^, Len + 1, #0);
-              try
-                ReadChunkBytes(Iff, Buf, Len);
-                Result := Result + string(Buf);
-              finally
-                FreeMem(Buf);
-              end;
+              ReadChunkBytes(Iff, Buf, Len);
+              GetTextFromClip := GetTextFromClip + AnsiString(Buf);
+              FreeMem(Buf);
             end;
             end;
           end;
           end;
         end;
         end;
@@ -141,13 +137,13 @@ begin
   end;
   end;
 end;
 end;
 
 
-function PutTextToClip(ClipUnit: Byte; Text: string): Boolean;
+function PutTextToClip(ClipUnit: Byte; Text: AnsiString): Boolean;
 var
 var
   Iff: PIffHandle;
   Iff: PIffHandle;
-  TText: string;
+  TText: AnsiString;
   Len: Integer;
   Len: Integer;
 begin
 begin
-  Result := False;
+  PutTextToClip := False;
   Iff := AllocIff;
   Iff := AllocIff;
   if Assigned(Iff) then
   if Assigned(Iff) then
   begin
   begin
@@ -163,7 +159,7 @@ begin
           begin
           begin
             Len := Length(Text);
             Len := Length(Text);
             TText := Text + #0;
             TText := Text + #0;
-            Result := WriteChunkBytes(iff, @(TText[1]), Len) = len;
+            PutTextToClip := WriteChunkBytes(iff, @(TText[1]), Len) = len;
             PopChunk(iff);
             PopChunk(iff);
           end;
           end;
           PopChunk(iff);
           PopChunk(iff);

+ 39 - 60
packages/arosunits/src/cybergraphics.pas

@@ -14,7 +14,7 @@
  **********************************************************************}
  **********************************************************************}
 
 
 unit cybergraphics;
 unit cybergraphics;
-{$mode objfpc}
+
 interface
 interface
 
 
 uses
 uses
@@ -23,8 +23,8 @@ uses
 const
 const
   CYBERGFXNAME = 'cybergraphics.library';
   CYBERGFXNAME = 'cybergraphics.library';
   CYBERGFX_INCLUDE_VERSION = 41;
   CYBERGFX_INCLUDE_VERSION = 41;
- 
- 
+
+
   // ProcessPixelArray Operations (v50)
   // ProcessPixelArray Operations (v50)
 
 
   POP_BRIGHTEN                = 0;
   POP_BRIGHTEN                = 0;
@@ -62,9 +62,9 @@ const
   PPAOPTAG_GRADSYMCENTER      = $85231026;
   PPAOPTAG_GRADSYMCENTER      = $85231026;
 
 
   PPAOPTAG_RGBMASK            = $85231025;
   PPAOPTAG_RGBMASK            = $85231025;
-  
+
   //  Definition of CyberModeNode (Returned in AllocModeList)
   //  Definition of CyberModeNode (Returned in AllocModeList)
-  
+
 type
 type
    PCyberModeNode = ^TCyberModeNode;
    PCyberModeNode = ^TCyberModeNode;
    TCyberModeNode = record
    TCyberModeNode = record
@@ -83,9 +83,9 @@ const
   CYBRMATTR_XMOD         = $80000001; // function returns BytesPerRow if its called with this parameter
   CYBRMATTR_XMOD         = $80000001; // function returns BytesPerRow if its called with this parameter
   CYBRMATTR_BPPIX        = $80000002; // BytesPerPixel shall be returned
   CYBRMATTR_BPPIX        = $80000002; // BytesPerPixel shall be returned
   CYBRMATTR_DISPADR      = $80000003; // do not use this ! private tag
   CYBRMATTR_DISPADR      = $80000003; // do not use this ! private tag
-  CYBRMATTR_PIXFMT       = $80000004; // the pixel format is returned 
+  CYBRMATTR_PIXFMT       = $80000004; // the pixel format is returned
   CYBRMATTR_WIDTH        = $80000005; // returns width in pixels
   CYBRMATTR_WIDTH        = $80000005; // returns width in pixels
-  CYBRMATTR_HEIGHT       = $80000006; // returns height in lines  
+  CYBRMATTR_HEIGHT       = $80000006; // returns height in lines
   CYBRMATTR_DEPTH        = $80000007; // returns bits per pixel
   CYBRMATTR_DEPTH        = $80000007; // returns bits per pixel
   CYBRMATTR_ISCYBERGFX   = $80000008; // returns -1 if supplied bitmap is a cybergfx one
   CYBRMATTR_ISCYBERGFX   = $80000008; // returns -1 if supplied bitmap is a cybergfx one
   CYBRMATTR_ISLINEARMEM  = $80000009; // returns -1 if supplied bitmap is linear accessable
   CYBRMATTR_ISLINEARMEM  = $80000009; // returns -1 if supplied bitmap is linear accessable
@@ -109,7 +109,7 @@ const
   CYBRMREQ_WinTitle    = CYBRMREQ_TB + 20;
   CYBRMREQ_WinTitle    = CYBRMREQ_TB + 20;
   CYBRMREQ_OKText      = CYBRMREQ_TB + 21;
   CYBRMREQ_OKText      = CYBRMREQ_TB + 21;
   CYBRMREQ_CancelText  = CYBRMREQ_TB + 22;
   CYBRMREQ_CancelText  = CYBRMREQ_TB + 22;
-  CYBRMREQ_Screen      = CYBRMREQ_TB + 30; // Screen you wish the Requester to open on 
+  CYBRMREQ_Screen      = CYBRMREQ_TB + 30; // Screen you wish the Requester to open on
 // Tags for BestCyberModeID()
 // Tags for BestCyberModeID()
   CYBRBIDTG_TB = TAG_USER + $50000;
   CYBRBIDTG_TB = TAG_USER + $50000;
   // FilterTags
   // FilterTags
@@ -148,26 +148,26 @@ const
   PIXFMT_RGB032 = 103;
   PIXFMT_RGB032 = 103;
   PIXFMT_0BGR32 = 104;
   PIXFMT_0BGR32 = 104;
 
 
-  RECTFMT_RGB15	  = 100;
-  RECTFMT_BGR15	  = 101;
+  RECTFMT_RGB15   = 100;
+  RECTFMT_BGR15   = 101;
   RECTFMT_RGB15PC = 102;
   RECTFMT_RGB15PC = 102;
   RECTFMT_BGR15PC = 103;
   RECTFMT_BGR15PC = 103;
-  RECTFMT_RGB16	  = 104;
-  RECTFMT_BGR16	  = 105;
+  RECTFMT_RGB16   = 104;
+  RECTFMT_BGR16   = 105;
   RECTFMT_RGB16PC = 106;
   RECTFMT_RGB16PC = 106;
   RECTFMT_BGR16PC = 107;
   RECTFMT_BGR16PC = 107;
-  RECTFMT_RGB24	  = RECTFMT_RGB;
-  RECTFMT_BGR24	  = 109;
-  RECTFMT_ARGB32	= RECTFMT_ARGB;
-  RECTFMT_BGRA32	= 111;
-  RECTFMT_RGBA32	= RECTFMT_RGBA;
-  RECTFMT_ABGR32	= 113;
+  RECTFMT_RGB24   = RECTFMT_RGB;
+  RECTFMT_BGR24   = 109;
+  RECTFMT_ARGB32  = RECTFMT_ARGB;
+  RECTFMT_BGRA32  = 111;
+  RECTFMT_RGBA32  = RECTFMT_RGBA;
+  RECTFMT_ABGR32  = 113;
   RECTFMT_0RGB32  = 114;
   RECTFMT_0RGB32  = 114;
   RECTFMT_BGR032  = 115;
   RECTFMT_BGR032  = 115;
   RECTFMT_RGB032  = 116;
   RECTFMT_RGB032  = 116;
   RECTFMT_0BGR32  = 117;
   RECTFMT_0BGR32  = 117;
 {$endif}
 {$endif}
-  
+
 // Parameters for CVideoCtrlTagList()
 // Parameters for CVideoCtrlTagList()
   SETVC_DPMSLevel = $88002001;
   SETVC_DPMSLevel = $88002001;
   DPMS_ON         = 0; // Full operation
   DPMS_ON         = 0; // Full operation
@@ -185,7 +185,7 @@ const
 // Tags for UnLockBitMapTagList()
 // Tags for UnLockBitMapTagList()
   UBMI_UPDATERECTS  = $85001001;
   UBMI_UPDATERECTS  = $85001001;
   UBMI_REALLYUNLOCK = $85001002;
   UBMI_REALLYUNLOCK = $85001002;
-  
+
 type
 type
 // Message passed to the DoCDrawMethodTagList() hook function
 // Message passed to the DoCDrawMethodTagList() hook function
   PCDrawMsg = ^TCDrawMsg;
   PCDrawMsg = ^TCDrawMsg;
@@ -236,68 +236,47 @@ procedure BltTemplateAlpha(src: APTR; srcx: LongInt; srcmod: LongInt; rp: PRastP
 procedure ProcessPixelArray(rp: PRastPort; destX: LongWord; destY: LongWord; sizeX: LongWord; sizeY: LongWord; operation: LongWord; value: LongInt; taglist: PTagItem); syscall CyberGfxBase 38;
 procedure ProcessPixelArray(rp: PRastPort; destX: LongWord; destY: LongWord; sizeX: LongWord; sizeY: LongWord; operation: LongWord; value: LongInt; taglist: PTagItem); syscall CyberGfxBase 38;
 
 
 // Functions and procedures with array of const go here
 // Functions and procedures with array of const go here
-function AllocCModeListTags(const ModeListTags: array of const): PList;
-function BestCModeIDTags(const BestModeIDTags: array of const): LongWord;
-procedure CVideoCtrlTags(ViewPort: PViewPort; const TagList: array of const);
-procedure DoCDrawMethodTags(Hook: PHook; a1arg: PRastPort; const TagList: array of const);
-function LockBitMapTags(BitMap: APTR; const TagList: array of const): APTR;
-procedure UnLockBitMapTags(Handle: APTR; const TagList: array of const);
+function AllocCModeListTags(const ModeListTags: array of PtrUInt): PList;
+function BestCModeIDTags(const BestModeIDTags: array of PtrUInt): LongWord;
+procedure CVideoCtrlTags(ViewPort: PViewPort; const TagList: array of PtrUInt);
+procedure DoCDrawMethodTags(Hook: PHook; a1arg: PRastPort; const TagList: array of PtrUInt);
+function LockBitMapTags(BitMap: APTR; const TagList: array of PtrUInt): APTR;
+procedure UnLockBitMapTags(Handle: APTR; const TagList: array of PtrUInt);
 
 
 function SHIFT_PIXFMT(fmt: LongInt): LongInt;
 function SHIFT_PIXFMT(fmt: LongInt): LongInt;
 function DOWNSHIFT_PIXFMT(fmt: LongInt): LongInt;
 function DOWNSHIFT_PIXFMT(fmt: LongInt): LongInt;
 
 
 implementation
 implementation
 
 
-uses
-  tagsarray;
-
 // Functions and procedures with array of const go here
 // Functions and procedures with array of const go here
-function AllocCModeListTags(const ModeListTags: array of const): PList;
-var
-  TagList: TTagsList;
+function AllocCModeListTags(const ModeListTags: array of PtrUInt): PList; inline;
 begin
 begin
-  AddTags(TagList, ModeListTags);
-  AllocCModeListTags := AllocCModeListTagList(GetTagPtr(TagList));
+  AllocCModeListTags := AllocCModeListTagList(@ModeListTags);
 end;
 end;
 
 
-function BestCModeIDTags(const BestModeIDTags: array of const): LongWord;
-var
-  TagList: TTagsList;
+function BestCModeIDTags(const BestModeIDTags: array of PtrUInt): LongWord; inline;
 begin
 begin
-  AddTags(TagList, BestModeIDTags);
-  BestCModeIDTags := BestCModeIDTagList(GetTagPtr(TagList));
+  BestCModeIDTags := BestCModeIDTagList(@BestModeIDTags);
 end;
 end;
 
 
-procedure CVideoCtrlTags(ViewPort: PViewPort; const TagList: array of const);
-var
-  TagsList: TTagsList;
+procedure CVideoCtrlTags(ViewPort: PViewPort; const TagList: array of PtrUInt); inline;
 begin
 begin
-  AddTags(TagsList, TagList);
-  CVideoCtrlTagList(ViewPort, GetTagPtr(TagsList));
+  CVideoCtrlTagList(ViewPort, @TagList);
 end;
 end;
 
 
-procedure DoCDrawMethodTags(Hook: PHook; a1arg: PRastPort; const TagList: array of const);
-var
-  TagsList: TTagsList;
+procedure DoCDrawMethodTags(Hook: PHook; a1arg: PRastPort; const TagList: array of PtrUInt); inline;
 begin
 begin
-  AddTags(TagsList, TagList);
-  DoCDrawMethodTagList(Hook, a1arg, GetTagPtr(TagsList));
+  DoCDrawMethodTagList(Hook, a1arg, @TagList);
 end;
 end;
 
 
-function LockBitMapTags(BitMap: APTR; const TagList: array of const): APTR;
-var
-  TagsList: TTagsList;
+function LockBitMapTags(BitMap: APTR; const TagList: array of PtrUInt): APTR; inline;
 begin
 begin
-  AddTags(TagsList, TagList);
-  LockBitMapTags := LockBitMapTagList(BitMap, GetTagPtr(TagsList));
+  LockBitMapTags := LockBitMapTagList(BitMap, @TagList);
 end;
 end;
 
 
-procedure UnLockBitMapTags(Handle: APTR; const TagList: array of const);
-var
-  TagsList: TTagsList;
+procedure UnLockBitMapTags(Handle: APTR; const TagList: array of PtrUInt); inline;
 begin
 begin
-  AddTags(TagsList, TagList);
-  UnLockBitMapTagList(Handle, GetTagPtr(TagsList));
+  UnLockBitMapTagList(Handle, @TagList);
 end;
 end;
 
 
 function SHIFT_PIXFMT(fmt: LongInt): LongInt;
 function SHIFT_PIXFMT(fmt: LongInt): LongInt;
@@ -311,7 +290,7 @@ begin
 end;
 end;
 
 
 initialization
 initialization
-  CyberGfxBase := OpenLibrary(CYBERGFXNAME, 0); 
+  CyberGfxBase := OpenLibrary(CYBERGFXNAME, 0);
 finalization
 finalization
   CloseLibrary(CyberGfxBase);
   CloseLibrary(CyberGfxBase);
 end.
 end.

+ 64 - 80
packages/arosunits/src/diskfont.pas

@@ -15,112 +15,96 @@
 
 
 unit diskfont;
 unit diskfont;
 
 
-{$mode objfpc}
-
-INTERFACE
+interface
 
 
 uses exec, agraphics,utility;
 uses exec, agraphics,utility;
 
 
 const
 const
-
-    MAXFONTPATH         = 256;
+  MAXFONTPATH = 256;
 
 
 type
 type
-
-    pFontContents = ^tFontContents;
-    tFontContents = record
-        fc_FileName     : Array [0..MAXFONTPATH-1] of Char;
-        fc_YSize        : Word;
-        fc_Style        : Byte;
-        fc_Flags        : Byte;
-    end;
-
-
-   pTFontContents = ^tTFontContents;
-   tTFontContents = record
-    tfc_FileName  : Array[0..MAXFONTPATH-3] of Char;
-    tfc_TagCount  : Word;
-
-    tfc_YSize     : Word;
+  PFontContents = ^TFontContents;
+  TFontContents = record
+    fc_FileName: array[0..MAXFONTPATH - 1] of Char;
+    fc_YSize: Word;
+    fc_Style: Byte;
+    fc_Flags: Byte;
+  end;
+
+  PTFontContents = ^TTFontContents;
+  TTFontContents = record
+    tfc_FileName: array[0..MAXFONTPATH - 3] of Char;
+    tfc_TagCount: Word;
+    tfc_YSize: Word;
     tfc_Style,
     tfc_Style,
-    tfc_Flags     : Byte;
-   END;
-
+    tfc_Flags: Byte;
+   end;
 
 
 const
 const
-
-    FCH_ID              = $0f00;
-    TFCH_ID             = $0f02;
-    OFCH_ID             = $0f03;
-
-
+  FCH_ID   = $0f00;
+  TFCH_ID  = $0f02;
+  OFCH_ID  = $0f03;
 
 
 type
 type
-
-    pFontContentsHeader = ^tFontContentsHeader;
-    tFontContentsHeader = record
-        fch_FileID      : Word;
-        fch_NumEntries  : Word;
-    end;
+  PFontContentsHeader = ^TFontContentsHeader;
+  TFontContentsHeader = record
+    fch_FileID: Word;
+    fch_NumEntries: Word;
+  end;
 
 
 const
 const
-
-    DFH_ID              = $0f80;
-    MAXFONTNAME         = 32;
+  DFH_ID = $0f80;
+  MAXFONTNAME = 32;
 
 
 type
 type
-
-    pDiskFontHeader = ^tDiskFontHeader;
-    tDiskFontHeader = record
-        dfh_DF          : tNode;
-        dfh_FileID      : Word;
-        dfh_Revision    : Word;
-        dfh_Segment     : Longint;
-        dfh_Name        : Array [0..MAXFONTNAME-1] of Char;
-        dfh_TF          : tTextFont;
-    end;
+  PDiskFontHeader = ^TDiskFontHeader;
+  TDiskFontHeader = record
+    dfh_DF: TNode;
+    dfh_FileID: Word;
+    dfh_Revision: Word;
+    dfh_Segment: Longint;
+    dfh_Name: array [0..MAXFONTNAME-1] of Char;
+    dfh_TF: TTextFont;
+  end;
 
 
 const
 const
-
-    AFB_MEMORY          = 0;
-    AFF_MEMORY          = 1;
-    AFB_DISK            = 1;
-    AFF_DISK            = 2;
-    AFB_SCALED          = 2;
-    AFF_SCALED          = $0004;
-    AFB_BITMAP          = 3;
-    AFF_BITMAP          = $0008;
-    AFB_TAGGED          = 16;
-    AFF_TAGGED          = $10000;
-
+  AFB_MEMORY          = 0;
+  AFF_MEMORY          = 1;
+  AFB_DISK            = 1;
+  AFF_DISK            = 2;
+  AFB_SCALED          = 2;
+  AFF_SCALED          = $0004;
+  AFB_BITMAP          = 3;
+  AFF_BITMAP          = $0008;
+  AFB_TAGGED          = 16;
+  AFF_TAGGED          = $10000;
 
 
 type
 type
-
-    pAvailFonts = ^tAvailFonts;
-    tAvailFonts = record
-        af_Type         : Word;
-        af_Attr         : tTextAttr;
-    end;
-
-    pTAvailFonts = ^tTAvailFonts;
-    tTAvailFonts = record
-        taf_Type        : Word;
-        taf_Attr        : tTTextAttr;
-    end;
-
-    pAvailFontsHeader = ^tAvailFontsHeader;
-    tAvailFontsHeader = record
-        afh_NumEntries  : Word;
-    end;
+  PAvailFonts = ^TAvailFonts;
+  TAvailFonts = record
+    af_Type: Word;
+    af_Attr: TTextAttr;
+  end;
+
+  PTAvailFonts = ^TTAvailFonts;
+  TTAvailFonts = record
+    taf_Type: Word;
+    taf_Attr: TTTextAttr;
+  end;
+
+  PAvailFontsHeader = ^TAvailFontsHeader;
+  TAvailFontsHeader = record
+    afh_NumEntries: Word;
+  end;
 
 
 const
 const
-    DISKFONTNAME : PChar = 'diskfont.library';
+  DISKFONTNAME: PChar = 'diskfont.library';
 
 
 var
 var
   DiskfontBase: PLibrary;
   DiskfontBase: PLibrary;
 
 
 function AvailFonts(Buffer: PChar; BufBytes: LongInt; Flags: LongInt): LongInt; syscall DiskfontBase 6;
 function AvailFonts(Buffer: PChar; BufBytes: LongInt; Flags: LongInt): LongInt; syscall DiskfontBase 6;
-procedure DisposeFontContents(FontContentsHeader: PFontContentsHeader); syscall DiskfontBase 8; 
+procedure DisposeFontContents(FontContentsHeader: PFontContentsHeader); syscall DiskfontBase 8;
 function NewFontContents(FontsLock: BPTR; FontName: PChar): PFontContentsHeader; syscall DiskfontBase 7;
 function NewFontContents(FontsLock: BPTR; FontName: PChar): PFontContentsHeader; syscall DiskfontBase 7;
 function NewScaledDiskFont(SourceFont: PTextFont; DestTextAttr: PTextAttr): PDiskFontHeader; syscall DiskfontBase 9;
 function NewScaledDiskFont(SourceFont: PTextFont; DestTextAttr: PTextAttr): PDiskFontHeader; syscall DiskfontBase 9;
 function OpenDiskFont(TextAttr: PTextAttr): PTextFont; syscall DiskfontBase 5;
 function OpenDiskFont(TextAttr: PTextAttr): PTextFont; syscall DiskfontBase 5;

+ 16 - 18
packages/arosunits/src/icon.pas

@@ -15,17 +15,15 @@
 
 
 unit icon;
 unit icon;
 
 
-{$mode delphi}
-
 interface
 interface
 
 
 uses
 uses
-  exec, workbench,utility,amigados, agraphics, intuition;
+  exec, workbench, utility, amigados, agraphics, intuition;
 //,datatypes;
 //,datatypes;
 
 
 const
 const
-  ICONNAME    : PChar = 'icon.library';  
-  
+  ICONNAME    : PChar = 'icon.library';
+
   ICONA_Dummy = TAG_USER + $9000;  // Start of icon.library tags
   ICONA_Dummy = TAG_USER + $9000;  // Start of icon.library tags
   ICONA_ErrorCode = ICONA_Dummy + 1; // Errorcode (PLongInt)
   ICONA_ErrorCode = ICONA_Dummy + 1; // Errorcode (PLongInt)
   ICONA_ErrorTagItem = ICONA_Dummy + 75; //Points to the tag item that caused the error (^PTagItem).
   ICONA_ErrorTagItem = ICONA_Dummy + 75; //Points to the tag item that caused the error (^PTagItem).
@@ -199,7 +197,7 @@ const
                                                   screen, turn the duplicate into that palette mapped icon.}
                                                   screen, turn the duplicate into that palette mapped icon.}
 
 
 { Tags for use with DrawIconStateA() and GetIconRectangleA().  }
 { Tags for use with DrawIconStateA() and GetIconRectangleA().  }
-  ICONDRAWA_DrawInfo = ICONA_Dummy + 66; // Drawing information to use (PDrawInfo). 
+  ICONDRAWA_DrawInfo = ICONA_Dummy + 66; // Drawing information to use (PDrawInfo).
   ICONDRAWA_Frameless = ICONA_Dummy + 70; // Draw the icon without the surrounding frame (BOOL).
   ICONDRAWA_Frameless = ICONA_Dummy + 70; // Draw the icon without the surrounding frame (BOOL).
   ICONDRAWA_EraseBackground = ICONA_Dummy + 71; // Erase the background before drawing a frameless icon (BOOL).
   ICONDRAWA_EraseBackground = ICONA_Dummy + 71; // Erase the background before drawing a frameless icon (BOOL).
   ICONDRAWA_Borderless = ICONA_Dummy + 83; // Draw the icon without the surrounding border and frame (BOOL).
   ICONDRAWA_Borderless = ICONA_Dummy + 83; // Draw the icon without the surrounding border and frame (BOOL).
@@ -213,7 +211,7 @@ const
   ICONA_Reserved6 = ICONA_Dummy + 86;
   ICONA_Reserved6 = ICONA_Dummy + 86;
   ICONA_Reserved7 = ICONA_Dummy + 87;
   ICONA_Reserved7 = ICONA_Dummy + 87;
   ICONA_Reserved8 = ICONA_Dummy + 88;
   ICONA_Reserved8 = ICONA_Dummy + 88;
-{ The last Tag}  
+{ The last Tag}
   ICONA_LAST_TAG = ICONA_Dummy + 88;
   ICONA_LAST_TAG = ICONA_Dummy + 88;
 
 
 
 
@@ -248,43 +246,43 @@ procedure ChangeToSelectedIconColor(Cr: Pointer); syscall IconBase 33; //TODO: p
 
 
 {macros}
 {macros}
 function PACK_ICON_ASPECT_RATIO(Num, Den: LongInt): LongInt;
 function PACK_ICON_ASPECT_RATIO(Num, Den: LongInt): LongInt;
-procedure UNPACK_ICON_ASPECT_RATIO(Aspect: LongInt; out Num, Den: LongInt);
+procedure UNPACK_ICON_ASPECT_RATIO(Aspect: LongInt; var Num, Den: LongInt);
 
 
 type
 type
-  TToolTypeArray= array of string;
-  
-function GetToolTypes(Filename: string): TToolTypeArray;
+  TToolTypeArray= array of AnsiString;
+
+function GetToolTypes(Filename: AnsiString): TToolTypeArray;
 
 
 
 
 implementation
 implementation
 
 
-function GetToolTypes(Filename: string): TToolTypeArray;
+function GetToolTypes(Filename: AnsiString): TToolTypeArray;
 var
 var
   DObj: PDiskObject;
   DObj: PDiskObject;
   Tooltype: PPChar;
   Tooltype: PPChar;
   Idx: Integer;
   Idx: Integer;
 begin
 begin
-  SetLength(Result, 0);
+  SetLength(GetToolTypes, 0);
   DObj := GetDiskObject(PChar(FileName));
   DObj := GetDiskObject(PChar(FileName));
   if not Assigned(Dobj) then
   if not Assigned(Dobj) then
     Exit;
     Exit;
   Tooltype := DObj^.do_Tooltypes;
   Tooltype := DObj^.do_Tooltypes;
   while Assigned(ToolType^) do
   while Assigned(ToolType^) do
   begin
   begin
-    Idx := Length(Result);
-    SetLength(Result, Idx + 1);
-    Result[Idx] := ToolType^;
+    Idx := Length(GetToolTypes);
+    SetLength(GetToolTypes, Idx + 1);
+    GetToolTypes[Idx] := ToolType^;
     Inc(ToolType);
     Inc(ToolType);
   end;
   end;
   FreeDiskObject(DObj);
   FreeDiskObject(DObj);
 end;
 end;
 
 
-function PACK_ICON_ASPECT_RATIO(Num, Den: LongInt): LongInt;
+function PACK_ICON_ASPECT_RATIO(Num, Den: LongInt): LongInt; inline;
 begin
 begin
   PACK_ICON_ASPECT_RATIO := (Num shl 4) or Den;
   PACK_ICON_ASPECT_RATIO := (Num shl 4) or Den;
 end;
 end;
 
 
-procedure UNPACK_ICON_ASPECT_RATIO(Aspect: LongInt; out Num, Den: LongInt);
+procedure UNPACK_ICON_ASPECT_RATIO(Aspect: LongInt; var Num, Den: LongInt); inline;
 begin
 begin
   Num := (Aspect shr 4) and $F;
   Num := (Aspect shr 4) and $F;
   Den := Aspect and $15;
   Den := Aspect and $15;

+ 1 - 4
packages/arosunits/src/iffparse.pas

@@ -17,11 +17,8 @@ unit iffparse;
 
 
 interface
 interface
 
 
-{$mode objfpc}
-
 uses exec, clipboard, utility;
 uses exec, clipboard, utility;
 
 
-
 const
 const
     IFFPARSENAME  : PChar = 'iffparse.library';
     IFFPARSENAME  : PChar = 'iffparse.library';
 
 
@@ -259,7 +256,7 @@ function Make_ID(str: String): LongInt;
 
 
 implementation
 implementation
 
 
-function Make_ID(str: String): LongInt;
+function Make_ID(str: String): LongInt; inline;
 begin
 begin
         Make_ID:= (LongInt(Ord(Str[1])) shl 24) or
         Make_ID:= (LongInt(Ord(Str[1])) shl 24) or
                   (LongInt(Ord(Str[2])) shl 16 ) or
                   (LongInt(Ord(Str[2])) shl 16 ) or

+ 77 - 124
packages/arosunits/src/intuition.pas

@@ -14,8 +14,6 @@
  **********************************************************************}
  **********************************************************************}
 unit Intuition;
 unit Intuition;
 
 
-{$mode objfpc}
-
 {$define INTUI_V36_NAMES_ONLY}
 {$define INTUI_V36_NAMES_ONLY}
 
 
 interface
 interface
@@ -3339,25 +3337,25 @@ procedure WindowToFront(Window: PWindow); syscall IntuitionBase 52;
 procedure ZipWindow(Window: PWindow); syscall IntuitionBase 84;
 procedure ZipWindow(Window: PWindow); syscall IntuitionBase 84;
 
 
 // VarArgs Versions
 // VarArgs Versions
-function SetAttrs(Obj: APTR; const Tags: array of const): LongWord;
-function NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of const): APTR;
-function BuildEasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; const Args: array of const): PWindow;
-function DoGadgetMethod(Gad: PGadget; Win: PWindow; Req: PRequester; const Args: array of const): IPTR;
-function EasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; const Args: array of const): LongInt;
-function OpenScreenTags(NewScreen: PNewScreen; const Tags: array of const): PScreen;
-function OpenWindowTags(NewWindow: PNewWindow; const Tags: array of const): PWindow;
-function SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of const): IPTR;
-procedure SetWindowPointer(Win: PWindow; const Tags: array of const);
+function SetAttrs(Obj: APTR; const Tags: array of PtrUInt): LongWord;
+function NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR;
+function BuildEasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; const Args: array of PtrUInt): PWindow;
+function DoGadgetMethod(Gad: PGadget; Win: PWindow; Req: PRequester; const Args: array of PtrUInt): IPTR;
+function EasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; const Args: array of PtrUInt): LongInt;
+function OpenScreenTags(NewScreen: PNewScreen; const Tags: array of PtrUInt): PScreen;
+function OpenWindowTags(NewWindow: PNewWindow; const Tags: array of PtrUInt): PWindow;
+function SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of PtrUInt): IPTR;
+procedure SetWindowPointer(Win: PWindow; const Tags: array of PtrUInt);
 
 
 // Function wrapper
 // Function wrapper
 function SetSuperAttrsA(cl: PIClass; Obj: PObject_; TagList: PTagItem): IPTR;
 function SetSuperAttrsA(cl: PIClass; Obj: PObject_; TagList: PTagItem): IPTR;
-function SetSuperAttrs(cl: PIClass; Obj: PObject_; Tags: array of const): IPTR;
+function SetSuperAttrs(cl: PIClass; Obj: PObject_; const Tags: array of PtrUInt): IPTR;
 function DoMethodA(Obj: PObject_; Message: APTR): IPTR;
 function DoMethodA(Obj: PObject_; Message: APTR): IPTR;
-function DoMethod(Obj: PObject_; MethodID: LongWord; Args: array of const): IPTR;
+function DoMethod(Obj: PObject_; const Args: array of PtrUInt): IPTR;
 function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
 function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
-function CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: LongWord; const Args: array of const): IPTR;
+function CoerceMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR;
 function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
 function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
-function DoSuperMethod(cl: PIClass; Obj: PObject_; Args: array of const): IPTR;
+function DoSuperMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR;
 
 
 function Has_Children(Win: PWindow): Boolean;
 function Has_Children(Win: PWindow): Boolean;
 function Is_Children(Win: PWindow): Boolean;
 function Is_Children(Win: PWindow): Boolean;
@@ -3391,154 +3389,110 @@ function SHAKNUM(x: Word): Word;
 
 
 implementation
 implementation
 
 
-uses
-  tagsarray, longarray;
-
-function SetAttrs(Obj: APTR; const Tags: array of const): LongWord;
-var
-  TagList: TTagsList;
+function SetAttrs(Obj: APTR; const Tags: array of PtrUInt): LongWord; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  Result := SetAttrsA(Obj, GetTagPtr(TagList));
+  SetAttrs := SetAttrsA(Obj, @Tags);
 end;
 end;
 
 
-function NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of const): APTR;
-var
-  TagList: TTagsList;
+function NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  Result := NewObjectA(ClassPtr, ClassID, GetTagPtr(TagList));
+  NewObject := NewObjectA(ClassPtr, ClassID, @Tags);
 end;
 end;
 
 
-function BuildEasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; const Args: array of const): PWindow;
-var
-  ArgList: TArgList;
+function BuildEasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; const Args: array of PtrUInt): PWindow; inline;
 begin
 begin
-  AddArguments(ArgList, Args);
-  Result := BuildEasyRequestArgs(Window, EasyStruct, IDCMP, GetArgPtr(ArgList));
+  BuildEasyRequest := BuildEasyRequestArgs(Window, EasyStruct, IDCMP, @Args);
 end;
 end;
 
 
-function DoGadgetMethod(Gad: PGadget; Win: PWindow; Req: PRequester; const Args: array of const): IPTR;
-var
-  ArgList: TArgList;
+function DoGadgetMethod(Gad: PGadget; Win: PWindow; Req: PRequester; const Args: array of PtrUInt): IPTR; inline;
 begin
 begin
-  AddArguments(ArgList, Args);
 {$ifdef i386}
 {$ifdef i386}
-  Result := DoGadgetMethodA(Gad, Win, Req, TMsg(ArgList));
+  DoGadgetMethod := DoGadgetMethodA(Gad, Win, Req, TMsg(@Args));
 {$else}
 {$else}
 {$warning fix me!}
 {$warning fix me!}
 {$endif}
 {$endif}
 end;
 end;
 
 
-function EasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; const Args: array of const): LongInt;
-var
-  ArgList: TArgList;
+function EasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; const Args: array of PtrUInt): LongInt; inline;
 begin
 begin
-  AddArguments(ArgList, Args);
-  Result := EasyRequestArgs(Window, EasyStruct, IDCMP_Ptr, @(ArgList[0]));
+  EasyRequest := EasyRequestArgs(Window, EasyStruct, IDCMP_Ptr, @Args);
 end;
 end;
 
 
-function OpenScreenTags(NewScreen: PNewScreen; const Tags: array of const): PScreen;
-var
-  TagList: TTagsList;
+function OpenScreenTags(NewScreen: PNewScreen; const Tags: array of PtrUInt): PScreen; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  Result := OpenScreenTagList(NewScreen, GetTagPtr(TagList));
+  OpenScreenTags := OpenScreenTagList(NewScreen, @Tags);
 end;
 end;
 
 
-function OpenWindowTags(NewWindow: PNewWindow; const Tags: array of const): PWindow;
-var
-  TagList: TTagsList;
+function OpenWindowTags(NewWindow: PNewWindow; const Tags: array of PtrUInt): PWindow; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  Result := OpenWindowTagList(NewWindow, GetTagPtr(TagList));
+  OpenWindowTags := OpenWindowTagList(NewWindow, @Tags);
 end;
 end;
 
 
-function SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of const): IPTR;
-var
-  TagList: TTagsList;
+function SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of PtrUInt): IPTR; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  Result := SetGadgetAttrsA(Gadget, Window, Requester, GetTagPtr(TagList));
+  SetGadgetAttrs := SetGadgetAttrsA(Gadget, Window, Requester, @Tags);
 end;
 end;
 
 
-procedure SetWindowPointer(Win: PWindow; const Tags: array of const);
-var
-  TagList: TTagsList;
+procedure SetWindowPointer(Win: PWindow; const Tags: array of PtrUInt); inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  SetWindowPointerA(Win, GetTagPtr(TagList));
+  SetWindowPointerA(Win, @Tags);
 end;
 end;
 
 
 // Functions wrapper
 // Functions wrapper
 
 
-function DoMethodA(Obj: PObject_; Message: APTR): IPTR;
+function DoMethodA(Obj: PObject_; Message: APTR): IPTR; inline;
 begin
 begin
-  Result := 0;
+  DoMethodA := 0;
   if Obj = nil then
   if Obj = nil then
     Exit;
     Exit;
-  Result := CALLHOOKPKT_(PHook(OCLASS(Obj)), Obj, Message);
+  DoMethodA := CALLHOOKPKT_(PHook(OCLASS(Obj)), Obj, Message);
 end;
 end;
 
 
-function DoMethod(Obj: PObject_; MethodID: LongWord; Args: array of const): IPTR;
-var
-  ArgList: TArgList;
+function DoMethod(Obj: PObject_; const Args: array of PtrUInt): IPTR; inline;
 begin
 begin
-  Result := 0;
+  DoMethod := 0;
   if obj = nil then
   if obj = nil then
     Exit;
     Exit;
-  AddArguments(ArgList, [MethodID]);
-  AddArguments(ArgList, Args);
-  Result := CALLHOOKPKT_(PHook(OCLASS(Obj)), Obj, @(ArgList[0]));
+  DoMethod := CALLHOOKPKT_(PHook(OCLASS(Obj)), Obj, @Args);
 end;
 end;
 
 
-function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
+function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR; inline;
 begin
 begin
-  Result := 0;
+  DoSuperMethodA := 0;
   if (cl = nil) or (obj = nil) then
   if (cl = nil) or (obj = nil) then
     Exit;
     Exit;
-  Result := CALLHOOKPKT_(PHook(cl^.cl_Super), Obj, Message);
+  DoSuperMethodA := CALLHOOKPKT_(PHook(cl^.cl_Super), Obj, Message);
 end;
 end;
 
 
-function DoSuperMethod(cl: PIClass; Obj: PObject_; Args: array of const): IPTR;
-var
-  ArgList: TArgList;
+function DoSuperMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR; inline;
 begin
 begin
-  Result := 0;
+  DoSuperMethod := 0;
   if (cl = nil) or (obj = nil) then
   if (cl = nil) or (obj = nil) then
     Exit;
     Exit;
-  AddArguments(ArgList, Args);
-  Result := CALLHOOKPKT_(PHook(cl^.cl_Super), Obj, @(ArgList[0]));
+  DoSuperMethod := CALLHOOKPKT_(PHook(cl^.cl_Super), Obj, @Args);
 end;
 end;
 
 
-function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
+function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR; inline;
 begin
 begin
-  Result := 0;
+  CoerceMethodA := 0;
   if (cl = nil) or (obj = nil) then
   if (cl = nil) or (obj = nil) then
     Exit;
     Exit;
-  Result := CALLHOOKPKT_(PHook(cl), Obj, Message);
+  CoerceMethodA := CALLHOOKPKT_(PHook(cl), Obj, Message);
 end;
 end;
 
 
-function CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: LongWord; const Args: array of const): IPTR;
-var
-  ArgList: TArgList;
+function CoerceMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR; inline;
 begin
 begin
-  AddArguments(ArgList,[MethodID]);
-  AddArguments(ArgList, Args);
-  Result := CoerceMethodA(cl, Obj, @(ArgList[0]));
+  CoerceMethod := CoerceMethodA(cl, Obj, @Args);
 end;
 end;
 
 
-
-function SetSuperAttrs(cl: PIClass; Obj: PObject_; Tags: array of const): IPTR;
+function SetSuperAttrs(cl: PIClass; Obj: PObject_; const Tags: array of PtrUInt): IPTR;
 var
 var
-  TagList: TTagsList;
   ops: TopSet;
   ops: TopSet;
 begin
 begin
-  AddTags(TagList, Tags);
   ops.MethodID := OM_SET;
   ops.MethodID := OM_SET;
-  ops.ops_AttrList := GetTagPtr(TagList);
+  ops.ops_AttrList := @Tags;
   ops.ops_GInfo := nil;
   ops.ops_GInfo := nil;
-  Result := DoSuperMethodA(cl, obj, @ops);
+  SetSuperAttrs := DoSuperMethodA(cl, obj, @ops);
 end;
 end;
 
 
 function SetSuperAttrsA(cl: PIClass; Obj: PObject_; TagList: PTagItem): IPTR;
 function SetSuperAttrsA(cl: PIClass; Obj: PObject_; TagList: PTagItem): IPTR;
@@ -3548,21 +3502,20 @@ begin
   ops.MethodID := OM_SET;
   ops.MethodID := OM_SET;
   ops.ops_AttrList := TagList;
   ops.ops_AttrList := TagList;
   ops.ops_GInfo := nil;
   ops.ops_GInfo := nil;
-  Result := DoSuperMethodA(cl, obj, @ops);
+  SetSuperAttrsA := DoSuperMethodA(cl, obj, @ops);
 end;
 end;
 
 
-
-function INST_DATA(Cl: PIClass; O: P_Object): Pointer;
+function INST_DATA(Cl: PIClass; O: P_Object): Pointer; inline;
 begin
 begin
   INST_DATA := Pointer(PtrUInt(O) + Cl^.cl_InstOffset);
   INST_DATA := Pointer(PtrUInt(O) + Cl^.cl_InstOffset);
 end;
 end;
 
 
-function SIZEOF_INSTANCE(Cl: PIClass): LongInt;
+function SIZEOF_INSTANCE(Cl: PIClass): LongInt; inline;
 begin
 begin
   SIZEOF_INSTANCE := Cl^.cl_InstOffset + Cl^.cl_InstSize + SizeOf(T_Object);
   SIZEOF_INSTANCE := Cl^.cl_InstOffset + Cl^.cl_InstSize + SizeOf(T_Object);
 end;
 end;
 
 
-function BASEOBJECT(O: P_Object): Pointer;
+function BASEOBJECT(O: P_Object): Pointer; inline;
 begin
 begin
   BASEOBJECT := Pointer(PtrUInt(O) + SizeOf(T_Object));
   BASEOBJECT := Pointer(PtrUInt(O) + SizeOf(T_Object));
 end;
 end;
@@ -3587,17 +3540,17 @@ begin
   SHIFTITEM := (N and $3f) shl 5
   SHIFTITEM := (N and $3f) shl 5
 end;
 end;
 
 
-function SHIFTMENU(N: SmallInt): Word;
+function SHIFTMENU(N: SmallInt): Word; inline;
 begin
 begin
   SHIFTMENU := N and $1f
   SHIFTMENU := N and $1f
 end;
 end;
 
 
-function SHIFTSUB(N: SmallInt): Word;
+function SHIFTSUB(N: SmallInt): Word; inline;
 begin
 begin
   SHIFTSUB := (N and $1f) shl 11
   SHIFTSUB := (N and $1f) shl 11
 end;
 end;
 
 
-function FULLMENUNUM(Menu, Item, Sub: SmallInt): Word;
+function FULLMENUNUM(Menu, Item, Sub: SmallInt): Word; inline;
 begin
 begin
   FULLMENUNUM := ((Sub and $1f) shl 11) or ((Item and $3f) shl 5) or (Menu and $1f);
   FULLMENUNUM := ((Sub and $1f) shl 11) or ((Item and $3f) shl 5) or (Menu and $1f);
 end;
 end;
@@ -3608,84 +3561,84 @@ end;
   in pascal, of course!
   in pascal, of course!
 }
 }
 
 
-function IM_BGPEN(Im: PImage): Byte;
+function IM_BGPEN(Im: PImage): Byte; inline;
 begin
 begin
   IM_BGPEN := Im^.PlaneOnOff;
   IM_BGPEN := Im^.PlaneOnOff;
 end;
 end;
 
 
-function IM_BOX(Im: PImage): PIBox;
+function IM_BOX(Im: PImage): PIBox; inline;
 begin
 begin
   IM_BOX := PIBox(@Im^.LeftEdge);
   IM_BOX := PIBox(@Im^.LeftEdge);
 END;
 END;
 
 
-function IM_FGPEN (Im: PImage): Byte;
+function IM_FGPEN (Im: PImage): Byte; inline;
 begin
 begin
   IM_FGPEN := Im^.PlanePick;
   IM_FGPEN := Im^.PlanePick;
 end;
 end;
 
 
-function GADGET_BOX(G: PGadget): PIBox;
+function GADGET_BOX(G: PGadget): PIBox; inline;
 begin
 begin
   GADGET_BOX := PIBox(@G^.LeftEdge);
   GADGET_BOX := PIBox(@G^.LeftEdge);
 end;
 end;
 
 
-function CUSTOM_HOOK (Gadget: PGadget): PHook;
+function CUSTOM_HOOK (Gadget: PGadget): PHook; inline;
 begin
 begin
     CUSTOM_HOOK := PHook(Gadget^.MutualExclude);
     CUSTOM_HOOK := PHook(Gadget^.MutualExclude);
 end;
 end;
 
 
-function ITEMNUM(N: Word): Word;
+function ITEMNUM(N: Word): Word; inline;
 begin
 begin
   ITEMNUM := (N shr 5) and $3F
   ITEMNUM := (N shr 5) and $3F
 end;
 end;
 
 
-function MENUNUM(N: Word): Word;
+function MENUNUM(N: Word): Word; inline;
 begin
 begin
  MENUNUM := N and $1f
  MENUNUM := N and $1f
 end;
 end;
 
 
-function SUBNUM(N: Word): Word;
+function SUBNUM(N: Word): Word; inline;
 begin
 begin
   SUBNUM := (N shr 11) and $1f
   SUBNUM := (N shr 11) and $1f
 end;
 end;
 
 
-function IAM_Resolution(x, y: Word): LongWord;
+function IAM_Resolution(x, y: Word): LongWord; inline;
 begin
 begin
-  Result := (x shl 16) or y;
+  IAM_Resolution := (x shl 16) or y;
 end;
 end;
 
 
-function SRBNUM(x: Word): Word;
+function SRBNUM(x: Word): Word; inline;
 begin
 begin
   SRBNUM := $08 - (x shr 4);
   SRBNUM := $08 - (x shr 4);
 end;
 end;
 
 
-function SWBNUM(x: Word): Word;
+function SWBNUM(x: Word): Word; inline;
 begin
 begin
   SWBNUM := $08 - (x and $0f);
   SWBNUM := $08 - (x and $0f);
 end;
 end;
 
 
-function SSBNUM(x: Word): Word;
+function SSBNUM(x: Word): Word; inline;
 begin
 begin
   SSBNUM := $01 + (x shr 4);
   SSBNUM := $01 + (x shr 4);
 end;
 end;
 
 
-function SPARNUM(x: Word): Word;
+function SPARNUM(x: Word): Word; inline;
 begin
 begin
   SPARNUM := x shr 4;
   SPARNUM := x shr 4;
 end;
 end;
 
 
-function SHAKNUM(x: Word): Word;
+function SHAKNUM(x: Word): Word; inline;
 begin
 begin
   SHAKNUM := x and $0f;
   SHAKNUM := x and $0f;
 end;
 end;
 
 
-function Has_Children(Win: PWindow): Boolean;
+function Has_Children(Win: PWindow): Boolean; inline;
 begin
 begin
-  Result := Assigned(Win^.FirstChild);
+  Has_Children := Assigned(Win^.FirstChild);
 end;
 end;
 
 
-function Is_Children(Win: PWindow): Boolean;
+function Is_Children(Win: PWindow): Boolean; inline;
 begin
 begin
-  Result := Assigned(Win^.Parent2);
+  Is_Children := Assigned(Win^.Parent2);
 end;
 end;
 
 
 initialization
 initialization

+ 1 - 3
packages/arosunits/src/keymap.pas

@@ -16,9 +16,7 @@
 
 
 unit Keymap;
 unit Keymap;
 
 
-INTERFACE
-
-{$mode objfpc}
+interface
 
 
 uses exec, inputevent;
 uses exec, inputevent;
 
 

+ 16 - 35
packages/arosunits/src/mui.pas

@@ -12,7 +12,6 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
-{$mode objfpc}
 {$packrecords C}
 {$packrecords C}
 unit mui;
 unit mui;
 
 
@@ -3763,17 +3762,14 @@ function MUIV_Window_Width_Screen(p: LongInt): LongInt;
 
 
 
 
 // Functions and procedures with array of const go here
 // Functions and procedures with array of const go here
-function MUI_AllocAslRequestTags(ReqTyp: Longword; const Tags: array of const): Pointer;
-function MUI_AslRequestTags(req: Pointer; const Tags : array of const): LongBool;
-function MUI_MakeObject(_type: LongInt; const Params : array of const): PLongWord;
-function MUI_NewObject(a0arg: PCHAR; const Tags: array of const): PLongWord;
-function MUI_Request(App: Pointer; Win: Pointer; Flags: LongWord; Title: PChar; Gadgets: PChar; Format: PChar; const Params: array of const): LongInt;
+function MUI_AllocAslRequestTags(ReqTyp: Longword; const Tags: array of PtrUInt): Pointer;
+function MUI_AslRequestTags(req: Pointer; const Tags : array of PtrUInt): LongBool;
+function MUI_MakeObject(_Type: LongInt; const Params : array of PtrUInt): PObject_;
+function MUI_NewObject(a0arg: PChar; const Tags: array of PtrUInt): PObject_;
+function MUI_Request(App: Pointer; win: Pointer; Flags: LongWord; Title: PChar; Gadgets: PChar; Format: PChar; const Params: Array Of PtrUInt): LongInt;
 
 
 implementation
 implementation
 
 
-uses
-  tagsarray, longarray;
-
 function MUINotifyData(Obj: APTR): PMUI_NotifyData; inline;
 function MUINotifyData(Obj: APTR): PMUI_NotifyData; inline;
 begin
 begin
   MUINotifyData := PMUI_NotifyData(@P__dummyAreaData__(Obj)^.mnd);
   MUINotifyData := PMUI_NotifyData(@P__dummyAreaData__(Obj)^.mnd);
@@ -4038,49 +4034,34 @@ end;
 
 
 function MUIV_Window_Width_Screen(p : LongInt) : LongInt; inline;
 function MUIV_Window_Width_Screen(p : LongInt) : LongInt; inline;
 begin
 begin
-    MUIV_Window_Width_Screen := (-200 - (p));
+  MUIV_Window_Width_Screen := (-200 - (p));
 end;
 end;
 
 
 // Functions and procedures with array of const go here
 // Functions and procedures with array of const go here
 
 
-function MUI_AllocAslRequestTags(ReqTyp : longword; const tags : Array Of Const) : Pointer;
-var
-  TagList: TTagsList;
+function MUI_AllocAslRequestTags(ReqTyp : longword; const Tags: array of PtrUInt) : Pointer; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  MUI_AllocAslRequestTags := MUI_AllocAslRequest(ReqTyp, GetTagPtr(TagList));
+  MUI_AllocAslRequestTags := MUI_AllocAslRequest(ReqTyp, @Tags);
 end;
 end;
 
 
-function MUI_AslRequestTags(req : Pointer; const tags : Array Of Const) : LongBool;
-var
-  TagList: TTagsList;
+function MUI_AslRequestTags(Req: Pointer; const Tags: array of PtrUInt) : LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  MUI_AslRequestTags := MUI_AslRequest(req, GetTagPtr(TagList));
+  MUI_AslRequestTags := MUI_AslRequest(Req, @Tags);
 end;
 end;
 
 
-function MUI_MakeObject(_type : LongInt; const params : Array Of Const) : pLongWord;
-var
-  Args: TArgList;
+function MUI_MakeObject(_Type : LongInt; const Params: array of PtrUInt): PObject_; inline;
 begin
 begin
-  AddArguments(Args, params);
-  MUI_MakeObject := MUI_MakeObjectA(_type, GetArgPtr(Args));
+  MUI_MakeObject := MUI_MakeObjectA(_Type, @Params);
 end;
 end;
 
 
-function MUI_NewObject(a0arg : pCHAR; const tags : Array Of Const) : pLongWord;
-var
-  TagList: TTagsList;
+function MUI_NewObject(a0arg: PChar; const Tags: array of PtrUInt): PObject_; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  MUI_NewObject := MUI_NewObjectA(a0arg , GetTagPtr(TagList));
+  MUI_NewObject := MUI_NewObjectA(a0arg , @Tags);
 end;
 end;
 
 
-function MUI_Request(app : Pointer; win : Pointer; flags : longword; title : pCHAR; gadgets : pCHAR; format : pCHAR; const params : Array Of Const) : LongInt;
-var
-  Args: TArgList;
+function MUI_Request(App: Pointer; win: Pointer; Flags: LongWord; Title: PChar; Gadgets: PChar; Format: PChar; const Params: Array Of PtrUInt): LongInt;
 begin
 begin
-  AddArguments(Args, params);
-  MUI_Request := MUI_RequestA(app , win , flags , title , gadgets , format , GetArgPtr(Args));
+  MUI_Request := MUI_RequestA(App, Win, Flags, Title, Gadgets, Format, @Params);
 end;
 end;
 
 
 const
 const

+ 8 - 18
packages/arosunits/src/utility.pas

@@ -14,7 +14,6 @@
  **********************************************************************}
  **********************************************************************}
 unit utility;
 unit utility;
 
 
-{$mode objfpc}{$H+}
 {$PACKRECORDS C}
 {$PACKRECORDS C}
 
 
 interface
 interface
@@ -253,41 +252,32 @@ function UnpackStructureTags(Pack: APTR; PackTable: PLongWord; TagList: PTagItem
 function CALLHOOKPKT_(Hook: PHook; Object_: APTR; Message: APTR): IPTR; inline;
 function CALLHOOKPKT_(Hook: PHook; Object_: APTR; Message: APTR): IPTR; inline;
 
 
 // VarArgs Versions
 // VarArgs Versions
-function AllocNamedObject(const Name: STRPTR; const Tags: array of const): PNamedObject;
-function CallHook(Hook: PHook; Object_: APTR; const Params: array of const): IPTR;
+function AllocNamedObject(const Name: STRPTR; const Tags: array of PtrUInt): PNamedObject;
+function CallHook(Hook: PHook; Object_: APTR; const Params: array of PtrUInt): IPTR;
 
 
 implementation
 implementation
 
 
-uses
-  tagsarray,longarray;
-
-function AllocNamedObject(const Name: STRPTR; const Tags: array of const): PNamedObject;
-var
-  TagList: TTagsList;
+function AllocNamedObject(const Name: STRPTR; const Tags: array of PtrUInt): PNamedObject; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  Result := AllocNamedObjectA(Name, GetTagPtr(TagList));
+  AllocNamedObject := AllocNamedObjectA(Name, @Tags);
 end;
 end;
 
 
-function CallHook(Hook: PHook; Object_: APTR; const Params: array of const): IPTR;
-var
-  Args: TArgList;
+function CallHook(Hook: PHook; Object_: APTR; const Params: array of PtrUInt): IPTR; inline;
 begin
 begin
-  AddArguments(Args, params);
-  CallHook := CallHookPkt(Hook, Object_ , GetArgPtr(Args));
+  CallHook := CallHookPkt(Hook, Object_ , @Params);
 end;
 end;
 
 
 function CALLHOOKPKT_(Hook: PHook; Object_: APTR; Message: APTR): IPTR;
 function CALLHOOKPKT_(Hook: PHook; Object_: APTR; Message: APTR): IPTR;
 var
 var
   FuncPtr: THookFunctionProc;
   FuncPtr: THookFunctionProc;
 begin
 begin
-  Result := 0;
+  CALLHOOKPKT_ := 0;
   if (Hook = nil) or (Object_ = nil) or (Message = nil) then
   if (Hook = nil) or (Object_ = nil) or (Message = nil) then
     Exit;
     Exit;
   if (Hook^.h_Entry = 0) then
   if (Hook^.h_Entry = 0) then
     Exit;
     Exit;
   FuncPtr := THookFunctionProc(Hook^.h_Entry);
   FuncPtr := THookFunctionProc(Hook^.h_Entry);
-  Result := FuncPtr(Hook, Object_, Message);
+  CALLHOOKPKT_ := FuncPtr(Hook, Object_, Message);
 end;
 end;
 
 
 end.
 end.

+ 24 - 53
packages/arosunits/src/workbench.pas

@@ -13,11 +13,8 @@
 
 
  **********************************************************************}
  **********************************************************************}
 unit Workbench;
 unit Workbench;
-
-{$MODE OBJFPC} {$H+}
 {$PACKRECORDS C}
 {$PACKRECORDS C}
 
 
-
 Interface
 Interface
 
 
 Uses
 Uses
@@ -588,90 +585,64 @@ function SendAppWindowMessage(Win: PWindow; NumFiles: LongWord; Files: PPChar; C
 function GetNextAppIcon(LastDiskObj: PDiskObject; Text_: PChar): PDiskObject; syscall WorkbenchBase 27;
 function GetNextAppIcon(LastDiskObj: PDiskObject; Text_: PChar): PDiskObject; syscall WorkbenchBase 27;
 
 
 // varargs versions:
 // varargs versions:
-function AddAppIcon(ID: LongWord; UserData: LongWord; Text_: PChar; MsgPort: PMsgPort; Lock: BPTR; DiskObj: PDiskObject; const Tags: array of const): PAppIcon;
-function AddAppMenuItem(ID: LongWord; UserData: LongWord; Text_: APTR; MsgPort: PMsgPort; const Tags: array of const): PAppMenuItem;
-function AddAppWindow(ID: LongWord; UserData: LongWord; Window: PWindow; MsgPort: PMsgPort; const Tags: array of const): PAppWindow;
-function AddAppWindowDropZone(Aw: PAppWindow; ID: LongWord; UserData: LongWord; const Tags: array of const): PAppWindowDropZone;
-function CloseWorkbenchObject(Name: STRPTR; const Tags: array of const): LongBool; unimplemented;
-function MakeWorkbenchObjectVisible(Name: STRPTR; const Tags: array of const): LongBool; unimplemented;
-function OpenWorkbenchObject(Name: STRPTR; const Tags: array of const): LongBool;
-function WorkbenchControl(Name: STRPTR; const Tags: array of const): LongBool;
+function AddAppIcon(ID: LongWord; UserData: LongWord; Text_: PChar; MsgPort: PMsgPort; Lock: BPTR; DiskObj: PDiskObject; const Tags: array of PtrUInt): PAppIcon;
+function AddAppMenuItem(ID: LongWord; UserData: LongWord; Text_: APTR; MsgPort: PMsgPort; const Tags: array of PtrUInt): PAppMenuItem;
+function AddAppWindow(ID: LongWord; UserData: LongWord; Window: PWindow; MsgPort: PMsgPort; const Tags: array of PtrUInt): PAppWindow;
+function AddAppWindowDropZone(Aw: PAppWindow; ID: LongWord; UserData: LongWord; const Tags: array of PtrUInt): PAppWindowDropZone;
+function CloseWorkbenchObject(Name: STRPTR; const Tags: array of PtrUInt): LongBool; unimplemented;
+function MakeWorkbenchObjectVisible(Name: STRPTR; const Tags: array of PtrUInt): LongBool; unimplemented;
+function OpenWorkbenchObject(Name: STRPTR; const Tags: array of PtrUInt): LongBool;
+function WorkbenchControl(Name: STRPTR; const Tags: array of PtrUInt): LongBool;
 
 
 implementation
 implementation
 
 
-uses
-  TagsArray;
-
 
 
 // varargs versions:
 // varargs versions:
-function AddAppIcon(ID: LongWord; UserData: LongWord; Text_: PChar; MsgPort: PMsgPort; Lock: BPTR; DiskObj: PDiskObject; const Tags: array of const): PAppIcon;
-var
-  TagList: TTagsList;
+function AddAppIcon(ID: LongWord; UserData: LongWord; Text_: PChar; MsgPort: PMsgPort; Lock: BPTR; DiskObj: PDiskObject; const Tags: array of PtrUInt): PAppIcon; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AddAppIcon := AddAppIconA(ID, UserData, Text_, MsgPort, Lock, DiskObj, GetTagPtr(TagList));
+  AddAppIcon := AddAppIconA(ID, UserData, Text_, MsgPort, Lock, DiskObj, @Tags);
 end;
 end;
 
 
 
 
-function AddAppMenuItem(ID: LongWord; UserData: LongWord; Text_: APTR; MsgPort: PMsgPort;  const Tags: array of const): PAppMenuItem;
-var
-  TagList: TTagsList;
+function AddAppMenuItem(ID: LongWord; UserData: LongWord; Text_: APTR; MsgPort: PMsgPort;  const Tags: array of PtrUInt): PAppMenuItem; inline;
 begin
 begin
-  AddAppMenuItem := AddAppMenuItemA(ID, UserData, Text_, MsgPort, GetTagPtr(TagList));
+  AddAppMenuItem := AddAppMenuItemA(ID, UserData, Text_, MsgPort, @Tags);
 end;
 end;
 
 
 
 
-function AddAppWindow(ID: LongWord; UserData: LongWord; Window: PWindow; MsgPort: PMsgPort;  const Tags: array of const): PAppWindow;
-var
-  TagList: TTagsList;
+function AddAppWindow(ID: LongWord; UserData: LongWord; Window: PWindow; MsgPort: PMsgPort;  const Tags: array of PtrUInt): PAppWindow; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AddAppWindow := AddAppWindowA(ID, UserData, Window, MsgPort, GetTagPtr(TagList));
+  AddAppWindow := AddAppWindowA(ID, UserData, Window, MsgPort, @Tags);
 end;
 end;
 
 
 
 
-function AddAppWindowDropZone(Aw: PAppWindow; ID: LongWord; UserData: LongWord;  const Tags: array of const): PAppWindowDropZone;
-var
-  TagList: TTagsList;
+function AddAppWindowDropZone(Aw: PAppWindow; ID: LongWord; UserData: LongWord;  const Tags: array of PtrUInt): PAppWindowDropZone; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  AddAppWindowDropZone := AddAppWindowDropZoneA(Aw, ID, UserData, GetTagPtr(TagList));
+  AddAppWindowDropZone := AddAppWindowDropZoneA(Aw, ID, UserData, @Tags);
 end;
 end;
 
 
 
 
-function CloseWorkbenchObject(Name: STRPTR;  const Tags: array of const): LongBool;
-var
-  TagList: TTagsList;
+function CloseWorkbenchObject(Name: STRPTR;  const Tags: array of PtrUInt): LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  CloseWorkbenchObject := CloseWorkbenchObjectA(Name, GetTagPtr(TagList));
+  CloseWorkbenchObject := CloseWorkbenchObjectA(Name, @Tags);
 end;
 end;
 
 
 
 
-function MakeWorkbenchObjectVisible(Name: STRPTR;  const Tags: array of const): LongBool;
-var
-  TagList: TTagsList;
+function MakeWorkbenchObjectVisible(Name: STRPTR;  const Tags: array of PtrUInt): LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  MakeWorkbenchObjectVisible := MakeWorkbenchObjectVisibleA(Name, GetTagPtr(TagList));
+  MakeWorkbenchObjectVisible := MakeWorkbenchObjectVisibleA(Name, @Tags);
 end;
 end;
 
 
 
 
-function OpenWorkbenchObject(Name: STRPTR;  const Tags: array of const): LongBool;
-var
-  TagList: TTagsList;
+function OpenWorkbenchObject(Name: STRPTR;  const Tags: array of PtrUInt): LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  OpenWorkbenchObject := OpenWorkbenchObjectA(Name, GetTagPtr(TagList));
+  OpenWorkbenchObject := OpenWorkbenchObjectA(Name, @Tags);
 end;
 end;
 
 
 
 
-function WorkbenchControl(Name: STRPTR;  const Tags: array of const): LongBool;
-var
-  TagList: TTagsList;
+function WorkbenchControl(Name: STRPTR;  const Tags: array of PtrUInt): LongBool; inline;
 begin
 begin
-  AddTags(TagList, Tags);
-  WorkbenchControl := WorkbenchControlA(Name, GetTagPtr(TagList));
+  WorkbenchControl := WorkbenchControlA(Name, @Tags);
 end;
 end;
 
 
 
 

Some files were not shown because too many files changed in this diff