rpm 5.2.1
|
00001 #ifndef _H_RPMFC_ 00002 #define _H_RPMFC_ 00003 00004 /*@-exportlocal@*/ 00005 /*@unchecked@*/ 00006 extern int _rpmfc_debug; 00007 /*@=exportlocal@*/ 00008 00011 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmfc_s * rpmfc; 00012 00015 typedef enum FCOLOR_e FCOLOR_t; 00016 00019 typedef struct rpmfcTokens_s * rpmfcToken; 00020 00023 enum FCOLOR_e { 00024 RPMFC_BLACK = 0, 00025 RPMFC_ELF32 = (1 << 0), 00026 RPMFC_ELF64 = (1 << 1), 00027 RPMFC_ELFMIPSN32 = (1 << 2), 00028 #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) 00029 /* (1 << 3) leaks into package headers, reserved */ 00030 00031 /* bits 4-7 unused */ 00032 RPMFC_PKGCONFIG = (1 << 8), 00033 RPMFC_LIBTOOL = (1 << 9), 00034 RPMFC_BOURNE = (1 << 10), 00035 RPMFC_MONO = (1 << 11), 00036 00037 RPMFC_SCRIPT = (1 << 12), 00038 RPMFC_STATIC = (1 << 13), 00039 RPMFC_NOTSTRIPPED = (1 << 14), 00040 /* bit 15 unused */ 00041 00042 /* bits 16-19 are enumerated, not bits */ 00043 RPMFC_DIRECTORY = (1 << 16), 00044 RPMFC_SYMLINK = (2 << 16), 00045 RPMFC_DEVICE = (3 << 16), 00046 RPMFC_LIBRARY = (4 << 16), 00047 RPMFC_FONT = (5 << 16), 00048 RPMFC_IMAGE = (6 << 16), 00049 RPMFC_MANPAGE = (7 << 16), 00050 RPMFC_TEXT = (8 << 16), 00051 RPMFC_DOCUMENT = (9 << 16), 00052 00053 RPMFC_ARCHIVE = (1 << 20), 00054 RPMFC_COMPRESSED = (1 << 21), 00055 RPMFC_MODULE = (1 << 22), 00056 RPMFC_EXECUTABLE = (1 << 23), 00057 00058 RPMFC_PERL = (1 << 24), 00059 RPMFC_JAVA = (1 << 25), 00060 RPMFC_PYTHON = (1 << 26), 00061 RPMFC_PHP = (1 << 27), 00062 RPMFC_TCL = (1 << 28), 00063 00064 RPMFC_WHITE = (1 << 29), 00065 RPMFC_INCLUDE = (1 << 30), 00066 RPMFC_ERROR = (1 << 31) 00067 }; 00068 00069 #if defined(_RPMFC_INTERNAL) 00070 00072 struct rpmfc_s { 00073 struct rpmioItem_s _item; 00074 size_t nfiles; 00075 size_t fknown; 00076 size_t fwhite; 00077 size_t ix; 00078 int skipProv; 00079 int skipReq; 00080 int tracked; 00081 size_t brlen; 00083 ARGV_t fn; 00084 ARGI_t fcolor; 00085 ARGI_t fcdictx; 00086 ARGI_t fddictx; 00087 ARGI_t fddictn; 00088 ARGV_t cdict; 00089 ARGV_t ddict; 00090 ARGI_t ddictx; 00092 /*@relnull@*/ 00093 rpmds provides; 00094 /*@relnull@*/ 00095 rpmds requires; 00097 rpmiob iob_java; 00098 rpmiob iob_perl; 00099 rpmiob iob_python; 00100 rpmiob iob_php; 00102 /*@null@*/ 00103 void * Pmires; 00104 int Pnmire; 00105 /*@null@*/ 00106 void * PFmires; 00107 int PFnmire; 00108 /*@null@*/ 00109 void * Rmires; 00110 int Rnmire; 00111 /*@null@*/ 00112 void * RFmires; 00113 int RFnmire; 00114 00115 }; 00116 00119 struct rpmfcTokens_s { 00120 /*@observer@*/ 00121 const char * token; 00122 int colors; 00123 }; 00124 #endif 00125 00126 #ifdef __cplusplus 00127 extern "C" { 00128 #endif 00129 00137 int rpmfcExec(const char ** av, rpmiob iob_stdin, /*@out@*/ rpmiob * iob_stdoutp, 00138 int failnonzero) 00139 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00140 /*@modifies *iob_stdoutp, rpmGlobalMacroContext, 00141 fileSystem, internalState @*/ 00142 /*@requires maxSet(iob_stdoutp) >= 0 @*/; 00143 00149 /*@-exportlocal@*/ 00150 int rpmfcColoring(const char * fmstr) 00151 /*@*/; 00152 /*@=exportlocal@*/ 00153 00161 /*@-exportlocal@*/ 00162 void rpmfcPrint(/*@null@*/ const char * msg, rpmfc fc, /*@null@*/ FILE * fp) 00163 /*@globals fileSystem @*/ 00164 /*@modifies *fp, fc, fileSystem @*/; 00165 /*@=exportlocal@*/ 00166 00174 /*@-exportlocal@*/ 00175 rpmRC rpmfcClassify(rpmfc fc, const char ** argv, /*@null@*/ rpmuint16_t * fmode) 00176 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00177 /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/; 00178 /*@=exportlocal@*/ 00179 00185 /*@-exportlocal@*/ 00186 rpmRC rpmfcApply(rpmfc fc) 00187 /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ 00188 /*@modifies fc, rpmGlobalMacroContext, internalState @*/; 00189 /*@=exportlocal@*/ 00190 00197 rpmRC rpmfcGenerateDepends(void * specp, void * pkgp) 00198 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ 00199 /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/; 00200 00206 /*@unused@*/ /*@null@*/ 00207 rpmfc rpmfcUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfc fc) 00208 /*@modifies fc @*/; 00209 #define rpmfcUnlink(_fc) \ 00210 ((rpmfc)rpmioUnlinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) 00211 00217 /*@unused@*/ /*@newref@*/ /*@null@*/ 00218 rpmfc rpmfcLink (/*@null@*/ rpmfc fc) 00219 /*@modifies fc @*/; 00220 #define rpmfcLink(_fc) \ 00221 ((rpmfc)rpmioLinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) 00222 00228 /*@null@*/ 00229 rpmfc rpmfcFree(/*@only@*/ /*@null@*/ rpmfc fc) 00230 /*@modifies fc @*/; 00231 #define rpmfcFree(_fc) \ 00232 ((rpmfc)rpmioFreePoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) 00233 00238 /*@-exportlocal@*/ 00239 rpmfc rpmfcNew(void) 00240 /*@*/; 00241 /*@=exportlocal@*/ 00242 00243 #ifdef __cplusplus 00244 } 00245 #endif 00246 00247 #endif /* _H_RPMFC_ */