home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / macutils.lzh / MACUTILS / MACUNPACK / zma.h < prev    next >
C/C++ Source or Header  |  1995-09-18  |  2KB  |  54 lines

  1. #include "zmahdr.h"
  2.  
  3. #define    Z_HDRSIZE    78
  4.  
  5. #define    Z_WHAT        0    /* What kind of data? */
  6. #define    Z_HLEN        1    /* Header length */
  7. #define    Z_BFLAGS    2    /* Boolean flags */
  8. #define    Z_NEXT        4    /* Pointer to next entry */
  9. #define    Z_CRLEN        8    /* Length compressed resource */
  10. #define    Z_CDLEN        12    /* Length compressed data */
  11. #define    Z_URLEN        16    /* Length uncompressed resource */
  12. #define    Z_UDLEN        20    /* Length uncompressed data */
  13. #define    Z_TYPE        24    /* File type */
  14. #define    Z_AUTH        28    /* File creator */
  15. #define Z_CONTS        28    /* Directory contents pointer; overlayed */
  16. #define    Z_MDATE        32    /* Date */
  17. #define    Z_COMMENT    36    /* Comment offset, currently unused */
  18. #define    Z_FLAGS        40    /* Finder flags */
  19. #define    Z_DCRC        42    /* Data crc */
  20. #define    Z_RCRC        44    /* Resource crc */
  21. #define    Z_FNAME        46    /* File name length and name */
  22.  
  23. typedef struct fileHdr {        /* 78 bytes */
  24.     char        deleted;    /* Not in original, split off from: */
  25.     char        what;        /* What kind?  Negative if deleted */
  26.     unsigned char    hlen ;        /* Header length */
  27.     unsigned short    boolFlags;    /* Boolean flags */
  28.     unsigned long    next;        /* Next entry */
  29.     unsigned long    compRLength;    /* The compressed lengths. */
  30.     unsigned long    compDLength;    /* For dirs, the second is # entries */
  31.     unsigned long    rsrcLength;    /* The uncompressed lengths. */
  32.     unsigned long    dataLength;
  33.     unsigned long    fType;        /* file type */
  34.     unsigned long    fCreator;    /* er... */
  35.     unsigned long    modDate;    /* !restored-compat w/backup prgms */
  36.     unsigned long    comment;    /* Comment offset */
  37.     unsigned short    FndrFlags;    /* copy of Finder flags.  For our
  38.                         purposes, we can clear:
  39.                         busy,onDesk */
  40.     unsigned short    dataCRC;    /* Data fork crc */
  41.     unsigned short    rsrcCRC;    /* Resource fork crc */
  42.     unsigned char    fName[32];    /* a STR32 */
  43.     /* The following are overlayed in the original structure */
  44.     unsigned long    conts;        /* Pointer to directory contents */
  45. };
  46.  
  47. /* zma types (see what) */
  48. #define    z_noth    0    /* ??? */
  49. #define z_file    1    /* file is compressed */
  50. #define z_plain    2    /* file is uncompressed */
  51. #define    z_dir    3    /* directory */
  52. #define    z_plug    4    /* for plug in, not supported */
  53.  
  54.