Go to the source code of this file.
Data Structures | |
struct | MacroContext_s |
struct | MacroEntry_s |
Defines | |
#define | RMIL_DEFAULT -15 |
Markers for sources of macros added throughout rpm. More... | |
#define | RMIL_MACROFILES -13 |
#define | RMIL_RPMRC -11 |
#define | RMIL_CMDLINE -7 |
#define | RMIL_TARBALL -5 |
#define | RMIL_SPEC -3 |
#define | RMIL_OLDSPEC -1 |
#define | RMIL_GLOBAL 0 |
Typedefs | |
typedef MacroEntry_s * | MacroEntry |
typedef MacroContext_s * | MacroContext |
typedef enum rpmCompressedMagic_e | rpmCompressedMagic |
Enumerations | |
enum | rpmCompressedMagic_e { COMPRESSED_NOT = 0, COMPRESSED_OTHER = 1, COMPRESSED_BZIP2 = 2, COMPRESSED_ZIP = 3 } |
Functions | |
void | rpmDumpMacroTable (MacroContext mc, FILE *fp) |
Print macros to file stream. More... | |
int | expandMacros (void *spec, MacroContext mc, char *sbuf, size_t slen) |
Expand macro into buffer. More... | |
void | addMacro (MacroContext mc, const char *n, const char *o, const char *b, int level) |
Add macro to context. More... | |
void | delMacro (MacroContext mc, const char *n) |
Delete macro from context. More... | |
int | rpmDefineMacro (MacroContext mc, const char *macro, int level) |
Define macro in context. More... | |
void | rpmLoadMacros (MacroContext mc, int level) |
Load macros from specific context into global context. More... | |
void | rpmInitMacros (MacroContext mc, const char *macrofiles) |
Initialize global macro context from set of macrofile(s). More... | |
void | rpmFreeMacros (MacroContext mc) |
Destroy macro context. More... | |
int | isCompressed (const char *file, rpmCompressedMagic *compressed) |
Return type of compression used in file. More... | |
char * | rpmExpand (const char *arg,...) |
Return (malloc'ed) concatenated macro expansion(s). More... | |
char * | rpmCleanPath (char *path) |
Canonicalize file path. More... | |
const char * | rpmGetPath (const char *path,...) |
Return (malloc'ed) expanded, canonicalized, file path. More... | |
const char * | rpmGenPath (const char *urlroot, const char *urlmdir, const char *urlfile) |
Merge 3 args into path, any or all of which may be a url. More... | |
int | rpmExpandNumeric (const char *arg) |
Return macro expansion as a numeric value. More... | |
Variables | |
MacroContext | rpmGlobalMacroContext |
MacroContext | rpmCLIMacroContext |
const char * | macrofiles |
Definition in file rpmmacro.h.
|
Definition at line 50 of file rpmmacro.h. Referenced by ftsCacheUpdate, rpmcliAllArgCallback, and rpmInitMacros. |
|
Markers for sources of macros added throughout rpm.
Definition at line 46 of file rpmmacro.h. Referenced by main, rpmtsOpenSDB, setDefaults, setPathDefault, and setVarDefault. |
|
Definition at line 54 of file rpmmacro.h. Referenced by expandMacro. |
|
Definition at line 47 of file rpmmacro.h. Referenced by rpmInitMacros. |
|
Definition at line 53 of file rpmmacro.h. Referenced by handlePreambleTag. |
|
Definition at line 48 of file rpmmacro.h. Referenced by doReadRC, parseSpec, and rpmRebuildTargetVars. |
|
Definition at line 52 of file rpmmacro.h. Referenced by addSource, doScript, doSetupMacro, handlePreambleTag, and parseSpec. |
|
Definition at line 51 of file rpmmacro.h. Referenced by buildForTarget. |
|
The structure used to store the set of macros in a context. |
|
The structure used to store a macro. |
|
Referenced by buildForTarget, doFoo, doPatch, doUntar, and isCompressed. |
|
Definition at line 151 of file rpmmacro.h. |
|
Add macro to context.
Definition at line 1507 of file macro.c. Referenced by addSource, buildForTarget, doDefine, doReadRC, doScript, doSetupMacro, expandMacro, grabArgs, handlePreambleTag, main, makeGPGSignature, makePGPSignature, parseSpec, rpmLoadMacros, rpmPlatform, rpmrc_AddMacro, rpmRebuildTargetVars, rpmtsOpenSDB, setDefaults, setPathDefault, and setVarDefault. |
|
Delete macro from context.
Definition at line 1533 of file macro.c. Referenced by doScript, doUndefine, handlePreambleTag, makeGPGSignature, makePGPSignature, parseSpec, rpmrc_DelMacro, rpmRebuildTargetVars, and rpmtsOpenSDB. |
|
Expand macro into buffer.
Definition at line 1472 of file macro.c. Referenced by addFileToTagAux, copyNextLine, processPackageFiles, rpmExpand, and rpmGetPath. |
|
Return type of compression used in file.
Definition at line 1681 of file macro.c. Referenced by buildForTarget, doFoo, doPatch, and doUntar. |
|
Canonicalize file path.
Definition at line 1783 of file macro.c. Referenced by doLookup, rpmdbMoveDatabase, rpmdbRemoveDatabase, rpmGetPath, and rpmQueryVerify. |
|
Define macro in context.
Definition at line 1549 of file macro.c. Referenced by ftsCacheUpdate, rpmcliAllArgCallback, rpmdbRebuild, and rpmInitMacros. |
|
Print macros to file stream.
Definition at line 202 of file macro.c. Referenced by expandMacro, and rpmShowRC. |
|
Return (malloc'ed) concatenated macro expansion(s).
Definition at line 1733 of file macro.c. Referenced by checkFiles, checkForValidArchitectures, checkPassPhrase, cpio_doio, dbiTagsInit, defaultMachine, doPrimary, doScript, doSetupMacro, fillOutMainPackage, generateDepends, i18nTag, ignoreDep, initGlobs, main, makeGPGSignature, makePGPSignature, newRpmdb, open_dso, packageBinaries, parseForRegexLang, parseForRegexMultiLib, parseSpec, rdToken, readLine, rpmcliAllArgCallback, rpmdbSetIteratorRE, rpmExpandNumeric, rpmGetPassPhrase, rpmLookupSignatureType, rpmPlatform, rpmReadConfigFiles, rpmRollback, rpmts_IDTXglob, rpmtsFindPubkey, rpmtsSolve, urlFind, and writeRPM. |
|
Return macro expansion as a numeric value. Boolean values ('Y' or 'y' returns 1, 'N' or 'n' returns 0) are permitted as well. An undefined macro returns 0.
Definition at line 1756 of file macro.c. Referenced by build, checkFiles, dbiOpen, genCpioListAndHeader, main, newRpmdb, parseRCPOT, parseSpec, processPackageFiles, rpmcliQuery, rpmcliVerify, rpmdbInit, rpmdbOpen, rpmdbRebuild, rpmdbVerify, rpmErase, rpmInstall, rpmLeadVersion, rpmRollback, rpmts_Create, and rpmtsOpenSDB. |
|
Destroy macro context.
|
|
Merge 3 args into path, any or all of which may be a url. The leading part of the first URL encountered is used for the result, other URL prefixes are discarded, permitting a primitive form of URL inheiritance.
Definition at line 1902 of file macro.c. Referenced by buildForTarget, db3close, db3open, db_init, doScript, doSetupMacro, handlePreambleTag, makeTempFile, processBinaryFile, processPackageFiles, and rpmInstall. |
|
Return (malloc'ed) expanded, canonicalized, file path.
Definition at line 1871 of file macro.c. Referenced by addFileToTagAux, addSource, buildForTarget, db3close, db3open, doPatch, doReadRC, doRmSource, doUntar, newRpmdb, packageBinaries, packageSources, parseFiles, parseForSimple, parseSpec, processPackageFiles, processSourceFiles, readIcon, rpmdbRebuild, rpmDetectPGPVersion, rpmGenPath, rpmGetFilesystemUsage, rpmtsOpenDB, rpmtsOpenSDB, and setPathDefault. |
|
Initialize global macro context from set of macrofile(s).
Definition at line 1583 of file macro.c. Referenced by rpmReadRC. |
|
Load macros from specific context into global context.
Definition at line 1562 of file macro.c. Referenced by rpmInitMacros. |
|
Definition at line 30 of file rpmmacro.h. |
|
Definition at line 27 of file rpmmacro.h. |