home *** CD-ROM | disk | FTP | other *** search
- /*
- * This library is mainly intended to demonstrate how to program a
- * sub library
- */
-
- #include <xpk/xpksub.h>
- #include <proto/exec.h>
- #include "xpkLibNONE.h"
- #include "SDI_compiler.h"
-
- STATIC const struct XpkMode NONEMode = {
- NULL, /* Next mode */
- 100, /* Handles up to */
- XPKMF_A3000SPEED, /* Flags */
- 0, /* Packing memory */
- 0, /* Unpacking memory */
- 1918, /* Packing speed */
- 2477, /* Unpacking speed */
- 0, /* Compression ratio */
- 0, /* Reserved */
- "normal", /* Description */
- };
-
- STATIC const struct XpkInfo NONEInfo = {
- 1, /* info version */
- VERSION, /* lib version */
- 0, /* master vers */
- 0, /* ModesVersion */
- "NONE" , /* short name */
- "NoPacker", /* long name */
- "A dummy library that does no compression", /* Description */
- 0x4E4F4E45, /* 4 letter ID */
- XPKIF_PK_CHUNK | /* flags */
- XPKIF_UP_CHUNK,
- 32768, /* max in chunk */
- 20, /* min in chunk */
- 32768, /* def in chunk */
- "Writing", /* pk message */
- "Reading", /* up message */
- "Wrote", /* pk past msg */
- "Read", /* up past msg */
- 50, /* DefMode */
- 0, /* Pad */
- (struct XpkMode *)&NONEMode, /* ModeDesc */
- {0,} /* reserved */
- };
-
- /* returns an info structure about our packer */
-
- ASM(const struct XpkInfo *) LIBXpksPackerInfo(void)
- {
- return &NONEInfo;
- }
-
- /* compresssion and decompression stuff */
-
- ASM(LONG) LIBXpksPackChunk(REG(a0, struct XpkSubParams *xpar),
- REG(a6, struct XpkSubBase *XpkSubBase))
- {
- return XPKERR_EXPANSION;
- }
-
- #define SysBase XpkSubBase->xsb_SysBase
-
- ASM(LONG) LIBXpksUnpackChunk(REG(a0, struct XpkSubParams *xpar),
- REG(a6, struct XpkSubBase *XpkSubBase))
- {
- CopyMem(xpar->xsp_InBuf,xpar->xsp_OutBuf,xpar->xsp_OutLen=xpar->xsp_InLen);
- return 0;
- }
-