rpm
5.4.14
|
#include "system.h"
#include <rpmiotypes.h>
#include <rpmio.h>
#include <rpmlog.h>
#include <rpmurl.h>
#include <rpmmg.h>
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _RPMMG_INTERNAL |
Functions | |
static void | rpmmgFini (void *_mg) |
static rpmmg | rpmmgGetPool (rpmioPool pool) |
rpmmg | rpmmgNew (const char *fn, int flags) |
Create and load a magic wrapper. More... | |
const char * | rpmmgFile (rpmmg mg, const char *fn) |
Return magic string for a file. More... | |
const char * | rpmmgBuffer (rpmmg mg, const char *b, size_t nb) |
Return magic string for a buffer. More... | |
Variables | |
int | _rpmmg_debug = 0 |
rpmioPool | _rpmmgPool = NULL |
const char* rpmmgBuffer | ( | rpmmg | mg, |
const char * | b, | ||
size_t | nb | ||
) |
Return magic string for a buffer.
mg | magic wrapper |
b | buffer |
nb | no. bytes in buffer |
Definition at line 165 of file rpmmg.c.
References _, _rpmmg_debug, fprintf(), msg, NULL, rpmlog(), RPMLOG_ERR, t, and xstrdup().
Referenced by rpmmgFile().
const char* rpmmgFile | ( | rpmmg | mg, |
const char * | fn | ||
) |
Return magic string for a file.
mg | magic wrapper |
fn | file path |
Definition at line 84 of file rpmmg.c.
References _, _free(), _rpmmg_debug, b, Fclose(), fd, Ferror(), Fopen(), fprintf(), Fread(), msg, nb, NULL, rpmlog(), RPMLOG_ERR, rpmmgBuffer(), setlocale, t, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_MONGO, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), void, and xstrdup().
Referenced by doUntar(), and rpmfcClassify().
Definition at line 43 of file rpmmg.c.
References _rpmmg_debug, _rpmmgPool, NULL, rpmioGetPool(), rpmioNewPool(), and rpmmgFini().
Referenced by rpmmgNew().
Create and load a magic wrapper.
fn | magic file |
flags | magic flags |
Definition at line 57 of file rpmmg.c.
References _, errno, rpmlog(), RPMLOG_ERR, rpmmgFree(), rpmmgGetPool(), rpmmgLink(), xstrdup(), and xx.
Referenced by doUntar(), and rpmfcClassify().
Definition at line 41 of file rpmmg.c.
Referenced by rpmioClean(), and rpmmgGetPool().