- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# rpmmacro.h

Go to the documentation of this file.

    00001 #ifndef _H_MACRO_
    00002 #define _H_MACRO_
    00003
    00008 #include <stdio.h>
    00009 #include <stddef.h>
    00010
    00011 #include <rpm/rpmutil.h>
    00012
    00013 #ifdef __cplusplus
    00014 extern "C" {
    00015 #endif
    00016
    00017 typedef struct rpmMacroEntry_s * rpmMacroEntry;
    00018
    00019 typedef struct rpmMacroContext_s * rpmMacroContext;
    00020
    00021 extern rpmMacroContext rpmGlobalMacroContext;
    00022
    00023 extern rpmMacroContext rpmCLIMacroContext;
    00024
    00030 extern const char * macrofiles;
    00031
    00035 #define RMIL_DEFAULT    -15
    00036 #define RMIL_MACROFILES -13
    00037 #define RMIL_RPMRC      -11
    00038
    00039 #define RMIL_CMDLINE    -7
    00040 #define RMIL_TARBALL    -5
    00041 #define RMIL_SPEC       -3
    00042 #define RMIL_OLDSPEC    -1
    00043 #define RMIL_GLOBAL     0
    00044
    00050 void    rpmDumpMacroTable       (rpmMacroContext mc,
    00051                                         FILE * fp);
    00052
    00063 int     expandMacros    (void * spec, rpmMacroContext mc,
    00064                                 char * sbuf,
    00065                                 size_t slen);
    00066
    00076 void    addMacro        (rpmMacroContext mc, const char * n,
    00077                                 const char * o,
    00078                                 const char * b, int level);
    00079
    00085 void    delMacro        (rpmMacroContext mc, const char * n);
    00086
    00094 int     rpmDefineMacro  (rpmMacroContext mc, const char * macro,
    00095                                 int level);
    00096
    00102 void    rpmLoadMacros   (rpmMacroContext mc, int level);
    00103
    00109 int     rpmLoadMacroFile(rpmMacroContext mc, const char * fn);
    00110
    00116 void    rpmInitMacros   (rpmMacroContext mc, const char * macrofiles);
    00117
    00122 void    rpmFreeMacros   (rpmMacroContext mc);
    00123
    00129 char * rpmExpand        (const char * arg, ...) RPM_GNUC_NULL_TERMINATED;
    00130
    00138 int     rpmExpandNumeric (const char * arg);
    00139
    00140 #ifdef __cplusplus
    00141 }
    00142 #endif
    00143
    00144 #endif  /* _H_ MACRO_ */