home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip540.zip / beos / beos.h < prev    next >
C/C++ Source or Header  |  1998-09-20  |  2KB  |  39 lines

  1. /* beos.h -- A few handy things for the BeOS port.     */
  2. /* (c) 1997 Chris Herborth (chrish@qnx.com)            */
  3. /* This is covered under the usual Info-ZIP copyright. */
  4.  
  5. /* "#define EF_BE_FL_UNCMPR 0x01" has been moved into unzpriv.h */
  6. #define EB_BE_FL_BADBITS    0xfe    /* bits currently undefined */
  7.  
  8. #define BEOS_ASSIGN_FILETYPE 1      /* call update_mime_info() */
  9.  
  10. /*
  11. DR9 'Be' extra-field layout:
  12.  
  13. 'Be'      - signature
  14. ef_size   - size of data in this EF (little-endian unsigned short)
  15. full_size - uncompressed data size (little-endian unsigned long)
  16. flag      - flags (byte)
  17.             flags & EB_BE_FL_UNCMPR     = the data is not compressed
  18.             flags & EB_BE_FL_BADBITS    = the data is corrupted or we
  19.                                           can't handle it properly
  20. data      - compressed or uncompressed file attribute data
  21.  
  22. If flag & EB_BE_FL_UNCMPR, the data is not compressed; this optimisation is
  23. necessary to prevent wasted space for files with small attributes (which
  24. appears to be quite common on the Advanced Access DR9 release).  In this
  25. case, there should be ( ef_size - EB_L_BE_LEN ) bytes of data, and full_size
  26. should equal ( ef_size - EB_L_BE_LEN ).
  27.  
  28. If the data is compressed, there will be ( ef_size - EB_L_BE_LEN ) bytes of
  29. compressed data, and full_size bytes of uncompressed data.
  30.  
  31. If a file has absolutely no attributes, there will not be a 'Be' extra field.
  32.  
  33. The uncompressed data is arranged like this:
  34.  
  35. attr_name\0 - C string
  36. struct attr_info (fields in big-endian format)
  37. attr_data (length in attr_info.size)
  38. */
  39.