lib/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 typedef enum FCOLOR_e FCOLOR_t;
00019 
00022 typedef struct rpmfcTokens_s * rpmfcToken;
00023 
00026 enum FCOLOR_e {
00027     RPMFC_BLACK                 = 0,
00028     RPMFC_ELF32                 = (1 <<  0),
00029     RPMFC_ELF64                 = (1 <<  1),
00030     RPMFC_ELFMIPSN32            = (1 <<  2),
00031 #define RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
00032 
00033     RPMFC_PKGCONFIG             = (1 <<  4),
00034     RPMFC_LIBTOOL               = (1 <<  5),
00035     RPMFC_BOURNE                = (1 <<  6),
00036 
00037     RPMFC_MODULE                = (1 <<  7),
00038     RPMFC_EXECUTABLE            = (1 <<  8),
00039     RPMFC_SCRIPT                = (1 <<  9),
00040     RPMFC_TEXT                  = (1 << 10),
00041     RPMFC_DATA                  = (1 << 11),    /* XXX unused */
00042     RPMFC_DOCUMENT              = (1 << 12),
00043     RPMFC_STATIC                = (1 << 13),
00044     RPMFC_NOTSTRIPPED           = (1 << 14),
00045     RPMFC_COMPRESSED            = (1 << 15),
00046 
00047     RPMFC_DIRECTORY             = (1 << 16),
00048     RPMFC_SYMLINK               = (1 << 17),
00049     RPMFC_DEVICE                = (1 << 18),
00050     RPMFC_LIBRARY               = (1 << 19),
00051     RPMFC_ARCHIVE               = (1 << 20),
00052     RPMFC_FONT                  = (1 << 21),
00053     RPMFC_IMAGE                 = (1 << 22),
00054     RPMFC_MANPAGE               = (1 << 23),
00055 
00056     RPMFC_PERL                  = (1 << 24),
00057     RPMFC_JAVA                  = (1 << 25),
00058     RPMFC_PYTHON                = (1 << 26),
00059     RPMFC_PHP                   = (1 << 27),
00060     RPMFC_TCL                   = (1 << 28),
00061 
00062     RPMFC_WHITE                 = (1 << 29),
00063     RPMFC_INCLUDE               = (1 << 30),
00064     RPMFC_ERROR                 = (1 << 31)
00065 };
00066 
00067 #if defined(_RPMFC_INTERNAL)
00068 
00070 struct rpmfc_s {
00071     int nfiles;         
00072     int fknown;         
00073     int fwhite;         
00074     int ix;             
00075     int skipProv;       
00076     int skipReq;        
00077     int tracked;        
00078     size_t brlen;       
00080     ARGV_t fn;          
00081     ARGI_t fcolor;      
00082     ARGI_t fcdictx;     
00083     ARGI_t fddictx;     
00084     ARGI_t fddictn;     
00085     ARGV_t cdict;       
00086     ARGV_t ddict;       
00087     ARGI_t ddictx;      
00089 /*@relnull@*/
00090     rpmds provides;     
00091 /*@relnull@*/
00092     rpmds requires;     
00094     StringBuf sb_java;  
00095     StringBuf sb_perl;  
00096     StringBuf sb_python;
00097     StringBuf sb_php;   
00099 };
00100 
00103 struct rpmfcTokens_s {
00104 /*@observer@*/
00105     const char * token;
00106     int colors;
00107 };
00108 #endif
00109 
00110 #ifdef __cplusplus
00111 extern "C" {
00112 #endif
00113 
00121 int rpmfcExec(ARGV_t av, StringBuf sb_stdin, /*@out@*/ StringBuf * sb_stdoutp,
00122                 int failnonzero)
00123         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00124         /*@modifies *sb_stdoutp, rpmGlobalMacroContext,
00125                 fileSystem, internalState @*/
00126         /*@requires maxSet(sb_stdoutp) >= 0 @*/;
00127 
00133 /*@-exportlocal@*/
00134 int rpmfcColoring(const char * fmstr)
00135         /*@*/;
00136 /*@=exportlocal@*/
00137 
00145 /*@-exportlocal@*/
00146 void rpmfcPrint(/*@null@*/ const char * msg, rpmfc fc, /*@null@*/ FILE * fp)
00147         /*@globals fileSystem @*/
00148         /*@modifies *fp, fc, fileSystem @*/;
00149 /*@=exportlocal@*/
00150 
00156 /*@-exportlocal@*/
00157 /*@null@*/
00158 rpmfc rpmfcFree(/*@only@*/ /*@null@*/ rpmfc fc)
00159         /*@modifies fc @*/;
00160 /*@=exportlocal@*/
00161 
00166 /*@-exportlocal@*/
00167 rpmfc rpmfcNew(void)
00168         /*@*/;
00169 /*@=exportlocal@*/
00170 
00178 /*@-exportlocal@*/
00179 int rpmfcClassify(rpmfc fc, ARGV_t argv, /*@null@*/ int16_t * fmode)
00180         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00181         /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/;
00182 /*@=exportlocal@*/
00183 
00189 /*@-exportlocal@*/
00190 int rpmfcApply(rpmfc fc)
00191         /*@modifies fc @*/;
00192 /*@=exportlocal@*/
00193 
00200 int rpmfcGenerateDepends(void * specp, void * pkgp)
00201         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00202         /*@modifies *pkgp,
00203                 rpmGlobalMacroContext, fileSystem, internalState @*/;
00204 
00205 #ifdef __cplusplus
00206 }
00207 #endif
00208 
00209 #endif /* _H_RPMFC_ */

Generated on Fri Sep 7 01:07:23 2007 for rpm by  doxygen 1.5.1