#include <stdio.h>#include <stdlib.h>#include <string.h>#include "zlib.h"#include "unzip.h"#include <errno.h>#include "crypt.h"Include dependency graph for unzip.c:

Go to the source code of this file.
Data Structures | |
| struct | unz_file_info_internal_s |
| struct | file_in_zip_read_info_s |
| struct | unz_s |
Defines | |
| #define | local static |
| #define | CASESENSITIVITYDEFAULT_NO |
| #define | UNZ_BUFSIZE (16384) |
| #define | UNZ_MAXFILENAMEINZIP (256) |
| #define | ALLOC(size) (malloc(size)) |
| #define | TRYFREE(p) {if (p) free(p);} |
| #define | SIZECENTRALDIRITEM (0x2e) |
| #define | SIZEZIPLOCALHEADER (0x1e) |
| #define | CASESENSITIVITYDEFAULTVALUE 2 |
| #define | STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal |
| #define | BUFREADCOMMENT (0x400) |
Typedefs | |
| typedef unz_file_info_internal_s | unz_file_info_internal |
Functions | |
| local int unzlocal_getByte | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, int *pi)) |
| local int | unzlocal_getByte (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, int *pi) const |
| local int unzlocal_getShort | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX)) |
| local int | unzlocal_getShort (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) const |
| local int | unzlocal_getLong (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) const |
| local int | strcmpcasenosensitive_internal (char *fileName1, const char *fileName2) const |
| int ZEXPORT | unzStringFileNameCompare (char *fileName1, const char *fileName2, int iCaseSensitivity) const |
| local uLong unzlocal_SearchCentralDir | OF ((const zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream)) |
| local uLong | unzlocal_SearchCentralDir (zlib_filefunc_def *pzlib_filefunc_def, voidpf filestream) const |
| unzFile ZEXPORT | unzOpen2 (char *path, zlib_filefunc_def *pzlib_filefunc_def) const |
| unzFile ZEXPORT | unzOpen (char *path) const |
| int ZEXPORT | unzClose (unzFile file) |
| int ZEXPORT | unzGetGlobalInfo (unzFile file, unz_global_info *pglobal_info) |
| local void | unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz *ptm) |
| local int unzlocal_GetCurrentFileInfoInternal | OF ((unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)) |
| local int | unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize) |
| int ZEXPORT | unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize) |
| int ZEXPORT | unzGoToFirstFile (unzFile file) |
| int ZEXPORT | unzGoToNextFile (unzFile file) |
| int ZEXPORT | unzLocateFile (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) |
| local int | unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s, uInt *piSizeVar, uLong *poffset_local_extrafield, uInt *psize_local_extrafield) |
| int ZEXPORT | unzOpenCurrentFile3 (unzFile file, int *method, int *level, int raw, const char *password) |
| int ZEXPORT | unzOpenCurrentFile (unzFile file) |
| int ZEXPORT | unzOpenCurrentFilePassword (unzFile file, const char *password) |
| int ZEXPORT | unzOpenCurrentFile2 (unzFile file, int *method, int *level, int raw) |
| int ZEXPORT | unzReadCurrentFile (unzFile file, voidp buf, unsigned len) |
| z_off_t ZEXPORT | unztell (unzFile file) |
| int ZEXPORT | unzeof (unzFile file) |
| int ZEXPORT | unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) |
| int ZEXPORT | unzCloseCurrentFile (unzFile file) |
| int ZEXPORT | unzGetGlobalComment (unzFile file, char *szComment, uLong uSizeBuf) |
| uLong ZEXPORT | unzGetOffset (unzFile file) |
| int ZEXPORT | unzSetOffset (unzFile file, uLong pos) |
Variables | |
| const char | unz_copyright [] |
|
|
Definition at line 78 of file unzip.c. Referenced by allocate_new_datablock(), gz_open(), gzerror(), gzseek(), unzlocal_SearchCentralDir(), unzOpen2(), unzOpenCurrentFile3(), ziplocal_SearchCentralDir(), zipOpen2(), and zipOpenNewFileInZip3(). |
|
|
Definition at line 320 of file unzip.c. Referenced by unzlocal_SearchCentralDir(), and ziplocal_SearchCentralDir(). |
|
|
|
|
|
Definition at line 287 of file unzip.c. Referenced by unzStringFileNameCompare(). |
|
|
|
|
|
Definition at line 84 of file unzip.c. Referenced by unzGoToNextFile(). |
|
|
Definition at line 85 of file unzip.c. Referenced by unzlocal_CheckCurrentFileCoherencyHeader(), and unzOpenCurrentFile3(). |
|
|
Definition at line 293 of file unzip.c. Referenced by unzStringFileNameCompare(). |
|
|
Definition at line 81 of file unzip.c. Referenced by destroy(), free_datablock(), gzerror(), unzClose(), unzCloseCurrentFile(), unzOpenCurrentFile3(), zipClose(), and zipOpen2(). |
|
|
Definition at line 70 of file unzip.c. Referenced by unzOpenCurrentFile3(), and unzReadCurrentFile(). |
|
|
Definition at line 74 of file unzip.c. Referenced by unzLocateFile(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Definition at line 511 of file unzip.c. References NULL, s, TRYFREE, UNZ_OK, UNZ_PARAMERROR, unzCloseCurrentFile(), and ZCLOSE. |
|
|
Definition at line 1489 of file unzip.c. References file_in_zip_read_info_s::crc32, file_in_zip_read_info_s::crc32_wait, err, inflateEnd(), NULL, file_in_zip_read_info_s::raw, file_in_zip_read_info_s::read_buffer, file_in_zip_read_info_s::rest_read_uncompressed, s, file_in_zip_read_info_s::stream, file_in_zip_read_info_s::stream_initialised, TRYFREE, UNZ_CRCERROR, UNZ_OK, and UNZ_PARAMERROR. Referenced by do_extract_currentfile(), unzClose(), and unzOpenCurrentFile3(). |
|
|
Definition at line 1405 of file unzip.c. References NULL, file_in_zip_read_info_s::rest_read_uncompressed, s, and UNZ_PARAMERROR. |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 744 of file unzip.c. References NULL, and unzlocal_GetCurrentFileInfoInternal(). Referenced by do_extract_currentfile(), do_list(), and unzLocateFile(). |
|
||||||||||||
|
Definition at line 903 of file unzip.c. References NULL, unz_file_pos_s::num_of_file, unz_file_pos_s::pos_in_zip_directory, s, UNZ_END_OF_LIST_OF_FILE, UNZ_OK, and UNZ_PARAMERROR. |
|
||||||||||||||||
|
Definition at line 1532 of file unzip.c. References err, NULL, s, UNZ_ERRNO, UNZ_OK, UNZ_PARAMERROR, ZLIB_FILEFUNC_SEEK_SET, ZREAD, and ZSEEK. |
|
||||||||||||
|
Definition at line 532 of file unzip.c. References NULL, s, UNZ_OK, and UNZ_PARAMERROR. Referenced by do_extract(), and do_list(). |
|
||||||||||||||||
|
|
Definition at line 1564 of file unzip.c. References NULL, s, and UNZ_PARAMERROR. |
|
||||||||||||
|
Definition at line 921 of file unzip.c. References err, NULL, unz_file_pos_s::num_of_file, unz_file_pos_s::pos_in_zip_directory, s, UNZ_OK, UNZ_PARAMERROR, and unzlocal_GetCurrentFileInfoInternal(). |
|
|
Definition at line 768 of file unzip.c. References err, NULL, s, UNZ_OK, UNZ_PARAMERROR, and unzlocal_GetCurrentFileInfoInternal(). Referenced by unzLocateFile(), and unzOpen2(). |
|
|
Definition at line 790 of file unzip.c. References err, NULL, s, SIZECENTRALDIRITEM, UNZ_END_OF_LIST_OF_FILE, UNZ_OK, UNZ_PARAMERROR, and unzlocal_GetCurrentFileInfoInternal(). Referenced by do_extract(), do_list(), and unzLocateFile(). |
|
||||||||||||||||||||
|
Definition at line 957 of file unzip.c. References err, SIZEZIPLOCALHEADER, UNZ_BADZIPFILE, UNZ_ERRNO, UNZ_OK, unzlocal_getLong(), unzlocal_getShort(), Z_DEFLATED, ZLIB_FILEFUNC_SEEK_SET, and ZSEEK. Referenced by unzOpenCurrentFile3(). |
|
||||||||||||
|
Definition at line 548 of file unzip.c. References tm_unz_s::tm_hour, tm_unz_s::tm_mday, tm_unz_s::tm_min, tm_unz_s::tm_mon, tm_unz_s::tm_sec, and tm_unz_s::tm_year. Referenced by unzlocal_GetCurrentFileInfoInternal(). |
|
||||||||||||||||
|
Definition at line 171 of file unzip.c. References c, err, int(), UNZ_EOF, UNZ_ERRNO, UNZ_OK, ZERROR, and ZREAD. Referenced by unzlocal_getLong(), and unzlocal_getShort(). |
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||
|
Definition at line 229 of file unzip.c. References err, i, UNZ_OK, unzlocal_getByte(), and x. Referenced by unzlocal_CheckCurrentFileCoherencyHeader(), unzlocal_GetCurrentFileInfoInternal(), and unzOpen2(). |
|
||||||||||||||||
|
Definition at line 201 of file unzip.c. References err, i, UNZ_OK, unzlocal_getByte(), and x. Referenced by unzlocal_CheckCurrentFileCoherencyHeader(), unzlocal_GetCurrentFileInfoInternal(), and unzOpen2(). |
|
||||||||||||
|
Definition at line 331 of file unzip.c. References ALLOC, BUFREADCOMMENT, i, NULL, ZLIB_FILEFUNC_SEEK_END, ZLIB_FILEFUNC_SEEK_SET, ZREAD, ZSEEK, and ZTELL. Referenced by unzOpen2(). |
|
||||||||||||||||
|
Definition at line 824 of file unzip.c. References err, NULL, s, strlen(), UNZ_END_OF_LIST_OF_FILE, UNZ_MAXFILENAMEINZIP, UNZ_OK, UNZ_PARAMERROR, unzGetCurrentFileInfo(), unzGoToFirstFile(), unzGoToNextFile(), and unzStringFileNameCompare(). Referenced by do_extract_onefile(). |
|
|
Definition at line 500 of file unzip.c. References NULL, and unzOpen2(). |
|
||||||||||||
|
Definition at line 397 of file unzip.c. References ALLOC, err, fill_fopen_filefunc(), NULL, s, UNZ_BADZIPFILE, unz_copyright, UNZ_ERRNO, UNZ_OK, unzGoToFirstFile(), unzlocal_getLong(), unzlocal_getShort(), unzlocal_SearchCentralDir(), us, ZCLOSE, ZLIB_FILEFUNC_MODE_EXISTING, ZLIB_FILEFUNC_MODE_READ, ZLIB_FILEFUNC_SEEK_SET, and ZSEEK. Referenced by unzOpen(). |
|
|
Definition at line 1192 of file unzip.c. References NULL, and unzOpenCurrentFile3(). |
|
||||||||||||||||||||
|
Definition at line 1205 of file unzip.c. References NULL, and unzOpenCurrentFile3(). |
|
||||||||||||||||||||||||
|
||||||||||||
|
Definition at line 1198 of file unzip.c. References NULL, and unzOpenCurrentFile3(). Referenced by do_extract_currentfile(). |
|
||||||||||||||||
|
||||||||||||
|
Definition at line 1580 of file unzip.c. References err, NULL, s, UNZ_OK, UNZ_PARAMERROR, and unzlocal_GetCurrentFileInfoInternal(). |
|
||||||||||||||||
|
Definition at line 305 of file unzip.c. References CASESENSITIVITYDEFAULTVALUE, strcmp, and STRCMPCASENOSENTIVEFUNCTION. Referenced by unzLocateFile(). |
|
|
Definition at line 1385 of file unzip.c. References NULL, s, file_in_zip_read_info_s::stream, z_stream_s::total_out, UNZ_PARAMERROR, and z_off_t. |
|
|
Initial value:
" unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"
Definition at line 90 of file unzip.c. Referenced by unzOpen2(). |
1.4.6