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/* atheos.h -- A few handy things for the AtheOS port 10 * 11 * (c) 1997 Chris Herborth (chrish@qnx.com) - BeOS port 12 * (c) 2004 Ruslan Nickolaev (nruslan@hotbox.ru) - AtheOS port 13 * 14 * This is covered under the usual Info-ZIP copyright 15 */ 16 17#ifndef _ATHEOS_H_ 18#define _ATHEOS_H_ 19 20#define EB_BE_FL_BADBITS 0xfe /* bits currently undefined */ 21 22/* 23AtheOS 'At' extra-field layout: 24(same structure as the BeOS 'Be' e.f. layout, only signature and internal 25conventions of the file attribute data are different...) 26 27'At' - signature 28ef_size - size of data in this EF (little-endian unsigned short) 29full_size - uncompressed data size (little-endian unsigned long) 30flag - flags (byte) 31 flags & EB_BE_FL_UNCMPR = the data is not compressed 32 flags & EB_BE_FL_BADBITS = the data is corrupted or we 33 can't handle it properly 34data - compressed or uncompressed file attribute data 35 36If flag & EB_BE_FL_UNCMPR, the data is not compressed; this optimisation is 37necessary to prevent wasted space for files with small attributes. In this 38case, there should be (ef_size - EB_BEOS_HLEN) bytes of data, and full_size 39should equal (ef_size - EB_BEOS_HLEN). 40 41If the data is compressed, there will be (ef_size - EB_BEOS_HLEN) bytes of 42compressed data, and full_size bytes of uncompressed data. 43 44If a file has absolutely no attributes, there will not be a 'At' extra field. 45 46The uncompressed data is arranged like this: 47 48attr_name\0 - C string 49struct attr_info (fields in little-endian format) 50attr_data (length in attr_info.ai_size) 51*/ 52 53#endif /* _ATHEOS_H_ */ 54