rpm
4.5
|
#include <regex.h>
#include "magic.h"
Go to the source code of this file.
Defines | |
#define | RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) |
Typedefs | |
typedef struct rpmfc_s * | rpmfc |
typedef enum FCOLOR_e | FCOLOR_t |
typedef struct rpmfcTokens_s * | rpmfcToken |
Enumerations | |
enum | FCOLOR_e { RPMFC_BLACK = 0, RPMFC_ELF32 = (1 << 0), RPMFC_ELF64 = (1 << 1), RPMFC_ELFMIPSN32 = (1 << 2) } |
Functions | |
int | rpmfcExec (ARGV_t av, StringBuf sb_stdin, StringBuf *sb_stdoutp, int failnonzero) |
Return helper output. | |
int | rpmfcColoring (const char *fmstr) |
Return file color given file(1) string. | |
void | rpmfcPrint (const char *msg, rpmfc fc, FILE *fp) |
Print results of file classification. | |
rpmfc | rpmfcFree (rpmfc fc) |
Destroy a file classifier. | |
rpmfc | rpmfcNew (void) |
Create a file classifier. | |
int | rpmfcClassify (rpmfc fc, ARGV_t argv, int16_t *fmode) |
Build file class dictionary and mappings. | |
int | rpmfcApply (rpmfc fc) |
Build file/package dependency dictionary and mappings. | |
int | rpmfcGenerateDepends (void *specp, void *pkgp) |
Generate package dependencies. | |
Variables | |
int | _rpmfc_debug |
typedef struct rpmfcTokens_s* rpmfcToken |
enum FCOLOR_e |
int rpmfcApply | ( | rpmfc | fc | ) |
Build file/package dependency dictionary and mappings.
fc | file classifier |
Definition at line 1094 of file rpmfc.c.
References _, argiAdd(), argiCount(), argvCount(), rpmfcApplyTbl_s::colormask, rpmfcApplyTbl_s::func, rpmdsFind(), rpmdsFree(), rpmdsSingle(), rpmExpand(), rpmfcExpandRegexps(), rpmfcFindRequiredPackages(), rpmfcFreeRegexps(), RPMMESS_DEBUG, RPMMESS_NORMAL, and rpmMessage.
Referenced by main(), and rpmfcGenerateDepends().
Build file class dictionary and mappings.
fc | file classifier |
argv | files to classify |
fmode | files mode_t array (or NULL) |
int rpmfcColoring | ( | const char * | fmstr | ) |
Return file color given file(1) string.
fmstr | file(1) string |
Definition at line 619 of file rpmfc.c.
References RPMFC_BLACK, and rpmfcTokens.
Referenced by rpmfcClassify().
Return helper output.
av | helper argv (with possible macros) |
sb_stdin | helper input |
*sb_stdoutp | helper output |
failnonzero | IS non-zero helper exit status a failure? |
Definition at line 209 of file rpmfc.c.
References _free(), argvAppend(), argvFree(), freeStringBuf(), getOutputFrom(), getStringBuf(), rpmExpand(), and rpmfcExpandAppend().
Referenced by checkFiles(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), and rpmfcHelper().
Destroy a file classifier.
fc | file classifier |
Definition at line 711 of file rpmfc.c.
References _free(), argiFree(), argvFree(), freeStringBuf(), and rpmdsFree().
Referenced by main(), and rpmfcGenerateDepends().
int rpmfcGenerateDepends | ( | void * | specp, |
void * | pkgp | ||
) |
Generate package dependencies.
specp | spec file control |
pkgp | package control |
Definition at line 1712 of file rpmfc.c.
References _free(), _rpmfc_debug, argiCount(), argiData(), argvCount(), argvData(), argvFree(), Package_s::autoProv, Package_s::autoReq, Package_s::cpioList, Package_s::ds, Package_s::header, headerAddEntry(), headerRemoveEntry(), DepMsg_s::msg, printDeps(), Spec_s::rootURL, RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, rpmdsCount(), rpmdsEVR(), rpmdsFree(), rpmdsMerge(), rpmdsN(), rpmdsNew(), rpmdsSingle(), rpmExpandNumeric(), rpmfcApply(), rpmfcClassify(), rpmfcFree(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcNew(), rpmfcPrint(), rpmfiFC(), rpmfiFFlags(), rpmfiFMode(), rpmfiFN(), rpmfiInit(), RPMFILE_CONFIG, rpmfiNext(), rpmGenPath(), RPMSENSE_EQUAL, urlPath(), xcalloc(), and xstrdup().
Referenced by processBinaryFiles().
rpmfc rpmfcNew | ( | void | ) |
Create a file classifier.
Definition at line 736 of file rpmfc.c.
References xcalloc().
Referenced by main(), and rpmfcGenerateDepends().
void rpmfcPrint | ( | const char * | msg, |
rpmfc | fc, | ||
FILE * | fp | ||
) |
Print results of file classification.
msg | message prefix (NULL for none) |
fc | file classifier |
fp | output file handle (NULL for stderr) |
Definition at line 634 of file rpmfc.c.
References rpmdsCount(), rpmdsDNEVR(), rpmdsNext(), rpmdsSetIx(), and RPMFC_BLACK.
Referenced by main(), and rpmfcGenerateDepends().
int _rpmfc_debug |
Definition at line 76 of file poptALL.c.
Referenced by main(), rpmdepPrint(), rpmfcGenerateDepends(), and rpmfcMergePR().