Go to the documentation of this file.
13 #include <rpm/rpmutil.h>
14 #include <rpm/rpmfileutil.h>
38 #define RMIL_DEFAULT -15
39 #define RMIL_MACROFILES -13
40 #define RMIL_RPMRC -11
42 #define RMIL_CMDLINE -7
43 #define RMIL_TARBALL -5
45 #define RMIL_OLDSPEC -1
49 #define addMacro(_mc, _n, _o, _b, _l) rpmPushMacro(_mc, _n, _o, _b, _l)
50 #define delMacro(_mc, _n) rpmPopMacro(_mc, _n)
53 #define RPMEXPR_EXPAND (1 << 0)
55 typedef enum rpmMacroFlags_e {
77 char ** obuf,
int flags);
90 const char * b,
int level);
104 const char * b,
int level,
int rpmPushMacroFlags(rpmMacroContext mc, const char *n, const char *o, const char *b, int level, rpmMacroFlags flags)
Push macro to context.
void rpmLoadMacros(rpmMacroContext mc, int level)
Load macros from specific context into global context.
enum rpmMacroFlags_e rpmMacroFlags
char * rpmExprStr(const char *expr)
Evaluate string expression.
int rpmDefineMacro(rpmMacroContext mc, const char *macro, int level)
Define macro in context.
int rpmPushMacro(rpmMacroContext mc, const char *n, const char *o, const char *b, int level)
Push macro to context.
void rpmInitMacros(rpmMacroContext mc, const char *macrofiles)
Initialize macro context from set of macrofile(s).
#define RPM_GNUC_NULL_TERMINATED
char * rpmExpand(const char *arg,...) RPM_GNUC_NULL_TERMINATED
Return (malloc'ed) concatenated macro expansion(s).
int rpmExprBoolFlags(const char *expr, int flags)
Evaluate boolean expression.
int rpmExprBool(const char *expr)
Evaluate boolean expression.
struct rpmMacroContext_s * rpmMacroContext
struct rpmMacroEntry_s * rpmMacroEntry
rpmMacroContext rpmCLIMacroContext
char * rpmExprStrFlags(const char *expr, int flags)
Evaluate string expression.
int rpmExpandNumeric(const char *arg)
Return macro expansion as a numeric value.
const char * macrofiles
List of macro files to read when configuring rpm.
int rpmPopMacro(rpmMacroContext mc, const char *n)
Pop macro from context.
int rpmMacroIsParametric(rpmMacroContext mc, const char *n)
void rpmDumpMacroTable(rpmMacroContext mc, FILE *fp)
Print macros to file stream.
int rpmMacroIsDefined(rpmMacroContext mc, const char *n)
int rpmLoadMacroFile(rpmMacroContext mc, const char *fn)
Load macro context from a macro file.
void rpmFreeMacros(rpmMacroContext mc)
Destroy macro context.
int rpmExpandMacros(rpmMacroContext mc, const char *sbuf, char **obuf, int flags)
Expand macro into buffer.
const char * rpmConfigDir(void)
Return rpm configuration base directory.
rpmMacroContext rpmGlobalMacroContext