Go to the documentation of this file.00001 #ifndef H_RPMSX
00002 #define H_RPMSX
00003
00009 #if defined(WITH_PCRE) && defined(WITH_PCRE_POSIX)
00010 #include <pcreposix.h>
00011 #else
00012 #include <regex.h>
00013 #endif
00014
00017
00018
00019 extern int _rpmsx_debug;
00020
00021
00024
00025
00026 extern int _rpmsx_nopromote;
00027
00028
00029 typedef struct rpmsx_s * rpmsx;
00030 typedef struct rpmsxp_s * rpmsxp;
00031 typedef struct rpmsxs_s * rpmsxs;
00032
00033 #if defined(_RPMSX_INTERNAL)
00034
00037 struct rpmsxp_s {
00038
00039 const char * pattern;
00040
00041 const char * type;
00042
00043 const char * context;
00044
00045 regex_t * preg;
00046 mode_t fmode;
00047 int matches;
00048 int hasMetaChars;
00049 int fstem;
00050 };
00051
00055 struct rpmsxs_s {
00056
00057 const char * stem;
00058 size_t len;
00059 };
00060
00064 struct rpmsx_s {
00065 struct rpmioItem_s _item;
00066
00067 rpmsxp sxp;
00068 int Count;
00069 int i;
00070
00071 rpmsxs sxs;
00072 int nsxs;
00073 int maxsxs;
00074 int reverse;
00075 #if defined(__LCLINT__)
00076
00077 int nrefs;
00078 #endif
00079 };
00080 #endif
00081
00082 #ifdef __cplusplus
00083 extern "C" {
00084 #endif
00085
00092
00093 rpmsx rpmsxUnlink ( rpmsx sx,
00094 const char * msg)
00095 ;
00096 #define rpmsxUnlink(_sx, _msg) \
00097 ((rpmsx)rpmioUnlinkPoolItem((rpmioItem)(_sx), _msg, __FILE__, __LINE__))
00098
00105
00106 rpmsx rpmsxLink ( rpmsx sx, const char * msg)
00107 ;
00108 #define rpmsxLink(_sx, _msg) \
00109 ((rpmsx)rpmioLinkPoolItem((rpmioItem)(_sx), _msg, __FILE__, __LINE__))
00110
00116
00117 rpmsx rpmsxFree( rpmsx sx)
00118 ;
00119 #define rpmsxFree(_sx) \
00120 ((rpmsx)rpmioFreePoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__))
00121
00128
00129 int rpmsxParse(rpmsx sx, const char *fn)
00130
00131
00132
00133 ;
00134
00135
00141
00142 rpmsx rpmsxNew(const char * fn)
00143
00144
00145
00146 ;
00147
00153 int rpmsxCount( const rpmsx sx)
00154 ;
00155
00161 int rpmsxIx( const rpmsx sx)
00162 ;
00163
00170 int rpmsxSetIx( rpmsx sx, int ix)
00171 ;
00172
00178
00179
00180 extern const char * rpmsxPattern( const rpmsx sx)
00181 ;
00182
00183
00189
00190
00191 extern const char * rpmsxType( const rpmsx sx)
00192 ;
00193
00194
00200
00201
00202 extern const char * rpmsxContext( const rpmsx sx)
00203 ;
00204
00205
00211
00212
00213 extern regex_t * rpmsxRE( const rpmsx sx)
00214 ;
00215
00216
00222
00223 extern mode_t rpmsxFMode( const rpmsx sx)
00224 ;
00225
00226
00232
00233 extern int rpmsxFStem( const rpmsx sx)
00234 ;
00235
00236
00242
00243 int rpmsxNext( rpmsx sx)
00244 ;
00245
00246
00253
00254
00255 rpmsx rpmsxInit( rpmsx sx, int reverse)
00256 ;
00257
00258
00266
00267 const char * rpmsxFContext( rpmsx sx, const char * fn, mode_t fmode)
00268 ;
00269
00270 #ifdef __cplusplus
00271 }
00272 #endif
00273
00274 #endif