瀏覽代碼

* update for amigaos 3.9

nils 22 年之前
父節點
當前提交
171ee607fa

文件差異過大導致無法顯示
+ 222 - 215
packages/extra/amunits/units/amigados.pas


+ 186 - 3
packages/extra/amunits/units/amigaprinter.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -18,16 +18,28 @@ unit amigaprinter;
 
 INTERFACE
 
-uses exec, graphics;
+uses exec, graphics,utility,intuition,prefs;
 
 
 Const
-
+{ V34-V40 commands }
     PRD_RAWWRITE        = CMD_NONSTD + 0;
     PRD_PRTCOMMAND      = CMD_NONSTD + 1;
     PRD_DUMPRPORT       = CMD_NONSTD + 2;
     PRD_QUERY           = CMD_NONSTD + 3;
 
+{ V44 commands }
+    PRD_RESETPREFS	= (CMD_NONSTD+4);	{ PRIVATE: do not use! }
+    PRD_LOADPREFS	= (CMD_NONSTD+5);	{ PRIVATE: do not use! }
+    PRD_USEPREFS	= (CMD_NONSTD+6);	{ PRIVATE: do not use! }
+    PRD_SAVEPREFS	= (CMD_NONSTD+7);	{ PRIVATE: do not use! }
+    PRD_READPREFS	= (CMD_NONSTD+8);
+    PRD_WRITEPREFS	= (CMD_NONSTD+9);
+    PRD_EDITPREFS	= (CMD_NONSTD+10);
+    PRD_SETERRHOOK	= (CMD_NONSTD+11);
+    PRD_DUMPRPORTTAGS	= (CMD_NONSTD+12);
+
+
 { printer command definitions }
 
     aRIS        = 0;            { ESCc  reset                   ISO }
@@ -172,6 +184,29 @@ Type
         io_Special      : Word;         { option flags }
     end;
 
+{ For PRD_DUMPRPORTTAGS (V44) }
+     PIODRPTagsReq = ^tIODRPTagsReq;
+     tIODRPTagsReq = record
+          io_Message : tMessage;
+          io_Device : PDevice;          { device node pointer  }
+          io_Unit : PUnit;              { unit (driver private)}
+          io_Command : UWORD;           { device command }
+          io_Flags : UBYTE;
+          io_Error : BYTE;              { error or warning num }
+          io_RastPort : PRastPort;      { raster port }
+          io_ColorMap : PColorMap;      { color map }
+          io_Modes : ULONG;             { graphics viewport modes }
+          io_SrcX : UWORD;              { source x origin }
+          io_SrcY : UWORD;              { source y origin }
+          io_SrcWidth : UWORD;          { source x width }
+          io_SrcHeight : UWORD;         { source x height }
+          io_DestCols : LONG;           { destination x width }
+          io_DestRows : LONG;           { destination y height }
+          io_Special : UWORD;           { option flags }
+          io_TagList : PTagItem;        { tag list with additional info }
+       end;
+
+
 Const
 
     SPECIAL_MILCOLS     = $0001;        { DestCols specified in 1/1000" }
@@ -223,6 +258,17 @@ Const
 
     PDERR_TOOKCONTROL   = 8;            { Took control in case 0 of render }
 
+    PDERR_BADPREFERENCES = 9;	{ preferences file corrupt }
+
+{
+	Note: all error codes < 32 are reserved for printer.device.
+	All error codes >= 32 and < 127 are reserved for driver specific
+	errors. Negative errors are reserved for system use (standard I/O
+	errors) and error code 127 is reserved for future expansion.
+}
+    PDERR_LASTSTANDARD	= 31;
+    PDERR_FIRSTCUSTOM	= 32;
+    PDERR_LASTCUSTOM	= 126;
 { internal use }
 
     SPECIAL_DENSITYMASK = $0700;        { masks out density values }
@@ -230,6 +276,143 @@ Const
                         SPECIAL_FULLCOLS + SPECIAL_FULLROWS + SPECIAL_FRACCOLS +
                         SPECIAL_FRACROWS + SPECIAL_ASPECT;
 
+{**************************************************************************}
+
+{ The following tags are used for PRD_DUMPRPORTTAGS }
+
+    DRPA_Dummy  = (TAG_USER + $60000);
+
+{**************************************************************************}
+
+{ The following tags are not implemented but reserved for future use. }
+
+    DRPA_ICCProfile	= (DRPA_Dummy+1); { APTR }
+    DRPA_ICCName	= (DRPA_Dummy+2); { STRPTR }
+    DRPA_NoColCorrect	= (DRPA_Dummy+3); { LBOOL }
+
+{**************************************************************************}
+
+{ If the following tag is used io_RastPort and io_ColorMap are
+   ignored.
+}
+   DRPA_SourceHook   = (DRPA_Dummy+4); { struct Hook * }
+
+{ The source hook (DRPA_SourceHook) is called with object NULL and
+   message is a pointer to the following struct.
+
+		VOID hook(struct Hook * hook,
+		          APTR dummy,
+		          struct DRPSourceMsg * drpm);
+}
+
+type
+     PDRPSourceMsg = ^tDRPSourceMsg;
+     tDRPSourceMsg = record
+          x : LONG;
+          y : LONG;
+          width : LONG;
+          height : LONG;
+          buf : PULONG;   { fill this buffer with 0x00RRGGBB pixels }
+       end;
+const
+{**************************************************************************}
+
+{ If these tags are used io_Modes is ignored for aspect ratio }
+
+   DRPA_AspectX      = (DRPA_Dummy+5); { ULONG }
+   DRPA_AspectY      = (DRPA_Dummy+6); { ULONG }
+
+{**************************************************************************}
+
+{ The following tags are used for PRD_EDITPREFS }
+
+   PPRA_Dummy  = (TAG_USER + $70000);
+
+{**************************************************************************}
+
+{ Request to edit prefs (for PRD_EDITPREFS; V44) }
+
+ type
+     PIOPrtPrefsReq = ^tIOPrtPrefsReq;
+     tIOPrtPrefsReq = record
+          io_Message : tMessage;
+          io_Device : PDevice;    { device node pointer  }
+          io_Unit : PUnit;        { unit (driver private)}
+          io_Command : UWORD;     { device command }
+          io_Flags : UBYTE;
+          io_Error : BYTE;        { error or warning num }
+          io_TagList : PTagItem;  { requester tag list }
+       end;
+
+const
+    PPRA_Window	  = (PPRA_Dummy+1); { struct Window * }
+    PPRA_Screen	  = (PPRA_Dummy+2); { struct Screen * }
+    PPRA_PubScreen  = (PPRA_Dummy+3); { STRPTR }
+
+{**************************************************************************}
+
+{ Request to set error hook (for PRD_SETERRHOOK; V44)}
+
+{
+#define PDHOOK_NONE	((struct Hook *) NULL)
+#define PDHOOK_STD	((struct Hook *) 1)
+}
+
+
+  type
+     PIOPrtErrReq = ^tIOPrtErrReq;
+     tIOPrtErrReq = record
+          io_Message : tMessage;
+          io_Device : PDevice;    { device node pointer  }
+          io_Unit : PUnit;        { unit (driver private)}
+          io_Command : UWORD;     { device command }
+          io_Flags : UBYTE;
+          io_Error : BYTE;        { error or warning num }
+          io_Hook : PHook;
+       end;
+
+{**************************************************************************}
+
+{
+	The error hook is called with the IORequest that caused the error as
+	object (2nd Parameter) and a pointer to struct PrtErrMsg as message
+	(3rd Parameter):
+
+		VOID hook(struct Hook * hook,
+		          struct printerIO * ior,
+		          struct PrtErrMsg * pem);
+}
+
+
+    PPrtErrMsg = ^tPrtErrMsg;
+     tPrtErrMsg = record
+          pe_Version : ULONG;
+          pe_ErrorLevel : ULONG;
+          pe_Window : PWindow;
+          pe_ES : PEasyStruct;
+          pe_IDCMP : PULONG;
+          pe_ArgList : APTR;
+       end;
+
+
+  const
+     PDHOOK_VERSION = 1;
+
+  type
+     PIOPrefsReq = ^IOPrefsReq;
+     IOPrefsReq = record
+          io_Message : tMessage;
+          io_Device : PDevice;    { device node pointer  }
+          io_Unit : PUnit;        { unit (driver private)}
+          io_Command : UWORD;     { device command }
+          io_Flags : UBYTE;
+          io_Error : BYTE;        { error or warning num }
+          io_TxtPrefs : PPrinterTxtPrefs;
+          io_UnitPrefs : PPrinterUnitPrefs;
+          io_DevUnitPrefs : PPrinterDeviceUnitPrefs;
+          io_GfxPrefs : PPrinterGfxPrefs;
+       end;
+
 IMPLEMENTATION
 
 end.

+ 236 - 70
packages/extra/amunits/units/exec.pp

@@ -40,14 +40,31 @@
     Just changed the result to a longint.
     06 Sep 2000.
 
-    Fixed the above functions so that they return a 
+    Fixed the above functions so that they return a
     shortint as they should. Made some changes to the
     stub.
     20 Sep 2000.
-    
+
     Put together exec.pp and exec.inc.
     04 Feb 2003.
 
+    Update for AmigaOS 3.9.
+    Added some consts and a record.
+    Functions added.
+         PROCEDURE NewMinList
+	 FUNCTION AVL_AddNode
+	 FUNCTION AVL_RemNodeByAddress
+	 FUNCTION AVL_RemNodeByKey
+	 FUNCTION AVL_FindNode
+	 FUNCTION AVL_FindPrevNodeByAddress
+	 FUNCTION AVL_FindPrevNodeByKey
+	 FUNCTION AVL_FindNextNodeByAddress
+	 FUNCTION AVL_FindNextNodeByKey
+	 FUNCTION AVL_FindFirstNode
+	 FUNCTION AVL_FindLastNode
+
+    05 Feb 2003.
+    
     [email protected]
 }
 
@@ -1098,6 +1115,7 @@ CONST
   AFB_68881     = 4;    {  also set for 68882  }
   AFB_68882     = 5;
   AFB_FPU40     = 6;    {  Set if 68040 FPU }
+  AFB_68060     = 7;
 
   AFF_68010     = %00000001;
   AFF_68020     = %00000010;
@@ -1106,6 +1124,7 @@ CONST
   AFF_68881     = %00010000;
   AFF_68882     = %00100000;
   AFF_FPU40     = %01000000;
+  AFF_68060     = (1 shl 7);
 
 {    AFB_RESERVED8 = %000100000000;  }
 {    AFB_RESERVED9 = %001000000000;  }
@@ -1137,6 +1156,22 @@ CONST
   DMA_ReadFromRAM     = 8;      { Set if DMA goes *FROM* RAM to device }
 
 
+{ Don't even think about the contents of this structure. Just embed it
+ * and reference it
+ *}
+  type
+     PAVLNode = ^tAVLNode;
+     tAVLNode = record
+          reserved : array[0..3] of ULONG;
+       end;
+     ppAVLNode = ^pAVLNode;
+
+
+       PAVLNODECOMP = ^AVLNODECOMP;
+       AVLNODECOMP = APTR;
+
+       PAVLKEYCOMP = ^AVLKEYCOMP;
+       AVLKEYCOMP = APTR;
 
 
 
@@ -1146,13 +1181,12 @@ PROCEDURE AddHead(list : pList; node : pNode);
 PROCEDURE AddIntServer(intNumber : LONGINT; interrupt_ : pInterrupt);
 PROCEDURE AddLibrary(lib : pLibrary);
 PROCEDURE AddMemHandler(memhand : pInterrupt);
-PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; 
-const name : pCHAR);
+PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR);
 PROCEDURE AddPort(port : pMsgPort);
 PROCEDURE AddResource(resource : POINTER);
 PROCEDURE AddSemaphore(sigSem : pSignalSemaphore);
 PROCEDURE AddTail(list : pList; node : pNode);
-FUNCTION AddTask(task : pTask; initPC : POINTER; finalPC : POINTER) : POINTER;
+FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER;
 PROCEDURE Alert(alertNum : ULONG);
 FUNCTION AllocAbs(byteSize : ULONG; location : POINTER) : POINTER;
 FUNCTION Allocate(freeList : pMemHeader; byteSize : ULONG) : POINTER;
@@ -1168,8 +1202,8 @@ FUNCTION AvailMem(requirements : ULONG) : ULONG;
 PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG);
 PROCEDURE CacheClearU;
 FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG;
-PROCEDURE CachePostDMA(address : POINTER; VAR length : ULONG; flags : ULONG);
-FUNCTION CachePreDMA(address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
+PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG);
+FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
 PROCEDURE Cause(interrupt_ : pInterrupt);
 FUNCTION CheckIO(ioRequest : pIORequest) : pIORequest;
 PROCEDURE ChildFree(tid : POINTER);
@@ -1179,12 +1213,11 @@ PROCEDURE ChildWait(tid : POINTER);
 PROCEDURE CloseDevice(ioRequest : pIORequest);
 PROCEDURE CloseLibrary(lib : pLibrary);
 PROCEDURE ColdReboot;
-PROCEDURE CopyMem(source : POINTER; dest : POINTER; size : ULONG);
-PROCEDURE CopyMemQuick(source : POINTER; dest : POINTER; size : ULONG);
-FUNCTION CreateIORequest(port : pMsgPort; size : ULONG) : POINTER;
+PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG);
+PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG);
+FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER;
 FUNCTION CreateMsgPort : pMsgPort;
-FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : 
-POINTER;
+FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : POINTER;
 PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG);
 PROCEDURE Debug(flags : ULONG);
 PROCEDURE DeleteIORequest(iorequest : POINTER);
@@ -1210,27 +1243,23 @@ PROCEDURE FreeVec(memoryBlock : POINTER);
 FUNCTION GetCC : ULONG;
 FUNCTION GetMsg(port : pMsgPort) : pMessage;
 PROCEDURE InitCode(startClass : ULONG; version : ULONG);
-FUNCTION InitResident(resident_ : pResident; segList : ULONG) : POINTER;
+FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER;
 PROCEDURE InitSemaphore(sigSem : pSignalSemaphore);
-PROCEDURE InitStruct(initTable : POINTER; memory : POINTER; size : ULONG);
-PROCEDURE MakeFunctions(target : POINTER; functionArray : POINTER; funcDispBase : 
-ULONG);
-FUNCTION MakeLibrary(funcInit : POINTER; structInit : POINTER; libInit : tPROCEDURE; 
-dataSize : ULONG; segList : ULONG) : pLibrary;
+PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG);
+PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer);
+FUNCTION MakeLibrary(const  funcInit : POINTER;const  structInit : POINTER; libInit : tPROCEDURE;dataSize : ULONG; segList : ULONG) : pLibrary;
 FUNCTION ObtainQuickVector(interruptCode : POINTER) : ULONG;
 PROCEDURE ObtainSemaphore(sigSem : pSignalSemaphore);
 PROCEDURE ObtainSemaphoreList(sigSem : pList);
 PROCEDURE ObtainSemaphoreShared(sigSem : pSignalSemaphore);
 FUNCTION OldOpenLibrary(const libName : pCHAR) : pLibrary;
-FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; 
-flags : ULONG) : shortint;
+FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG) : shortint;
 FUNCTION OpenLibrary(const libName : pCHAR; version : ULONG) : pLibrary;
 FUNCTION OpenResource(const resName : pCHAR) : POINTER;
 PROCEDURE Permit;
 FUNCTION Procure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage) : BOOLEAN;
 PROCEDURE PutMsg(port : pMsgPort; message : pMessage);
-PROCEDURE RawDoFmt(formatString : pCHAR; dataStream : POINTER; putChProc : tPROCEDURE; 
-putChData : POINTER);
+function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer;
 PROCEDURE ReleaseSemaphore(sigSem : pSignalSemaphore);
 PROCEDURE ReleaseSemaphoreList(sigSem : pList);
 PROCEDURE RemDevice(device : pDevice);
@@ -1247,9 +1276,8 @@ PROCEDURE RemTask(task : pTask);
 PROCEDURE ReplyMsg(message : pMessage);
 PROCEDURE SendIO(ioRequest : pIORequest);
 FUNCTION SetExcept(newSignals : ULONG; signalSet : ULONG) : ULONG;
-FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : 
-POINTER;
-FUNCTION SetIntVector(intNumber : LONGINT; interrupt_ : pInterrupt) : pInterrupt;
+FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : POINTER;
+FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt;
 FUNCTION SetSignal(newSignals : ULONG; signalSet : ULONG) : ULONG;
 FUNCTION SetSR(newSR : ULONG; mask : ULONG) : ULONG;
 FUNCTION SetTaskPri(task : pTask; priority : LONGINT) : shortint;
@@ -1259,31 +1287,36 @@ PROCEDURE SumKickData;
 PROCEDURE SumLibrary(lib : pLibrary);
 FUNCTION SuperState : POINTER;
 FUNCTION Supervisor(userFunction : tPROCEDURE) : ULONG;
-FUNCTION TypeOfMem(address : POINTER) : ULONG;
+FUNCTION TypeOfMem(const address : POINTER) : ULONG;
 PROCEDURE UserState(sysStack : POINTER);
 PROCEDURE Vacate(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage);
 FUNCTION Wait(signalSet : ULONG) : ULONG;
 FUNCTION WaitIO(ioRequest : pIORequest) : shortint;
 FUNCTION WaitPort(port : pMsgPort) : pMessage;
 
-{$ifdef amiga_overlays}
-
-PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; 
-const name : String);
+PROCEDURE NewMinList(minlist : pMinList);
+FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode;
+FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode;
+FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode;
+FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode;
+FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode;
+FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode;
+
+PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : String);
 FUNCTION FindName(list : pList; const name : String) : pNode;
 FUNCTION FindPort(const name : String) : pMsgPort;
 FUNCTION FindResident(const name : String) : pResident;
 FUNCTION FindSemaphore(const sigSem : String) : pSignalSemaphore;
 FUNCTION FindTask(const name : String) : pTask;
 FUNCTION OldOpenLibrary(const libName : String) : pLibrary;
-FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest; 
-flags : ULONG) : shortint;
+FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest;flags : ULONG) : shortint;
 FUNCTION OpenLibrary(const libName : String; version : ULONG) : pLibrary;
 FUNCTION OpenResource(const resName : String) : POINTER;
-PROCEDURE RawDoFmt(formatString : String; dataStream : POINTER; putChProc : 
-tPROCEDURE; putChData : POINTER);
-
-{$endif}
+function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc :tPROCEDURE; putChData : POINTER): pointer;
 
 function BitMask(no :shortint): longint;
 function IsListEmpty( list : pList): boolean;
@@ -1291,9 +1324,7 @@ function IsMsgPortEmpty( mp : pMsgPort): boolean;
 
 IMPLEMENTATION
 
-{$ifdef amiga_overlays}
 uses pastoc;
-{$endif}
 
 function BitMask(no :shortint): longint;
 begin
@@ -1379,8 +1410,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; 
-const name : pCHAR);
+PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1440,7 +1470,7 @@ BEGIN
   END;
 END;
 
-FUNCTION AddTask(task : pTask; initPC : POINTER; finalPC : POINTER) : POINTER;
+FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1641,7 +1671,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE CachePostDMA(address : POINTER; VAR length : ULONG; flags : ULONG);
+PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1654,7 +1684,7 @@ BEGIN
   END;
 END;
 
-FUNCTION CachePreDMA(address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
+FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1767,7 +1797,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE CopyMem(source : POINTER; dest : POINTER; size : ULONG);
+PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1780,7 +1810,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE CopyMemQuick(source : POINTER; dest : POINTER; size : ULONG);
+PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1793,7 +1823,7 @@ BEGIN
   END;
 END;
 
-FUNCTION CreateIORequest(port : pMsgPort; size : ULONG) : POINTER;
+FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -1817,7 +1847,7 @@ BEGIN
   END;
 END;
 
-FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : 
+FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) :
 POINTER;
 BEGIN
   ASM
@@ -2121,7 +2151,7 @@ BEGIN
   END;
 END;
 
-FUNCTION InitResident(resident_ : pResident; segList : ULONG) : POINTER;
+FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2145,7 +2175,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE InitStruct(initTable : POINTER; memory : POINTER; size : ULONG);
+PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2158,8 +2188,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE MakeFunctions(target : POINTER; functionArray : POINTER; funcDispBase : 
-ULONG);
+PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2172,8 +2201,7 @@ BEGIN
   END;
 END;
 
-FUNCTION MakeLibrary(funcInit : POINTER; structInit : POINTER; libInit : tPROCEDURE; 
-dataSize : ULONG; segList : ULONG) : pLibrary;
+FUNCTION MakeLibrary(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG) : pLibrary;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2246,7 +2274,7 @@ BEGIN
   END;
 END;
 
-FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; 
+FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest;
 flags : ULONG) : shortint;
 BEGIN
   ASM
@@ -2325,8 +2353,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE RawDoFmt(formatString : pCHAR; dataStream : POINTER; putChProc : tPROCEDURE; 
-putChData : POINTER);
+function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2337,6 +2364,7 @@ BEGIN
     MOVEA.L _ExecBase,A6
     JSR -522(A6)
     MOVEA.L (A7)+,A6
+    MOVE.L  D0,@RESULT
   END;
 END;
 
@@ -2521,7 +2549,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : 
+FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) :
 POINTER;
 BEGIN
   ASM
@@ -2536,7 +2564,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SetIntVector(intNumber : LONGINT; interrupt_ : pInterrupt) : pInterrupt;
+FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2655,7 +2683,7 @@ BEGIN
   END;
 END;
 
-FUNCTION TypeOfMem(address : POINTER) : ULONG;
+FUNCTION TypeOfMem(const address : POINTER) : ULONG;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -2726,9 +2754,150 @@ BEGIN
   END;
 END;
 
-{$ifdef amiga_overlays}
-PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; 
-const name : String);
+PROCEDURE NewMinList(minlist : pMinList);
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	minlist,A0
+	MOVEA.L	_ExecBase,A6
+	JSR	-828(A6)
+	MOVEA.L	(A7)+,A6
+  END;
+END;
+
+FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	node,A1
+	MOVEA.L	func,A2
+	MOVEA.L	_ExecBase,A6
+	JSR	-852(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	node,A1
+	MOVEA.L	_ExecBase,A6
+	JSR	-858(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	key,A1
+	MOVEA.L	func,A2
+	MOVEA.L	_ExecBase,A6
+	JSR	-864(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	key,A1
+	MOVEA.L	func,A2
+	MOVEA.L	_ExecBase,A6
+	JSR	-870(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	node,A0
+	MOVEA.L	_ExecBase,A6
+	JSR	-876(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	key,A1
+	MOVEA.L	func,A2
+	MOVEA.L	_ExecBase,A6
+	JSR	-882(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	node,A0
+	MOVEA.L	_ExecBase,A6
+	JSR	-888(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	key,A1
+	MOVEA.L	func,A2
+	MOVEA.L	_ExecBase,A6
+	JSR	-894(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	_ExecBase,A6
+	JSR	-900(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode;
+BEGIN
+  ASM
+	MOVE.L	A6,-(A7)
+	MOVEA.L	root,A0
+	MOVEA.L	_ExecBase,A6
+	JSR	-906(A6)
+	MOVEA.L	(A7)+,A6
+	MOVE.L	D0,@RESULT
+  END;
+END;
+
+
+PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : String);
 BEGIN
     AddMemList(size,attributes,pri,base,pas2c(name));
 END;
@@ -2756,7 +2925,7 @@ FUNCTION OldOpenLibrary(const libName : String) : pLibrary;
 BEGIN
     OldOpenLibrary := OldOpenLibrary(pas2c(libName));
 END;
-FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest; 
+FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest;
 flags : ULONG) : shortint;
 BEGIN
     OpenDevice := OpenDevice(pas2c(devName),unite,ioRequest,flags);
@@ -2769,20 +2938,17 @@ FUNCTION OpenResource(const resName : String) : POINTER;
 BEGIN
     OpenResource := OpenResource(pas2c(resName));
 END;
-PROCEDURE RawDoFmt(formatString : String; dataStream : POINTER; putChProc : 
-tPROCEDURE; putChData : POINTER);
+function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer;
 BEGIN
-    RawDoFmt(pas2c(formatString),dataStream,putChProc,putChData);
+    RawDoFmt := RawDoFmt(pas2c(formatString),dataStream,putChProc,putChData);
 END;
 
-{$endif}
-
 END. (* UNIT EXEC *)
 
 {
   $Log$
-  Revision 1.1  2003-02-04 18:07:40  nils
-    * initial release
+  Revision 1.2  2003-02-07 20:45:08  nils
+  * update for amigaos 3.9
 
   Revision 1.1.2.2  2001/07/24 07:34:30  pierre
    * amigaoverlays include file insertion commented out as it does seem necessary

+ 35 - 9
packages/extra/amunits/units/hardblocks.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -16,10 +16,27 @@
 
 unit hardblocks;
 
+{
+    History:
+    
+    Updated for AmigaOs 3.9.
+    A few changes in records.
+    28 Jan 2003.
+
+    [email protected] Nils Sjoholm
+}
+    
 INTERFACE
 
 uses exec;
 
+{	Changes
+**	  Expanded envec
+**	  Added storage for driveinit name up to 31 letters.
+**	  Added storage for filesysten name up to 83 letters.
+**}
+
+
 {--------------------------------------------------------------------
  *
  *      This file describes blocks of data that exist on a hard disk
@@ -40,10 +57,19 @@ uses exec;
  *      file system load images, drive bad block maps, spare blocks,
  *      etc.
  *
- *      Though only 512 byte blocks are currently supported by the
- *      file system, this proposal tries to be forward-looking by
- *      making the block size explicit, and by using only the first
- *      256 bytes for all blocks but the LoadSeg data.
+ *	Though all descriptions in this file contemplate 512 blocks
+ *	per track this desecription works functionally with any block
+ *	size. The LSEG blocks should make most efficient use of the
+ *	disk block size possible, for example. While this specification
+ *	can support 256 byte sectors that is deprecated at this time.
+ *
+ *	This version adds some modest storage spaces for inserting
+ *	the actual source filename for files installed on the RDBs
+ *	as either DriveInit code or Filesystem code. This makes
+ *	creating a mountfile suitable for use with the "C:Mount"
+ *	command that can be used for manually mounting the disk if
+ *	ever required.
+ *
  *
  *------------------------------------------------------------------}
 
@@ -106,7 +132,7 @@ type
         rdb_ControllerVendor : Array [0..7] of Char;
         rdb_ControllerProduct : Array [0..15] of Char;
         rdb_ControllerRevision : Array [0..3] of Char;
-        rdb_Reserved5   : Array [0..9] of ULONG;
+        rdb_DriveInitName : array[0..39] of char;
     end;
 
 const
@@ -173,8 +199,8 @@ type
         pb_DriveName    : Array [0..31] of Char; { preferred DOS device name: BSTR form }
                                         { (not used if this name is in use) }
         pb_Reserved2    : Array [0..14] of ULONG; { filler to 32 longwords }
-        pb_Environment  : Array [0..16] of ULONG; { environment vector for this partition }
-        pb_EReserved    : Array [0..14] of ULONG; { reserved for future environment vector }
+        pb_Environment  : Array [0..19] of ULONG; { environment vector for this partition }
+        pb_EReserved    : Array [0..11] of ULONG; { reserved for future environment vector }
     end;
 
 const
@@ -218,7 +244,7 @@ type
                                 {   processing before substitution }
         fhb_GlobalVec   : Longint;      { BCPL global vector when starting task }
         fhb_Reserved2   : Array [0..22] of ULONG; { (those reserved by PatchFlags) }
-        fhb_Reserved3   : Array [0..20] of ULONG;
+        fhb_FileSysName : array[0..83] of char;  { File system file name as loaded. }
     end;
 
 const

文件差異過大導致無法顯示
+ 405 - 121
packages/extra/amunits/units/intuition.pas


+ 141 - 4
packages/extra/amunits/units/prefs.pas

@@ -13,13 +13,50 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{
+    History:
+    
+    Update for AmigaOS 3.9.
+    Added some const and a few records.
+    Added reaction and workbench.
+    31 Jan 2003.
+    
+    [email protected] Nils Sjoholm
+    
+}
 
+    
 unit prefs;
 
 INTERFACE
 uses exec, iffparse, graphics, timer, intuition;
 
 
+{ Asl }
+
+const
+   ID_ASL = $41534C20;
+
+{ These members correspond directly to the associated
+  	   members of the 'AslSemaphore' data structure defined
+  	   in the <libraries/asl.h> header file by the same names.
+  	  }
+
+  type
+     PAslPrefs = ^tAslPrefs;
+     tAslPrefs = record
+          ap_Reserved : array[0..3] of LONG;
+          ap_SortBy : UBYTE;
+          ap_SortDrawers : UBYTE;
+          ap_SortOrder : UBYTE;
+          ap_SizePosition : UBYTE;
+          ap_RelativeLeft : WORD;
+          ap_RelativeTop : WORD;
+          ap_RelativeWidth : UBYTE;
+          ap_RelativeHeight : UBYTE;
+       end;
+
+
 { Font }
 {***************************************************************************}
 
@@ -77,13 +114,14 @@ const
  ICB_STRGAD_FILTER = 2;
  ICB_MENUSNAP      = 3;
  ICB_MODEPROMOTE   = 4;
+ ICB_SQUARE_RATIO  = 5;
 
  ICF_COERCE_COLORS = 1;
  ICF_COERCE_LACE   = 2;
  ICF_STRGAD_FILTER = 4;
  ICF_MENUSNAP      = 8;
  ICF_MODEPROMOTE   = 16;
-
+ ICF_SQUARE_RATIO  = (1 shl 5);
 
 {***************************************************************************}
 
@@ -485,10 +523,11 @@ const
 const
  ID_PTXT = 1347704916;
  ID_PUNT = 1347767892;
-
+ ID_PDEV = $50444556;
 
  DRIVERNAMESIZE = 30;               { Filename size     }
  DEVICENAMESIZE = 32;               { .device name size }
+ UNITNAMESIZE   = 32;
 
 Type
  pPrinterTxtPrefs = ^tPrinterTxtPrefs;
@@ -546,6 +585,11 @@ const
  PQ_DRAFT  = 0;
  PQ_LETTER = 1;
 
+
+{ PrinterUnitPrefs is used from printer.device to open
+   the connection device
+}
+
 Type
  pPrinterUnitPrefs = ^tPrinterUnitPrefs;
  tPrinterUnitPrefs = record
@@ -555,6 +599,43 @@ Type
     pu_DeviceName       : Array[0..DEVICENAMESIZE-1] of Char;  { Name for OpenDevice()        }
  end;
 
+
+  { PrinterDeviceUnitPrefs is used as descriptor for printer device
+     units.
+   }
+     PPrinterDeviceUnitPrefs = ^tPrinterDeviceUnitPrefs;
+     tPrinterDeviceUnitPrefs = record
+          pd_Reserved : array[0..3] of LONG;   { System reserved		   }
+          pd_UnitNum : LONG;                   { Unit number for OpenDevice()	   }
+          pd_UnitName : array[0..(UNITNAMESIZE)-1] of UBYTE;  { Symbolic name of the unit  }
+       end;
+
+{ Reaction }
+  const
+
+     ID_RACT = $52414354;
+
+
+  type
+     PReactionPrefs = ^tReactionPrefs;
+     tReactionPrefs = record
+          rp_BevelType : UWORD;
+          rp_GlyphType : UWORD;
+          rp_LayoutSpacing : UWORD;
+          rp_3DProp : BOOL;
+          rp_LabelPen : UWORD;
+          rp_LabelPlace : UWORD;
+          rp_3DLabel : BOOL;
+          rp_SimpleRefresh : BOOL;
+          rp_3DLook : BOOL;
+          rp_FallbackAttr : tTextAttr;
+          rp_LabelAttr : tTextAttr;
+          rp_FallbackName : array[0..(FONTNAMESIZE)-1] of UBYTE;
+          rp_LabelName : array[0..(FONTNAMESIZE)-1] of UBYTE;
+          rp_Pattern : array[0..255] of UBYTE;
+       end;
+
+
   {     File format for screen mode preferences }
 
 const
@@ -666,6 +747,27 @@ const
 
  WBPF_NOREMAP   = $0010;
     { Don't remap the pattern }
+  { PDTA_DitherQuality: see pictureclass.h  }
+     WBPF_DITHER_MASK = $0300;
+  { DitherQuality: Default  }
+     WBPF_DITHER_DEF = $0000;
+  { DitherQuality: 0  }
+     WBPF_DITHER_BAD = $0100;
+  { DitherQuality: 2  }
+     WBPF_DITHER_GOOD = $0200;
+  { DitherQuality: 4  }
+     WBPF_DITHER_BEST = $0300;
+  { OBP_Precision: see pictureclass.h  }
+     WBPF_PRECISION_MASK = $0C00;
+     WBPF_PRECISION_DEF = $0000;
+     WBPF_PRECISION_ICON = $0400;
+     WBPF_PRECISION_IMAGE = $0800;
+     WBPF_PRECISION_EXACT = $0C00;
+     WBPF_PLACEMENT_MASK = $3000;
+     WBPF_PLACEMENT_TILE = $0000;
+     WBPF_PLACEMENT_CENTER = $1000;
+     WBPF_PLACEMENT_SCALE = $2000;
+     WBPF_PLACEMENT_SCALEGOOD = $3000;
 
 {***************************************************************************}
 
@@ -676,18 +778,53 @@ const
  PAT_WIDTH      = 16;
  PAT_HEIGHT     = 16;
 
+{ Workbench }
+
+ ID_WBNC = $57424E43;
+
+ type
+     PWorkbenchPrefs = ^tWorkbenchPrefs;
+     tWorkbenchPrefs = record
+          { settings from workbench.library }
+          wbp_DefaultStackSize : ULONG;
+          wbp_TypeRestartTime : ULONG;
+	  { settings from icon.library }
+          wbp_IconPrecision : ULONG;
+          wbp_EmbossRect : tRectangle;
+          wbp_Borderless : BOOL;
+          wbp_MaxNameLength : LONG;
+          wbp_NewIconsSupport : BOOL;
+          wbp_ColorIconSupport : BOOL;
+	   { new for V45 }
+          wbp_ImageMemType : ULONG;
+          wbp_LockPens : BOOL;
+          wbp_NoTitleBar : BOOL;
+          wbp_NoGauge : BOOL;
+       end;
+
+     PWorkbenchHiddenDevicePrefs = ^tWorkbenchHiddenDevicePrefs;
+     tWorkbenchHiddenDevicePrefs = record
+          whdp_Name : array[0..0] of UBYTE;  { C String including NULL char  }
+       end;
+
+const
+     ID_WBHD = $57424844;
+
 IMPLEMENTATION
 
 END.
 
 {
   $Log$
-  Revision 1.2  2002-11-19 18:48:39  nils
+  Revision 1.3  2003-02-07 20:45:08  nils
+  * update for amigaos 3.9
+
+  Revision 1.2  2002/11/19 18:48:39  nils
     * missing semicolon
 
 }
 
-  
+
 
 
 

+ 172 - 25
packages/extra/amunits/units/prtbase.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -14,6 +14,17 @@
 
  **********************************************************************}
 
+{
+    History:
+    
+    Update for AmigaOS 3.0.
+    Some const and records added and changes
+    was made to a few records.
+    31 Jan 2003.
+    
+    [email protected] Nils Sjoholm
+}
+
 {
         printer device data definition
 }
@@ -22,7 +33,7 @@ unit prtbase;
 
 INTERFACE
 
-uses exec, parallel, serial, amigados, intuition, timer;
+uses exec, parallel, serial, amigados, intuition, timer,utility;
 
 
 Type
@@ -38,11 +49,48 @@ Type
     end;
 
 Const
+     IOB_QUEUED = 4;
+     IOB_CURRENT = 5;
+     IOB_SERVICING = 6;
+     IOB_DONE = 7;
+     IOF_QUEUED = 1 shl IOB_QUEUED;
+     IOF_CURRENT = 1 shl IOB_CURRENT;
+     IOF_SERVICING = 1 shl IOB_SERVICING;
+     IOF_DONE = 1 shl IOB_DONE;
+  { pd_Flags  }
+     PB_IOR0 = 0;
+     PB_IOR1 = 1;
+     PB_IOOPENED = 2;
+     PB_EXPUNGED = 7;
+     PBF_IOR0 = 1 shl PB_IOR0;
+     PBF_IOR1 = 1 shl PB_IOR1;
+     PBF_IOOPENDED = 1 shl PB_IOOPENED;
+     PBF_EXPUNGED = 1 shl PB_EXPUNGED;
+  { du_Flags (actually placed in pd_Unit.mp_Node.ln_Pri)  }
+     DUB_STOPPED = 0;
+     DUF_STOPPED = 1 shl DUB_STOPPED;
+
+     P_OLDSTKSIZE        = $0800;        { stack size for child task }
+     P_STKSIZE           = $1000;
+     P_BUFSIZE           = 256;          { size of internal buffers for text i/o }
+     P_SAFESIZE          = 128;          { safety margin for text output buffer }
+
+{**************************************************************************}
 
-    P_OLDSTKSIZE        = $0800;        { stack size for child task }
-    P_STKSIZE           = $1000;
-    P_BUFSIZE           = 256;          { size of internal buffers for text i/o }
-    P_SAFESIZE          = 128;          { safety margin for text output buffer }
+{
+	"struct PrinterData" was a very bad concept in the old V1.0 days
+	because it is both: the device and the unit.
+
+	Starting with V44 PrinterData may be duplicated for many Units. But all
+	new fields that are specific to the Unit  are now part of the new
+	"struct PrinterUnit". Don't touch the private fields!
+
+	A note on the function pointers in these data structure definitions:
+	unless otherwise specified, all functions expect that their parameters
+	are passed on the *stack* rather than in CPU registers. Every parameter
+	must be passed a 32 bit long word, i.e. an "UWORD" will use the same
+	stack space as an "ULONG".
+}
 
 Type
        pPrinterData = ^tPrinterData;
@@ -91,6 +139,22 @@ Const
     PPC_COLORALPHA      = 2;            { color alphanumerics }
     PPC_COLORGFX        = 3;            { color graphics }
 
+    
+{ extended PED structure (V44)  }
+    PPCB_EXTENDED = 2;
+    PPCF_EXTENDED = $4;
+    
+{
+	Some printer drivers (PrinterPS) do not support
+	strip printing. An application has to print a page
+	using a single print request or through clever use
+	of the PRD_DUMPRPORTTAGS printing callback hook.
+}
+
+{ no strip printing, please  }
+       PPCB_NOSTRIP = 3;
+       PPCF_NOSTRIP = $8;
+
 { Color Class }
 
     PCC_BW              = 1;            { black&white only }
@@ -118,24 +182,24 @@ Type
 
     pPrinterExtendedData = ^tPrinterExtendedData;
     tPrinterExtendedData = record
-        ped_PrinterName : STRPTR;       { printer name, null terminated }
-        ped_Init        : Pointer;      { called after LoadSeg }
-        ped_Expunge     : Pointer;      { called before UnLoadSeg }
-        ped_Open        : Pointer;      { called at OpenDevice }
-        ped_Close       : Pointer;      { called at CloseDevice }
-        ped_PrinterClass : Byte;        { printer class }
-        ped_ColorClass  : Byte;         { color class }
-        ped_MaxColumns  : Byte;         { number of print columns available }
-        ped_NumCharSets : Byte;         { number of character sets }
-        ped_NumRows     : Word;         { number of 'pins' in print head }
-        ped_MaxXDots    : ULONG;        { number of dots max in a raster dump }
-        ped_MaxYDots    : ULONG;        { number of dots max in a raster dump }
-        ped_XDotsInch   : Word;         { horizontal dot density }
-        ped_YDotsInch   : Word;         { vertical dot density }
-        ped_Commands    : Pointer;      { printer text command table }
-        ped_DoSpecial   : Pointer;      { special command handler }
-        ped_Render      : Pointer;      { raster render function }
-        ped_TimeoutSecs : Longint;      { good write timeout }
+        ped_PrinterName : STRPTR;         { printer name, null terminated }
+        ped_Init        : procedure;      { called after LoadSeg }
+        ped_Expunge     : procedure;      { called before UnLoadSeg }
+        ped_Open        : function:LONG;  { called at OpenDevice }
+        ped_Close       : procedure;      { called at CloseDevice }
+        ped_PrinterClass : uByte;         { printer class }
+        ped_ColorClass  : uByte;          { color class }
+        ped_MaxColumns  : uByte;          { number of print columns available }
+        ped_NumCharSets : uByte;          { number of character sets }
+        ped_NumRows     : uWord;          { number of 'pins' in print head }
+        ped_MaxXDots    : ULONG;          { number of dots max in a raster dump }
+        ped_MaxYDots    : ULONG;          { number of dots max in a raster dump }
+        ped_XDotsInch   : uWord;          { horizontal dot density }
+        ped_YDotsInch   : uWord;          { vertical dot density }
+        ped_Commands    : Pointer;        { printer text command table }
+        ped_DoSpecial   : function:LONG;  { special command handler }
+        ped_Render      : function:LONG;  { raster render function }
+        ped_TimeoutSecs : Longint;        { good write timeout }
 
         { the following only exists if the segment version is >= 33 }
 
@@ -146,9 +210,73 @@ Type
         { ptr to conversion function for all chars }
 
         ped_ConvFunc    : Pointer;
+	{*************************************************************
+	 *
+	 * The following only exists if the segment version is >= 44
+	 * AND PPCB_EXTENDED is set in ped_PrinterClass:
+	 *
+	 ************************************************************}
+
+	{ Attributes and features }
+	ped_TagList : PTagItem;
+	{ driver specific preferences:
+	 *
+	 *	LONG ped_DoPreferences(struct printerIO * ior,
+	 *	                       LONG command);
+	 }
+        ped_DoPreferences : function :LONG;
+	{ custom error handling:
+	 *
+	 *	VOID ped_CallErrHook(struct printerIO * ior,
+	 *	                     struct Hook * hook);
+	 }
+        ped_CallErrHook : procedure ;
     end;
 
-
+    { The following tags are used to define more printer driver features  }
+
+    const
+       PRTA_Dummy = TAG_USER + $50000;
+    {                                                                           }
+    { V44 features  }
+    { LBOOL  }
+       PRTA_8BitGuns = PRTA_Dummy + 1;
+    { LBOOL  }
+       PRTA_ConvertSource = PRTA_Dummy + 2;
+    { LBOOL  }
+       PRTA_FloydDithering = PRTA_Dummy + 3;
+    { LBOOL  }
+       PRTA_AntiAlias = PRTA_Dummy + 4;
+    { LBOOL  }
+       PRTA_ColorCorrection = PRTA_Dummy + 5;
+    { LBOOL  }
+       PRTA_NoIO = PRTA_Dummy + 6;
+    { LBOOL  }
+       PRTA_NewColor = PRTA_Dummy + 7;
+    { LONG  }
+       PRTA_ColorSize = PRTA_Dummy + 8;
+    { LBOOL  }
+       PRTA_NoScaling = PRTA_Dummy + 9;
+    { User interface  }
+    { STRPTR    }
+       PRTA_DitherNames = PRTA_Dummy + 20;
+    { STRPTR    }
+       PRTA_ShadingNames = PRTA_Dummy + 21;
+    { LBOOL  }
+       PRTA_ColorCorrect = PRTA_Dummy + 22;
+    { STRPTR    }
+       PRTA_DensityInfo = PRTA_Dummy + 23;
+    { Hardware page borders  }
+    { LONG, inches/1000  }
+       PRTA_LeftBorder = PRTA_Dummy + 30;
+    { LONG, inches/1000  }
+       PRTA_TopBorder = PRTA_Dummy + 31;
+    { LBOOL  }
+       PRTA_MixBWColor = PRTA_Dummy + 32;
+    { Driver Preferences  }
+    { LBOOL  }
+       PRTA_Preferences = PRTA_Dummy + 40;
+type
     pPrinterSegment = ^tprinterSegment;
     tPrinterSegment = record
         ps_NextSegment  : ULONG;        { (actually a BPTR) }
@@ -158,6 +286,25 @@ Type
         ps_PED          : tPrinterExtendedData;  { printer extended data }
     end;
 
+{**************************************************************************}
+
+{
+	Driver specific preferences. This structure is device specific: every
+	driver must base its preferences structure on this to allow version
+	checking etc.
+
+	The application will read/write this structure as an I/O buffer.
+}
+      PPrtDriverPreferences = ^tPrtDriverPreferences;
+       tPrtDriverPreferences = record
+            pdp_Version : UWORD;   { PRIVATE! driver specific version }
+            { PRIVATE! driver specific id }
+	    pdp_PrinterID : array[0..31] of UBYTE;
+            pdp_PrefName : array[0..(FILENAME_SIZE - 16)-1] of char;
+            { size of this structure }
+	    pdp_Length : ULONG;
+         end;
+
 IMPLEMENTATION
 
 end.

+ 16 - 1
packages/extra/amunits/units/prtgfx.pas

@@ -14,11 +14,20 @@
 
  **********************************************************************}
 
+{
+    History:
+    
+    Update for AmigaOS 3.9.
+    31 Jan 2003.
+    
+    [email protected]
+}
+     
 unit prtgfx;
 
 INTERFACE
 
-uses exec;
+uses exec,utility;
 Const
 
     PCMYELLOW           = 0;            { byte index for yellow }
@@ -31,6 +40,7 @@ Const
     PCMWHITE            = PCMBLACK;     { byte index for white }
 
 Type
+    PUWORD = ^UWORD;
 
     pColorEntry = ^tColorEntry;
     tcolorEntry = record
@@ -82,6 +92,11 @@ Type
         pi_threshold    : Word;         { threshold value (from prefs) }
         pi_tempwidth    : Word;         { PRIVATE - DO NOT USE! }
         pi_flags        : Word;         { PRIVATE - DO NOT USE! }
+	{ V44 additions }
+	pi_ReduceBuf : PUWORD;          { PRIVATE - DO NOT USE! }
+        pi_ReduceBufSize : UWORD;       { PRIVATE - DO NOT USE! }
+        pi_SourceHook : PHook;          { PRIVATE - DO NOT USE! }
+        pi_InvertHookBuf : PULONG;      { RESERVED - DO NOT USE! }
     end;
 
 IMPLEMENTATION

+ 25 - 3
packages/extra/amunits/units/scsidisk.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -13,7 +13,16 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
-
+{
+    History:
+    
+    Update for AmigaOS 3.9.
+    Added const.
+    31 Jan 2003.
+    
+    [email protected]
+}
+    
 {
         SCSI exec-level device command
 }
@@ -64,6 +73,19 @@ uses exec;
  *      iddisk.device) for the second controller board, instead of
  *      implementing the 100's digit.
  *
+ *
+ *	With the advent of wide SCSI the scheme above fails miserably.
+ *	A new scheme was adopted by Phase V, who appear to be the only
+ *	source of wide SCSI for the Amiga at this time. Thus their
+ *	numbering system kludge is adopted here. When the ID or LUN is
+ *	above 7 the new numbering scheme is used.
+ *
+ *	Unit =
+ *		Board * 10 * 1000 * 1000 +
+ *		LUN	  * 10 * 1000		 +
+ *		ID	  * 10				 +
+ *		HD_WIDESCSI;
+ *
  *      There are optional restrictions on the alignment, bus
  *      accessability, and size of the data for the data phase.
  *      Be conservative to work with all manufacturer's controllers.
@@ -71,7 +93,7 @@ uses exec;
  *------------------------------------------------------------------}
 
 Const
-
+    HD_WIDESCSI         = 8;
     HD_SCSICMD          = 28;   { issue a SCSI command to the unit }
                                 { io_Data points to a SCSICmd }
                                 { io_Length is sizeof(struct SCSICmd) }

+ 106 - 94
packages/extra/amunits/units/utility.pas

@@ -25,6 +25,10 @@
     Added the define use_amiga_smartlink.
     13 Jan 2003.
 
+    Update for AmigaOS 3.9.
+    Added a few overlays.
+    06 Feb 2003.
+    
     [email protected]
 }
 
@@ -336,74 +340,60 @@ Type
     ub_Reserved  : Byte;
  END;
 
-function AddNamedObject(nameSpace,
-                        obj : pNamedObject) : Boolean;
+function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean;
 function AllocateTagItems(num : ULONG) : pTagItem;
-function AllocNamedObjectA(name : STRPTR;
-                           TagList : pTagItem) : pNamedObject;
-procedure Amiga2Date(amigatime : ULONG;
-                     resultat : pClockData);
-procedure ApplyTagChanges(TagList,
-                          ChangeList : pTagItem);
+function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject;
+procedure Amiga2Date(amigatime : ULONG;resultat : pClockData);
+procedure ApplyTagChanges(TagList : pTagItem; const ChangeList : pTagItem);
 function AttemptRemNamedObject(obj : pNamedObject) : LongInt;
-function CallHookPkt(h : pHook;
-                     obj, paramPkt : APTR) : ULONG;
-function CheckDate(date : pClockData) : ULONG;
-function CloneTagItems(tagList : pTagItem) : pTagItem;
-function Date2Amiga(date : pClockData) : ULONG;
-procedure FilterTagChanges(changelist, oldvalues : pTagItem;
-                           apply : ULONG);
-function FilterTagItems(taglist : pTagItem ;
-                        tagArray : Pointer;
-                        logic : ULONG) : ULONG;
-function FindNamedObject(nameSpace : pNamedObject;
-                         name : STRPTR;
-                         lastobject: pNamedObject) : pNamedObject;
-function FindTagItem(TagVal : Tag;
-                     TagList : pTagItem) : pTagItem;
+function CallHookPkt(h : pHook;obj, paramPkt : APTR) : ULONG;
+function CheckDate(const date : pClockData) : ULONG;
+function CloneTagItems(const tagList : pTagItem) : pTagItem;
+function Date2Amiga(const date : pClockData) : ULONG;
+procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG);
+function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG;
+function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject;
+function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem;
 procedure FreeNamedObject(Obj : pNamedObject);
 procedure FreeTagItems(TagList : pTagItem);
-function GetTagData(tagval : Tag;
-                    default : ULONG;
-                    TagList : pTagItem) : ULONG;
+function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG;
 function GetUniqueID : ULONG;
-procedure MapTags(TagList : pTagItem;
-                  maplist : pTagItem;
-                  IncludeMiss : ULONG);
+procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG);
 function NamedObjectName(Obj : pNamedObject) : STRPTR;
 function NextTagItem(Item : ppTagItem) : pTagItem;
-function PackBoolTags(InitialFlags : ULONG;
-                      TagList, boolmap : pTagItem) : ULONG;
-function PackStructureTags(packk: APTR;
-                           packTable : Pointer;
-                           TagList : pTagItem) : ULONG;
-procedure RefreshTagItemClones(cloneTagItems,
-                               OriginalTagItems : pTagItem);
+function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG;
+function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG;
+procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem);
 procedure ReleaseNamedObject(Obj : pNamedObject);
-procedure RemNamedObject(Obj : pNamedObject;
-                         Msg : pointer);
+procedure RemNamedObject(Obj : pNamedObject;Msg : pointer);
 function SDivMod32( dividend , divisor : LongInt) : LongInt;
 function SMult32(Arg1, Arg2 : LongInt) : LongInt;
 function SMult64(Arg1, Arg2 : LongInt) : LongInt;
-function Stricmp(Str1, Str2 : STRPTR) : LongInt;
-function Strnicmp(Str1, Str2 : STRPTR;
-                  len : LongInt) : LongInt;
-function TagInArray(t : Tag;
-                    TagArray : Pointer) : Boolean;
+function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt;
+function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt;
+function TagInArray(t : Tag;const TagArray : pULONG) : Boolean;
 function ToLower(c : ULONG) : Char;
 function ToUpper(c : ULONG) : Char;
 function UDivMod32( dividend , divisor : ULONG) : ULONG;
 function UMult32(Arg1, Arg2 : ULONG) : ULONG;
 function UMult64(Arg1, Arg2 : ULONG) : ULONG;
-function UnpackStructureTags(pac: APTR;
-                             packTable: Pointer;
-                             TagList : pTagItem) : ULONG;
+function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG;
+
+function AllocNamedObjectA(const name : string;const TagList : pTagItem) : pNamedObject;
+FUNCTION FindNamedObject(nameSpace : pNamedObject; CONST name : string; lastObject : pNamedObject) : pNamedObject;
+FUNCTION Stricmp(CONST string1 : string; CONST string2 : pCHAR) : LONGINT;
+FUNCTION Stricmp(CONST string1 : pCHAR; CONST string2 : string) : LONGINT;
+FUNCTION Stricmp(CONST string1 : string; CONST string2 : string) : LONGINT;
+FUNCTION Strnicmp(CONST string1 : string; CONST string2 : pCHAR; length : LONGINT) : LONGINT;
+FUNCTION Strnicmp(CONST string1 : pCHAR; CONST string2 : string; length : LONGINT) : LONGINT;
+FUNCTION Strnicmp(CONST string1 : string; CONST string2 : string; length : LONGINT) : LONGINT;
 
 
 IMPLEMENTATION
 
-function AddNamedObject(nameSpace,
-                        obj : pNamedObject) : Boolean;
+uses pastoc;
+
+function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -434,8 +424,7 @@ begin
   end;
 end;
 
-function AllocNamedObjectA(name : STRPTR;
-                           TagList : pTagItem) : pNamedObject;
+function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -448,8 +437,7 @@ begin
    end;
 end;
 
-procedure Amiga2Date(amigatime : ULONG;
-                     resultat : pClockData);
+procedure Amiga2Date(amigatime : ULONG;resultat : pClockData);
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -461,8 +449,7 @@ begin
    end;
 end;
 
-procedure ApplyTagChanges(TagList,
-                          ChangeList : pTagItem);
+procedure ApplyTagChanges(TagList : pTagItem;const ChangeList : pTagItem);
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -486,8 +473,7 @@ begin
    end;
 end;
 
-function CallHookPkt(h : pHook;
-                     obj, paramPkt : APTR) : ULONG;
+function CallHookPkt(h : pHook;obj, paramPkt : APTR) : ULONG;
 begin
    asm
        MOVEM.L a2/a6,-(A7)
@@ -501,7 +487,7 @@ begin
    end;
 end;
 
-function CheckDate(date : pClockData) : ULONG;
+function CheckDate(const date : pClockData) : ULONG;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -513,7 +499,7 @@ begin
    end;
 end;
 
-function CloneTagItems(tagList : pTagItem) : pTagItem;
+function CloneTagItems(const tagList : pTagItem) : pTagItem;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -525,7 +511,7 @@ begin
    end;
 end;
 
-function Date2Amiga(date : pClockData) : ULONG;
+function Date2Amiga(const date : pClockData) : ULONG;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -537,8 +523,7 @@ begin
    end;
 end;
 
-procedure FilterTagChanges(changelist, oldvalues : pTagItem;
-                           apply : ULONG);
+procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG);
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -551,9 +536,7 @@ begin
    end;
 end;
 
-function FilterTagItems(taglist : pTagItem ;
-                        tagArray : Pointer;
-                        logic : ULONG) : ULONG;
+function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -567,9 +550,7 @@ begin
    end;
 end;
 
-function FindNamedObject(nameSpace : pNamedObject;
-                         name : STRPTR;
-                         lastobject: pNamedObject) : pNamedObject;
+function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject;
 begin
    asm
        MOVEM.L a2/a6,-(A7)
@@ -583,8 +564,7 @@ begin
    end;
 end;
 
-function FindTagItem(TagVal : Tag;
-                     TagList : pTagItem) : pTagItem;
+function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -619,9 +599,7 @@ begin
    end;
 end;
 
-function GetTagData(tagval : Tag;
-                    default : ULONG;
-                    TagList : pTagItem) : ULONG;
+function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -646,9 +624,7 @@ begin
    end;
 end;
 
-procedure MapTags(TagList : pTagItem;
-                  maplist : pTagItem;
-                  IncludeMiss : ULONG);
+procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG);
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -685,8 +661,7 @@ begin
    end;
 end;
 
-function PackBoolTags(InitialFlags : ULONG;
-                      TagList, boolmap : pTagItem) : ULONG;
+function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -700,9 +675,7 @@ begin
    end;
 end;
 
-function PackStructureTags(packk: APTR;
-                           packTable : Pointer;
-                           TagList : pTagItem) : ULONG;
+function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG;
 begin
    asm
        MOVEM.L a2/a6,-(A7)
@@ -716,12 +689,11 @@ begin
    end;
 end;
 
-procedure RefreshTagItemClones(cloneTagItems,
-                               OriginalTagItems : pTagItem);
+procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem);
 begin
    asm
        MOVE.L  A6,-(A7)
-       MOVE.L  cloneTagItems,a0
+       MOVE.L  cloneTagItem,a0
        MOVE.L  OriginalTagItems,a1
        MOVE.L  _UtilityBase,A6
        JSR -084(A6)
@@ -740,8 +712,7 @@ begin
    end;
 end;
 
-procedure RemNamedObject(Obj : pNamedObject;
-                         Msg : pointer);
+procedure RemNamedObject(Obj : pNamedObject;Msg : pointer);
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -792,7 +763,7 @@ begin
    end;
 end;
 
-function Stricmp(Str1, Str2 : STRPTR) : LongInt;
+function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -805,8 +776,7 @@ begin
    end;
 end;
 
-function Strnicmp(Str1, Str2 : STRPTR;
-                  len : LongInt) : LongInt;
+function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -820,8 +790,7 @@ begin
    end;
 end;
 
-function TagInArray(t : Tag;
-                    TagArray : Pointer) : Boolean;
+function TagInArray(t : Tag;const TagArray : pULONG) : Boolean;
 begin
    asm
        MOVE.L  A6,-(A7)
@@ -903,9 +872,7 @@ begin
    end;
 end;
 
-function UnpackStructureTags(pac: APTR;
-                             packTable: Pointer;
-                             TagList : pTagItem) : ULONG;
+function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG;
 begin
    asm
        MOVEM.L a2/a6,-(A7)
@@ -919,12 +886,57 @@ begin
    end;
 end;
 
+
+function AllocNamedObjectA(const name : string;const TagList : pTagItem) : pNamedObject;
+begin
+       AllocNamedObjectA := AllocNamedObjectA(pas2c(name),TagList);
+end;
+
+FUNCTION FindNamedObject(nameSpace : pNamedObject; CONST name : string; lastObject : pNamedObject) : pNamedObject;
+begin
+       FindNamedObject := FindNamedObject(nameSpace,pas2c(name),lastObject);
+end;
+
+FUNCTION Stricmp(CONST string1 : string; CONST string2 : pCHAR) : LONGINT;
+begin
+       Stricmp := Stricmp(pas2c(string1),string2);
+end;
+
+FUNCTION Stricmp(CONST string1 : pCHAR; CONST string2 : string) : LONGINT;
+begin
+       Stricmp := Stricmp(string1,pas2c(string2));
+end;
+
+FUNCTION Stricmp(CONST string1 : string; CONST string2 : string) : LONGINT;
+begin
+       Stricmp := Stricmp(pas2c(string1),pas2c(string2));
+end;
+
+FUNCTION Strnicmp(CONST string1 : string; CONST string2 : pCHAR; length : LONGINT) : LONGINT;
+begin
+       Strnicmp := Strnicmp(pas2c(string1),string2,length);
+end;
+
+FUNCTION Strnicmp(CONST string1 : pCHAR; CONST string2 : string; length : LONGINT) : LONGINT;
+begin
+       Strnicmp := Strnicmp(string1,pas2c(string2),length);
+end;
+
+FUNCTION Strnicmp(CONST string1 : string; CONST string2 : string; length : LONGINT) : LONGINT;
+begin
+       Strnicmp := Strnicmp(pas2c(string1),pas2c(string2),length);
+end;
+
+
 end.
 
 
 {
   $Log$
-  Revision 1.4  2003-01-13 18:14:57  nils
+  Revision 1.5  2003-02-07 20:45:08  nils
+  * update for amigaos 3.9
+
+  Revision 1.4  2003/01/13 18:14:57  nils
   * added the define use_amiga_smartlink
 
   Revision 1.3  2002/11/20 22:09:14  nils

部分文件因文件數量過多而無法顯示