Browse Source

Amiga, AROS, MorphOS: Overloads for some var parameter/pointer as return value functions, set all filehandle, locks to BPTR (as defined in the SDKs)

git-svn-id: trunk@31606 -
marcus 10 years ago
parent
commit
5e94e3ab9e

+ 55 - 55
packages/amunits/src/coreunits/amigados.pas

@@ -1577,12 +1577,12 @@ PROCEDURE AbortPkt(port : pMsgPort location 'd1'; pkt : pDosPacket location 'd2'
 FUNCTION AddBuffers(const name : pCHAR location 'd1'; number : LONGINT location 'd2') : LongBool; syscall _DOSBase 732;
 FUNCTION AddDosEntry(dlist : pDosList location 'd1') : LongBool; syscall _DOSBase 678;
 FUNCTION AddPart(dirname : pCHAR location 'd1';const filename : pCHAR location 'd2'; size : ULONG location 'd3') : LongBool; syscall _DOSBase 882;
-FUNCTION AddSegment(const name : pCHAR location 'd1'; seg : LONGINT location 'd2'; system : LONGINT location 'd3') : LongBool; syscall _DOSBase 774;
+FUNCTION AddSegment(const name : pCHAR location 'd1'; seg : BPTR location 'd2'; system : LONGINT location 'd3') : LongBool; syscall _DOSBase 774;
 FUNCTION AllocDosObject(type_ : ULONG location 'd1';const tags : pTagItem location 'd2') : POINTER; syscall _DOSBase 228;
 FUNCTION AllocDosObjectTagList(type_ : ULONG location 'd1';const tags : pTagItem location 'd2') : POINTER; syscall _DOSBase 228;
-FUNCTION AssignAdd(const name : pCHAR location 'd1'; lock : LONGINT location 'd2') : LongBool; syscall _DOSBase 630;
+FUNCTION AssignAdd(const name : pCHAR location 'd1'; lock : BPTR location 'd2') : LongBool; syscall _DOSBase 630;
 FUNCTION AssignLate(const name : pCHAR location 'd1';const path : pCHAR location 'd2') : LongBool; syscall _DOSBase 618;
-FUNCTION AssignLock(const name : pCHAR location 'd1'; lock : LONGINT location 'd2') : LongBool; syscall _DOSBase 612;
+FUNCTION AssignLock(const name : pCHAR location 'd1'; lock : BPTR location 'd2') : LongBool; syscall _DOSBase 612;
 FUNCTION AssignPath(const name : pCHAR location 'd1';const path : pCHAR location 'd2') : LongBool; syscall _DOSBase 624;
 FUNCTION AttemptLockDosList(flags : ULONG location 'd1') : pDosList; syscall _DOSBase 666;
 FUNCTION ChangeMode(type_ : LONGINT location 'd1'; fh : LONGINT location 'd2'; newmode : LONGINT location 'd3') : LongBool; syscall _DOSBase 450;
@@ -1591,11 +1591,11 @@ FUNCTION Cli : pCommandLineInterface; syscall _DOSBase 492;
 FUNCTION CliInitNewcli(dp : pDosPacket location 'a0') : LONGINT; syscall _DOSBase 930;
 FUNCTION CliInitRun(dp : pDosPacket location 'a0') : LONGINT; syscall _DOSBase 936;
 FUNCTION CompareDates(const date1 : pDateStamp location 'd1';const date2 : pDateStamp location 'd2') : LONGINT; syscall _DOSBase 738;
-FUNCTION CreateDir(const name : pCHAR location 'd1') : LONGINT; syscall _DOSBase 120;
+FUNCTION CreateDir(const name : pCHAR location 'd1') : BPTR; syscall _DOSBase 120;
 FUNCTION CreateNewProc(const tags : pTagItem location 'd1') : pProcess; syscall _DOSBase 498;
 FUNCTION CreateNewProcTagList(const tags : pTagItem location 'd1') : pProcess; syscall _DOSBase 498;
-FUNCTION CreateProc(const name : pCHAR location 'd1'; pri : LONGINT location 'd2'; segList : LONGINT location 'd3'; stackSize : LONGINT location 'd4') : pMsgPort; syscall _DOSBase 138;
-FUNCTION CurrentDir(lock : LONGINT location 'd1') : LONGINT; syscall _DOSBase 126;
+FUNCTION CreateProc(const name : pCHAR location 'd1'; pri : LONGINT location 'd2'; segList : BPTR location 'd3'; stackSize : LONGINT location 'd4') : pMsgPort; syscall _DOSBase 138;
+FUNCTION CurrentDir(lock : BPTR location 'd1') : BPTR; syscall _DOSBase 126;
 PROCEDURE DateStamp(date : pDateStamp location 'd1'); syscall _DOSBase 192;
 FUNCTION DateToStr(datetime : pDateTime location 'd1') : LongBool; syscall _DOSBase 744;
 FUNCTION DOSDeleteFile(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 072;
@@ -1607,30 +1607,30 @@ FUNCTION DoPkt1(port : pMsgPort location 'd1'; action : LONGINT location 'd2'; a
 FUNCTION DoPkt2(port : pMsgPort location 'd1'; action : LONGINT location 'd2'; arg1 : LONGINT location 'd3'; arg2 : LONGINT location 'd4') : LONGINT; syscall _DOSBase 240;
 FUNCTION DoPkt3(port : pMsgPort location 'd1'; action : LONGINT location 'd2'; arg1 : LONGINT location 'd3'; arg2 : LONGINT location 'd4'; arg3 : LONGINT location 'd5') : LONGINT; syscall _DOSBase 240;
 FUNCTION DoPkt4(port : pMsgPort location 'd1'; action : LONGINT location 'd2'; arg1 : LONGINT location 'd3'; arg2 : LONGINT location 'd4'; arg3 : LONGINT location 'd5'; arg4 : LONGINT location 'd6') : LONGINT; syscall _DOSBase 240;
-PROCEDURE DOSClose(file_ : LONGINT location 'd1'); syscall _DOSBase 036;
+PROCEDURE DOSClose(file_ : BPTR location 'd1'); syscall _DOSBase 036;
 PROCEDURE DOSDelay(timeout : LONGINT location 'd1'); syscall _DOSBase 198;
 PROCEDURE DOSExit(returnCode : LONGINT location 'd1'); syscall _DOSBase 144;
-FUNCTION DOSFlush(fh : LONGINT location 'd1') : LongBool; syscall _DOSBase 360;
-FUNCTION DOSInput : LONGINT; syscall _DOSBase 054;
-FUNCTION DOSOpen(const name : pCHAR location 'd1'; accessMode : LONGINT location 'd2') : LONGINT; syscall _DOSBase 030;
-FUNCTION DOSOutput : LONGINT; syscall _DOSBase 060;
-FUNCTION DOSRead(file_ : LONGINT location 'd1'; buffer : POINTER location 'd2'; length : LONGINT location 'd3') : LONGINT; syscall _DOSBase 042;
+FUNCTION DOSFlush(fh : BPTR location 'd1') : LongBool; syscall _DOSBase 360;
+FUNCTION DOSInput : BPTR; syscall _DOSBase 054;
+FUNCTION DOSOpen(const name : pCHAR location 'd1'; accessMode : LONGINT location 'd2') : BPTR; syscall _DOSBase 030;
+FUNCTION DOSOutput : BPTR; syscall _DOSBase 060;
+FUNCTION DOSRead(file_ : BPTR location 'd1'; buffer : POINTER location 'd2'; length : LONGINT location 'd3') : LONGINT; syscall _DOSBase 042;
 FUNCTION DOSRename(const oldName : pCHAR location 'd1';const newName : pCHAR location 'd2') : LongBool; syscall _DOSBase 078;
-FUNCTION DOSSeek(file_ : LONGINT location 'd1'; position : LONGINT location 'd2'; offset : LONGINT location 'd3') : LONGINT; syscall _DOSBase 066;
-FUNCTION DOSWrite(file_ : LONGINT location 'd1'; buffer : POINTER location 'd2'; length : LONGINT location 'd3') : LONGINT; syscall _DOSBase 048;
-FUNCTION DupLock(lock : LONGINT location 'd1') : LONGINT; syscall _DOSBase 096;
-FUNCTION DupLockFromFH(fh : LONGINT location 'd1') : LONGINT; syscall _DOSBase 372;
+FUNCTION DOSSeek(file_ : BPTR location 'd1'; position : LONGINT location 'd2'; offset : LONGINT location 'd3') : LONGINT; syscall _DOSBase 066;
+FUNCTION DOSWrite(file_ : BPTR location 'd1'; buffer : POINTER location 'd2'; length : LONGINT location 'd3') : LONGINT; syscall _DOSBase 048;
+FUNCTION DupLock(lock : BPTR location 'd1') : BPTR; syscall _DOSBase 096;
+FUNCTION DupLockFromFH(fh : BPTR location 'd1') : BPTR; syscall _DOSBase 372;
 PROCEDURE EndNotify(notify : pNotifyRequest location 'd1'); syscall _DOSBase 894;
 FUNCTION ErrorReport(code : LONGINT location 'd1'; type_ : LONGINT location 'd2'; arg1 : ULONG location 'd3'; device : pMsgPort location 'd4') : LongBool; syscall _DOSBase 480;
-FUNCTION ExAll(lock : LONGINT location 'd1'; buffer : pExAllData location 'd2'; size : LONGINT location 'd3'; data : LONGINT location 'd4'; control : pExAllControl location 'd5') : LongBool; syscall _DOSBase 432;
-PROCEDURE ExAllEnd(lock : LONGINT location 'd1'; buffer : pExAllData location 'd2'; size : LONGINT location 'd3'; data : LONGINT location 'd4'; control : pExAllControl location 'd5'); syscall _DOSBase 990;
-FUNCTION Examine(lock : LONGINT location 'd1'; fileInfoBlock : pFileInfoBlock location 'd2') : LongBool; syscall _DOSBase 102;
-FUNCTION ExamineFH(fh : LONGINT location 'd1'; fib : pFileInfoBlock location 'd2') : LongBool; syscall _DOSBase 390;
+FUNCTION ExAll(lock : BPTR location 'd1'; buffer : pExAllData location 'd2'; size : LONGINT location 'd3'; data : LONGINT location 'd4'; control : pExAllControl location 'd5') : LongBool; syscall _DOSBase 432;
+PROCEDURE ExAllEnd(lock : BPTR location 'd1'; buffer : pExAllData location 'd2'; size : LONGINT location 'd3'; data : LONGINT location 'd4'; control : pExAllControl location 'd5'); syscall _DOSBase 990;
+FUNCTION Examine(lock : BPTR location 'd1'; fileInfoBlock : pFileInfoBlock location 'd2') : LongBool; syscall _DOSBase 102;
+FUNCTION ExamineFH(fh : BPTR location 'd1'; fib : pFileInfoBlock location 'd2') : LongBool; syscall _DOSBase 390;
 FUNCTION Execute(const string_ : pCHAR location 'd1'; file_ : LONGINT location 'd2'; file2 : LONGINT location 'd3') : LongBool; syscall _DOSBase 222;
-FUNCTION ExNext(lock : LONGINT location 'd1'; fileInfoBlock : pFileInfoBlock location 'd2') : LongBool; syscall _DOSBase 108;
+FUNCTION ExNext(lock : BPTR location 'd1'; fileInfoBlock : pFileInfoBlock location 'd2') : LongBool; syscall _DOSBase 108;
 FUNCTION Fault(code : LONGINT location 'd1'; header : pCHAR location 'd2'; buffer : pCHAR location 'd3'; len : LONGINT location 'd4') : LongBool; syscall _DOSBase 468;
-FUNCTION FGetC(fh : LONGINT location 'd1') : LONGINT; syscall _DOSBase 306;
-FUNCTION FGets(fh : LONGINT location 'd1'; buf : pCHAR location 'd2'; buflen : ULONG location 'd3') : pCHAR; syscall _DOSBase 336;
+FUNCTION FGetC(fh : BPTR location 'd1') : LONGINT; syscall _DOSBase 306;
+FUNCTION FGets(fh : BPTR location 'd1'; buf : pCHAR location 'd2'; buflen : ULONG location 'd3') : pCHAR; syscall _DOSBase 336;
 FUNCTION FilePart(const path : pCHAR location 'd1') : pCHAR; syscall _DOSBase 870;
 FUNCTION FindArg(const keyword : pCHAR location 'd1';const arg_template : pCHAR location 'd2') : LONGINT; syscall _DOSBase 804;
 FUNCTION FindCliProc(num : ULONG location 'd1') : pProcess; syscall _DOSBase 546;
@@ -1638,34 +1638,34 @@ FUNCTION FindDosEntry(const dlist : pDosList location 'd1';const name : pCHAR lo
 FUNCTION FindSegment(const name : pCHAR location 'd1';const seg : pSegment location 'd2'; system : LONGINT location 'd3') : pSegment; syscall _DOSBase 780;
 FUNCTION FindVar(const name : pCHAR location 'd1'; type_ : ULONG location 'd2') : pLocalVar; syscall _DOSBase 918;
 FUNCTION Format(const filesystem : pCHAR location 'd1';const volumename : pCHAR location 'd2'; dostype : ULONG location 'd3') : LongBool; syscall _DOSBase 714;
-FUNCTION FPutC(fh : LONGINT location 'd1'; ch : LONGINT location 'd2') : LONGINT; syscall _DOSBase 312;
-FUNCTION FPuts(fh : LONGINT location 'd1';const str : pCHAR location 'd2') : LongBool; syscall _DOSBase 342;
-FUNCTION FRead(fh : LONGINT location 'd1'; block : POINTER location 'd2'; blocklen : ULONG location 'd3'; number : ULONG location 'd4') : LONGINT; syscall _DOSBase 324;
+FUNCTION FPutC(fh : BPTR location 'd1'; ch : LONGINT location 'd2') : LONGINT; syscall _DOSBase 312;
+FUNCTION FPuts(fh : BPTR location 'd1';const str : pCHAR location 'd2') : LongBool; syscall _DOSBase 342;
+FUNCTION FRead(fh : BPTR location 'd1'; block : POINTER location 'd2'; blocklen : ULONG location 'd3'; number : ULONG location 'd4') : LONGINT; syscall _DOSBase 324;
 PROCEDURE FreeArgs(args : pRDArgs location 'd1'); syscall _DOSBase 858;
 PROCEDURE FreeDeviceProc(dp : pDevProc location 'd1'); syscall _DOSBase 648;
 PROCEDURE FreeDosEntry(dlist : pDosList); syscall _DOSBase 702;
 PROCEDURE FreeDosObject(type_ : ULONG location 'd1'; ptr : POINTER location 'd2'); syscall _DOSBase 234;
-FUNCTION FWrite(fh : LONGINT location 'd1'; block : POINTER location 'd2'; blocklen : ULONG location 'd3'; number : ULONG location 'd4') : LONGINT; syscall _DOSBase 330;
+FUNCTION FWrite(fh : BPTR location 'd1'; block : POINTER location 'd2'; blocklen : ULONG location 'd3'; number : ULONG location 'd4') : LONGINT; syscall _DOSBase 330;
 FUNCTION GetArgStr : pCHAR; syscall _DOSBase 534;
 FUNCTION GetConsoleTask : pMsgPort; syscall _DOSBase 510;
 FUNCTION GetCurrentDirName(buf : pCHAR location 'd1'; len : LONGINT location 'd2') : LongBool; syscall _DOSBase 564;
 FUNCTION GetDeviceProc(const name : pCHAR location 'd1'; dp : pDevProc location 'd2') : pDevProc; syscall _DOSBase 642;
 FUNCTION GetFileSysTask : pMsgPort; syscall _DOSBase 522;
-FUNCTION GetProgramDir : LONGINT; syscall _DOSBase 600;
+FUNCTION GetProgramDir : BPTR; syscall _DOSBase 600;
 FUNCTION GetProgramName(buf : pCHAR location 'd1'; len : LONGINT location 'd2') : LongBool; syscall _DOSBase 576;
 FUNCTION GetPrompt(buf : pCHAR location 'd1'; len : LONGINT location 'd2') : LongBool; syscall _DOSBase 588;
 FUNCTION GetVar(const name : pCHAR location 'd1'; buffer : pCHAR location 'd2'; size : LONGINT location 'd3'; flags : LONGINT location 'd4') : LONGINT; syscall _DOSBase 906;
-FUNCTION Info(lock : LONGINT location 'd1'; parameterBlock : pInfoData location 'd2') : LongBool; syscall _DOSBase 114;
+FUNCTION Info(lock : BPTR location 'd1'; parameterBlock : pInfoData location 'd2') : LongBool; syscall _DOSBase 114;
 FUNCTION Inhibit(const name : pCHAR location 'd1'; onoff : LONGINT location 'd2') : LongBool; syscall _DOSBase 726;
-FUNCTION InternalLoadSeg(fh : LONGINT location 'd0'; table : LONGINT location 'a0';const funcarray : pLONGINT location 'a1'; VAR stack : LONGINT location 'a2') : LONGINT; syscall _DOSBase 756;
-FUNCTION InternalUnLoadSeg(seglist : LONGINT location 'd1'; freefunc : tPROCEDURE location 'a1') : LongBool; syscall _DOSBase 762;
+FUNCTION InternalLoadSeg(fh : BPTR location 'd0'; table : LONGINT location 'a0';const funcarray : pLONGINT location 'a1'; VAR stack : LONGINT location 'a2') : LONGINT; syscall _DOSBase 756;
+FUNCTION InternalUnLoadSeg(seglist : BPTR location 'd1'; freefunc : tPROCEDURE location 'a1') : LongBool; syscall _DOSBase 762;
 FUNCTION IoErr : LONGINT; syscall _DOSBase 132;
 FUNCTION IsFileSystem(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 708;
-FUNCTION IsInteractive(file_ : LONGINT location 'd1') : LongBool; syscall _DOSBase 216;
+FUNCTION IsInteractive(file_ : BPTR location 'd1') : LongBool; syscall _DOSBase 216;
 FUNCTION LoadSeg(const name : pCHAR location 'd1') : LONGINT; syscall _DOSBase 150;
 FUNCTION Lock(const name : pCHAR location 'd1'; type_ : LONGINT location 'd2') : LONGINT; syscall _DOSBase 084;
 FUNCTION LockDosList(flags : ULONG location 'd1') : pDosList; syscall _DOSBase 654;
-FUNCTION LockRecord(fh : LONGINT location 'd1'; offset : ULONG location 'd2'; length : ULONG location 'd3'; mode : ULONG location 'd4'; timeout : ULONG location 'd5') : LongBool; syscall _DOSBase 270;
+FUNCTION LockRecord(fh : BPTR location 'd1'; offset : ULONG location 'd2'; length : ULONG location 'd3'; mode : ULONG location 'd4'; timeout : ULONG location 'd5') : LongBool; syscall _DOSBase 270;
 FUNCTION LockRecords(recArray : pRecordLock location 'd1'; timeout : ULONG location 'd2') : LongBool; syscall _DOSBase 276;
 FUNCTION MakeDosEntry(const name : pCHAR location 'd1'; type_ : LONGINT location 'd2') : pDosList; syscall _DOSBase 696;
 FUNCTION MakeLink(const name : pCHAR location 'd1'; dest : LONGINT location 'd2'; soft : LONGINT location 'd3') : LongBool; syscall _DOSBase 444;
@@ -1675,14 +1675,14 @@ FUNCTION MatchNext(anchor : pAnchorPath location 'd1') : LONGINT; syscall _DOSBa
 FUNCTION MatchPattern(const pat : pCHAR location 'd1'; str : pCHAR location 'd2') : LongBool; syscall _DOSBase 846;
 FUNCTION MatchPatternNoCase(const pat : pCHAR location 'd1'; str : pCHAR location 'd2') : LongBool; syscall _DOSBase 972;
 FUNCTION MaxCli : ULONG; syscall _DOSBase 552;
-FUNCTION NameFromFH(fh : LONGINT location 'd1'; buffer : pCHAR location 'd2'; len : LONGINT location 'd3') : LongBool; syscall _DOSBase 408;
-FUNCTION NameFromLock(lock : LONGINT location 'd1'; buffer : pCHAR location 'd2'; len : LONGINT location 'd3') : LongBool; syscall _DOSBase 402;
-FUNCTION NewLoadSeg(const file_ : pCHAR location 'd1';const tags : pTagItem location 'd2') : LONGINT; syscall _DOSBase 768;
-FUNCTION NewLoadSegTagList(const file_ : pCHAR location 'd1';const tags : pTagItem location 'd2') : LONGINT; syscall _DOSBase 768;
+FUNCTION NameFromFH(fh : BPTR location 'd1'; buffer : pCHAR location 'd2'; len : LONGINT location 'd3') : LongBool; syscall _DOSBase 408;
+FUNCTION NameFromLock(lock : BPTR location 'd1'; buffer : pCHAR location 'd2'; len : LONGINT location 'd3') : LongBool; syscall _DOSBase 402;
+FUNCTION NewLoadSeg(const file_ : pCHAR location 'd1';const tags : pTagItem location 'd2') : BPTR; syscall _DOSBase 768;
+FUNCTION NewLoadSegTagList(const file_ : pCHAR location 'd1';const tags : pTagItem location 'd2') : BPTR; syscall _DOSBase 768;
 FUNCTION NextDosEntry(const dlist : pDosList location 'd1'; flags : ULONG location 'd2') : pDosList; syscall _DOSBase 690;
-FUNCTION OpenFromLock(lock : LONGINT location 'd1') : LONGINT; syscall _DOSBase 378;
-FUNCTION ParentDir(lock : LONGINT location 'd1') : LONGINT; syscall _DOSBase 210;
-FUNCTION ParentOfFH(fh : LONGINT location 'd1') : LONGINT; syscall _DOSBase 384;
+FUNCTION OpenFromLock(lock : BPTR location 'd1') : BPTR; syscall _DOSBase 378;
+FUNCTION ParentDir(lock : BPTR location 'd1') : BPTR; syscall _DOSBase 210;
+FUNCTION ParentOfFH(fh : BPTR location 'd1') : BPTR; syscall _DOSBase 384;
 FUNCTION ParsePattern(const pat : pCHAR location 'd1'; buf : pCHAR location 'd2'; buflen : LONGINT location 'd3') : LONGINT; syscall _DOSBase 840;
 FUNCTION ParsePatternNoCase(const pat : pCHAR location 'd1'; buf : pCHAR location 'd2'; buflen : LONGINT location 'd3') : LONGINT; syscall _DOSBase 966;
 FUNCTION PathPart(const path : pCHAR location 'd1') : pCHAR; syscall _DOSBase 876;
@@ -1696,28 +1696,28 @@ FUNCTION RemAssignList(const name : pCHAR location 'd1'; lock : LONGINT location
 FUNCTION RemDosEntry(dlist : pDosList location 'd1') : LongBool; syscall _DOSBase 672;
 FUNCTION RemSegment(seg : pSegment location 'd1') : LongBool; syscall _DOSBase 786;
 PROCEDURE ReplyPkt(dp : pDosPacket location 'd1'; res1 : LONGINT location 'd2'; res2 : LONGINT location 'd3'); syscall _DOSBase 258;
-FUNCTION RunCommand(seg : LONGINT location 'd1'; stack : LONGINT location 'd2';const paramptr : pCHAR location 'd3'; paramlen : LONGINT location 'd4') : LONGINT; syscall _DOSBase 504;
-FUNCTION SameDevice(lock1 : LONGINT location 'd1'; lock2 : LONGINT location 'd2') : LongBool; syscall _DOSBase 984;
-FUNCTION SameLock(lock1 : LONGINT location 'd1'; lock2 : LONGINT location 'd2') : LONGINT; syscall _DOSBase 420;
-FUNCTION SelectInput(fh : LONGINT location 'd1') : LONGINT; syscall _DOSBase 294;
-FUNCTION SelectOutput(fh : LONGINT location 'd1') : LONGINT; syscall _DOSBase 300;
+FUNCTION RunCommand(seg : BPTR location 'd1'; stack : LONGINT location 'd2';const paramptr : pCHAR location 'd3'; paramlen : LONGINT location 'd4') : LONGINT; syscall _DOSBase 504;
+FUNCTION SameDevice(lock1 : BPTR location 'd1'; lock2 : BPTR location 'd2') : LongBool; syscall _DOSBase 984;
+FUNCTION SameLock(lock1 : BPTR location 'd1'; lock2 : BPTR location 'd2') : LONGINT; syscall _DOSBase 420;
+FUNCTION SelectInput(fh : BPTR location 'd1') : BPTR; syscall _DOSBase 294;
+FUNCTION SelectOutput(fh : BPTR location 'd1') : BPTR; syscall _DOSBase 300;
 PROCEDURE SendPkt(dp : pDosPacket location 'd1'; port : pMsgPort location 'd2'; replyport : pMsgPort location 'd3'); syscall _DOSBase 246;
 FUNCTION SetArgStr(const string_ : pCHAR location 'd1') : PChar; syscall _DOSBase 540;
 FUNCTION SetComment(const name : pCHAR location 'd1';const comment : pCHAR location 'd2') : LongBool; syscall _DOSBase 180;
 FUNCTION SetConsoleTask(const task : pMsgPort location 'd1') : pMsgPort; syscall _DOSBase 516;
 FUNCTION SetCurrentDirName(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 558;
 FUNCTION SetFileDate(const name : pCHAR location 'd1'; date : pDateStamp location 'd2') : LongBool; syscall _DOSBase 396;
-FUNCTION SetFileSize(fh : LONGINT location 'd1'; pos : LONGINT location 'd2'; mode : LONGINT location 'd3') : LongBool; syscall _DOSBase 456;
+FUNCTION SetFileSize(fh : BPTR location 'd1'; pos : LONGINT location 'd2'; mode : LONGINT location 'd3') : LongBool; syscall _DOSBase 456;
 FUNCTION SetFileSysTask(const task : pMsgPort location 'd1') : pMsgPort; syscall _DOSBase 528;
 FUNCTION SetIoErr(result : LONGINT location 'd1') : LONGINT; syscall _DOSBase 462;
-FUNCTION SetMode(fh : LONGINT location 'd1'; mode : LONGINT location 'd2') : LongBool; syscall _DOSBase 426;
+FUNCTION SetMode(fh : BPTR location 'd1'; mode : LONGINT location 'd2') : LongBool; syscall _DOSBase 426;
 FUNCTION SetOwner(const name : pCHAR location 'd1'; owner_info : LONGINT location 'd2') : LongBool; syscall _DOSBase 996;
-FUNCTION SetProgramDir(lock : LONGINT location 'd1') : LONGINT; syscall _DOSBase 594;
+FUNCTION SetProgramDir(lock : BPTR location 'd1') : LONGINT; syscall _DOSBase 594;
 FUNCTION SetProgramName(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 570;
 FUNCTION SetPrompt(const name : pCHAR location 'd1') : LongBool; syscall _DOSBase 582;
 FUNCTION SetProtection(const name : pCHAR location 'd1'; protect : LONGINT location 'd2') : LongBool; syscall _DOSBase 186;
 FUNCTION SetVar(const name : pCHAR location 'd1'; buffer : pCHAR location 'd2'; size : LONGINT location 'd3'; flags : LONGINT location 'd4') : LongBool; syscall _DOSBase 900;
-FUNCTION SetVBuf(fh : LONGINT location 'd1'; buff : pCHAR location 'd2'; type_ : LONGINT location 'd3'; size : LONGINT location 'd4') : LongBool; syscall _DOSBase 366;
+FUNCTION SetVBuf(fh : BPTR location 'd1'; buff : pCHAR location 'd2'; type_ : LONGINT location 'd3'; size : LONGINT location 'd4') : LongBool; syscall _DOSBase 366;
 FUNCTION SplitName(const name : pCHAR location 'd1'; seperator : ULONG location 'd2'; buf : pCHAR location 'd3'; oldpos : LONGINT location 'd4'; size : LONGINT location 'd5') : smallint; syscall _DOSBase 414;
 FUNCTION StartNotify(notify : pNotifyRequest location 'd1') : LongBool; syscall _DOSBase 888;
 FUNCTION StrToDate(datetime : pDateTime location 'd1') : LongBool; syscall _DOSBase 750;
@@ -1725,15 +1725,15 @@ FUNCTION StrToLong(const string_ : pCHAR location 'd1'; VAR value : LONGINT loca
 FUNCTION SystemTagList(const command : pCHAR location 'd1';const tags : pTagItem location 'd2') : LONGINT; syscall _DOSBase 606;
 FUNCTION DOSSystem(const command : pCHAR location 'd1';const tags : pTagItem location 'd2') : LONGINT; syscall _DOSBase 606;
 FUNCTION UnGetC(fh : LONGINT location 'd1'; character : LONGINT location 'd2') : LONGINT; syscall _DOSBase 318;
-PROCEDURE UnLoadSeg(seglist : LONGINT location 'd1'); syscall _DOSBase 156;
-PROCEDURE UnLock(lock : LONGINT location 'd1'); syscall _DOSBase 090;
+PROCEDURE UnLoadSeg(seglist : BPTR location 'd1'); syscall _DOSBase 156;
+PROCEDURE UnLock(lock : BPTR location 'd1'); syscall _DOSBase 090;
 PROCEDURE UnLockDosList(flags : ULONG location 'd1'); syscall _DOSBase 660;
-FUNCTION UnLockRecord(fh : LONGINT location 'd1'; offset : ULONG location 'd2'; length : ULONG location 'd3') : LongBool; syscall _DOSBase 282;
+FUNCTION UnLockRecord(fh : BPTR location 'd1'; offset : ULONG location 'd2'; length : ULONG location 'd3') : LongBool; syscall _DOSBase 282;
 FUNCTION UnLockRecords(recArray : pRecordLock location 'd1') : LongBool; syscall _DOSBase 288;
-FUNCTION VFPrintf(fh : LONGINT location 'd1';const format : pCHAR location 'd2';const argarray : POINTER location 'd3') : LONGINT; syscall _DOSBase 354;
-PROCEDURE VFWritef(fh : LONGINT location 'd1';const format : pCHAR location 'd2';const argarray : pLONGINT location 'd3'); syscall _DOSBase 348;
+FUNCTION VFPrintf(fh : BPTR location 'd1';const format : pCHAR location 'd2';const argarray : POINTER location 'd3') : LONGINT; syscall _DOSBase 354;
+PROCEDURE VFWritef(fh : BPTR location 'd1';const format : pCHAR location 'd2';const argarray : pLONGINT location 'd3'); syscall _DOSBase 348;
 FUNCTION VPrintf(const format : pCHAR location 'd1'; const argarray : POINTER location 'd2') : LONGINT; syscall _DOSBase 954;
-FUNCTION WaitForChar(file_ : LONGINT location 'd1'; timeout : LONGINT location 'd2') : LongBool; syscall _DOSBase 204;
+FUNCTION WaitForChar(file_ : BPTR location 'd1'; timeout : LONGINT location 'd2') : LongBool; syscall _DOSBase 204;
 FUNCTION WaitPkt : pDosPacket; syscall _DOSBase 252;
 FUNCTION WriteChars(const buf : pCHAR location 'd1'; buflen : ULONG location 'd2') : LONGINT; syscall _DOSBase 942;
 

+ 2 - 1
packages/amunits/src/coreunits/intuition.pas

@@ -4100,7 +4100,8 @@ PROCEDURE FreeScreenBuffer(sc : pScreen location 'a0'; sb : pScreenBuffer locati
 PROCEDURE FreeScreenDrawInfo(screen : pScreen location 'a0'; drawInfo : pDrawInfo location 'a1'); syscall _IntuitionBase 696;
 PROCEDURE FreeSysRequest(window : pWindow location 'a0'); syscall _IntuitionBase 372;
 PROCEDURE GadgetMouse(gadget : pGadget location 'a0'; gInfo : pGadgetInfo location 'a1'; mousePoint : psmallint location 'a2'); syscall _IntuitionBase 570;
-FUNCTION GetAttr(attrID : ULONG location 'd0'; obj : POINTER location 'a0'; storagePtr : pULONG location 'a1') : ULONG; syscall _IntuitionBase 654;
+FUNCTION GetAttr(attrID : ULONG location 'd0'; obj : POINTER location 'a0'; storagePtr : pULONG location 'a1') : ULONG; overload; syscall _IntuitionBase 654;
+FUNCTION GetAttr(attrID : ULONG location 'd0'; obj : POINTER location 'a0'; var storage : ULONG location 'a1') : ULONG; overload; syscall _IntuitionBase 654;
 PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR location 'a0'); syscall _IntuitionBase 582;
 FUNCTION GetDefPrefs(preferences : pPreferences location 'a0'; size : LONGINT location 'd0') : pPreferences; syscall _IntuitionBase 126;
 FUNCTION GetPrefs(preferences : pPreferences location 'a0'; size : LONGINT location 'd0') : pPreferences; syscall _IntuitionBase 132;

+ 2 - 1
packages/amunits/src/coreunits/utility.pas

@@ -356,7 +356,8 @@ function GetTagData(tagval : Tag location 'd0';default : ULONG location 'd1';con
 function GetUniqueID : ULONG; syscall _UtilityBase 270;
 procedure MapTags(TagList : pTagItem location 'a0';const maplist : pTagItem location 'a1';IncludeMiss : ULONG location 'd0'); syscall _UtilityBase 060;
 function NamedObjectName(Obj : pNamedObject location 'a0') : STRPTR; syscall _UtilityBase 252;
-function NextTagItem(Item : ppTagItem location 'a0') : pTagItem; syscall _UtilityBase 048;
+function NextTagItem(ItemPtr : ppTagItem location 'a0') : pTagItem; overload; syscall _UtilityBase 048;
+function NextTagItem(var Item : pTagItem location 'a0') : pTagItem; overload; syscall _UtilityBase 048;
 function PackBoolTags(InitialFlags : ULONG location 'd0';const TagList: PTagItem location 'a0'; const boolmap : pTagItem location 'a1') : ULONG; syscall _UtilityBase 042;
 function PackStructureTags(packk: APTR location 'a0';const packTable : pULONG location 'a1';const TagList : pTagItem location 'a2') : ULONG; syscall _UtilityBase 210;
 procedure RefreshTagItemClones(cloneTagItem : pTagItem location 'a0'; const OriginalTagItems : pTagItem location 'a1'); syscall _UtilityBase 084;

+ 2 - 1
packages/arosunits/src/utility.pas

@@ -229,7 +229,8 @@ function GetTagData(TagValue: Tag; Default: IPTR; const TagList: PTagItem): IPTR
 function GetUniqueID: LongWord; syscall AOS_UtilityBase 45;
 procedure MapTags(TagList: PTagItem; const MapList: PTagItem; MapType: LongWord); syscall AOS_UtilityBase 10;
 function NamedObjectName(Object_: PNamedObject): STRPTR; syscall AOS_UtilityBase 42;
-function NextTagItem(var Item: PTagItem): PTagItem; syscall AOS_UtilityBase 8;
+function NextTagItem(var Item: PTagItem): PTagItem; overload; syscall AOS_UtilityBase 8;
+function NextTagItem(ItemPtr: PPTagItem): PTagItem; overload; syscall AOS_UtilityBase 8;
 function PackBoolTags(InitialFlags: LongWord; const TagList, BoolMap: PTagItem): IPTR; syscall AOS_UtilityBase 7;
 function PackStructureTags(Pack: APTR; PackTable: PLongWord; TagList: PTagItem): LongWord; syscall AOS_UtilityBase 35;
 procedure RefreshTagItemClones(Clone: PTagItem; const Original: PTagItem); syscall AOS_UtilityBase 14;

+ 63 - 63
packages/morphunits/src/amigados.pas

@@ -1393,29 +1393,29 @@ type
 { dos.library functions }
 
 function dosOpen(fname     : PChar   location 'd1';
-              accessMode: LongInt location 'd2'): LongInt;
+              accessMode: LongInt location 'd2'): BPTR;
 SysCall MOS_DOSBase 30;
 
-function dosClose(fileh: LongInt location 'd1'): LongBool;
+function dosClose(fileh: BPTR location 'd1'): LongBool;
 SysCall MOS_DOSBase 36;
 
-function dosRead(fileh : LongInt location 'd1';
+function dosRead(fileh : BPTR location 'd1';
                  buffer: Pointer location 'd2';
                  length: LongInt location 'd3'): LongInt;
 SysCall MOS_DOSBase 42;
 
-function dosWrite(fileh : LongInt location 'd1';
+function dosWrite(fileh : BPTR location 'd1';
                   buffer: Pointer location 'd2';
                   length: LongInt location 'd3'): LongInt;
 SysCall MOS_DOSBase 48;
 
-function dosInput: LongInt;
+function dosInput: BPTR;
 SysCall MOS_DOSBase 54;
 
-function dosOutput: LongInt;
+function dosOutput: BPTR;
 SysCall MOS_DOSBase 60;
 
-function dosSeek(fileh   : LongInt location 'd1';
+function dosSeek(fileh   : BPTR location 'd1';
                  position: LongInt location 'd2';
                  posmode : LongInt location 'd3'): LongInt;
 SysCall MOS_DOSBase 66;
@@ -1428,31 +1428,31 @@ function dosRename(oldName: PChar location 'd1';
 SysCall MOS_DOSBase 78;
 
 function Lock(lname     : PChar   location 'd1';
-              accessMode: LongInt location 'd2'): LongInt;
+              accessMode: LongInt location 'd2'): BPTR;
 SysCall MOS_DOSBase 84;
 
-procedure Unlock(lock: LongInt location 'd1');
+procedure Unlock(lock: BPTR location 'd1');
 SysCall MOS_DOSBase 90;
 
-function DupLock(lock: LongInt location 'd1'): LongInt;
+function DupLock(lock: BPTR location 'd1'): LongInt;
 SysCall MOS_DOSBase 096;
 
-function Examine(lock         : LongInt        location 'd1';
+function Examine(lock         : BPTR        location 'd1';
                  fileInfoBlock: PFileInfoBlock location 'd2'): LongInt;
 SysCall MOS_DOSBase 102;
 
-function ExNext(lock         : LongInt        location 'd1';
+function ExNext(lock         : BPTR        location 'd1';
                 fileInfoBlock: PFileInfoBlock location 'd2'): LongInt;
 SysCall MOS_DOSBase 108;
 
-function Info(lock          : LongInt   location 'd1';
+function Info(lock          : BPTR   location 'd1';
               parameterBlock: PInfoData location 'd2'): LongInt;
 SysCall MOS_DOSBase 114;
 
 function dosCreateDir(dname: PChar location 'd1'): LongInt;
 SysCall MOS_DOSBase 120;
 
-function CurrentDir(lock: LongInt location 'd1'): LongInt;
+function CurrentDir(lock: BPTR location 'd1'): BPTR;
 SysCall MOS_DOSBase 126;
 
 function IoErr: LongInt;
@@ -1460,17 +1460,17 @@ SysCall MOS_DOSBase 132;
 
 function CreateProc(name     : PChar   location 'd1';
                     pri      : LongInt location 'd2';
-                    segList  : LongInt location 'd3';
+                    segList  : BPTR location 'd3';
                     stackSize: LongInt location 'd4'): PMsgPort;
 SysCall MOS_DOSBase 138;
 
 procedure dosExit(returnCode: LongInt location 'd1');
 SysCall MOS_DOSBase 144;
 
-function LoadSeg(name: PChar location 'd1'): LongInt;
+function LoadSeg(name: PChar location 'd1'): BPTR;
 SysCall MOS_DOSBase 150;
 
-procedure UnLoadSeg(seglist: LongInt location 'd1');
+procedure UnLoadSeg(seglist: BPTR location 'd1');
 SysCall MOS_DOSBase 156;
 
 function DeviceProc(name: PChar location 'd1'): PMsgPort;
@@ -1494,15 +1494,15 @@ function WaitForChar(file1  : LongInt location 'd1';
                      timeout: LongInt location 'd2'): LongBool;
 SysCall MOS_DOSBase 204;
 
-function ParentDir(lock: LongInt location 'd1'): LongInt;
+function ParentDir(lock: BPTR location 'd1'): BPTR;
 SysCall MOS_DOSBase 210;
 
-function IsInteractive(file1: LongInt location 'd1'): LongBool;
+function IsInteractive(file1: BPTR location 'd1'): LongBool;
 SysCall MOS_DOSBase 216;
 
 function Execute(string1: PChar   location 'd1';
-                 file1  : LongInt location 'd2';
-                 file2  : LongInt location 'd3'): LongBool;
+                 file1  : BPTR location 'd2';
+                 file2  : BPTR location 'd3'): LongBool;
 SysCall MOS_DOSBase 222;
 
 function AllocDosObject(type1: Cardinal location 'd1';
@@ -1573,7 +1573,7 @@ procedure AbortPkt(port: PMsgPort   location 'd1';
                    pkt : PDosPacket location 'd2');
 SysCall MOS_DOSBase 264;
 
-function LockRecord(fh     : LongInt  location 'd1';
+function LockRecord(fh     : BPTR  location 'd1';
                     offset : Cardinal location 'd2';
                     length : Cardinal location 'd3';
                     mode   : Cardinal location 'd4';
@@ -1584,7 +1584,7 @@ function LockRecords(recArray: PRecordLock location 'd1';
                      timeout : Cardinal    location 'd2'): LongBool;
 SysCall MOS_DOSBase 276;
 
-function UnLockRecord(fh    : LongInt  location 'd1';
+function UnLockRecord(fh    : BPTR  location 'd1';
                       offset: Cardinal location 'd2';
                       length: Cardinal location 'd3'): LongBool;
 SysCall MOS_DOSBase 282;
@@ -1592,73 +1592,73 @@ SysCall MOS_DOSBase 282;
 function UnLockRecords(recArray: PRecordLock location 'd1'): LongBool;
 SysCall MOS_DOSBase 288;
 
-function SelectInput(fh: LongInt location 'd1'): LongInt;
+function SelectInput(fh: BPTR location 'd1'): LongInt;
 SysCall MOS_DOSBase 294;
 
-function SelectOutput(fh: LongInt location 'd1'): LongInt;
+function SelectOutput(fh: BPTR location 'd1'): LongInt;
 SysCall MOS_DOSBase 300;
 
-function FGetC(fh: LongInt location 'd1'): LongInt;
+function FGetC(fh: BPTR location 'd1'): LongInt;
 SysCall MOS_DOSBase 306;
 
-function FPutC(fh: LongInt location 'd1';
+function FPutC(fh: BPTR location 'd1';
                ch: LongInt location 'd2'): LongInt;
 SysCall MOS_DOSBase 312;
 
-function UnGetC(fh       : LongInt location 'd1';
+function UnGetC(fh       : BPTR location 'd1';
                 character: LongInt location 'd2'): LongInt;
 SysCall MOS_DOSBase 318;
 
-function FRead(fh      : LongInt  location 'd1';
+function FRead(fh      : BPTR  location 'd1';
                block   : Pointer  location 'd2';
                blocklen: Cardinal location 'd3';
                number  : Cardinal location 'd4'): LongInt;
 SysCall MOS_DOSBase 324;
 
-function FWrite(fh      : LongInt  location 'd1';
+function FWrite(fh      : BPTR  location 'd1';
                 block   : Pointer  location 'd2';
                 blocklen: Cardinal location 'd3';
                 number  : Cardinal location 'd4'): LongInt;
 SysCall MOS_DOSBase 330;
 
-function FGets(fh    : LongInt  location 'd1';
+function FGets(fh    : BPTR  location 'd1';
                buf   : PChar    location 'd2';
                buflen: Cardinal location 'd3'): PChar;
 SysCall MOS_DOSBase 336;
 
-function FPuts(fh : LongInt location 'd1';
+function FPuts(fh : BPTR location 'd1';
                str: PChar   location 'd2'): LongInt;
 SysCall MOS_DOSBase 342;
 
-procedure VFWritef(fh      : LongInt location 'd1';
+procedure VFWritef(fh      : BPTR location 'd1';
                    format  : PChar   location 'd2';
                    argarray: Pointer location 'd3');
 SysCall MOS_DOSBase 348;
 
-function VFPrintf(fh      : LongInt location 'd1';
+function VFPrintf(fh      : BPTR location 'd1';
                   format  : PChar   location 'd2';
                   argarray: Pointer location 'd3'): LongInt;
 SysCall MOS_DOSBase 354;
 
-function dosFlush(fh: LongInt location 'd1'): LongInt;
+function dosFlush(fh: BPTR location 'd1'): LongInt;
 SysCall MOS_DOSBase 360;
 
-function SetVBuf(fh   : LongInt location 'd1';
+function SetVBuf(fh   : BPTR location 'd1';
                  buff : PChar   location 'd2';
                  type1: LongInt location 'd3';
                  size : LongInt location 'd4'): LongInt;
 SysCall MOS_DOSBase 366;
 
-function DupLockFromFH(fh: LongInt location 'd1'): LongInt;
+function DupLockFromFH(fh: BPTR location 'd1'): BPTR;
 SysCall MOS_DOSBase 372;
 
-function OpenFromLock(lock: LongInt location 'd1'): LongInt;
+function OpenFromLock(lock: BPTR location 'd1'): BPTR;
 SysCall MOS_DOSBase 378;
 
-function ParentOfFH(fh: LongInt location 'd1'): LongInt;
+function ParentOfFH(fh: BPTR location 'd1'): BPTR;
 SysCall MOS_DOSBase 384;
 
-function ExamineFH(fh : LongInt        location 'd1';
+function ExamineFH(fh : BPTR        location 'd1';
                    fib: PFileInfoBlock location 'd2'): LongBool;
 SysCall MOS_DOSBase 390;
 
@@ -1666,12 +1666,12 @@ function SetFileDate(name: PChar      location 'd1';
                      date: PDateStamp location 'd2'): LongBool;
 SysCall MOS_DOSBase 396;
 
-function NameFromLock(lock  : LongInt location 'd1';
+function NameFromLock(lock  : BPTR location 'd1';
                       buffer: PChar   location 'd2';
                       len   : LongInt location 'd3'): LongBool;
 SysCall MOS_DOSBase 402;
 
-function NameFromFH(fh    : LongInt location 'd1';
+function NameFromFH(fh    : BPTR location 'd1';
                     buffer: PChar   location 'd2';
                     len   : LongInt location 'd3'): LongBool;
 SysCall MOS_DOSBase 408;
@@ -1683,15 +1683,15 @@ function SplitName(name     : PChar    location 'd1';
                    size     : LongInt  location 'd5'): SmallInt;
 SysCall MOS_DOSBase 414;
 
-function SameLock(lock1: LongInt location 'd1';
-                  lock2: LongInt location 'd2'): LongInt;
+function SameLock(lock1: BPTR location 'd1';
+                  lock2: BPTR location 'd2'): LongInt;
 SysCall MOS_DOSBase 420;
 
-function SetMode(fh  : LongInt location 'd1';
+function SetMode(fh  : BPTR location 'd1';
                  mode: LongInt location 'd2'): LongInt;
 SysCall MOS_DOSBase 426;
 
-function ExAll(lock   : LongInt       location 'd1';
+function ExAll(lock   : BPTR       location 'd1';
                buffer : PExAllData    location 'd2';
                size   : LongInt       location 'd3';
                data   : LongInt       location 'd4';
@@ -1699,7 +1699,7 @@ function ExAll(lock   : LongInt       location 'd1';
 SysCall MOS_DOSBase 432;
 
 function ReadLink(port  : PMsgPort location 'd1';
-                  lock  : LongInt  location 'd2';
+                  lock  : BPTR  location 'd2';
                   path  : PChar    location 'd3';
                   buffer: PChar    location 'd4';
                   size  : Cardinal location 'd5'): LongBool;
@@ -1711,11 +1711,11 @@ function MakeLink(name: PChar   location 'd1';
 SysCall MOS_DOSBase 444;
 
 function ChangeMode(type1  : LongInt location 'd1';
-                    fh     : LongInt location 'd2';
+                    fh     : BPTR location 'd2';
                     newmode: LongInt location 'd3'): LongBool;
 SysCall MOS_DOSBase 450;
 
-function SetFileSize(fh  : LongInt location 'd1';
+function SetFileSize(fh  : BPTR location 'd1';
                      pos : LongInt location 'd2';
                      mode: LongInt location 'd3'): LongInt;
 SysCall MOS_DOSBase 456;
@@ -1748,7 +1748,7 @@ SysCall MOS_DOSBase 498;
 function CreateNewProcTagList(tags: PTagItem location 'd1'): PProcess;
 SysCall MOS_DOSBase 498;
 
-function RunCommand(seg     : LongInt location 'd1';
+function RunCommand(seg     : BPTR location 'd1';
                     stack   : LongInt location 'd2';
                     paramptr: PChar   location 'd3';
                     paramlen: LongInt location 'd4'): LongInt;
@@ -1799,10 +1799,10 @@ function GetPrompt(buf: PChar   location 'd1';
                    len: LongInt location 'd2'): LongBool;
 SysCall MOS_DOSBase 588;
 
-function SetProgramDir(lock: LongInt location 'd1'): LongInt;
+function SetProgramDir(lock: BPTR location 'd1'): LongInt;
 SysCall MOS_DOSBase 594;
 
-function GetProgramDir: LongInt;
+function GetProgramDir: BPTR;
 SysCall MOS_DOSBase 600;
 
 function SystemTagList(command: PChar    location 'd1';
@@ -1814,7 +1814,7 @@ function dosSystem(command: PChar    location 'd1';
 SysCall MOS_DOSBase 606;
 
 function AssignLock(name: PChar   location 'd1';
-                    lock: LongInt location 'd2'): LongBool;
+                    lock: BPTR location 'd2'): LongBool;
 SysCall MOS_DOSBase 612;
 
 function AssignLate(name: PChar location 'd1';
@@ -1826,11 +1826,11 @@ function AssignPath(name: PChar location 'd1';
 SysCall MOS_DOSBase 624;
 
 function AssignAdd(name: PChar   location 'd1';
-                   lock: LongInt location 'd2'): LongBool;
+                   lock: BPTR location 'd2'): LongBool;
 SysCall MOS_DOSBase 630;
 
 function RemAssignList(name: PChar   location 'd1';
-                       lock: LongInt location 'd2'): LongBool;
+                       lock: BPTR location 'd2'): LongBool;
 SysCall MOS_DOSBase 636;
 
 function GetDeviceProc(name: PChar    location 'd1';
@@ -1901,7 +1901,7 @@ SysCall MOS_DOSBase 744;
 function StrToDate(datetime: _PDateTime location 'd1'): LongBool;
 SysCall MOS_DOSBase 750;
 
-function InternalLoadSeg(fh           : LongInt location 'd0';
+function InternalLoadSeg(fh           : BPTR location 'd0';
                          table        : LongInt location 'a0';
                          var funcarray: LongInt location 'a1';
                          var stack    : LongInt location 'a2'): LongInt;
@@ -1916,7 +1916,7 @@ function NewLoadSegTagList(file1: PChar    location 'd1';
 SysCall MOS_DOSBase 768;
 
 function AddSegment(name  : PChar   location 'd1';
-                    seg   : LongInt location 'd2';
+                    seg   : BPTR location 'd2';
                     system: LongInt location 'd3'): LongBool;
 SysCall MOS_DOSBase 774;
 
@@ -2034,8 +2034,8 @@ function MatchPatternNoCase(pat: PChar location 'd1';
                             str: PChar location 'd2'): LongBool;
 SysCall MOS_DOSBase 972;
 
-function SameDevice(lock1: LongInt location 'd1';
-                    lock2: LongInt location 'd2'): LongBool;
+function SameDevice(lock1: BPTR location 'd1';
+                    lock2: BPTR location 'd2'): LongBool;
 SysCall MOS_DOSBase 984;
 
 procedure ExAllEnd(lock   : LongInt       location 'd1';
@@ -2063,8 +2063,8 @@ SysCall MOS_DOSBase 1008;
   *********************************************************************
   * }
 
-function BADDR(x: LongInt): Pointer; Inline;
-function MKBADDR(x: Pointer): LongInt; Inline;
+function BADDR(x: BPTR): Pointer; Inline;
+function MKBADDR(x: Pointer): BPTR; Inline;
 
 
 { * dos stdio definitions
@@ -2137,12 +2137,12 @@ end;
   * }
 
 
-function BADDR(x: LongInt): Pointer; Inline;
+function BADDR(x: BPTR): Pointer; Inline;
 begin
  BADDR:=Pointer(x Shl 2);
 end;
 
-function MKBADDR(x: Pointer): LongInt; Inline;
+function MKBADDR(x: Pointer): BPTR; Inline;
 begin
  MKBADDR:=LongInt(PtrUInt(x)) Shr 2;
 end;

+ 4 - 1
packages/morphunits/src/intuition.pas

@@ -4355,7 +4355,10 @@ SysCall IntuitionBase 642;
 function SetAttrsA(object1 : POINTER location 'a0'; tagList : pTagItem location 'a1') : CARDINAL;
 SysCall IntuitionBase 648;
 
-function GetAttr(attrID : CARDINAL location 'd0'; object1 : POINTER location 'a0'; VAR storagePtr : CARDINAL location 'a1') : CARDINAL;
+function GetAttr(attrID : CARDINAL location 'd0'; object1 : POINTER location 'a0'; storagePtr : pCARDINAL location 'a1') : CARDINAL; overload;
+SysCall IntuitionBase 654;
+
+function GetAttr(attrID : CARDINAL location 'd0'; object1 : POINTER location 'a0'; VAR storage : CARDINAL location 'a1') : CARDINAL; overload;
 SysCall IntuitionBase 654;
 
 function SetGadgetAttrsA(gadget : pGadget location 'a0'; window : pWindow location 'a1'; requester : pRequester location 'a2'; tagList : pTagItem location 'a3') : CARDINAL;

+ 4 - 1
packages/morphunits/src/utility.pas

@@ -208,7 +208,10 @@ function PackBoolTags(initialFlags: Cardinal location 'd0';
                       boolMap     : PTagItem location 'a1'): Cardinal;
 SysCall MOS_UtilityBase 042;
 
-function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem;
+function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem; overload;
+SysCall MOS_UtilityBase 048;
+
+function NextTagItem(var tagList: PTagItem location 'a0'): PTagItem; overload;
 SysCall MOS_UtilityBase 048;
 
 procedure FilterTagChanges(changeList  : PTagItem location 'a0';