#ifndef LIBRARIES_CRM_H #define LIBRARIES_CRM_H /* ** $Filename: libraries/crm.h $ ** $Release: 4.0 $ ** $Date: 26-Sep-93 $ ** ** CrM.library include and definition file ** ** (c) 1992-3 Thomas Schwarz ** All Rights Reserved */ /*------------------------------------------------------------------------*/ #ifndef EXEC_TYPES_H #include #endif #ifndef UTILITY_TAGITEM_H #include #endif #define CRMNAME "CrM.library" #define CRMVERSION 4 /************** * Data Header **************/ struct DataHeader { ULONG dh_ID; WORD dh_MinSecDist; ULONG dh_OriginalLen; ULONG dh_CrunchedLen; }; /*************** * CurrentStats ***************/ struct cmCurrentStats { ULONG cmcu_ToGo; ULONG cmcu_Len; }; /******************** ** CrunchStruct(ure) ********************/ struct cmCrunchStruct { APTR cmcr_Src; /* Source Start */ ULONG cmcr_SrcLen; /* Source Len */ APTR cmcr_Dest; /* Destination Start */ ULONG cmcr_DestLen; /* Destination Len (maximum) */ struct DataHeader *cmcr_DataHdr; /* DataHeader */ struct Hook *cmcr_DisplayHook; /* Hook to display ToGo/Gain Counters */ /*** Registers hold these values when the Hook is called: */ /*** a0:struct Hook* a2:struct cmCrunchStruct* a1:struct cmCurrentStats* */ /*** you have to return TRUE/FALSE in d0 to continue/abort crunching! */ UWORD cmcr_DisplayStep; /* time between 2 calls to the Hook */ /******** readonly: ********/ UWORD cmcr_Offset; /* desired Offset */ UWORD cmcr_HuffSize; /* HuffLen in KBytes */ UWORD cmcr_Algo; /* desired Packalgorithm */ ULONG cmcr_MaxOffset; /* biggest possible Offset (Buffer allocated) */ ULONG cmcr_RealOffset; /* currently used Offset */ ULONG cmcr_MinSecDist; /* MinSecDist for packed Data */ ULONG cmcr_CrunchedLen; /* Length of crunched Data at cmcr_Dest */ /******** private: ********/ ULONG cmcr_HuffTabs; ULONG cmcr_HuffBuf; ULONG cmcr_HuffLen; ULONG cmcr_SpeedLen; ULONG cmcr_SpeedTab; ULONG cmcr_MegaSpeedTab; UBYTE cmcr_QuitFlag; /* readonly: reason for failure */ UBYTE cmcr_OverlayFlag; UBYTE cmcr_LEDFlashFlag; UBYTE cmcr_Pad; /* CrunchStruct continues here, but LEAVE YOUR HANDS OFF!!! */ }; /************************************* ** Result Codes of cmCheckCrunched() ** and Symbols for the CMCS_Algo Tag *************************************/ #define cm_Normal 1 #define cm_LZH 2 #define cmB_Sample 4 #define cmF_Sample (1<