home *** CD-ROM | disk | FTP | other *** search
- IFND LIBRARIES_XFDMASTER_I
- LIBRARIES_XFDMASTER_I SET 1
-
- **
- ** $VER: xfdmaster.i 33.3 (20.3.94)
- **
- ** Copyright © 1994 by Georg Hörmann
- ** All Rights Reserved
- **
-
- IFND EXEC_LIBRARIES_I
- include "exec/libraries.i"
- ENDC
-
- ;======================================================================
- ; Library Base
- ;======================================================================
-
- STRUCTURE xfdMasterBase,LIB_SIZE
- ULONG xfdm_SegList ; PRIVATE
- APTR xfdm_DosBase
- APTR xfdm_FirstSlave
- APTR xfdm_FirstForeman ; PRIVATE
- LABEL xfdMasterBase_SIZE
-
- XFDM_VERSION EQU 33 ;for OpenLibrary()
-
- XFDM_NAME MACRO
- dc.b "xfdmaster.library",0
- ENDM
-
- ;======================================================================
- ; Buffer Info
- ;======================================================================
-
- STRUCTURE xfdBufferInfo,0
- APTR xfdbi_SourceBuffer ; pointer to source buffer
- ULONG xfdbi_SourceBufLen ; length of source buffer
- APTR xfdbi_Slave ; PRIVATE
- APTR xfdbi_PackerName ; name of recognized packer
- UWORD xfdbi_PackerFlags ; flags for recognized packer
- LABEL xfdbi_MaxSpecialLen ; max. length of special info (eg. password)
- UWORD xfdbi_Error ; error return code
- APTR xfdbi_TargetBuffer ; pointer to target buffer
- ULONG xfdbi_TargetBufMemType ; memtype of target buffer
- ULONG xfdbi_TargetBufLen ; full length of buffer
- ULONG xfdbi_TargetBufSaveLen ; used length of buffer
- ULONG xfdbi_DecrAddress ; address to load decrunched file
- ULONG xfdbi_JmpAddress ; address to jump in file
- APTR xfdbi_Special ; special decrunch info (eg. password)
- LABEL xfdBufferInfo_SIZE
-
- ;======================================================================
- ; Segment Info
- ;======================================================================
-
- STRUCTURE xfdSegmentInfo,0
- ULONG xfdsi_SegList ; value received by LoadSeg()
- APTR xfdsi_Slave ; PRIVATE
- APTR xfdsi_PackerName ; name of recognized packer
- UWORD xfdsi_PackerFlags ; flags for recognized packer
- LABEL xfdsi_MaxSpecialLen ; max. length of special info (eg. password)
- UWORD xfdsi_Error ; error return code
- APTR xfdsi_Special ; special decrunch info (eg. password)
- LABEL xfdSegmentInfo_SIZE
-
- ;======================================================================
- ; Error Codes
- ;======================================================================
-
- XFDERR_OK EQU 0 ; no error
- XFDERR_NOMEMORY EQU 1 ; error allocating memory
- XFDERR_NOSLAVE EQU 2 ; no slave entry in info structure
- XFDERR_NOTSUPPORTED EQU 3 ; slave doesn't support called function
- XFDERR_UNKNOWN EQU 4 ; unknown file
- XFDERR_NOSOURCE EQU 5 ; no sourcebuffer/seglist specified
- XFDERR_WRONGPASSWORD EQU 6 ; wrong password for decrunching
- XFDERR_BADHUNK EQU 7 ; bad hunk structure
- XFDERR_CORRUPTEDDATA EQU 8 ; crunched data is corrupted
- NUM_XFDERRS EQU 9 ; PRIVATE
-
- ;======================================================================
- ; Values for xfd??_PackerFlags
- ;======================================================================
-
- BITDEF XFDPF,RELOC,0 ; relocatible file packer
- BITDEF XFDPF,ADDR,1 ; absolute address file packer
- BITDEF XFDPF,DATA,2 ; data file packer
-
- BITDEF XFDPF,PASSWORD,4 ; packer requires password
-
- ;======================================================================
- ; Foreman
- ;======================================================================
-
- STRUCTURE xfdForeman,0
- STRUCT xfdf_Security,4 ; moveq #-1,d0 : rts
- STRUCT xfdf_ID,4 ; set to XFDF_ID
- UWORD xfdf_Version ; set to XFDF_VERSION
- UWORD xfdf_Reserved ; not used by now, set to NULL
- ULONG xfdf_Next ; PRIVATE
- ULONG xfdf_SegList ; PRIVATE
- APTR xfdf_FirstSlave ; first slave (see below)
- LABEL xfdForeman_SIZE
-
- XFDF_ID EQU (("X"<<24)!("F"<<16)!("D"<<8)!("F"))
- XFDF_VERSION EQU 1
-
- ;======================================================================
- ; Slave
- ;======================================================================
-
- STRUCTURE xfdSlave,0
- APTR xfds_Next ; next slave (or NULL)
- UWORD xfds_Version ; set to XFDS_VERSION
- UWORD xfds_MasterVersion ; minimum XFDM_VERSION required
- APTR xfds_PackerName ; NULL-terminated name of packer
- UWORD xfds_PackerFlags ; flags for packer
- UWORD xfds_MaxSpecialLen ; max. length of special info (eg. password)
- FPTR xfds_RecogBuffer ; buffer recognition code (or NULL)
- FPTR xfds_DecrunchBuffer ; buffer decrunch code (or NULL)
- FPTR xfds_RecogSegment ; segment recognition code (or NULL)
- FPTR xfds_DecrunchSegment ; segment decrunch code (or NULL)
- LABEL xfdSlave_SIZE
-
- XFDS_VERSION EQU 1
-
-
- ENDC ; LIBRARIES_XFDMASTER_I
-