#include "file.h"
#include "magic.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Include dependency graph for funcs.c:
Go to the source code of this file.
Defines | |
#define | SIZE_T_MAX (size_t)0xffffffffU |
#define | OCTALIFY(n, o) |
Functions | |
static const char * | rcsid (const char *p) |
int | vsnprintf (char *, size_t, const char *, va_list) |
int | file_printf (struct magic_set *ms, const char *fmt,...) |
static void | file_error_core (struct magic_set *ms, int error, const char *f, va_list va, uint32_t lineno) |
void | file_error (struct magic_set *ms, int error, const char *f,...) |
void | file_magerror (struct magic_set *ms, const char *f,...) |
void | file_oomem (struct magic_set *ms, size_t len) |
void | file_badseek (struct magic_set *ms) |
void | file_badread (struct magic_set *ms) |
int | file_buffer (struct magic_set *ms, int fd, const char *inname, const void *buf, size_t nb) |
int | file_reset (struct magic_set *ms) |
const char * | file_getbuffer (struct magic_set *ms) |
int | file_check_mem (struct magic_set *ms, unsigned int level) |
int | snprintf (char *buf, size_t len, const char *fmt,...) |
|
Value: /*LINTED*/ \ (void)(*(n)++ = '\\', \ *(n)++ = (((uint32_t)*(o) >> 6) & 3) + '0', \ *(n)++ = (((uint32_t)*(o) >> 3) & 7) + '0', \ *(n)++ = (((uint32_t)*(o) >> 0) & 7) + '0', \ (o)++) Definition at line 239 of file funcs.c. Referenced by file_getbuffer(). |
|
Definition at line 46 of file funcs.c. Referenced by file_getbuffer(). |
|
Definition at line 159 of file funcs.c. References errno, and file_error(). Referenced by apprentice_map(). |
|
Definition at line 153 of file funcs.c. References errno, and file_error(). Referenced by file_pipe2file(). |
|
Definition at line 166 of file funcs.c. References file_ascmagic(), file_is_tar(), file_printf(), file_softmagic(), file_tryelf(), file_zmagic(), magic_set::flags, MAGIC_MIME, MAGIC_NO_CHECK_APPTYPE, MAGIC_NO_CHECK_ASCII, MAGIC_NO_CHECK_COMPRESS, MAGIC_NO_CHECK_ELF, MAGIC_NO_CHECK_SOFT, and MAGIC_NO_CHECK_TAR. Referenced by file_zmagic(), magic_buffer(), and magic_file(). |
|
Definition at line 326 of file funcs.c. References magic_set::c, COND_NONE, file_oomem(), magic_set::cont::level_info::got_match, magic_set::cont::level_info::last_cond, magic_set::cont::level_info::last_match, magic_set::cont::len, and magic_set::cont::li. |
|
Definition at line 125 of file funcs.c. References file_error_core(). Referenced by apprentice_1(), apprentice_compile(), apprentice_file(), apprentice_map(), check_format(), file_apprentice(), file_badread(), file_badseek(), file_fsmagic(), file_oomem(), file_pipe2file(), file_reset(), getstr(), magic_file(), parse(), rcsid(), and uncompressbuf(). |
|
Definition at line 100 of file funcs.c. References magic_set::out::buf, magic_set::error, magic_set::haderr, magic_set::o, magic_set::out::size, snprintf(), strerror, and vsnprintf(). Referenced by file_error(), and file_magerror(). |
|
Definition at line 248 of file funcs.c. References magic_set::out::buf, file_oomem(), magic_set::flags, magic_set::haderr, magic_set::out::left, MAGIC_RAW, magic_set::o, OCTALIFY, magic_set::out::pbuf, magic_set::out::psize, magic_set::out::size, and SIZE_T_MAX. Referenced by magic_buffer(), and magic_file(). |
|
Definition at line 138 of file funcs.c. References file_error_core(), and magic_set::line. Referenced by check_fmt(), mconvert(), mcopy(), and mprint(). |
|
Definition at line 147 of file funcs.c. References errno, and file_error(). Referenced by apprentice_1(), apprentice_file(), apprentice_map(), file_apprentice(), file_check_mem(), file_getbuffer(), file_printf(), mprint(), and parse(). |
|
Definition at line 63 of file funcs.c. References magic_set::out::buf, file_oomem(), magic_set::out::left, magic_set::o, magic_set::out::ptr, magic_set::out::size, and vsnprintf(). Referenced by file_buffer(), file_fsmagic(), file_is_tar(), file_zmagic(), info_from_stat(), magic_file(), match(), mprint(), print_sep(), and rcsid(). |
|
Definition at line 226 of file funcs.c. References magic_set::out::buf, magic_set::error, file_error(), magic_set::haderr, magic_set::out::left, magic_set::mlist, magic_set::o, magic_set::out::ptr, and magic_set::out::size. Referenced by magic_buffer(), and magic_file(). |
|
|
|
Definition at line 361 of file funcs.c. Referenced by file_error_core(), headerCheck(), mkdbname(), mprint(), pgpsigFormat(), rpmfcHelper(), rpmProblemString(), rpmpsmStage(), rpmReadHeader(), rpmReadSignature(), xmlFormat(), and yamlFormat(). |
|
Definition at line 352 of file funcs.c. Referenced by file_error_core(), file_printf(), snprintf(), and vrpmlog(). |