Functions | |
void | rpmDumpMacroTable (rpmMacroContext mc, FILE *fp) |
Print macros to file stream. | |
int | expandMacros (void *spec, rpmMacroContext mc, char *sbuf, size_t slen) |
Expand macro into buffer. | |
void | addMacro (rpmMacroContext mc, const char *n, const char *o, const char *b, int level) |
Add macro to context. | |
void | delMacro (rpmMacroContext mc, const char *n) |
Delete macro from context. | |
int | rpmDefineMacro (rpmMacroContext mc, const char *macro, int level) |
Define macro in context. | |
void | rpmLoadMacros (rpmMacroContext mc, int level) |
Load macros from specific context into global context. | |
int | rpmLoadMacroFile (rpmMacroContext mc, const char *fn) |
Load macro context from a macro file. | |
void | rpmInitMacros (rpmMacroContext mc, const char *macrofiles) |
Initialize macro context from set of macrofile(s). | |
void | rpmFreeMacros (rpmMacroContext mc) |
Destroy macro context. | |
char * | rpmExpand (const char *arg,...) RPM_GNUC_NULL_TERMINATED |
Return (malloc'ed) concatenated macro expansion(s). | |
int | rpmExpandNumeric (const char *arg) |
Return macro expansion as a numeric value. | |
const char * | rpmConfigDir (void) |
Return rpm configuration base directory. |
void addMacro | ( | rpmMacroContext | mc, | |
const char * | n, | |||
const char * | o, | |||
const char * | b, | |||
int | level | |||
) |
Add macro to context.
mc | macro context (NULL uses global context). | |
n | macro name | |
o | macro paramaters | |
b | macro body | |
level | macro recursion level (0 is entry API) |
Referenced by buildForTarget().
void delMacro | ( | rpmMacroContext | mc, | |
const char * | n | |||
) |
Delete macro from context.
mc | macro context (NULL uses global context). | |
n | macro name |
int expandMacros | ( | void * | spec, | |
rpmMacroContext | mc, | |||
char * | sbuf, | |||
size_t | slen | |||
) |
Expand macro into buffer.
spec | cookie (unused) | |
mc | macro context (NULL uses global context). |
sbuf | input macro to expand, output expansion |
slen | size of buffer |
const char* rpmConfigDir | ( | void | ) |
Return rpm configuration base directory.
If RPM_CONFIGDIR environment variable is set, it's value will be used. Otherwise the configuration directory is the one set at build time, typically /usr/lib/rpm. The value of rpmConfigDir() is determined on first call to this function and is guaranteed to remain the same on subsequent calls.
Referenced by main().
int rpmDefineMacro | ( | rpmMacroContext | mc, | |
const char * | macro, | |||
int | level | |||
) |
Define macro in context.
mc | macro context (NULL uses global context). | |
macro | macro name, options, body | |
level | macro recursion level (0 is entry API) |
void rpmDumpMacroTable | ( | rpmMacroContext | mc, | |
FILE * | fp | |||
) |
Print macros to file stream.
mc | macro context (NULL uses global context). | |
fp | file stream (NULL uses stderr). |
char* rpmExpand | ( | const char * | arg, | |
... | ||||
) |
Return (malloc'ed) concatenated macro expansion(s).
arg | macro(s) to expand (NULL terminates list) |
Referenced by getTarSpec().
int rpmExpandNumeric | ( | const char * | arg | ) |
void rpmFreeMacros | ( | rpmMacroContext | mc | ) |
void rpmInitMacros | ( | rpmMacroContext | mc, | |
const char * | macrofiles | |||
) |
Initialize macro context from set of macrofile(s).
mc | macro context | |
macrofiles | colon separated list of macro files (NULL does nothing) |
int rpmLoadMacroFile | ( | rpmMacroContext | mc, | |
const char * | fn | |||
) |
Load macro context from a macro file.
mc | (unused) | |
fn | macro file name |
void rpmLoadMacros | ( | rpmMacroContext | mc, | |
int | level | |||
) |
Load macros from specific context into global context.
mc | macro context (NULL does nothing). | |
level | macro recursion level (0 is entry API) |