Debian Codegraph @

libs/zziplib/zziplib-src/zzip/file.h

raw
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
5 *
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.
10 *
11 * Author:
12 * Guido Draheim <[email protected]>
13 * Tomi Ollila <[email protected]>
14 *
15 * Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
16 */
17
18 #ifndef _ZZIP_FILE_H /* zzip-file.h */
19 #define _ZZIP_FILE_H 1
20
21 #ifndef ZZIP_32K
22 #ifdef __GNUC__
23 /* include zzip/lib.h beforehand in order to suppress the following warning */
24 #warning zzip/file.h is an internal header, do not use it freely
25 #endif
26 #endif
27
28 #include <zzip/lib.h>
29 #include <zlib.h>
30
31 #ifdef ZZIP_HAVE_UNISTD_H
32 #include <unistd.h>
33 #else
34 #include <stdio.h>
35 # ifdef ZZIP_HAVE_SYS_TYPES_H
36 # include <sys/types.h>
37 # endif
38 #endif
39
40 #ifdef ZZIP_HAVE_SYS_PARAM_H
41 #include <sys/param.h> /* PATH_MAX */
42 #endif
43
44 #ifndef PATH_MAX
45 # ifdef MAX_PATH /* windows */
46 # define PATH_MAX MAX_PATH
47 # else
48 # define PATH_MAX 512
49 # endif
50 #endif
51 /*
52 * ZZIP_FILE structure... currently no need to unionize, since structure needed
53 * for inflate is superset of structure needed for unstore.
54 *
55 * Don't make this public. Instead, create methods for needed operations.
56 */
57
58 struct zzip_file
59 {
60 struct zzip_dir* dir;
61 int fd;
62 int method;
63 zzip_size_t restlen;
64 zzip_size_t crestlen;
65 zzip_size_t usize;
66 zzip_size_t csize;
67 /* added dataoffset member - data offset from start of zipfile*/
68 zzip_off_t dataoffset;
69 char* buf32k;
70 zzip_off_t offset; /* offset from the start of zipfile... */
71 z_stream d_stream;
72 zzip_plugin_io_t io;
73 };
74
75 #endif /* _ZZIP_FILE_H */
76