00001 #ifndef _H_RPMFC_
00002 #define _H_RPMFC_
00003
00004 #undef FILE_RCSID
00005 #include "magic.h"
00006
00007
00008
00009 extern int _rpmfc_debug;
00010
00011
00014 typedef 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
00038 rpmds provides;
00039
00040 rpmds requires;
00042 StringBuf sb_java;
00043 StringBuf sb_perl;
00044 StringBuf sb_python;
00046 };
00047
00050 enum FCOLOR_e {
00051 RPMFC_BLACK = 0,
00052 RPMFC_ELF32 = (1 << 0),
00053 RPMFC_ELF64 = (1 << 1),
00054 #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64)
00055
00056 RPMFC_MODULE = (1 << 7),
00057 RPMFC_EXECUTABLE = (1 << 8),
00058 RPMFC_SCRIPT = (1 << 9),
00059 RPMFC_TEXT = (1 << 10),
00060 RPMFC_DATA = (1 << 11),
00061 RPMFC_DOCUMENT = (1 << 12),
00062 RPMFC_STATIC = (1 << 13),
00063 RPMFC_NOTSTRIPPED = (1 << 14),
00064 RPMFC_COMPRESSED = (1 << 15),
00065
00066 RPMFC_DIRECTORY = (1 << 16),
00067 RPMFC_SYMLINK = (1 << 17),
00068 RPMFC_DEVICE = (1 << 18),
00069 RPMFC_LIBRARY = (1 << 19),
00070 RPMFC_ARCHIVE = (1 << 20),
00071 RPMFC_FONT = (1 << 21),
00072 RPMFC_IMAGE = (1 << 22),
00073 RPMFC_MANPAGE = (1 << 23),
00074
00075 RPMFC_PERL = (1 << 24),
00076 RPMFC_JAVA = (1 << 25),
00077 RPMFC_PYTHON = (1 << 26),
00078 RPMFC_PHP = (1 << 27),
00079 RPMFC_TCL = (1 << 28),
00080 RPMFC_MONO = (1 << 6),
00081
00082 RPMFC_WHITE = (1 << 29),
00083 RPMFC_INCLUDE = (1 << 30),
00084 RPMFC_ERROR = (1 << 31)
00085 };
00086 typedef enum FCOLOR_e FCOLOR_t;
00087
00090 struct rpmfcTokens_s {
00091
00092 const char * token;
00093 int colors;
00094 };
00095
00098 typedef struct rpmfcTokens_s * rpmfcToken;
00099
00100 #ifdef __cplusplus
00101 extern "C" {
00102 #endif
00103
00111 int rpmfcExec(ARGV_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp,
00112 int failnonzero)
00113
00114
00115
00116 ;
00117
00123
00124 int rpmfcColoring(const char * fmstr)
00125 ;
00126
00127
00135
00136 void rpmfcPrint( const char * msg, rpmfc fc, FILE * fp)
00137
00138 ;
00139
00140
00146
00147
00148 rpmfc rpmfcFree( rpmfc fc)
00149 ;
00150
00151
00156
00157 rpmfc rpmfcNew(void)
00158 ;
00159
00160
00168
00169 int rpmfcClassify(rpmfc fc, ARGV_t argv, int16_t * fmode)
00170
00171 ;
00172
00173
00179
00180 int rpmfcApply(rpmfc fc)
00181 ;
00182
00183
00190 int rpmfcGenerateDepends(const Spec spec, Package pkg)
00191
00192
00193 ;
00194
00195 #ifdef __cplusplus
00196 }
00197 #endif
00198
00199 #endif