#include "system.h"
#include "file.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | EATAB |
#define | LOWCASE(l) |
#define | MAP_FAILED (void *) -1 |
#define | MAP_FILE 0 |
#define | MAGIC "/etc/magic" |
#define | ALLOC_INCR 200 |
#define | NBYTE 4 |
#define | NSHORT 5 |
#define | NLONG 4 |
#define | NSTRING 6 |
#define | NDATE 4 |
#define | NBESHORT 7 |
#define | NBELONG 6 |
#define | NBEDATE 6 |
#define | NLESHORT 7 |
#define | NLELONG 6 |
#define | NLEDATE 6 |
#define | NPSTRING 7 |
#define | NLDATE 5 |
#define | NBELDATE 7 |
#define | NLELDATE 7 |
#define | NREGEX 5 |
Functions | |
const char * | rcsid (const char *p) |
uint32_t | file_signextend (struct magic *m, uint32_t v) |
void | eatsize (char **p) |
int | hextoint (int c) |
char * | getstr (char *s, char *p, int plen, int *slen) |
int | getvalue (struct magic *m, char **p) |
int | parse (struct magic **magicp, uint32_t *nmagicp, char *l, int action) |
void | file_showstr (FILE *fp, const char *s, size_t len) |
uint16_t | swap2 (uint16_t sv) |
uint32_t | swap4 (uint32_t sv) |
void | bs1 (struct magic *m) |
void | byteswap (struct magic *m, uint32_t nmagic) |
char * | mkdbname (const char *fn) |
int | apprentice_file (fmagic fm, struct magic **magicp, uint32_t *nmagicp, const char *fn, int action) |
int | apprentice_compile (const fmagic fm, struct magic **magicp, uint32_t *nmagicp, const char *fn, int action) |
int | apprentice_map (const fmagic fm, struct magic **magicp, uint32_t *nmagicp, const char *fn, int action) |
int | apprentice_1 (fmagic fm, const char *fn, int action) |
int | fmagicSetup (fmagic fm, const char *fn, int action) |
Variables | |
char | PATHSEP = ':' |
int | maxmagic = 0 |
const char * | default_magicfile = "/etc/magic" |
|
Referenced by parse(). |
|
Value: {while (isascii((unsigned char) *l) && \ isspace((unsigned char) *l)) ++l;} Definition at line 45 of file apprentice.c. |
|
Value: (isupper((unsigned char) (l)) ? \ tolower((unsigned char) (l)) : (l)) Definition at line 47 of file apprentice.c. Referenced by eatsize(). |
|
Definition at line 78 of file apprentice.c. |
|
Definition at line 60 of file apprentice.c. |
|
Definition at line 64 of file apprentice.c. Referenced by apprentice_map(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Referenced by parse(). |
|
Definition at line 1022 of file apprentice.c. References __progname, apprentice_compile(), apprentice_file(), apprentice_map(), fmagic, mlist::magic, magic, fmagic_s::mlist, mlist::next, mlist::prev, and xmalloc(). Referenced by fmagicSetup(). |
|
Definition at line 865 of file apprentice.c. References __progname, errno, fmagic, mkdbname(), SEEK_SET, strerror(), and VERSIONNO. Referenced by apprentice_1(). |
|
Definition at line 812 of file apprentice.c. References __progname, errno, fmagic, fmagic_s::lineno, maxmagic, parse(), strerror(), and xcalloc(). Referenced by apprentice_1(). |
|
Definition at line 921 of file apprentice.c. References __progname, byteswap(), errno, fmagic, MAP_FILE, mkdbname(), strerror(), swap4(), VERSIONNO, and xmalloc(). Referenced by apprentice_1(). |
|
Definition at line 767 of file apprentice.c. References magic::cont_level, magic::in_offset, magic::VALUETYPE::l, magic::mask, magic::offset, swap2(), swap4(), magic::type, and magic::value. Referenced by byteswap(). |
|
Definition at line 783 of file apprentice.c. References bs1(). Referenced by apprentice_map(). |
|
Definition at line 133 of file apprentice.c. References LOWCASE. Referenced by getvalue(), and parse(). |
|
Definition at line 675 of file apprentice.c. Referenced by file_mdump(), and fmagicSDebug(). |
|
Definition at line 88 of file apprentice.c. References FILE_BEDATE, FILE_BELDATE, FILE_BELONG, FILE_BESHORT, FILE_BYTE, FILE_DATE, FILE_LDATE, FILE_LEDATE, FILE_LELDATE, FILE_LELONG, FILE_LESHORT, FILE_LONG, file_magwarn(), FILE_PSTRING, FILE_REGEX, FILE_SHORT, FILE_STRING, magic::flag, and magic::type. Referenced by fmagicSCheck(), fmagicSPrint(), getvalue(), and parse(). |
|
Definition at line 1075 of file apprentice.c. References __progname, apprentice_1(), EXIT_FAILURE, FILE_CHECK, fmagic, fmagic_s::mlist, mlist::next, PATHSEP, mlist::prev, and xstrdup(). Referenced by main(), and rpmfcClassify(). |
|
Definition at line 182 of file apprentice.c. References hextoint(). Referenced by getvalue(). |
|
Definition at line 290 of file apprentice.c. References eatsize(), FILE_PSTRING, file_signextend(), FILE_STRING, getstr(), magic::VALUETYPE::l, magic::reln, magic::VALUETYPE::s, magic::type, magic::vallen, and magic::value. Referenced by parse(). |
|
Definition at line 159 of file apprentice.c. Referenced by getstr(). |
|
Definition at line 798 of file apprentice.c. References stpcpy(), and xmalloc(). Referenced by apprentice_compile(), and apprentice_map(). |
|
Definition at line 313 of file apprentice.c. References ALLOC_INCR, CHAR_COMPACT_BLANK, CHAR_COMPACT_OPTIONAL_BLANK, CHAR_IGNORE_LOWERCASE, magic::cont_level, magic::desc, eatsize(), file_magwarn(), file_mdump(), file_signextend(), FILE_STRING, magic::flag, getvalue(), magic::in_offset, magic::in_op, magic::in_type, magic::mask, magic::mask_op, maxmagic, NBEDATE, NBELDATE, NBELONG, NBESHORT, NBYTE, NDATE, NLDATE, NLEDATE, NLELDATE, NLELONG, NLESHORT, NLONG, magic::nospflag, NPSTRING, NREGEX, NSHORT, NSTRING, magic::offset, magic::reln, magic::type, and xrealloc(). Referenced by apprentice_file(). |
|
Definition at line 41 of file apprentice.c. |
|
Definition at line 732 of file apprentice.c. Referenced by bs1(). |
|
Definition at line 749 of file apprentice.c. Referenced by apprentice_map(), and bs1(). |
|
Definition at line 82 of file apprentice.c. |
|
Definition at line 75 of file apprentice.c. Referenced by apprentice_file(), and parse(). |
|
Definition at line 71 of file apprentice.c. Referenced by fmagicSetup(). |