|
rpm 5.3.12
|

Go to the source code of this file.
Defines | |
| #define | rpmmgUnlink(_mg) ((rpmmg)rpmioUnlinkPoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__)) |
| #define | rpmmgLink(_mg) ((rpmmg)rpmioLinkPoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__)) |
| #define | rpmmgFree(_mg) ((rpmmg)rpmioFreePoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
| typedef struct rpmmg_s * | rpmmg |
Functions | |
| rpmmg | rpmmgUnlink (rpmmg mg) |
| Unreference a magic wrapper instance. | |
| rpmmg | rpmmgLink (rpmmg mg) |
| Reference a magic wrapper instance. | |
| rpmmg | rpmmgFree (rpmmg mg) |
| Destroy a magic wrapper. | |
| 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 |
Definition in file rpmmg.h.
| 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().
Destroy a magic wrapper.
| mg | magic wrapper |
Referenced by doUntar(), rpmfcClassify(), and rpmmgNew().
Reference a magic wrapper instance.
| mg | magic wrapper |
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().
1.7.4