build/rpmfc.h

Go to the documentation of this file.
00001 #ifndef _H_RPMFC_
00002 #define _H_RPMFC_
00003 
00004 #undef  FILE_RCSID
00005 #include "magic.h"
00006 
00007 /*@-exportlocal@*/
00008 /*@unchecked@*/
00009 extern int _rpmfc_debug;
00010 /*@=exportlocal@*/
00011 
00014 typedef /*@abstract@*/ struct rpmfc_s * rpmfc;
00015 
00018 struct rpmfc_s {
00019     int nfiles;         
00020     int fknown;         
00021     int fwhite;         
00022     int ix;             
00023     int skipProv;       
00024     int skipReq;        
00025     int tracked;        
00026     size_t brlen;       
00028     ARGV_t fn;          
00029     ARGI_t fcolor;      
00030     ARGI_t fcdictx;     
00031     ARGI_t fddictx;     
00032     ARGI_t fddictn;     
00033     ARGV_t cdict;       
00034     ARGV_t ddict;       
00035     ARGI_t ddictx;      
00037 /*@relnull@*/
00038     rpmds provides;     
00039 /*@relnull@*/
00040     rpmds requires;     
00042     StringBuf sb_java;  
00043     StringBuf sb_perl;  
00044     StringBuf sb_python;
00045     StringBuf sb_php;   
00047 };
00048 
00051 enum FCOLOR_e {
00052     RPMFC_BLACK                 = 0,
00053     RPMFC_ELF32                 = (1 <<  0),
00054     RPMFC_ELF64                 = (1 <<  1),
00055 #define RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64)
00056 
00057     RPMFC_MODULE                = (1 <<  7),
00058     RPMFC_EXECUTABLE            = (1 <<  8),
00059     RPMFC_SCRIPT                = (1 <<  9),
00060     RPMFC_TEXT                  = (1 << 10),
00061     RPMFC_DATA                  = (1 << 11),    /* XXX unused */
00062     RPMFC_DOCUMENT              = (1 << 12),
00063     RPMFC_STATIC                = (1 << 13),
00064     RPMFC_NOTSTRIPPED           = (1 << 14),
00065     RPMFC_COMPRESSED            = (1 << 15),
00066 
00067     RPMFC_DIRECTORY             = (1 << 16),
00068     RPMFC_SYMLINK               = (1 << 17),
00069     RPMFC_DEVICE                = (1 << 18),
00070     RPMFC_LIBRARY               = (1 << 19),
00071     RPMFC_ARCHIVE               = (1 << 20),
00072     RPMFC_FONT                  = (1 << 21),
00073     RPMFC_IMAGE                 = (1 << 22),
00074     RPMFC_MANPAGE               = (1 << 23),
00075 
00076     RPMFC_PERL                  = (1 << 24),
00077     RPMFC_JAVA                  = (1 << 25),
00078     RPMFC_PYTHON                = (1 << 26),
00079     RPMFC_PHP                   = (1 << 27),
00080     RPMFC_TCL                   = (1 << 28),
00081     RPMFC_MONO                  = (1 <<  6),
00082 
00083     RPMFC_WHITE                 = (1 << 29),
00084     RPMFC_INCLUDE               = (1 << 30),
00085     RPMFC_ERROR                 = (1 << 31)
00086 };
00087 typedef enum FCOLOR_e FCOLOR_t;
00088 
00091 struct rpmfcTokens_s {
00092 /*@observer@*/
00093     const char * token;
00094     int colors;
00095 };
00096 
00099 typedef struct rpmfcTokens_s * rpmfcToken;
00100 
00101 #ifdef __cplusplus
00102 extern "C" {
00103 #endif
00104 
00112 int rpmfcExec(ARGV_t av, StringBuf sb_stdin, /*@out@*/ StringBuf * sb_stdoutp,
00113                 int failnonzero)
00114         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00115         /*@modifies *sb_stdoutp, rpmGlobalMacroContext,
00116                 fileSystem, internalState @*/
00117         /*@requires maxSet(sb_stdoutp) >= 0 @*/;
00118 
00124 /*@-exportlocal@*/
00125 int rpmfcColoring(const char * fmstr)
00126         /*@*/;
00127 /*@=exportlocal@*/
00128 
00136 /*@-exportlocal@*/
00137 void rpmfcPrint(/*@null@*/ const char * msg, rpmfc fc, /*@null@*/ FILE * fp)
00138         /*@globals fileSystem @*/
00139         /*@modifies *fp, fc, fileSystem @*/;
00140 /*@=exportlocal@*/
00141 
00147 /*@-exportlocal@*/
00148 /*@null@*/
00149 rpmfc rpmfcFree(/*@only@*/ /*@null@*/ rpmfc fc)
00150         /*@modifies fc @*/;
00151 /*@=exportlocal@*/
00152 
00157 /*@-exportlocal@*/
00158 rpmfc rpmfcNew(void)
00159         /*@*/;
00160 /*@=exportlocal@*/
00161 
00169 /*@-exportlocal@*/
00170 int rpmfcClassify(rpmfc fc, ARGV_t argv, /*@null@*/ int16_t * fmode)
00171         /*@globals fileSystem, internalState @*/
00172         /*@modifies fc, fileSystem, internalState @*/;
00173 /*@=exportlocal@*/
00174 
00180 /*@-exportlocal@*/
00181 int rpmfcApply(rpmfc fc)
00182         /*@modifies fc @*/;
00183 /*@=exportlocal@*/
00184 
00191 int rpmfcGenerateDepends(const Spec spec, Package pkg)
00192         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00193         /*@modifies pkg->cpioList, pkg->header,
00194                 rpmGlobalMacroContext, fileSystem, internalState @*/;
00195 
00196 #ifdef __cplusplus
00197 }
00198 #endif
00199 
00200 #endif /* _H_RPMFC_ */

Generated on Tue Feb 19 22:53:13 2008 for rpm by  doxygen 1.5.1