Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <utime.h>
#include "unzip.h"
Go to the source code of this file.
Macros | |
#define | __USE_FILE_OFFSET64 |
#define | __USE_LARGEFILE64 |
#define | _LARGEFILE64_SOURCE |
#define | _FILE_OFFSET_BIT 64 |
#define | FOPEN_FUNC(filename, mode) fopen64(filename, mode) |
#define | FTELLO_FUNC(stream) ftello64(stream) |
#define | FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) |
#define | CASESENSITIVITY (0) |
#define | WRITEBUFFERSIZE (8192) |
#define | MAXFILENAME (256) |
Functions | |
static void | change_file_date (char *filename, uLong dosdate, tm_unz tmu_date) const |
static int | mymkdir (char *dirname) const |
static int | makedir (char *newdir) const |
static void | do_banner () |
static void | do_help () |
static void | Display64BitsSize (ZPOS64_T n, int size_char) |
static int | do_list (unzFile uf) |
static int | do_extract_currentfile (unzFile uf, const int *popt_extract_without_path, int *popt_overwrite, const char *password) |
static int | do_extract (unzFile uf, int opt_extract_without_path, int opt_overwrite, const char *password) |
static int | do_extract_onefile (unzFile uf, const char *filename, int opt_extract_without_path, int opt_overwrite, const char *password) |
int | main (int argc, argv) |
Definition at line 84 of file miniunz.c.
References HANDLE, NULL, 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, tm_unz_s::tm_year, and utime.
Referenced by do_extract_currentfile().
Definition at line 208 of file miniunz.c.
Referenced by do_list().
|
static |
|
static |
Definition at line 476 of file miniunz.c.
References do_extract_currentfile(), err, i, unz_global_info64_s::number_entry, printf(), UNZ_OK, unzGetGlobalInfo64(), and unzGoToNextFile().
Referenced by main().
|
static |
Definition at line 314 of file miniunz.c.
References c, change_file_date(), unz_file_info64_s::dosDate, err, test-lz4-list::exit, benchmark::FILE, FOPEN_FUNC, free(), makedir(), malloc(), mymkdir(), NULL, p, printf(), skip(), unz_file_info64_s::tmu_date, UNZ_ERRNO, UNZ_INTERNALERROR, UNZ_OK, unzCloseCurrentFile(), unzGetCurrentFileInfo64(), unzOpenCurrentFilePassword(), unzReadCurrentFile(), and WRITEBUFFERSIZE.
Referenced by do_extract(), and do_extract_onefile().
|
static |
Definition at line 511 of file miniunz.c.
References CASESENSITIVITY, do_extract_currentfile(), printf(), UNZ_OK, and unzLocateFile().
Referenced by main().
|
static |
Definition at line 236 of file miniunz.c.
References unz_file_info64_s::compressed_size, unz_file_info64_s::compression_method, unz_file_info64_s::crc, Display64BitsSize(), err, unz_file_info64_s::flag, i, NULL, unz_global_info64_s::number_entry, printf(), tm_unz_s::tm_hour, tm_unz_s::tm_mday, tm_unz_s::tm_min, tm_unz_s::tm_mon, tm_unz_s::tm_year, unz_file_info64_s::tmu_date, unz_file_info64_s::uncompressed_size, UNZ_OK, unzGetCurrentFileInfo64(), unzGetGlobalInfo64(), unzGoToNextFile(), Z_BZIP2ED, and Z_DEFLATED.
Referenced by main().
Definition at line 533 of file miniunz.c.
References argv, c, chdir, do_banner(), do_extract(), do_extract_onefile(), do_help(), do_list(), test-lz4-list::exit, fill_win32_filefunc64A(), i, MAXFILENAME, NULL, p, printf(), unzClose(), unzOpen2_64(), and unzOpen64().
|
static |
Definition at line 140 of file miniunz.c.
References ENOENT, free(), len, malloc(), mymkdir(), NULL, p, printf(), and UNZ_INTERNALERROR.
Referenced by do_extract_currentfile().
|
static |
Definition at line 126 of file miniunz.c.
References mkdir.
Referenced by do_extract_currentfile(), and makedir().