|
rpm 5.3.12
|
#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.
Defines | |
| #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. | |
| const char * | rpmmgFile (rpmmg mg, const char *fn) |
| Return magic string for a file. | |
| const char * | rpmmgBuffer (rpmmg mg, const char *b, size_t nb) |
| Return magic string for a buffer. | |
Variables | |
| int | _rpmmg_debug = 0 |
| rpmioPool | _rpmmgPool = NULL |
Definition in file rpmmg.c.
| 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 139 of file rpmmg.c.
References _, _rpmmg_debug, rpmlog(), RPMLOG_ERR, 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 83 of file rpmmg.c.
References _, _rpmmg_debug, Fclose(), Ferror(), Fopen(), Fread(), rpmlog(), RPMLOG_ERR, rpmmgBuffer(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrdup().
Referenced by doUntar(), and rpmfcClassify().
| static void rpmmgFini | ( | void * | _mg | ) | [static] |
Definition at line 43 of file rpmmg.c.
References _rpmmg_debug, _rpmmgPool, rpmioGetPool(), rpmioNewPool(), and rpmmgFini().
Referenced by rpmmgNew().
| rpmmg rpmmgNew | ( | const char * | fn, |
| int | flags | ||
| ) |
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(), and xstrdup().
Referenced by doUntar(), and rpmfcClassify().
| rpmioPool _rpmmgPool = NULL |
Definition at line 41 of file rpmmg.c.
Referenced by rpmioClean(), and rpmmgGetPool().
1.7.4