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