home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / util / arc / lino / src / lin.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-13  |  2.8 KB  |  119 lines

  1.  
  2. /* lin.h (see xpk.h/xpksub.h) */
  3.  
  4.  
  5. /* ERROR MESSAGES */
  6.  
  7. #define XPKERR_OK        0
  8. #define XPKERR_IOERRIN       -3
  9. #define XPKERR_CHECKSUM    -5
  10. #define XPKERR_NOMEM       -7
  11. #define XPKERR_NEEDPASSWD  -13
  12. #define XPKERR_CORRUPTPKD  -14
  13. #define XPKERR_MISSINGLIB  -15
  14. #define XPKERR_EXPANSION   -17
  15. #define XPKERR_ABORTED       -19
  16. #define XPKERR_PACKED       -22
  17. #define XPKERR_NOTPACKED   -23
  18. #define XPKERR_NOINFO       -28
  19.  
  20.  
  21.  
  22.  
  23. /* Defines for Flags */
  24. #define XPKIF_PK_CHUNK      0x00000001
  25. #define XPKIF_PREREADHDR  0x00000800
  26. #define XPKIF_NEEDPASSWD  0x00004000
  27.  
  28.  
  29. typedef struct XpkMode {
  30.     struct XpkMode *Next;     /* Next descriptor        */
  31.     ULONG    Upto;         /* Mode (0-100)                */
  32.     ULONG    Flags;         /*                */
  33.     ULONG    PackMemory;     /* Memory used by sub-library    */
  34.     ULONG    UnpackMemory;     /*         - || -        */
  35.     ULONG    PackSpeed;     /* KB/sec on AMIGA 3000    */
  36.     ULONG    UnpackSpeed;     /*         - || -        */
  37.     UWORD    Ratio;         /* Ratio in 0.1%        */
  38.     UWORD    ChunkSize;     /* Chunk size in KB        */
  39.     BYTE    Description[10]; /* Short description        */
  40. } XMINFO;
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. /* XpkSub */
  48.  
  49.  
  50. typedef struct XpkInfo {
  51.     UWORD    XpkInfoVersion;
  52.     UWORD    LibVersion;
  53.     UWORD    MasterVersion;
  54.     UWORD    ModesVersion;
  55.     STRPTR    Name;
  56.     STRPTR    LongName;
  57.     STRPTR    Description;
  58.     LONG    ID;
  59.     LONG    Flags;
  60.     LONG    MaxPkInChunk;
  61.     LONG    MinPkInChunk;
  62.     LONG    DefPkInChunk;
  63.     STRPTR    PackMsg;
  64.     STRPTR    UnpackMsg;
  65.     STRPTR    PackedMsg;
  66.     STRPTR    UnpackedMsg;
  67.     UWORD    DefMode;
  68.     UWORD    Pad;
  69.     struct XpkMode *ModeDesc;
  70.     ULONG    Reserved[6];
  71. } XINFO;
  72.  
  73.  
  74. typedef struct XpkSubParams {
  75.     APTR    InBuf;       /* The input data           */
  76.     LONG    InLen;       /* The number of bytes to pack  */
  77.     APTR    OutBuf;    /* The output buffer        */
  78.     LONG    OutBufLen; /* The length of the output buf */
  79.     LONG    OutLen;    /* Number of bytes written       */
  80.     LONG    Flags;       /* Flags for master/sub comm.   */
  81.     LONG    Number;    /* The number of this chunk       */
  82.     LONG    Mode;       /* The packing mode to use       */
  83.     APTR    Password;  /* The password to use       */
  84.     LONG    Arg[4];    /* Reserved; don't use          */
  85.     LONG    Sub[4];    /* Sublib private data       */
  86. } XPARAMS;
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. /* lib-functions */
  94.  
  95. XINFO *XpksPackerInfo (void);
  96. long XpksPackChunk  (XPARAMS *);
  97. void XpksPackFree   (XPARAMS *);
  98. long XpksPackReset  (XPARAMS *);
  99. long XpksUnpackChunk(XPARAMS *);
  100. void XpksUnpackFree (XPARAMS *);
  101.  
  102. #ifdef AZTEC_C
  103. #pragma amicall(XpkSubBase,0x1e,XpksPackerInfo())
  104. #pragma amicall(XpkSubBase,0x24,XpksPackChunk(a0))
  105. #pragma amicall(XpkSubBase,0x2a,XpksPackFree(a0))
  106. #pragma amicall(XpkSubBase,0x30,XpksPackReset(a0))
  107. #pragma amicall(XpkSubBase,0x36,XpksUnpackChunk(a0))
  108. #pragma amicall(XpkSubBase,0x3c,XpksUnpackFree(a0))
  109. #else
  110. #pragma libcall XpkSubBase XpksPackerInfo  1E    0
  111. #pragma libcall XpkSubBase XpksPackChunk   24 801
  112. #pragma libcall XpkSubBase XpksPackFree    2A 801
  113. #pragma libcall XpkSubBase XpksPackReset   30 801
  114. #pragma libcall XpkSubBase XpksUnpackChunk 36 801
  115. #pragma libcall XpkSubBase XpksUnpackFree  3C 801
  116. #endif
  117.  
  118.  
  119.