beos.h 1.9 KB

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