Debian Codegraph @

compat/unzip.h

raw symbols SCIP
1 /* unzip.h -- Backwards compatible unzip interface
2 part of the minizip-ng project
3
4 Copyright (C) Nathan Moinvaziri
5 https://github.com/zlib-ng/minizip-ng
6 Copyright (C) 1998-2010 Gilles Vollant
7 https://www.winimage.com/zLibDll/minizip.html
8
9 This program is distributed under the terms of the same license as zlib.
10 See the accompanying LICENSE file for the full text of the license.
11 */
12
13 #ifndef _unz64_H
14 #define _unz64_Hcxx . . $ `compat/unzip.h:14:9`!
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 #include <stdint.h>
21
22 #if !defined(_ZLIB_H) && !defined(ZLIB_H) && !defined(ZLIB_H_)
23 # if __has_include(<zlib-ng.h>)
24 # include <zlib-ng.h>
25 # elif __has_include(<zlib.h>)
26 # include <zlib.h>
27 # endif
28 #endif
29
30 #ifndef _ZLIBIOAPI_H
31 # include "ioapi.h"cxx . . $ `<file>/compat/ioapi.h`/
32 #endif
33
34 /***************************************************************************/
35
36 #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
37 /* like the STRICT of WIN32, we define a pointer that cannot be converted
38 from (void*) without cast */
39 typedef struct TagunzFile__ {
40 int unused;
41 } unzFile__;
42 typedef unzFile__ *unzFile;
43 #else
44 typedef void *unzFilecxx . . $ unzFile#;
45 #endif
46
47 /***************************************************************************/
48
49 #define UNZ_OKcxx . . $ `compat/unzip.h:49:9`! (0)
50 #define UNZ_END_OF_LIST_OF_FILEcxx . . $ `compat/unzip.h:50:9`! (-100)
51 #define UNZ_ERRNOcxx . . $ `compat/unzip.h:51:9`! (-1) /* Z_ERRNO */
52 #define UNZ_EOFcxx . . $ `compat/unzip.h:52:9`! (0)
53 #define UNZ_PARAMERRORcxx . . $ `compat/unzip.h:53:9`! (-102)
54 #define UNZ_BADZIPFILEcxx . . $ `compat/unzip.h:54:9`! (-103)
55 #define UNZ_INTERNALERRORcxx . . $ `compat/unzip.h:55:9`! (-104)
56 #define UNZ_CRCERRORcxx . . $ `compat/unzip.h:56:9`! (-105)
57 #define UNZ_BADPASSWORDcxx . . $ `compat/unzip.h:57:9`! (-106) /* minizip-ng */
58
59 /***************************************************************************/
60 /* tm_unz contain date/time info */
61 typedef struct tm_unz_scxx . . $ tm_unz_s# {
62 int tm_seccxx . . $ tm_unz_s#tm_sec.; /* seconds after the minute - [0,59] */
63 int tm_mincxx . . $ tm_unz_s#tm_min.; /* minutes after the hour - [0,59] */
64 int tm_hourcxx . . $ tm_unz_s#tm_hour.; /* hours since midnight - [0,23] */
65 int tm_mdaycxx . . $ tm_unz_s#tm_mday.; /* day of the month - [1,31] */
66 int tm_moncxx . . $ tm_unz_s#tm_mon.; /* months since January - [0,11] */
67 int tm_yearcxx . . $ tm_unz_s#tm_year.; /* years - [1980..2044] */
68 } tm_unzcxx . . $ tm_unz#;
69
70 /***************************************************************************/
71
72 #if !defined(MZ_COMPAT_VERSION) || MZ_COMPAT_VERSION <= 110
73 # define mz_dos_datecxx . . $ `compat/unzip.h:73:11`! dosDate
74 #else
75 # define mz_dos_date dos_date
76 #endif
77
78 /* Global data about the zip from end of central dir */
79 typedef struct unz_global_info64_scxx . . $ unz_global_info64_s# {
80 uint64_tcxx . . $ uint64_t# number_entrycxx . . $ unz_global_info64_s#number_entry.; /* total number of entries in the central dir on this disk */
81 unsigned long size_commentcxx . . $ unz_global_info64_s#size_comment.; /* size of the global comment of the zipfile */
82 /* minizip-ng fields */
83 uint32_tcxx . . $ uint32_t# number_disk_with_CDcxx . . $ unz_global_info64_s#number_disk_with_CD.; /* number the the disk with central dir, used for spanning ZIP */
84 } unz_global_info64cxx . . $ unz_global_info64#;
85
86 typedef struct unz_global_info_scxx . . $ unz_global_info_s# {
87 unsigned long number_entrycxx . . $ unz_global_info_s#number_entry.; /* total number of entries in the central dir on this disk */
88 unsigned long size_commentcxx . . $ unz_global_info_s#size_comment.; /* size of the global comment of the zipfile */
89 /* minizip-ng fields */
90 uint32_tcxx . . $ uint32_t# number_disk_with_CDcxx . . $ unz_global_info_s#number_disk_with_CD.; /* number the the disk with central dir, used for spanning ZIP */
91 } unz_global_infocxx . . $ unz_global_info#;
92
93 /* Information about a file in the zip */
94 typedef struct unz_file_info64_scxx . . $ unz_file_info64_s# {
95 unsigned long versioncxx . . $ unz_file_info64_s#version.; /* version made by 2 bytes */
96 unsigned long version_neededcxx . . $ unz_file_info64_s#version_needed.; /* version needed to extract 2 bytes */
97 unsigned long flagcxx . . $ unz_file_info64_s#flag.; /* general purpose bit flag 2 bytes */
98 unsigned long compression_methodcxx . . $ unz_file_info64_s#compression_method.; /* compression method 2 bytes */
99 unsigned long mz_dos_datecxx . . $ `compat/unzip.h:73:11`!; /* last mod file date in Dos fmt 4 bytes */
100 unsigned long crccxx . . $ unz_file_info64_s#crc.; /* crc-32 4 bytes */
101 ZPOS64_Tcxx . . $ ZPOS64_T# compressed_sizecxx . . $ unz_file_info64_s#compressed_size.; /* compressed size 8 bytes */
102 ZPOS64_Tcxx . . $ ZPOS64_T# uncompressed_sizecxx . . $ unz_file_info64_s#uncompressed_size.; /* uncompressed size 8 bytes */
103 unsigned long size_filenamecxx . . $ unz_file_info64_s#size_filename.; /* filename length 2 bytes */
104 unsigned long size_file_extracxx . . $ unz_file_info64_s#size_file_extra.; /* extra field length 2 bytes */
105 unsigned long size_file_commentcxx . . $ unz_file_info64_s#size_file_comment.; /* file comment length 2 bytes */
106
107 unsigned long disk_num_startcxx . . $ unz_file_info64_s#disk_num_start.; /* disk number start 4 bytes */
108 unsigned long internal_facxx . . $ unz_file_info64_s#internal_fa.; /* internal file attributes 2 bytes */
109 unsigned long external_facxx . . $ unz_file_info64_s#external_fa.; /* external file attributes 4 bytes */
110
111 tm_unzcxx . . $ tm_unz# tmu_datecxx . . $ unz_file_info64_s#tmu_date.;
112
113 /* minizip-ng fields */
114 ZPOS64_Tcxx . . $ ZPOS64_T# disk_offsetcxx . . $ unz_file_info64_s#disk_offset.;
115 uint16_tcxx . . $ uint16_t# size_file_extra_internalcxx . . $ unz_file_info64_s#size_file_extra_internal.;
116 } unz_file_info64cxx . . $ unz_file_info64#;
117
118 typedef struct unz_file_info_scxx . . $ unz_file_info_s# {
119 unsigned long versioncxx . . $ unz_file_info_s#version.; /* version made by 2 bytes */
120 unsigned long version_neededcxx . . $ unz_file_info_s#version_needed.; /* version needed to extract 2 bytes */
121 unsigned long flagcxx . . $ unz_file_info_s#flag.; /* general purpose bit flag 2 bytes */
122 unsigned long compression_methodcxx . . $ unz_file_info_s#compression_method.; /* compression method 2 bytes */
123 unsigned long mz_dos_datecxx . . $ `compat/unzip.h:73:11`!; /* last mod file date in Dos fmt 4 bytes */
124 unsigned long crccxx . . $ unz_file_info_s#crc.; /* crc-32 4 bytes */
125 ZPOS64_Tcxx . . $ ZPOS64_T# compressed_sizecxx . . $ unz_file_info_s#compressed_size.; /* compressed size 4 bytes */
126 ZPOS64_Tcxx . . $ ZPOS64_T# uncompressed_sizecxx . . $ unz_file_info_s#uncompressed_size.; /* uncompressed size 4 bytes */
127 unsigned long size_filenamecxx . . $ unz_file_info_s#size_filename.; /* filename length 2 bytes */
128 unsigned long size_file_extracxx . . $ unz_file_info_s#size_file_extra.; /* extra field length 2 bytes */
129 unsigned long size_file_commentcxx . . $ unz_file_info_s#size_file_comment.; /* file comment length 2 bytes */
130
131 unsigned long disk_num_startcxx . . $ unz_file_info_s#disk_num_start.; /* disk number start 2 bytes */
132 unsigned long internal_facxx . . $ unz_file_info_s#internal_fa.; /* internal file attributes 2 bytes */
133 unsigned long external_facxx . . $ unz_file_info_s#external_fa.; /* external file attributes 4 bytes */
134
135 tm_unzcxx . . $ tm_unz# tmu_datecxx . . $ unz_file_info_s#tmu_date.;
136
137 /* minizip-ng fields */
138 ZPOS64_Tcxx . . $ ZPOS64_T# disk_offsetcxx . . $ unz_file_info_s#disk_offset.;
139 } unz_file_infocxx . . $ unz_file_info#;
140
141 /***************************************************************************/
142
143 #if !defined(MZ_COMPAT_VERSION) || MZ_COMPAT_VERSION < 110
144 /* Possible values:
145 0 - Uses OS default, e.g. Windows ignores case.
146 1 - Is case sensitive.
147 >= 2 - Ignore case.
148 */
149 typedef int unzFileNameCasecxx . . $ unzFileNameCase#;
150 #else
151 typedef int (*unzFileNameComparer)(unzFile file, const char *filename1, const char *filename2);
152 #endif
153 typedef int (*unzIteratorFunctioncxx . . $ unzIteratorFunction#)(unzFilecxx . . $ unzFile# file);
154 typedef int (*unzIteratorFunction2cxx . . $ unzIteratorFunction2#)(unzFilecxx . . $ unzFile# file, unz_file_info64cxx . . $ unz_file_info64# *pfile_info, char *filename, uint16_tcxx . . $ uint16_t# filename_size,
155 void *extrafield, uint16_tcxx . . $ uint16_t# extrafield_size, char *comment, uint16_tcxx . . $ uint16_t# comment_size);
156
157 /***************************************************************************/
158 /* Reading a zip file */
159
160 /* Compatibility layer with the original minizip library (unzip.h). */
161 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! unzFilecxx . . $ unzFile# unzOpencxx . . $ unzOpen(42228c1987407501).(const char *path);
162 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! unzFilecxx . . $ unzFile# unzOpen64cxx . . $ unzOpen64(3343d82129b43479).(const void *path);
163 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! unzFilecxx . . $ unzFile# unzOpen2cxx . . $ unzOpen2(9ed7ea5cbd602b00).(const char *path, zlib_filefunc_defcxx . . $ zlib_filefunc_def# *pzlib_filefunc_def);
164 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! unzFilecxx . . $ unzFile# unzOpen2_64cxx . . $ unzOpen2_64(259836ebea66a013).(const void *path, zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# *pzlib_filefunc_def);
165 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzClosecxx . . $ unzClose(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
166
167 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetGlobalInfocxx . . $ unzGetGlobalInfo(b3cbc121def653f6).(unzFilecxx . . $ unzFile# file, unz_global_infocxx . . $ unz_global_info# *pglobal_info32);
168 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetGlobalInfo64cxx . . $ unzGetGlobalInfo64(5b73c380ee4011c3).(unzFilecxx . . $ unzFile# file, unz_global_info64cxx . . $ unz_global_info64# *pglobal_info);
169 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetGlobalCommentcxx . . $ unzGetGlobalComment(ca250401d2a07b03).(unzFilecxx . . $ unzFile# file, char *comment, unsigned long comment_size);
170 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzOpenCurrentFilecxx . . $ unzOpenCurrentFile(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
171 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzOpenCurrentFilePasswordcxx . . $ unzOpenCurrentFilePassword(f53b6be6549e6d95).(unzFilecxx . . $ unzFile# file, const char *password);
172 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzOpenCurrentFile2cxx . . $ unzOpenCurrentFile2(89ca22876955cdfe).(unzFilecxx . . $ unzFile# file, int *method, int *level, int raw);
173 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzOpenCurrentFile3cxx . . $ unzOpenCurrentFile3(6db33bb1c5970ef1).(unzFilecxx . . $ unzFile# file, int *method, int *level, int raw, const char *password);
174 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzReadCurrentFilecxx . . $ unzReadCurrentFile(42dc92c764946a43).(unzFilecxx . . $ unzFile# file, void *buf, uint32_tcxx . . $ uint32_t# len);
175 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzCloseCurrentFilecxx . . $ unzCloseCurrentFile(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
176 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetCurrentFileInfocxx . . $ unzGetCurrentFileInfo(b19de73933e57c3d).(unzFilecxx . . $ unzFile# file, unz_file_infocxx . . $ unz_file_info# *pfile_info, char *filename, unsigned long filename_size,
177 void *extrafield, unsigned long extrafield_size, char *comment,
178 unsigned long comment_size);
179 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetCurrentFileInfo64cxx . . $ unzGetCurrentFileInfo64(26688c4c454be285).(unzFilecxx . . $ unzFile# file, unz_file_info64cxx . . $ unz_file_info64# *pfile_info, char *filename,
180 unsigned long filename_size, void *extrafield, unsigned long extrafield_size,
181 char *comment, unsigned long comment_size);
182 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGoToFirstFilecxx . . $ unzGoToFirstFile(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
183 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGoToNextFilecxx . . $ unzGoToNextFile(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
184 #if !defined(MZ_COMPAT_VERSION) || MZ_COMPAT_VERSION < 110
185 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzLocateFilecxx . . $ unzLocateFile(7083a8984c0735e8).(unzFilecxx . . $ unzFile# file, const char *filename, unzFileNameCasecxx . . $ unzFileNameCase# filename_case);
186 #else
187 ZEXPORT int unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func);
188 #endif
189 /* unzStringFileNameCompare is too new */
190 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetLocalExtrafieldcxx . . $ unzGetLocalExtrafield(42dc92c764946a43).(unzFilecxx . . $ unzFile# file, void *buf, unsigned int len);
191
192 /* Compatibility layer with older minizip-ng (mz_unzip.h). */
193 unzFilecxx . . $ unzFile# unzOpen_MZcxx . . $ unzOpen_MZ(9f162e79bfc6c74).(void *stream);
194 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzClose_MZcxx . . $ unzClose_MZ(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
195 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! void *unzGetHandle_MZcxx . . $ unzGetHandle_MZ(9f162e79bfc6c74).(unzFilecxx . . $ unzFile# file);
196 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! void *unzGetStream_MZcxx . . $ unzGetStream_MZ(9f162e79bfc6c74).(unzFilecxx . . $ unzFile# file);
197
198 /***************************************************************************/
199 /* Raw access to zip file */
200
201 typedef struct unz_file_pos_scxx . . $ unz_file_pos_s# {
202 uint32_tcxx . . $ uint32_t# pos_in_zip_directorycxx . . $ unz_file_pos_s#pos_in_zip_directory.; /* offset in zip file directory */
203 uint32_tcxx . . $ uint32_t# num_of_filecxx . . $ unz_file_pos_s#num_of_file.; /* # of file */
204 } unz_file_poscxx . . $ unz_file_pos#;
205
206 typedef struct unz64_file_pos_scxx . . $ unz64_file_pos_s# {
207 int64_tcxx . . $ int64_t# pos_in_zip_directorycxx . . $ unz64_file_pos_s#pos_in_zip_directory.; /* offset in zip file directory */
208 uint64_tcxx . . $ uint64_t# num_of_filecxx . . $ unz64_file_pos_s#num_of_file.; /* # of file */
209 } unz64_file_poscxx . . $ unz64_file_pos#;
210
211 /* Compatibility layer with the original minizip library (unzip.h). */
212 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetFilePoscxx . . $ unzGetFilePos(7e2c4081d2cf8a08).(unzFilecxx . . $ unzFile# file, unz_file_poscxx . . $ unz_file_pos# *file_pos);
213 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGoToFilePoscxx . . $ unzGoToFilePos(7e2c4081d2cf8a08).(unzFilecxx . . $ unzFile# file, unz_file_poscxx . . $ unz_file_pos# *file_pos);
214 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGetFilePos64cxx . . $ unzGetFilePos64(5d59764c884c9bea).(unzFilecxx . . $ unzFile# file, unz64_file_poscxx . . $ unz64_file_pos# *file_pos);
215 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzGoToFilePos64cxx . . $ unzGoToFilePos64(38c571ddddfa45d3).(unzFilecxx . . $ unzFile# file, const unz64_file_poscxx . . $ unz64_file_pos# *file_pos);
216 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int64_tcxx . . $ int64_t# unzGetOffset64cxx . . $ unzGetOffset64(72c1818a5177f981).(unzFilecxx . . $ unzFile# file);
217 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! unsigned long unzGetOffsetcxx . . $ unzGetOffset(751e5d26f8574c32).(unzFilecxx . . $ unzFile# file);
218 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzSetOffset64cxx . . $ unzSetOffset64(6b20ed9d0f5b4b14).(unzFilecxx . . $ unzFile# file, int64_tcxx . . $ int64_t# pos);
219 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzSetOffsetcxx . . $ unzSetOffset(c0a5f96701d3f89).(unzFilecxx . . $ unzFile# file, unsigned long pos);
220 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int32_tcxx . . $ int32_t# unztellcxx . . $ unztell(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
221 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! uint64_tcxx . . $ uint64_t# unztell64cxx . . $ unztell64(751e5d26f8574c32).(unzFilecxx . . $ unzFile# file);
222 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzeofcxx . . $ unzeof(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
223
224 /* Compatibility layer with older minizip-ng (mz_unzip.h). */
225 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int32_tcxx . . $ int32_t# unzTellcxx . . $ unzTell(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
226 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! uint64_tcxx . . $ uint64_t# unzTell64cxx . . $ unzTell64(751e5d26f8574c32).(unzFilecxx . . $ unzFile# file);
227 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzSeekcxx . . $ unzSeek(4d015e8c0eefb98e).(unzFilecxx . . $ unzFile# file, int32_tcxx . . $ int32_t# offset, int origin);
228 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzSeek64cxx . . $ unzSeek64(8bc0ff128761c75d).(unzFilecxx . . $ unzFile# file, int64_tcxx . . $ int64_t# offset, int origin);
229 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int unzEndOfFilecxx . . $ unzEndOfFile(dedf1e9b1c614a07).(unzFilecxx . . $ unzFile# file);
230 ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! void *unzGetStreamcxx . . $ unzGetStream(9f162e79bfc6c74).(unzFilecxx . . $ unzFile# file);
231
232 /***************************************************************************/
233
234 #ifdef __cplusplus
235 }
236 #endif
237
238 #endif /* _unz64_H */