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) 69 char ** obuf,
int flags);
82 const char * b,
int level);
void rpmLoadMacros(rpmMacroContext mc, int level)
Load macros from specific context into global context.
struct rpmMacroContext_s * rpmMacroContext
#define RPM_GNUC_NULL_TERMINATED
char * rpmExprStr(const char *expr)
Evaluate string expression.
int rpmPushMacro(rpmMacroContext mc, const char *n, const char *o, const char *b, int level)
Push macro to context.
int rpmExprBool(const char *expr)
Evaluate boolean expression.
int rpmDefineMacro(rpmMacroContext mc, const char *macro, int level)
Define macro in context.
void rpmInitMacros(rpmMacroContext mc, const char *macrofiles)
Initialize macro context from set of macrofile(s).
char * rpmExpand(const char *arg,...) RPM_GNUC_NULL_TERMINATED
Return (malloc'ed) concatenated macro expansion(s).
rpmMacroContext rpmGlobalMacroContext
int rpmExpandNumeric(const char *arg)
Return macro expansion as a numeric value.
rpmMacroContext rpmCLIMacroContext
int rpmPopMacro(rpmMacroContext mc, const char *n)
Pop macro from context.
void rpmDumpMacroTable(rpmMacroContext mc, FILE *fp)
Print macros to file stream.
int rpmLoadMacroFile(rpmMacroContext mc, const char *fn)
Load macro context from a macro file.
const char * macrofiles
List of macro files to read when configuring rpm.
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.
struct rpmMacroEntry_s * rpmMacroEntry