]> granicus.if.org Git - zziplib/blob - zzip/types.h
patches from Mike Frysinger
[zziplib] / zzip / types.h
1 /*
2  * unlike in <zzip/conf.h> we are allowed to make up typedefs here,
3  * while over there only #defines are allowed
4  *
5  * Author: 
6  *      Guido Draheim <guidod@gmx.de>
7  *
8  *      Copyright (c) 2003,2004 Guido Draheim
9  *          All rights reserved, 
10  *          usage allowed under the restrictions of the
11  *          Lesser GNU General Public License 
12  *          or alternatively the restrictions 
13  *          of the Mozilla Public License 1.1
14  *
15  * This file is usually the first to define some real symbols. If you do
16  * see some errors here then it is most likely the includepath is wrong
17  * or some includeheader is missing / unreadable on your system.
18  * (a) we include local headers with a "zzip/" prefix just to be sure
19  *     to not actually get the wrong one. Consider to add `-I..` somewhere
20  *     and especially VC/IDE users (who make up their own workspace files)
21  *     should include the root source directory of this project.
22  * (b) size_t and ssize_t are sometimes found be `configure` but they are
23  *     not in the usual places (ANSI C = stddef.h; UNIX = sys/types.h), so
24  *     be sure to look for them and add the respective header as an #include.
25  */
26
27 #ifndef _ZZIP_TYPES_H_
28 #define _ZZIP_TYPES_H_
29
30 #include <zzip/conf.h>
31 #include <fcntl.h>
32 #include <stddef.h> /* size_t and friends */
33 #ifdef ZZIP_HAVE_SYS_TYPES_H
34 #include <sys/types.h> /* bsd (mac) has size_t here */
35 #endif
36 /* msvc6 has neither ssize_t (we assume "int") nor off_t (assume "long") */
37
38 typedef unsigned char zzip_byte_t; // especially zlib decoding data
39
40 typedef       _zzip_off64_t     zzip_off64_t;
41 typedef       _zzip_off_t       zzip_off_t;
42 typedef       _zzip_size_t      zzip_size_t;      /* Some error here? */
43 typedef       _zzip_ssize_t     zzip_ssize_t;     /* See notes above! */
44
45 /* in <zzip/format.h> */
46 typedef struct zzip_disk64_trailer ZZIP_DISK64_TRAILER;
47 typedef struct zzip_disk_trailer ZZIP_DISK_TRAILER;
48 typedef struct zzip_file_trailer ZZIP_FILE_TRAILER;
49 typedef struct zzip_root_dirent  ZZIP_ROOT_DIRENT;
50 typedef struct zzip_file_header ZZIP_FILE_HEADER;
51 typedef struct zzip_disk_entry  ZZIP_DISK_ENTRY;
52 typedef struct zzip_extra_block ZZIP_EXTRA_BLOCK;
53
54
55
56 #endif
57