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

- File List
- Globals

# lib/rpmfc.h

Go to the documentation of this file.

    00001 #ifndef _H_RPMFC_
    00002 #define _H_RPMFC_
    00003
    00004 /*@-exportlocal@*/
    00005 /*@unchecked@*/
    00006 extern int _rpmfc_debug;
    00007 /*@=exportlocal@*/
    00008
    00011 typedef /*@abstract@*/ 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     int nfiles;
    00074     int fknown;
    00075     int fwhite;
    00076     int ix;
    00077     int skipProv;
    00078     int skipReq;
    00079     int tracked;
    00080     size_t brlen;
    00082     ARGV_t fn;
    00083     ARGI_t fcolor;
    00084     ARGI_t fcdictx;
    00085     ARGI_t fddictx;
    00086     ARGI_t fddictn;
    00087     ARGV_t cdict;
    00088     ARGV_t ddict;
    00089     ARGI_t ddictx;
    00091 /*@relnull@*/
    00092     rpmds provides;
    00093 /*@relnull@*/
    00094     rpmds requires;
    00096     StringBuf sb_java;
    00097     StringBuf sb_perl;
    00098     StringBuf sb_python;
    00099     StringBuf sb_php;
    00101 };
    00102
    00105 struct rpmfcTokens_s {
    00106 /*@observer@*/
    00107     const char * token;
    00108     int colors;
    00109 };
    00110 #endif
    00111
    00112 #ifdef __cplusplus
    00113 extern "C" {
    00114 #endif
    00115
    00123 int rpmfcExec(ARGV_t av, StringBuf sb_stdin, /*@out@*/ StringBuf * sb_stdoutp,
    00124                 int failnonzero)
    00125         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00126         /*@modifies *sb_stdoutp, rpmGlobalMacroContext,
    00127                 fileSystem, internalState @*/
    00128         /*@requires maxSet(sb_stdoutp) >= 0 @*/;
    00129
    00135 /*@-exportlocal@*/
    00136 int rpmfcColoring(const char * fmstr)
    00137         /*@*/;
    00138 /*@=exportlocal@*/
    00139
    00147 /*@-exportlocal@*/
    00148 void rpmfcPrint(/*@null@*/ const char * msg, rpmfc fc, /*@null@*/ FILE * fp)
    00149         /*@globals fileSystem @*/
    00150         /*@modifies *fp, fc, fileSystem @*/;
    00151 /*@=exportlocal@*/
    00152
    00158 /*@-exportlocal@*/
    00159 /*@null@*/
    00160 rpmfc rpmfcFree(/*@only@*/ /*@null@*/ rpmfc fc)
    00161         /*@modifies fc @*/;
    00162 /*@=exportlocal@*/
    00163
    00168 /*@-exportlocal@*/
    00169 rpmfc rpmfcNew(void)
    00170         /*@*/;
    00171 /*@=exportlocal@*/
    00172
    00180 /*@-exportlocal@*/
    00181 rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, /*@null@*/ uint16_t * fmode)
    00182         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00183         /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00184 /*@=exportlocal@*/
    00185
    00191 /*@-exportlocal@*/
    00192 rpmRC rpmfcApply(rpmfc fc)
    00193         /*@modifies fc @*/;
    00194 /*@=exportlocal@*/
    00195
    00202 rpmRC rpmfcGenerateDepends(void * specp, void * pkgp)
    00203         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
    00204         /*@modifies *pkgp,
    00205                 rpmGlobalMacroContext, fileSystem, internalState @*/;
    00206
    00207 #ifdef __cplusplus
    00208 }
    00209 #endif
    00210
    00211 #endif /* _H_RPMFC_ */