| 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 <[email protected]> |
| 7 |
* |
| 8 |
* Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL) |
| 9 |
* |
| 10 |
* This file is usually the first to define some real symbols. If you do |
| 11 |
* see some errors here then it is most likely the includepath is wrong |
| 12 |
* or some includeheader is missing / unreadable on your system. |
| 13 |
* (a) we include local headers with a "zzip/" prefix just to be sure |
| 14 |
* to not actually get the wrong one. Consider to add `-I..` somewhere |
| 15 |
* and especially VC/IDE users (who make up their own workspace files) |
| 16 |
* should include the root source directory of this project. |
| 17 |
* (b) size_t and ssize_t are sometimes found be `configure` but they are |
| 18 |
* not in the usual places (ANSI C = stddef.h; UNIX = sys/types.h), so |
| 19 |
* be sure to look for them and add the respective header as an #include. |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef _ZZIP_TYPES_H_ |
| 23 |
#define _ZZIP_TYPES_H_ |
| 24 |
|
| 25 |
#include <zzip/conf.h> |
| 26 |
#include <fcntl.h> |
| 27 |
#include <stddef.h> /* size_t and friends */ |
| 28 |
#ifdef ZZIP_HAVE_SYS_TYPES_H |
| 29 |
#include <sys/types.h> /* bsd (mac) has size_t here */ |
| 30 |
#endif |
| 31 |
/* msvc6 has neither ssize_t (we assume "int") nor off_t (assume "long") */ |
| 32 |
|
| 33 |
typedef unsigned char zzip_byte_t; // especially zlib decoding data |
| 34 |
|
| 35 |
typedef _zzip_off64_t zzip_off64_t; |
| 36 |
typedef _zzip_off_t zzip_off_t; |
| 37 |
typedef _zzip_size_t zzip_size_t; /* Some error here? */ |
| 38 |
typedef _zzip_ssize_t zzip_ssize_t; /* See notes above! */ |
| 39 |
|
| 40 |
/* in <zzip/format.h> */ |
| 41 |
typedef struct zzip_disk64_trailer ZZIP_DISK64_TRAILER; |
| 42 |
typedef struct zzip_disk_trailer ZZIP_DISK_TRAILER; |
| 43 |
typedef struct zzip_file_trailer ZZIP_FILE_TRAILER; |
| 44 |
typedef struct zzip_root_dirent ZZIP_ROOT_DIRENT; |
| 45 |
typedef struct zzip_file_header ZZIP_FILE_HEADER; |
| 46 |
typedef struct zzip_disk_entry ZZIP_DISK_ENTRY; |
| 47 |
typedef struct zzip_extra_block ZZIP_EXTRA_BLOCK; |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
#endif |
| 52 |
|