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 int len;
00059 };
00060
00064 struct rpmsx_s {
00065
00066 rpmsxp sxp;
00067 int Count;
00068 int i;
00069
00070 rpmsxs sxs;
00071 int nsxs;
00072 int maxsxs;
00073 int reverse;
00074
00075 int nrefs;
00076 };
00077 #endif
00078
00079 #ifdef __cplusplus
00080 extern "C" {
00081 #endif
00082
00089
00090 rpmsx rpmsxUnlink ( rpmsx sx,
00091 const char * msg)
00092 ;
00093
00095
00096
00097 rpmsx XrpmsxUnlink ( rpmsx sx,
00098 const char * msg, const char * fn, unsigned ln)
00099 ;
00100
00101 #define rpmsxUnlink(_sx, _msg) XrpmsxUnlink(_sx, _msg, __FILE__, __LINE__)
00102
00109
00110
00111 rpmsx rpmsxLink ( rpmsx sx, const char * msg)
00112 ;
00113
00115
00116 rpmsx XrpmsxLink ( rpmsx sx, const char * msg,
00117 const char * fn, unsigned ln)
00118 ;
00119
00120 #define rpmsxLink(_sx, _msg) XrpmsxLink(_sx, _msg, __FILE__, __LINE__)
00121
00127
00128
00129 rpmsx rpmsxFree( rpmsx sx)
00130 ;
00131
00132
00139
00140 int rpmsxParse(rpmsx sx, const char *fn)
00141
00142
00143
00144 ;
00145
00146
00152
00153 rpmsx rpmsxNew(const char * fn)
00154
00155
00156
00157 ;
00158
00164 int rpmsxCount( const rpmsx sx)
00165 ;
00166
00172 int rpmsxIx( const rpmsx sx)
00173 ;
00174
00181 int rpmsxSetIx( rpmsx sx, int ix)
00182 ;
00183
00189
00190
00191 extern const char * rpmsxPattern( const rpmsx sx)
00192 ;
00193
00194
00200
00201
00202 extern const char * rpmsxType( const rpmsx sx)
00203 ;
00204
00205
00211
00212
00213 extern const char * rpmsxContext( const rpmsx sx)
00214 ;
00215
00216
00222
00223
00224 extern regex_t * rpmsxRE( const rpmsx sx)
00225 ;
00226
00227
00233
00234 extern mode_t rpmsxFMode( const rpmsx sx)
00235 ;
00236
00237
00243
00244 extern int rpmsxFStem( const rpmsx sx)
00245 ;
00246
00247
00253
00254 int rpmsxNext( rpmsx sx)
00255 ;
00256
00257
00264
00265
00266 rpmsx rpmsxInit( rpmsx sx, int reverse)
00267 ;
00268
00269
00277
00278 const char * rpmsxFContext( rpmsx sx, const char * fn, mode_t fmode)
00279 ;
00280
00281 #ifdef __cplusplus
00282 }
00283 #endif
00284
00285 #endif