Rizin
unix-like reverse engineering framework and cli tools
|
#include "mconfig.h"
#include <rz_magic.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <rz_regex.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdarg.h>
Go to the source code of this file.
Macros | |
#define | O_BINARY 0 |
Typedefs | |
typedef unsigned long | unichar |
Functions | |
const char * | file_fmttime (unsigned int, int, char *) |
int | file_buffer (struct rz_magic_set *, int, const char *, const void *, size_t) |
int | file_fsmagic (struct rz_magic_set *, const char *, struct stat *) |
int | file_pipe2file (struct rz_magic_set *, int, const void *, size_t) |
int | file_printf (struct rz_magic_set *, const char *,...) |
int | file_reset (struct rz_magic_set *) |
int | file_tryelf (struct rz_magic_set *, int, const unsigned char *, size_t) |
int | file_zmagic (struct rz_magic_set *, int, const char *, const ut8 *, size_t) |
int | file_ascmagic (struct rz_magic_set *, const unsigned char *, size_t) |
int | file_is_tar (struct rz_magic_set *, const unsigned char *, size_t) |
int | file_softmagic (struct rz_magic_set *, const unsigned char *, size_t, int) |
struct mlist * | file_apprentice (struct rz_magic_set *, const char *, int) |
ut64 | file_signextend (RzMagic *, struct rz_magic *, ut64) |
void | file_delmagic (struct rz_magic *, int type, size_t entries) |
void | file_badread (struct rz_magic_set *) |
void | file_badseek (struct rz_magic_set *) |
void | file_oomem (struct rz_magic_set *, size_t) |
void | file_error (struct rz_magic_set *, int, const char *,...) |
void | file_magerror (struct rz_magic_set *, const char *,...) |
void | file_magwarn (struct rz_magic_set *, const char *,...) |
void | file_mdump (struct rz_magic *) |
void | file_showstr (FILE *, const char *, size_t) |
size_t | file_mbswidth (const char *) |
const char * | file_getbuffer (struct rz_magic_set *) |
ssize_t | sread (int, void *, size_t, int) |
int | file_check_mem (struct rz_magic_set *, unsigned int) |
int | file_looks_utf8 (const unsigned char *, size_t, unichar *, size_t *) |
int | vasprintf (char **ptr, const char *format_string, va_list vargs) |
int | asprintf (char **ptr, const char *format_string,...) |
void file_badread | ( | struct rz_magic_set * | ) |
Referenced by apprentice_map().
void file_badseek | ( | struct rz_magic_set * | ) |
Referenced by file_or_fd(), and rz_magic_buffer().
Definition at line 255 of file apprentice.c.
References entries(), munmap, p, RZ_FREE, and type.
Referenced by apprentice_1(), and free_mlist().
Referenced by apprentice_1(), apprentice_compile(), apprentice_map(), bad_link(), file_apprentice(), file_fsmagic(), file_or_fd(), getstr(), load_1(), parse(), and parse_mime().
Definition at line 188 of file mdump.c.
References local, rz_asctime_r(), rz_ctime_r(), rz_gmtime_r(), rz_localtime_r(), time, and v.
Referenced by file_mdump(), and mprint().
Definition at line 76 of file fsmagic.c.
References bad_link(), buf2, file_error(), file_printf(), fn, major, mime, minor, nch(), NULL, p, readlink, rz_magic_file(), S_IFLNK, sb, snprintf, stat, and autogen_x86imm::tmp.
Referenced by file_or_fd().
const char* file_getbuffer | ( | struct rz_magic_set * | ) |
Referenced by file_or_fd(), and rz_magic_buffer().
Referenced by file_buffer().
Definition at line 605 of file ascmagic.c.
References c, done, i, n, nbytes, T, and text_chars.
Referenced by file_ascmagic(), looks_utf8_with_BOM(), and set_test_type().
void file_magerror | ( | struct rz_magic_set * | , |
const char * | , | ||
... | |||
) |
Referenced by check_fmt(), magiccheck(), mconvert(), mcopy(), and mprint().
void file_magwarn | ( | struct rz_magic_set * | ms, |
const char * | f, | ||
... | |||
) |
Definition at line 172 of file mdump.c.
Referenced by apprentice_load(), check_cond(), check_format(), file_signextend(), getstr(), getvalue(), parse(), parse_mime(), and string_modifier_check().
void file_mdump | ( | struct rz_magic * | m | ) |
Definition at line 47 of file mdump.c.
References ASCTIME_BUF_MINLEN, eprintf, file_fmttime(), file_nnames, file_showstr(), regress::m, magic_file_names, PFMT64d, PFMT64x, SZOF, UNSIGNED, and ut64().
void file_oomem | ( | struct rz_magic_set * | , |
size_t | |||
) |
Referenced by apprentice_1(), apprentice_load(), apprentice_map(), file_apprentice(), file_ascmagic(), mprint(), and parse().
Referenced by bad_link(), file_ascmagic(), file_fsmagic(), file_is_tar(), info_from_stat(), match(), mprint(), and print_sep().
int file_reset | ( | struct rz_magic_set * | ) |
Referenced by file_or_fd(), rz_magic_buffer(), and rz_magic_new().
Definition at line 757 of file apprentice.c.
References file_magwarn(), regress::m, UNSIGNED, and v.
Referenced by getvalue(), magiccheck(), mprint(), and parse().
Referenced by file_ascmagic(), and file_buffer().
Referenced by file_buffer().