Go to the source code of this file.
Data Structures | |
struct | magic |
union | magic::VALUETYPE |
struct | mlist |
struct | magic_set |
struct | magic_set::cont |
struct | magic_set::out |
struct | fmagic_s |
Defines | |
#define | HOWMANY 65536 |
#define | MAXMAGIS 4096 |
#define | MAXDESC 64 |
#define | MAXstring 32 |
#define | MAGICNO 0xF11E041C |
#define | VERSIONNO 2 |
#define | FILE_MAGICSIZE (32 * 4) |
#define | FILE_CHECK 1 |
#define | FILE_COMPILE 2 |
#define | INDIR 1 |
#define | UNSIGNED 2 |
#define | OFFADD 4 |
#define | FILE_BYTE 1 |
#define | FILE_SHORT 2 |
#define | FILE_LONG 4 |
#define | FILE_STRING 5 |
#define | FILE_DATE 6 |
#define | FILE_BESHORT 7 |
#define | FILE_BELONG 8 |
#define | FILE_BEDATE 9 |
#define | FILE_LESHORT 10 |
#define | FILE_LELONG 11 |
#define | FILE_LEDATE 12 |
#define | FILE_PSTRING 13 |
#define | FILE_LDATE 14 |
#define | FILE_BELDATE 15 |
#define | FILE_LELDATE 16 |
#define | FILE_REGEX 17 |
#define | FILE_OPS "&|^+-*%/" |
#define | FILE_OPAND 0 |
#define | FILE_OPOR 1 |
#define | FILE_OPXOR 2 |
#define | FILE_OPADD 3 |
#define | FILE_OPMINUS 4 |
#define | FILE_OPMULTIPLY 5 |
#define | FILE_OPDIVIDE 6 |
#define | FILE_OPMODULO 7 |
#define | FILE_OPINVERSE 0x80 |
#define | BIT(A) (1 << (A)) |
#define | STRING_IGNORE_LOWERCASE BIT(0) |
#define | STRING_COMPACT_BLANK BIT(1) |
#define | STRING_COMPACT_OPTIONAL_BLANK BIT(2) |
#define | CHAR_IGNORE_LOWERCASE 'c' |
#define | CHAR_COMPACT_BLANK 'B' |
#define | CHAR_COMPACT_OPTIONAL_BLANK 'b' |
Typedefs | |
typedef fmagic_s * | fmagic |
Enumerations | |
enum | fmagicFlags_e { FMAGIC_FLAGS_NONE = 0, FMAGIC_FLAGS_DEBUG = (1 << 0), FMAGIC_FLAGS_BRIEF = (1 << 1), FMAGIC_FLAGS_MIME = (1 << 2), FMAGIC_FLAGS_CONTINUE = (1 << 3), FMAGIC_FLAGS_FOLLOW = (1 << 4), FMAGIC_FLAGS_SPECIAL = (1 << 5), FMAGIC_FLAGS_UNCOMPRESS = (1 << 6), FMAGIC_FLAGS_NOPAD = (1 << 7) } |
Functions | |
int | fmagicSetup (fmagic fm, const char *fn, int action) |
int | fmagicProcess (fmagic fm, const char *fn, int wid) |
int | fmagicA (fmagic fm) |
int | fmagicD (fmagic fm) |
void | fmagicE (fmagic fm) |
int | fmagicF (fmagic fm, int zfl) |
int | fmagicS (fmagic fm) |
int | fmagicZ (fmagic fm) |
void | file_printf (const fmagic fm, const char *f,...) |
const char * | file_fmttime (uint32_t v, int local) |
void | file_magwarn (const char *f,...) |
void | file_mdump (struct magic *m) |
void | file_showstr (FILE *fp, const char *s, size_t len) |
uint32_t | file_signextend (struct magic *m, uint32_t v) |
int | file_pipe2file (int fd, const void *startbuf, size_t nbytes) |
Variables | |
fmagic | global_fmagic |
const char * | default_magicfile |
|
|
|
Definition at line 130 of file file.h. Referenced by file_mdump(), and parse(). |
|
Definition at line 131 of file file.h. Referenced by file_mdump(), and parse(). |
|
Definition at line 129 of file file.h. Referenced by file_mdump(), and parse(). |
|
Definition at line 77 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSPrint(), and parse(). |
|
Definition at line 83 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), and parse(). |
|
Definition at line 76 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 75 of file file.h. Referenced by file_mdump(), file_signextend(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 70 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), fmagicSPrint(), and parse(). |
|
Definition at line 54 of file file.h. Referenced by apprentice_file(), fmagicSetup(), main(), and parse(). |
|
Definition at line 55 of file file.h. Referenced by apprentice_1(), and main(). |
|
Definition at line 74 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSPrint(), and parse(). |
|
Definition at line 82 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), and parse(). |
|
Definition at line 80 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSPrint(), and parse(). |
|
Definition at line 84 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), and parse(). |
|
Definition at line 79 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 78 of file file.h. Referenced by file_mdump(), file_signextend(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 72 of file file.h. Referenced by file_mdump(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
|
|
Definition at line 95 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 92 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 98 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 100 of file file.h. Referenced by file_mdump(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 96 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 99 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 97 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 93 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
|
|
Definition at line 94 of file file.h. Referenced by fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 81 of file file.h. Referenced by file_mdump(), file_signextend(), fmagicSCheck(), fmagicSConvert(), getvalue(), and parse(). |
|
Definition at line 85 of file file.h. Referenced by file_mdump(), file_signextend(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), getvalue(), and parse(). |
|
Definition at line 71 of file file.h. Referenced by file_mdump(), file_signextend(), fmagicSCheck(), fmagicSConvert(), fmagicSGet(), and parse(). |
|
Definition at line 73 of file file.h. Referenced by bs1(), file_mdump(), file_signextend(), fmagicSCheck(), fmagicSConvert(), getvalue(), and parse(). |
|
Definition at line 44 of file file.h. Referenced by fmagicA(), fmagicProcess(), and uncompressbuf(). |
|
Definition at line 62 of file file.h. Referenced by file_mdump(), fmagicSGet(), and parse(). |
|
Definition at line 50 of file file.h. Referenced by apprentice_compile(), and apprentice_map(). |
|
Definition at line 47 of file file.h. Referenced by parse(). |
|
Definition at line 46 of file file.h. Referenced by apprentice_file(). |
|
|
|
Definition at line 64 of file file.h. Referenced by fmagicSMatch(), and parse(). |
|
Definition at line 127 of file file.h. Referenced by file_mdump(), fmagicSCheck(), and parse(). |
|
Definition at line 128 of file file.h. Referenced by file_mdump(), fmagicSCheck(), and parse(). |
|
Definition at line 126 of file file.h. Referenced by file_mdump(), fmagicSCheck(), and parse(). |
|
Definition at line 63 of file file.h. Referenced by file_mdump(), file_signextend(), fmagicSCheck(), and parse(). |
|
Definition at line 51 of file file.h. Referenced by apprentice_compile(), and apprentice_map(). |
|
|
|
|
Definition at line 205 of file print.c. Referenced by file_mdump(), and fmagicSPrint(). |
|
Definition at line 163 of file print.c. References __progname, global_fmagic, fmagic_s::lineno, and fmagic_s::magicfile. Referenced by file_signextend(), and parse(). |
|
Definition at line 47 of file print.c. References CHAR_COMPACT_BLANK, CHAR_COMPACT_OPTIONAL_BLANK, CHAR_IGNORE_LOWERCASE, FILE_BEDATE, FILE_BELDATE, FILE_BELONG, FILE_BESHORT, FILE_BYTE, FILE_DATE, file_fmttime(), FILE_LDATE, FILE_LEDATE, FILE_LELDATE, FILE_LELONG, FILE_LESHORT, FILE_LONG, FILE_OPINVERSE, FILE_PSTRING, FILE_REGEX, FILE_SHORT, file_showstr(), FILE_STRING, INDIR, STRING_COMPACT_BLANK, STRING_COMPACT_OPTIONAL_BLANK, STRING_IGNORE_LOWERCASE, SZOF, and UNSIGNED. Referenced by fmagicSGet(), and parse(). |
|
Definition at line 90 of file compress.c. References errno, error(), EXIT_FAILURE, SEEK_SET, sread(), strerror(), and swrite(). |
|
Definition at line 184 of file print.c. References fmagic_s::nob, fmagic_s::obp, fmagic_s::obuf, and vsnprintf(). Referenced by fmagicA(), fmagicD(), fmagicF(), fmagicProcess(), fmagicSMatch(), and fmagicSPrint(). |
|
Definition at line 675 of file apprentice.c. Referenced by file_mdump(), and fmagicSDebug(). |
|
Definition at line 88 of file apprentice.c. References FILE_BESHORT, FILE_LESHORT, file_magwarn(), FILE_PSTRING, FILE_REGEX, FILE_SHORT, FILE_STRING, magic::flag, magic::type, and UNSIGNED. Referenced by fmagicSCheck(), fmagicSPrint(), getvalue(), and parse(). |
|
Definition at line 513 of file ascmagic.c. References fmagic_s::buf, file_printf(), fmagic_s::flags, FMAGIC_FLAGS_MIME, fmagicAMatch(), from_ebcdic(), HOWMANY, is_tar(), ISSPC, looks_ascii(), looks_extended(), looks_latin1(), looks_unicode(), looks_utf8(), MAXLINELEN, names::name, fmagic_s::nb, NNAMES, names::type, and types. Referenced by fmagicF(). |
|
Definition at line 38 of file fsmagic.c. References errno, error(), EXIT_FAILURE, file_printf(), FMAGIC_FLAGS_FOLLOW, FMAGIC_FLAGS_MIME, FMAGIC_FLAGS_SPECIAL, fmagicProcess(), fmagic_s::fn, major, minor, S_IFSOCK, and strerror(). Referenced by fmagicProcess(). |
|
Referenced by fmagicProcess(). |
|
Definition at line 237 of file fsmagic.c. References file_printf(), fmagic_s::flags, FMAGIC_FLAGS_MIME, fmagicA(), fmagicS(), and fmagicZ(). Referenced by fmagicProcess(), and fmagicZ(). |
|
Definition at line 275 of file fsmagic.c. References fmagic_s::buf, errno, error(), EXIT_FAILURE, file_printf(), fmagic_s::flags, FMAGIC_FLAGS_BRIEF, FMAGIC_FLAGS_MIME, FMAGIC_FLAGS_NOPAD, FMAGIC_FLAGS_UNCOMPRESS, fmagicD(), fmagicE(), fmagicF(), fmagic_s::fn, HOWMANY, fmagic_s::nb, fmagic_s::sb, strerror(), and xmalloc(). Referenced by fmagicD(), main(), rpmfcClassify(), and unwrap(). |
|
Definition at line 1067 of file softmagic.c. References fmagicSMatch(), fmagic_s::ml, fmagic_s::mlist, and mlist::next. Referenced by fmagicF(). |
|
Definition at line 1075 of file apprentice.c. References __progname, apprentice_1(), EXIT_FAILURE, FILE_CHECK, fmagic_s::mlist, mlist::next, PATHSEP, mlist::prev, and xstrdup(). Referenced by main(), and rpmfcClassify(). |
|
Definition at line 311 of file compress.c. References fmagic_s::buf, fmagicF(), maglen, fmagic_s::nb, ncompr, and uncompressbuf(). Referenced by fmagicF(). |
|
Definition at line 82 of file apprentice.c. Referenced by main(), and rpmfcClassify(). |
|
Definition at line 40 of file print.c. Referenced by file_magwarn(), main(), and rpmfcClassify(). |