Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

rpmio/rpmmacro.h

Go to the documentation of this file.
00001 #ifndef _H_MACRO_
00002 #define _H_MACRO_
00003 
00009 typedef /*@abstract@*/ struct MacroEntry_s {
00010     struct MacroEntry_s *prev;
00011     const char *name;   
00012     const char *opts;   
00013     const char *body;   
00014     int used;           
00015     int level;          
00016 } * MacroEntry;
00017 
00019 typedef /*@abstract@*/ struct MacroContext_s {
00020 /*@owned@*//*@null@*/ MacroEntry *macroTable;   
00021     int         macrosAllocated;
00022     int         firstFree;      
00023 } * MacroContext;
00024 
00028 #define RMIL_DEFAULT    -15
00029 #define RMIL_MACROFILES -13
00030 #define RMIL_RPMRC      -11
00031 
00032 #define RMIL_CMDLINE    -7
00033 #define RMIL_TARBALL    -5
00034 #define RMIL_SPEC       -3
00035 #define RMIL_OLDSPEC    -1
00036 #define RMIL_GLOBAL     0
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00047 void    rpmDumpMacroTable       (/*@null@*/ MacroContext mc,
00048                                         /*@null@*/ FILE * fp)
00049         /*@modifies *fp, fileSystem @*/;
00050 
00061 int     expandMacros    (/*@null@*/ void * spec, /*@null@*/ MacroContext mc,
00062                                 /*@in@*/ /*@out@*/ char * sbuf,
00063                                 size_t sbuflen)
00064         /*@modifies *sbuf, internalState @*/;
00065 
00075 void    addMacro        (/*@null@*/ MacroContext mc, const char * n,
00076                                 /*@null@*/ const char * o,
00077                                 /*@null@*/ const char * b, int level)
00078         /*@modifies mc, internalState @*/;
00079 
00085 void    delMacro        (/*@null@*/ MacroContext mc, const char * n)
00086         /*@modifies mc, internalState @*/;
00087 
00095 int     rpmDefineMacro  (/*@null@*/ MacroContext mc, const char * macro,
00096                                 int level)
00097         /*@modifies mc, internalState @*/;
00098 
00104 void    rpmLoadMacros   (/*@null@*/ MacroContext mc, int level)
00105         /*@modifies mc, internalState @*/;
00106 
00112 void    rpmInitMacros   (/*@null@*/ MacroContext mc, const char * macrofiles)
00113         /*@modifies mc, internalState, fileSystem @*/;
00114 
00119 void    rpmFreeMacros   (/*@null@*/ MacroContext mc)
00120         /*@modifies mc, internalState @*/;
00121 
00122 typedef enum rpmCompressedMagic_e {
00123     COMPRESSED_NOT              = 0,    
00124     COMPRESSED_OTHER            = 1,    
00125     COMPRESSED_BZIP2            = 2,    
00126     COMPRESSED_ZIP              = 3     
00127 } rpmCompressedMagic;
00128 
00135 int     isCompressed    (const char * file,
00136                                 /*@out@*/ rpmCompressedMagic * compressed)
00137         /*@modifies *compressed, fileSystem @*/;
00138 
00144 char *  rpmExpand       (/*@null@*/ const char * arg, ...)
00145         /*@*/;
00146 
00152 /*@null@*/ char * rpmCleanPath  (/*@null@*/ char * path)
00153         /*@modifies *path @*/;
00154 
00160 /*@-redecl@*/
00161 const char * rpmGetPath (/*@null@*/ const char * path, ...)
00162         /*@*/;
00163 /*@=redecl@*/
00164 
00175 /*@-redecl@*/
00176 const char * rpmGenPath (/*@null@*/ const char * root,
00177                         /*@null@*/ const char * mdir,
00178                         /*@null@*/ const char * file)
00179         /*@*/;
00180 /*@=redecl@*/
00181 
00189 int     rpmExpandNumeric (const char * arg)
00190         /*@*/;
00191 
00192 #ifdef __cplusplus
00193 }
00194 #endif
00195 
00196 #endif  /* _H_ MACRO_ */

Generated at Thu Sep 6 11:25:44 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001