beta-0.89.2
[luatex.git] / source / libs / zziplib / zziplib-0.13.62 / zzip / file.h
blobfcff276bb2369409edf6150a7e8855d96b3731c5
1 /*
2 * this is an internal header file - the structure contains two off_t
3 * atleast making it LARGEFILE_SENSITIVE on linux2 and solaris systems
4 * whereas about all functions just return a ZZIP_FILE* in zzip/zzip.h
6 * and so, this structure should be handled version-specific and
7 * subject to change - it had been kept binary-compatible for quite
8 * a while now so perhaps some program sources have errnously taken
9 * advantage of this file.
11 * Author:
12 * Guido Draheim <guidod@gmx.de>
13 * Tomi Ollila <Tomi.Ollila@tfi.net>
15 * Copyright (c) 1999,2000,2001,2002 Guido Draheim
16 * All rights reserved,
17 * use under the restrictions of the
18 * Lesser GNU General Public License
19 * or alternatively the restrictions
20 * of the Mozilla Public License 1.1
23 #ifndef _ZZIP_FILE_H /* zzip-file.h */
24 #define _ZZIP_FILE_H 1
26 #ifndef ZZIP_32K
27 #ifdef __GNUC__
28 /* include zzip/lib.h beforehand in order to suppress the following warning */
29 #warning zzip/file.h is an internal header, do not use it freely
30 #endif
31 #endif
33 #include <zzip/lib.h>
34 #include <zlib.h>
36 #ifdef ZZIP_HAVE_UNISTD_H
37 #include <unistd.h>
38 #else
39 #include <stdio.h>
40 # ifdef ZZIP_HAVE_SYS_TYPES_H
41 # include <sys/types.h>
42 # endif
43 #endif
45 #ifdef ZZIP_HAVE_SYS_PARAM_H
46 #include <sys/param.h> /* PATH_MAX */
47 #endif
49 #ifndef PATH_MAX
50 # ifdef MAX_PATH /* windows */
51 # define PATH_MAX MAX_PATH
52 # else
53 # define PATH_MAX 512
54 # endif
55 #endif
57 * ZZIP_FILE structure... currently no need to unionize, since structure needed
58 * for inflate is superset of structure needed for unstore.
60 * Don't make this public. Instead, create methods for needed operations.
63 struct zzip_file
65 struct zzip_dir* dir;
66 int fd;
67 int method;
68 zzip_size_t restlen;
69 zzip_size_t crestlen;
70 zzip_size_t usize;
71 zzip_size_t csize;
72 /* added dataoffset member - data offset from start of zipfile*/
73 zzip_off_t dataoffset;
74 char* buf32k;
75 zzip_off_t offset; /* offset from the start of zipfile... */
76 z_stream d_stream;
77 zzip_plugin_io_t io;
80 #endif /* _ZZIP_FILE_H */