rpmmacro.h
Go to the documentation of this file.
#ifndef _H_MACRO_
#define _H_MACRO_
#include <stdio.h>
#include <stddef.h>
#include <rpm/rpmutil.h>
#include <rpm/rpmfileutil.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct rpmMacroEntry_s * rpmMacroEntry;
typedef struct rpmMacroContext_s * rpmMacroContext;
extern rpmMacroContext rpmGlobalMacroContext;
extern rpmMacroContext rpmCLIMacroContext;
extern const char * macrofiles;
#define RMIL_DEFAULT -15
#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
void rpmDumpMacroTable (rpmMacroContext mc,
FILE * fp);
int expandMacros (void * spec, rpmMacroContext mc,
char * sbuf,
size_t slen);
void addMacro (rpmMacroContext mc, const char * n,
const char * o,
const char * b, int level);
void delMacro (rpmMacroContext mc, const char * n);
int rpmDefineMacro (rpmMacroContext mc, const char * macro,
int level);
void rpmLoadMacros (rpmMacroContext mc, int level);
int rpmLoadMacroFile(rpmMacroContext mc, const char * fn);
void rpmInitMacros (rpmMacroContext mc, const char * macrofiles);
void rpmFreeMacros (rpmMacroContext mc);
char * rpmExpand (const char * arg, ...) RPM_GNUC_NULL_TERMINATED;
int rpmExpandNumeric (const char * arg);
const char *rpmConfigDir(void);
#ifdef __cplusplus
}
#endif
#endif /* _H_ MACRO_ */