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 / lzh.h < prev    next >
Text File  |  1995-09-18  |  1KB  |  68 lines

  1. #define FILEHDRSIZE    22
  2. #define TOTALSIZE    64
  3. #define L_HSIZE        0
  4. #define L_HCRC        1
  5. #define L_METHOD    2
  6. #define L_PSIZE        7
  7. #define L_UPSIZE    11
  8. #define L_LASTMOD    15
  9. #define L_ATTRIBUTE    19
  10.  
  11. /* Level 0 and level 1 headers */
  12. #define L_NLENGTH    21
  13. #define L_NAME        22
  14. /* Offset after name */
  15. #define L_CRC        0
  16. #define L_ETYPE        2
  17. #define L_EXTENDSZ    3
  18. #define L_EXTEND    4
  19.  
  20. /* Level 2 header */
  21. #define L_2CRC        21
  22. #define L_2ETYPE    23
  23. #define L_2EXTENDSZ    24
  24. #define L_2EXTEND    25
  25.  
  26. /* Extension definition, EXTEND defines the size of the extension. */
  27. #define L_KIND        0    /* After EXTEND */
  28. #define L_ENAME        2    /* Extension name, EXTEND-3 bytes long */
  29. /* Offset after name */
  30. #define L_EEXTENDSZ    0
  31. #define L_EEXTEND    1
  32.  
  33. typedef struct fileHdr { /* 58 bytes */
  34.     unsigned char    hsize;
  35.     unsigned char    hcrc;
  36.     char        method[5];
  37.     unsigned long    psize;
  38.     unsigned long    upsize;
  39.     unsigned long    lastmod;
  40.     unsigned short    attribute;
  41.     unsigned char    nlength;
  42.     char        name[32];
  43.     unsigned short    crc;
  44.     unsigned char    etype;
  45.     unsigned char    extendsize;
  46.     char        *extend;
  47.     char        *data;
  48. };
  49.  
  50. /* Currently known methods: */
  51. #define    lh0    0
  52. #define    lh1    1
  53. #define lh2    2
  54. #define lh3    3
  55. #define lh4    4
  56. #define    lh5    5
  57. #define lz4    6
  58. #define    lz5    7
  59. #define    lzs    8
  60.  
  61. extern char *lzh_pointer;
  62. extern char *lzh_data;
  63. extern char *lzh_finfo;
  64. extern int lzh_fsize;
  65. extern int lzh_kind;
  66. extern char *lzh_file;
  67.  
  68.