13 #include <rpm/rpmutil.h>
14 #include <rpm/rpmfileutil.h>
38 #define RMIL_BUILTIN -20
39 #define RMIL_DEFAULT -15
40 #define RMIL_MACROFILES -13
41 #define RMIL_RPMRC -11
43 #define RMIL_CMDLINE -7
44 #define RMIL_TARBALL -5
46 #define RMIL_OLDSPEC -1
50 #define addMacro(_mc, _n, _o, _b, _l) rpmPushMacro(_mc, _n, _o, _b, _l)
51 #define delMacro(_mc, _n) rpmPopMacro(_mc, _n)
54 #define RPMEXPR_EXPAND (1 << 0)
57 #define RPMEXPAND_EXPAND_ARGS (1 << 0)
81 char ** obuf,
int flags);
94 char ** obuf,
int flags);
107 const char * b,
int level);
121 const char * b,
int level,
char *const * ARGV_const_t
int rpmPushMacroFlags(rpmMacroContext mc, const char *n, const char *o, const char *b, int level, rpmMacroFlags flags)
Push macro to context.
void rpmFreeMacros(rpmMacroContext mc)
Destroy macro context.
char * rpmExpand(const char *arg,...) RPM_GNUC_NULL_TERMINATED
Return (malloc'ed) concatenated macro expansion(s).
int rpmLoadMacroFile(rpmMacroContext mc, const char *fn)
Load macro context from a macro file.
void rpmLoadMacros(rpmMacroContext mc, int level)
Load macros from specific context into global context.
int rpmExpandNumeric(const char *arg)
Return macro expansion as a numeric value.
int rpmExprBoolFlags(const char *expr, int flags)
Evaluate boolean expression.
int rpmPopMacro(rpmMacroContext mc, const char *n)
Pop macro from context.
char * rpmExprStr(const char *expr)
Evaluate string expression.
char * rpmExprStrFlags(const char *expr, int flags)
Evaluate string expression.
void rpmInitMacros(rpmMacroContext mc, const char *macrofiles)
Initialize macro context from set of macrofile(s).
int rpmExpandMacros(rpmMacroContext mc, const char *sbuf, char **obuf, int flags)
Expand macro into buffer.
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.
const char * rpmConfigDir(void)
Return rpm configuration base directory.
int rpmExpandThisMacro(rpmMacroContext mc, const char *n, ARGV_const_t args, char **obuf, int flags)
Expand a specific macro into buffer.
void rpmDumpMacroTable(rpmMacroContext mc, FILE *fp)
Print macros to file stream.
int rpmExprBool(const char *expr)
Evaluate boolean expression.
const char * macrofiles
List of macro files to read when configuring rpm.
int rpmMacroIsParametric(rpmMacroContext mc, const char *n)
int rpmMacroIsDefined(rpmMacroContext mc, const char *n)
struct rpmMacroEntry_s * rpmMacroEntry
struct rpmMacroContext_s * rpmMacroContext
enum rpmMacroFlags_e rpmMacroFlags
rpmMacroContext rpmCLIMacroContext
rpmMacroContext rpmGlobalMacroContext
#define RPM_GNUC_NULL_TERMINATED