Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | source_nul |
Macros | |
#define | ZIP_MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | FOR_REGRESS |
#define | OPTIONS_REGRESS "F:Hm" |
#define | USAGE_REGRESS " [-Hm] [-F fragment-size]" |
#define | GETOPT_REGRESS |
#define | DISPATCH_REGRESS |
Typedefs | |
typedef struct source_nul | source_nul_t |
Enumerations | |
enum | source_type_t { SOURCE_TYPE_NONE , SOURCE_TYPE_IN_MEMORY , SOURCE_TYPE_HOLE } |
Functions | |
static int | add_nul (char *argv[]) |
static int | cancel (char *argv[]) |
static int | is_seekable (char *argv[]) |
static int | seek (char *argv[]) |
static int | unchange_one (char *argv[]) |
static int | unchange_all (char *argv[]) |
static int | zin_close (char *argv[]) |
zip_t * | ziptool_open (const char *archive, int flags, zip_error_t *error, zip_uint64_t offset, zip_uint64_t len) |
zip_source_t * | source_hole_create (const char *, int flags, zip_error_t *) |
static zip_t * | read_to_memory (const char *archive, int flags, zip_error_t *error, zip_source_t **srcp) |
static zip_source_t * | source_nul (zip_t *za, zip_uint64_t length) |
static int | cancel_callback (zip_t *archive, void *ud) |
static zip_t * | read_hole (const char *archive, int flags, zip_error_t *error) |
static zip_int64_t | source_nul_cb (void *ud, void *data, zip_uint64_t length, zip_source_cmd_t command) |
static int | write_memory_src_to_file (const char *archive, zip_source_t *src) |
int | ziptool_post_close (const char *archive) |
Variables | |
source_type_t | source_type = SOURCE_TYPE_NONE |
zip_uint64_t | fragment_size = 0 |
zip_source_t * | memory_src = NULL |
#define DISPATCH_REGRESS |
Definition at line 39 of file ziptool_regress.c.
#define FOR_REGRESS |
Definition at line 7 of file ziptool_regress.c.
#define GETOPT_REGRESS |
Definition at line 26 of file ziptool_regress.c.
#define OPTIONS_REGRESS "F:Hm" |
Definition at line 22 of file ziptool_regress.c.
Definition at line 24 of file ziptool_regress.c.
typedef struct source_nul source_nul_t |
enum source_type_t |
Enumerator | |
---|---|
SOURCE_TYPE_NONE | |
SOURCE_TYPE_IN_MEMORY | |
SOURCE_TYPE_HOLE |
Definition at line 9 of file ziptool_regress.c.
|
static |
Definition at line 66 of file ziptool_regress.c.
References argv, length, NULL, source_nul(), za, zip_add(), zip_source_free(), and zip_strerror().
|
static |
Definition at line 92 of file ziptool_regress.c.
References argv, cancel_callback(), progress_userdata_s::limit, NULL, PRId64, print_progress(), progress_userdata, za, and zip_register_cancel_callback_with_state().
Referenced by RZ_PACKED().
Definition at line 84 of file ziptool_regress.c.
References progress_userdata_s::limit, progress_userdata_s::percentage, and progress_userdata.
Referenced by cancel().
|
static |
Definition at line 109 of file ziptool_regress.c.
References argv, setup::idx, NULL, printf(), PRIu64, za, zip_file_is_seekable(), zip_fopen_index(), and zip_strerror().
|
static |
Definition at line 196 of file ziptool_regress.c.
References error(), flags, NULL, source_hole_create(), src, ZIP_ER_OPNOTSUPP, zip_error_set(), zip_open_from_source(), and zip_source_free().
Referenced by ziptool_open().
|
static |
Definition at line 214 of file ziptool_regress.c.
References ENOENT, error(), benchmark::FILE, flags, fragment_size, free(), fstat, i, zip_buffer_fragment::length, malloc(), NULL, src, ZIP_ER_MEMORY, ZIP_ER_OPEN, ZIP_ER_OPNOTSUPP, ZIP_ER_READ, zip_error_set(), ZIP_MIN, zip_open_from_source(), zip_source_buffer_create(), zip_source_buffer_fragment_create(), zip_source_free(), and zip_source_keep().
Referenced by ziptool_open().
|
static |
Definition at line 133 of file ziptool_regress.c.
References argv, setup::idx, NULL, PRIu64, SEEK_SET, za, zip_fopen_index(), zip_fseek(), and zip_strerror().
Referenced by arch_xap_disasm(), find_next_diff(), find_prev_diff(), parse_dbi_stream(), rz_analysis_function_type_matching_handler(), rz_core_analysis_types_propagation(), rz_io_desc_read(), rz_main_rizin(), rz_range_percent(), rz_table_visual_list(), rz_type_format_data(), rz_type_format_data_internal(), rz_type_format_struct(), and var_functions_show().
zip_source_t* source_hole_create | ( | const char * | fname, |
int | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 94 of file source_hole.c.
Referenced by read_hole().
|
static |
Definition at line 386 of file ziptool_regress.c.
References ctx::error, free(), length, malloc(), NULL, source_nul_cb(), src, ZIP_ER_MEMORY, zip_error_init(), zip_error_set(), zip_get_error(), and zip_source_function().
Referenced by add_nul().
|
static |
Definition at line 331 of file ziptool_regress.c.
References command, ctx::error, free(), length, memset(), NULL, zip_stat::size, zip_stat::valid, ZIP_ER_INVAL, ZIP_ER_OPNOTSUPP, zip_error_set(), zip_error_to_data(), ZIP_INT64_MAX, ZIP_SOURCE_CLOSE, ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE, ZIP_SOURCE_GET_ARGS, zip_source_make_command_bitmap(), ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_STAT, ZIP_SOURCE_SUPPORTS, and ZIP_STAT_SIZE.
Referenced by source_nul().
|
static |
Definition at line 152 of file ziptool_regress.c.
References za, zip_strerror(), and zip_unchange_all().
|
static |
Definition at line 162 of file ziptool_regress.c.
References argv, setup::idx, NULL, PRIu64, za, zip_strerror(), and zip_unchange().
|
static |
Definition at line 409 of file ziptool_regress.c.
References ENOENT, benchmark::FILE, free(), malloc(), NULL, zip_stat::size, src, unlink, ZIP_ER_DELETED, zip_error_code_zip(), zip_error_strerror(), zip_source_close(), zip_source_error(), zip_source_open(), zip_source_read(), and zip_source_stat().
Referenced by ziptool_post_close().
|
static |
Definition at line 176 of file ziptool_regress.c.
References argv, setup::idx, NULL, PRIu64, z_in, z_in_count, zip_close(), and zip_strerror().
zip_t * ziptool_open | ( | const char * | archive, |
int | flags, | ||
zip_error_t * | error, | ||
zip_uint64_t | offset, | ||
zip_uint64_t | len | ||
) |
Definition at line 462 of file ziptool_regress.c.
References error(), flags, len, memory_src, read_from_file(), read_hole(), read_to_memory(), source_type, SOURCE_TYPE_HOLE, SOURCE_TYPE_IN_MEMORY, SOURCE_TYPE_NONE, and za.
Definition at line 482 of file ziptool_regress.c.
References memory_src, source_type, SOURCE_TYPE_IN_MEMORY, write_memory_src_to_file(), and zip_source_free().
zip_uint64_t fragment_size = 0 |
Definition at line 12 of file ziptool_regress.c.
Referenced by read_to_memory().
zip_source_t* memory_src = NULL |
Definition at line 57 of file ziptool_regress.c.
Referenced by ziptool_open(), and ziptool_post_close().
source_type_t source_type = SOURCE_TYPE_NONE |
Definition at line 11 of file ziptool_regress.c.
Referenced by ziptool_open(), and ziptool_post_close().