Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
unzip.h File Reference
#include "zlib.h"
#include "ioapi.h"
+ Include dependency graph for unzip.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tm_unz_s
 
struct  unz_global_info64_s
 
struct  unz_global_info_s
 
struct  unz_file_info64_s
 
struct  unz_file_info_s
 
struct  unz_file_pos_s
 
struct  unz64_file_pos_s
 

Macros

#define Z_BZIP2ED   12
 
#define UNZ_OK   (0)
 
#define UNZ_END_OF_LIST_OF_FILE   (-100)
 
#define UNZ_ERRNO   (Z_ERRNO)
 
#define UNZ_EOF   (0)
 
#define UNZ_PARAMERROR   (-102)
 
#define UNZ_BADZIPFILE   (-103)
 
#define UNZ_INTERNALERROR   (-104)
 
#define UNZ_CRCERROR   (-105)
 

Typedefs

typedef voidp unzFile
 
typedef struct tm_unz_s tm_unz
 
typedef struct unz_global_info64_s unz_global_info64
 
typedef struct unz_global_info_s unz_global_info
 
typedef struct unz_file_info64_s unz_file_info64
 
typedef struct unz_file_info_s unz_file_info
 
typedef struct unz_file_pos_s unz_file_pos
 
typedef struct unz64_file_pos_s unz64_file_pos
 

Functions

int ZEXPORT unzStringFileNameCompare OF ((const char *fileName1, const char *fileName2, int iCaseSensitivity))
 
unzFile ZEXPORT unzOpen OF ((const char *path))
 
unzFile ZEXPORT unzOpen64 OF ((const void *path))
 
unzFile ZEXPORT unzOpen2 OF ((const char *path, zlib_filefunc_def *pzlib_filefunc_def))
 
unzFile ZEXPORT unzOpen2_64 OF ((const void *path, zlib_filefunc64_def *pzlib_filefunc_def))
 
int ZEXPORT unzClose OF ((unzFile file))
 
int ZEXPORT unzGetGlobalInfo OF ((unzFile file, unz_global_info *pglobal_info))
 
int ZEXPORT unzGetGlobalInfo64 OF ((unzFile file, unz_global_info64 *pglobal_info))
 
int ZEXPORT unzGetGlobalComment OF ((unzFile file, char *szComment, uLong uSizeBuf))
 
int ZEXPORT unzLocateFile OF ((unzFile file, const char *szFileName, int iCaseSensitivity))
 
int ZEXPORT unzGetFilePos (unzFile file, unz_file_pos *file_pos)
 
int ZEXPORT unzGoToFilePos (unzFile file, unz_file_pos *file_pos)
 
int ZEXPORT unzGetFilePos64 (unzFile file, unz64_file_pos *file_pos)
 
int ZEXPORT unzGoToFilePos64 (unzFile file, const unz64_file_pos *file_pos)
 
int ZEXPORT unzGetCurrentFileInfo64 OF ((unzFile file, unz_file_info64 *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize))
 
int ZEXPORT unzGetCurrentFileInfo OF ((unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize))
 
int ZEXPORT unzOpenCurrentFilePassword OF ((unzFile file, const char *password))
 
int ZEXPORT unzOpenCurrentFile2 OF ((unzFile file, int *method, int *level, int raw))
 
int ZEXPORT unzOpenCurrentFile3 OF ((unzFile file, int *method, int *level, int raw, const char *password))
 
int ZEXPORT unzReadCurrentFile OF ((unzFile file, voidp buf, unsigned len))
 
ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file)
 
uLong ZEXPORT unzGetOffset (unzFile file)
 
int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos)
 
int ZEXPORT unzSetOffset (unzFile file, uLong pos)
 

Macro Definition Documentation

◆ UNZ_BADZIPFILE

#define UNZ_BADZIPFILE   (-103)

◆ UNZ_CRCERROR

#define UNZ_CRCERROR   (-105)

Definition at line 81 of file unzip.h.

Referenced by unzCloseCurrentFile().

◆ UNZ_END_OF_LIST_OF_FILE

#define UNZ_END_OF_LIST_OF_FILE   (-100)

Definition at line 75 of file unzip.h.

Referenced by unzGetFilePos64(), unzGoToNextFile(), unzLocateFile(), and unzReadCurrentFile().

◆ UNZ_EOF

#define UNZ_EOF   (0)

Definition at line 77 of file unzip.h.

Referenced by unz64local_getByte(), and unzReadCurrentFile().

◆ UNZ_ERRNO

#define UNZ_ERRNO   (Z_ERRNO)

◆ UNZ_INTERNALERROR

#define UNZ_INTERNALERROR   (-104)

Definition at line 80 of file unzip.h.

Referenced by unzOpenCurrentFile3().

◆ UNZ_OK

#define UNZ_OK   (0)

◆ UNZ_PARAMERROR

#define UNZ_PARAMERROR   (-102)

◆ Z_BZIP2ED

#define Z_BZIP2ED   12

Typedef Documentation

◆ tm_unz

typedef struct tm_unz_s tm_unz

◆ unz64_file_pos

◆ unz_file_info

◆ unz_file_info64

◆ unz_file_pos

typedef struct unz_file_pos_s unz_file_pos

◆ unz_global_info

◆ unz_global_info64

◆ unzFile

typedef voidp unzFile

Definition at line 70 of file unzip.h.

Function Documentation

◆ OF() [1/16]

int ZEXPORT unzStringFileNameCompare OF ( (const char *fileName1, const char *fileName2, int iCaseSensitivity) )
extern

◆ OF() [2/16]

unzFile ZEXPORT unzOpen OF ( (const char *path) )
extern

◆ OF() [3/16]

unzFile ZEXPORT unzOpen2 OF ( (const char *path, zlib_filefunc_def *pzlib_filefunc_def) )
extern

◆ OF() [4/16]

unzFile ZEXPORT unzOpen64 OF ( (const void *path) )
extern

◆ OF() [5/16]

unzFile ZEXPORT unzOpen2_64 OF ( (const void *path, zlib_filefunc64_def *pzlib_filefunc_def) )
extern

◆ OF() [6/16]

int ZEXPORT unzeof OF ( (unzFile file) )
extern

Addition for GDAL : START

Addition for GDAL : END

◆ OF() [7/16]

int ZEXPORT unzGetGlobalComment OF ( (unzFile file, char *szComment, uLong uSizeBuf) )
extern

◆ OF() [8/16]

int ZEXPORT unzOpenCurrentFilePassword OF ( (unzFile file, const char *password) )
extern

◆ OF() [9/16]

int ZEXPORT unzLocateFile OF ( (unzFile file, const char *szFileName, int iCaseSensitivity) )
extern

◆ OF() [10/16]

int ZEXPORT unzOpenCurrentFile2 OF ( (unzFile file, int *method, int *level, int raw) )
extern

◆ OF() [11/16]

int ZEXPORT unzOpenCurrentFile3 OF ( (unzFile file, int *method, int *level, int raw, const char *password) )
extern

◆ OF() [12/16]

int ZEXPORT unzGetCurrentFileInfo OF ( (unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize) )
extern

◆ OF() [13/16]

int ZEXPORT unzGetCurrentFileInfo64 OF ( (unzFile file, unz_file_info64 *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize) )
extern

◆ OF() [14/16]

int ZEXPORT unzGetGlobalInfo OF ( (unzFile file, unz_global_info *pglobal_info) )
extern

◆ OF() [15/16]

int ZEXPORT unzGetGlobalInfo64 OF ( (unzFile file, unz_global_info64 *pglobal_info) )
extern

◆ OF() [16/16]

int ZEXPORT unzGetLocalExtrafield OF ( (unzFile file, voidp buf, unsigned len) )
extern

◆ unzGetFilePos()

int ZEXPORT unzGetFilePos ( unzFile file,
unz_file_pos * file_pos )
extern

Definition at line 1330 of file unzip.c.

1333{
1334 unz64_file_pos file_pos64;
1335 int err = unzGetFilePos64(file,&file_pos64);
1336 if (err==UNZ_OK)
1337 {
1338 file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory;
1339 file_pos->num_of_file = (uLong)file_pos64.num_of_file;
1340 }
1341 return err;
1342}
typedef uLong(ZCALLBACK *read_file_func) OF((voidpf opaque
ZPOS64_T num_of_file
Definition unzip.h:275
ZPOS64_T pos_in_zip_directory
Definition unzip.h:274
uLong num_of_file
Definition unzip.h:261
uLong pos_in_zip_directory
Definition unzip.h:260
int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
Definition unzip.c:1314
#define UNZ_OK
Definition unzip.h:74

References unz_file_pos_s::num_of_file, unz64_file_pos_s::num_of_file, unz_file_pos_s::pos_in_zip_directory, unz64_file_pos_s::pos_in_zip_directory, uLong(), UNZ_OK, and unzGetFilePos64().

+ Here is the call graph for this function:

◆ unzGetFilePos64()

int ZEXPORT unzGetFilePos64 ( unzFile file,
unz64_file_pos * file_pos )
extern

Definition at line 1314 of file unzip.c.

1315{
1316 unz64_s* s;
1317
1318 if (file==NULL || file_pos==NULL)
1319 return UNZ_PARAMERROR;
1320 s=(unz64_s*)file;
1321 if (!s->current_file_ok)
1323
1325 file_pos->num_of_file = s->num_file;
1326
1327 return UNZ_OK;
1328}
ZPOS64_T pos_in_central_dir
Definition unzip.c:176
ZPOS64_T current_file_ok
Definition unzip.c:177
ZPOS64_T num_file
Definition unzip.c:175
#define UNZ_END_OF_LIST_OF_FILE
Definition unzip.h:75
#define UNZ_PARAMERROR
Definition unzip.h:78

References unz64_s::current_file_ok, unz64_s::num_file, unz64_file_pos_s::num_of_file, unz64_s::pos_in_central_dir, unz64_file_pos_s::pos_in_zip_directory, UNZ_END_OF_LIST_OF_FILE, UNZ_OK, and UNZ_PARAMERROR.

Referenced by unzGetFilePos().

+ Here is the caller graph for this function:

◆ unzGetOffset()

uLong ZEXPORT unzGetOffset ( unzFile file)
extern

Definition at line 2106 of file unzip.c.

2107{
2108 ZPOS64_T offset64;
2109
2110 if (file==NULL)
2111 return 0; //UNZ_PARAMERROR;
2112 offset64 = unzGetOffset64(file);
2113 return (uLong)offset64;
2114}
unsigned long long int ZPOS64_T
Definition ioapi.h:98
ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
Definition unzip.c:2091

References uLong(), and unzGetOffset64().

+ Here is the call graph for this function:

◆ unzGetOffset64()

ZPOS64_T ZEXPORT unzGetOffset64 ( unzFile file)
extern

Definition at line 2091 of file unzip.c.

2092{
2093 unz64_s* s;
2094
2095 if (file==NULL)
2096 return 0; //UNZ_PARAMERROR;
2097 s=(unz64_s*)file;
2098 if (!s->current_file_ok)
2099 return 0;
2100 if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
2101 if (s->num_file==s->gi.number_entry)
2102 return 0;
2103 return s->pos_in_central_dir;
2104}
unz_global_info64 gi
Definition unzip.c:173
ZPOS64_T number_entry
Definition unzip.h:98

References unz64_s::current_file_ok, unz64_s::gi, unz64_s::num_file, unz_global_info64_s::number_entry, and unz64_s::pos_in_central_dir.

Referenced by unzGetOffset().

+ Here is the caller graph for this function:

◆ unzGoToFilePos()

int ZEXPORT unzGoToFilePos ( unzFile file,
unz_file_pos * file_pos )
extern

Definition at line 1366 of file unzip.c.

1369{
1370 unz64_file_pos file_pos64;
1371 if (file_pos == NULL)
1372 return UNZ_PARAMERROR;
1373
1374 file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory;
1375 file_pos64.num_of_file = file_pos->num_of_file;
1376 return unzGoToFilePos64(file,&file_pos64);
1377}
int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos)
Definition unzip.c:1344

References unz_file_pos_s::num_of_file, unz64_file_pos_s::num_of_file, unz_file_pos_s::pos_in_zip_directory, unz64_file_pos_s::pos_in_zip_directory, UNZ_PARAMERROR, and unzGoToFilePos64().

+ Here is the call graph for this function:

◆ unzGoToFilePos64()

int ZEXPORT unzGoToFilePos64 ( unzFile file,
const unz64_file_pos * file_pos )
extern

Definition at line 1344 of file unzip.c.

1345{
1346 unz64_s* s;
1347 int err;
1348
1349 if (file==NULL || file_pos==NULL)
1350 return UNZ_PARAMERROR;
1351 s=(unz64_s*)file;
1352
1353 /* jump to the right spot */
1355 s->num_file = file_pos->num_of_file;
1356
1357 /* set the current file */
1360 NULL,0,NULL,0,NULL,0);
1361 /* return results */
1362 s->current_file_ok = (err == UNZ_OK);
1363 return err;
1364}
unz_file_info64 cur_file_info
Definition unzip.c:184
unz_file_info64_internal cur_file_info_internal
Definition unzip.c:185
local int unz64local_GetCurrentFileInfoInternal(unzFile file, unz_file_info64 *pfile_info, unz_file_info64_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)
Definition unzip.c:882

References unz64_s::cur_file_info, unz64_s::cur_file_info_internal, unz64_s::current_file_ok, unz64_s::num_file, unz64_file_pos_s::num_of_file, unz64_s::pos_in_central_dir, unz64_file_pos_s::pos_in_zip_directory, unz64local_GetCurrentFileInfoInternal(), UNZ_OK, and UNZ_PARAMERROR.

Referenced by unzGoToFilePos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unzSetOffset()

int ZEXPORT unzSetOffset ( unzFile file,
uLong pos )
extern

Definition at line 2134 of file unzip.c.

2135{
2136 return unzSetOffset64(file,pos);
2137}
int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
Definition unzip.c:2116

References unzSetOffset64().

+ Here is the call graph for this function:

◆ unzSetOffset64()

int ZEXPORT unzSetOffset64 ( unzFile file,
ZPOS64_T pos )
extern

Definition at line 2116 of file unzip.c.

2117{
2118 unz64_s* s;
2119 int err;
2120
2121 if (file==NULL)
2122 return UNZ_PARAMERROR;
2123 s=(unz64_s*)file;
2124
2125 s->pos_in_central_dir = pos;
2126 s->num_file = s->gi.number_entry; /* hack */
2129 NULL,0,NULL,0,NULL,0);
2130 s->current_file_ok = (err == UNZ_OK);
2131 return err;
2132}

References unz64_s::cur_file_info, unz64_s::cur_file_info_internal, unz64_s::current_file_ok, unz64_s::gi, unz64_s::num_file, unz_global_info64_s::number_entry, unz64_s::pos_in_central_dir, unz64local_GetCurrentFileInfoInternal(), UNZ_OK, and UNZ_PARAMERROR.

Referenced by unzSetOffset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: