summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h')
-rw-r--r--Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h75
1 files changed, 38 insertions, 37 deletions
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h
index fba4000aa76..0881479c167 100644
--- a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h
+++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h
@@ -1,12 +1,12 @@
/*
- * Author:
+ * Author:
* Guido Draheim <guidod@gmx.de>
*
* Copyright (c) 2000,2001,2002,2003 Guido Draheim
* All rights reserved
* use under the restrictions of the
* Lesser GNU General Public License
- * or alternatively the restrictions
+ * or alternatively the restrictions
* of the Mozilla Public License 1.1
*
* The information was taken from appnote-981119-iz.zip
@@ -16,31 +16,32 @@
*/
#ifndef _ZZIP_FORMAT_H /* zzipformat.h */
#define _ZZIP_FORMAT_H
-
+
#include <zzip/types.h>
+#include <zzip/__hints.h>
/* we have ICO C 9X types defined */
-/*
- * Overall zipfile format
- * [local file header + file data stream + checksum descriptor] ...
+/*
+ * Overall zipfile format
+ * [local file header + file data stream + checksum descriptor] ...
* ... [disk central directory] [disk trailer record]
*/
-
+
# ifdef _MSC_VER
# pragma pack(push, 1)
# endif
-struct zzip_version
-{
- zzip_byte_t version[1];
- zzip_byte_t ostype[1];
-} __zzip_attribute__((packed));
+struct zzip_version
+{
+ zzip_byte_t version[1];
+ zzip_byte_t ostype[1];
+} ZZIP_GNUC_PACKED;
-struct zzip_dostime
-{
- zzip_byte_t time[2];
- zzip_byte_t date[2];
-} __zzip_attribute__((packed));
+struct zzip_dostime
+{
+ zzip_byte_t time[2];
+ zzip_byte_t date[2];
+} ZZIP_GNUC_PACKED;
#ifdef ZZIP_NEED_PACKED
/* if your compiler does interesting things about struct packing... */
@@ -74,10 +75,10 @@ struct zzip_file_header
zzip_byte_t z_extras[2]; /* extra field length */
/* followed by filename (of variable size) */
/* followed by extra field (of variable size) */
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
#define zzip_file_header_headerlength (4+2+2+2+4+4+4+4+2+2)
-/* B. data descriptor
+/* B. data descriptor
* the data descriptor exists only if bit 3 of z_flags is set. It is byte aligned
* and immediately follows the last byte of compressed data. It is only used if
* the output media of the compressor was not seekable, eg. standard output.
@@ -90,14 +91,14 @@ struct zzip_file_trailer
zzip_byte_t z_crc32[4]; /* crc-32 */
zzip_byte_t z_csize[4]; /* compressed size */
zzip_byte_t z_usize[4]; /* uncompressed size */
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
#define zzip_file_trailer_headerlength (4+4+4+4)
/* C. central directory structure:
- [file header] . . . end of central dir record
+ [file header] . . . end of central dir record
*/
-/* directory file header
+/* directory file header
* - a single entry including filename, extras and comment may not exceed 64k.
*/
@@ -124,7 +125,7 @@ struct zzip_disk_entry
/* followed by filename (of variable size) */
/* followed by extra field (of variable size) */
/* followed by file comment (of variable size) */
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
#define zzip_disk_entry_headerlength (4+2+2+2+2+4+4+4+4+2+2+2+2+2+4+4)
@@ -133,22 +134,22 @@ struct zzip_root_dirent
# define ZZIP_ROOT_DIRENT_MAGIC 0x02014b50
# define ZZIP_ROOT_DIRENT_CHECKMAGIC(__p) ZZIP_DISK_ENTRY_CHECKMAGIC(__p)
zzip_byte_t z_magic[4];
- zzip_version_t z_encoder;
+ zzip_version_t z_encoder;
zzip_version_t z_extract;
- zzip_byte_t z_flags[2];
- zzip_byte_t z_compr[2];
+ zzip_byte_t z_flags[2];
+ zzip_byte_t z_compr[2];
zzip_dostime_t z_dostime;
- zzip_byte_t z_crc32[4];
- zzip_byte_t z_csize[4];
+ zzip_byte_t z_crc32[4];
+ zzip_byte_t z_csize[4];
zzip_byte_t z_usize[4];
- zzip_byte_t z_namlen[2];
- zzip_byte_t z_extras[2];
- zzip_byte_t z_comment[2];
- zzip_byte_t z_diskstart[2];
- zzip_byte_t z_filetype[2];
+ zzip_byte_t z_namlen[2];
+ zzip_byte_t z_extras[2];
+ zzip_byte_t z_comment[2];
+ zzip_byte_t z_diskstart[2];
+ zzip_byte_t z_filetype[2];
zzip_byte_t z_filemode[4];
zzip_byte_t z_off[4];
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
/* end of central dir record */
@@ -166,7 +167,7 @@ struct zzip_disk_trailer
* the starting disk number */
zzip_byte_t z_comment[2]; /* zipfile comment length */
/* followed by zipfile comment (of variable size) */
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
#define zzip_disk_trailer_headerlength (4+2+2+2+2+4+4+2)
/* extra field should be type + size + data + type + size + data ... */
@@ -174,7 +175,7 @@ struct zzip_extra_block
{ /* fetch.h macros do not need this struct */
zzip_byte_t z_datatype[2]; /* as input type - a mere <char*> is okay */
zzip_byte_t z_datasize[2]; /* being returned by xx_to_extras usually */
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
#define zzip_extra_block_headerlength (2+2)
/* Zip64 end of central dir record */
@@ -194,7 +195,7 @@ struct zzip_disk64_trailer
zzip_byte_t z_rootseek[8]; /* offset of start of central directory with respect to *
* the starting disk number */
/* followed by zip64 extensible data sector (of variable size) */
-} __zzip_attribute__((packed));
+} ZZIP_GNUC_PACKED;
#define zzip_disk64_trailer_headerlength (4+8+2+2+4+4+8+8+8+8)
/* z_flags */