(*#-- BEGIN AutoRevision header, please do NOT edit! * * $VER: XpkSubD.def 1.0 (13.10.97) * Auth: T.B. (tonyiommi@geocities.com) * * Desc: XPKSub Defs, you need them to write your own packer libs. * xpksub.h 4.10 (05.04.97) by SDI * Reqs: AMIGA OS 2.0 * Lang: MODULA-2 * Comp: Cyclone © by M. Timmermans * *-- END AutoRevision header --*) DEFINITION MODULE XpkSubD; (*$ Implementation- *) FROM SYSTEM IMPORT ADDRESS; FROM XpkMasterD IMPORT ModePtr,StrPtr; (* --- The XpkInfo structure --- *) (* * Sublibs return this structure to xpkmaster when asked nicely * This is version 1 of XpkInfo. It's not #define'd because we don't want * it changing automatically with recompiles - you've got to actually update * your code when it changes. *) TYPE InfoPtr = POINTER TO Info; Info=RECORD infoVersion, (* Version number of this structure *) libVersion, (* The version of this sublibrary *) masterVersion, (* The required master lib version *) modesVersion :INTEGER; (* Version number of mode descriptors *) name, (* Brief name of the packer, 20 char max *) longName, (* Full name of the packer 30 char max *) description :StrPtr; (* Short packer desc., 70 char max *) id, (* ID the packer goes by (XPK format) *) flags, (* Defined below *) maxPkInChunk, (* Max input chunk size for packing *) minPkInChunk, (* Min input chunk size for packing *) defPkInChunk :LONGINT; (* Default packing chunk size *) packMsg, (* Packing message, present tense *) unpackMsg, (* Unpacking message, present tense *) packedMsg, (* Packing message, past tense *) unpackedMsg :StrPtr; (* Unpacking message, past tense *) defMode, (* Default mode number *) pad :INTEGER; (* for future use *) modeDesc :ModePtr; (* List of individual descriptors *) reserved :ARRAY[0..5] OF LONGINT; (* Future expansion - set to zero *) END; (* --- defines for Flags: see xpk.h, XPKIF_xxxxx --- *) (* The XpkSubParams structure *) SubParamsPtr = POINTER TO SubParams; SubParams=RECORD inBuf :ADDRESS; (* The input data *) inLen :LONGINT; (* The number of bytes to pack *) outBuf :ADDRESS; (* The output buffer *) outBufLen, (* The length of the output buf *) outLen, (* Number of bytes written *) flags, (* Flags for master/sub comm. *) number, (* The number of this chunk *) mode :LONGINT; (* The packing mode to use *) password :StrPtr; (* The password to use *) libVersion, (* SublibVersion used to pack *) pad :INTEGER; (* Reserved; don't use *) arg :ARRAY[0..2] OF LONGINT; (* Reserved; don't use *) sub :ARRAY[0..3] OF LONGINT; (* Sublib private data *) END; (* * xsp_LibVersion is the version number of the sublibrary used to pack * this chunk. It can be used to create backwards compatible sublibraries * with a totaly different fileformat. *) CONST sfStepDown = 1; (* May reduce pack eff. to save mem *) sfPrevChunk = 2; (* Previous chunk available on unpack *) END XpkSubD.