Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

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