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 struct MacroEntry_s * | MacroEntry |
typedef struct 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 sbuflen) |
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 context into global context. More... | |
void | rpmInitMacros (MacroContext mc, const char *macrofiles) |
Initialize 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 *root, const char *mdir, const char *file) |
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... |
Definition in file rpmmacro.h.
|
Definition at line 32 of file rpmmacro.h. |
|
Markers for sources of macros added throughout rpm.
Definition at line 28 of file rpmmacro.h. |
|
Definition at line 36 of file rpmmacro.h. |
|
Definition at line 29 of file rpmmacro.h. |
|
Definition at line 35 of file rpmmacro.h. |
|
Definition at line 30 of file rpmmacro.h. |
|
Definition at line 34 of file rpmmacro.h. |
|
Definition at line 33 of file rpmmacro.h. |
|
The structure used to store the set of macros in a context. |
|
The structure used to store a macro. |
|
|
|
Definition at line 122 of file rpmmacro.h. |
|
Add macro to context.
Definition at line 1420 of file macro.c. Referenced by RMIL_GLOBAL(), addSource(), buildForTarget(), doAddMacro(), doDefine(), doReadRC(), doScript(), doSetupMacro(), expandMacro(), grabArgs(), handlePreambleTag(), main(), parseSpec(), rpmInstallLoadMacros(), rpmLoadMacros(), rpmRebuildTargetVars(), setDefaults(), setPathDefault(), and setVarDefault().
|
|
Delete macro from context.
Definition at line 1446 of file macro.c. Referenced by RMIL_GLOBAL(), doDelMacro(), doScript(), doUndefine(), handlePreambleTag(), parseSpec(), and rpmRebuildTargetVars().
|
|
Expand macro into buffer.
Definition at line 1381 of file macro.c. Referenced by RMIL_GLOBAL(), addFileToTagAux(), copyNextLine(), processPackageFiles(), rpmExpand(), and rpmGetPath().
|
|
Return type of compression used in file.
Definition at line 1588 of file macro.c. Referenced by buildForTarget(), doFoo(), doPatch(), and doUntar().
|
|
Canonicalize file path.
Definition at line 1688 of file macro.c. Referenced by doLookup(), openDatabase(), rpmGetPath(), rpmQueryVerify(), rpmdbMoveDatabase(), and rpmdbRemoveDatabase().
|
|
Define macro in context.
Definition at line 1461 of file macro.c. Referenced by RMIL_GLOBAL(), main(), rpmInitMacros(), and rpmdbRebuild().
|
|
Print macros to file stream.
Definition at line 180 of file macro.c. Referenced by RMIL_GLOBAL(), expandMacro(), and rpmShowRC().
|
|
Return (malloc'ed) concatenated macro expansion(s).
Definition at line 1639 of file macro.c. Referenced by checkForValidArchitectures(), checkPassPhrase(), cpio_doio(), db3New(), dbiTagsInit(), doPrimary(), doScript(), doSetupMacro(), fillOutMainPackage(), generateDepends(), i18nTag(), main(), makeGPGSignature(), makePGPSignature(), newRpmdb(), packageBinaries(), parseForRegexLang(), parseForRegexMultiLib(), parseSpec(), rdToken(), readLine(), rpmExpandNumeric(), rpmGetPassPhrase(), rpmLookupSignatureType(), rpmReadConfigFiles(), rpmRollback(), rpmdbSetIteratorRE(), runScript(), skipFiles(), urlFind(), verifyGPGSignature(), verifyPGPSignature(), 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 1661 of file macro.c. Referenced by dbiOpen(), genCpioListAndHeader(), main(), newRpmdb(), openDatabase(), parseRCPOT(), parseSpec(), processPackageFiles(), rpmLeadVersion(), rpmdbInit(), rpmdbOpen(), rpmdbRebuild(), rpmdbVerify(), and skipFiles().
|
|
Destroy macro context.
Definition at line 1561 of file macro.c. Referenced by RMIL_GLOBAL(), build(), and main().
|
|
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's are discarded, permitting a primitive form of inheiritance.
Definition at line 1800 of file macro.c. Referenced by buildForTarget(), db1close(), db1open(), db3close(), db3open(), db_init(), doScript(), doSetupMacro(), handlePreambleTag(), makeTempFile(), processBinaryFile(), processPackageFiles(), psmStage(), rpmInstall(), and rpmInstallSourcePackage().
|
|
Return (malloc'ed) expanded, canonicalized, file path.
Definition at line 1771 of file macro.c. Referenced by addFileToTagAux(), addSource(), buildForTarget(), checkSpec(), db3close(), db3open(), doPatch(), doReadRC(), doRmSource(), doUntar(), newRpmdb(), packageBinaries(), packageSources(), parseFiles(), parseForSimple(), parseSpec(), processPackageFiles(), processSourceFiles(), psmStage(), readIcon(), rpmDetectPGPVersion(), rpmErase(), rpmGenPath(), rpmGetFilesystemUsage(), rpmInstall(), rpmdbRebuild(), setPathDefault(), verifyGPGSignature(), and verifyPGPSignature().
|
|
Initialize macro context from set of macrofile(s).
Definition at line 1496 of file macro.c. Referenced by RMIL_GLOBAL(), and rpmReadRC().
|
|
Load macros from context into global context.
Definition at line 1475 of file macro.c. Referenced by RMIL_GLOBAL(), and rpmInitMacros().
|