• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

lib/rpmsx.h

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 /*@-exportlocal@*/
00018 /*@unchecked@*/
00019 extern int _rpmsx_debug;
00020 /*@=exportlocal@*/
00021 
00024 /*@-exportlocal@*/
00025 /*@unchecked@*/
00026 extern int _rpmsx_nopromote;
00027 /*@=exportlocal@*/
00028 
00029 typedef /*@abstract@*/ /*@refcounted@*/ 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 /*@only@*/ /*@relnull@*/
00039     const char * pattern;       
00040 /*@only@*/ /*@relnull@*/
00041     const char * type;          
00042 /*@only@*/ /*@relnull@*/
00043     const char * context;       
00044 /*@only@*/ /*@relnull@*/
00045     regex_t * preg;             
00046     mode_t fmode;               
00047     int matches;
00048     int hasMetaChars;
00049     int fstem;                  
00050 };
00051 
00055 struct rpmsxs_s {
00056 /*@only@*/ /*@relnull@*/
00057     const char * stem;
00058     int len;
00059 };
00060 
00064 struct rpmsx_s {
00065 /*@only@*/ /*@relnull@*/
00066     rpmsxp sxp;                 
00067     int Count;                  
00068     int i;                      
00069 /*@only@*/ /*@relnull@*/
00070     rpmsxs sxs;                 
00071     int nsxs;                   
00072     int maxsxs;                 
00073     int reverse;                
00074 /*@refs@*/
00075     int nrefs;                  
00076 };
00077 #endif /* defined(_RPMSX_INTERNAL) */
00078 
00079 #ifdef __cplusplus
00080 extern "C" {
00081 #endif
00082 
00089 /*@unused@*/ /*@null@*/
00090 rpmsx rpmsxUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx,
00091                 /*@null@*/ const char * msg)
00092         /*@modifies sx @*/;
00093 
00095 /*@-exportlocal@*/
00096 /*@null@*/
00097 rpmsx XrpmsxUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx,
00098                 /*@null@*/ const char * msg, const char * fn, unsigned ln)
00099         /*@modifies sx @*/;
00100 /*@=exportlocal@*/
00101 #define rpmsxUnlink(_sx, _msg)  XrpmsxUnlink(_sx, _msg, __FILE__, __LINE__)
00102 
00109 /*@-exportlocal@*/
00110 /*@unused@*/ /*@newref@*/ /*@null@*/
00111 rpmsx rpmsxLink (/*@null@*/ rpmsx sx, /*@null@*/ const char * msg)
00112         /*@modifies sx @*/;
00113 
00115 /*@newref@*/ /*@null@*/
00116 rpmsx XrpmsxLink (/*@null@*/ rpmsx sx, /*@null@*/ const char * msg,
00117                 const char * fn, unsigned ln)
00118         /*@modifies sx @*/;
00119 /*@=exportlocal@*/
00120 #define rpmsxLink(_sx, _msg)    XrpmsxLink(_sx, _msg, __FILE__, __LINE__)
00121 
00127 /*@-exportlocal@*/
00128 /*@null@*/
00129 rpmsx rpmsxFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx)
00130         /*@modifies sx@*/;
00131 /*@=exportlocal@*/
00132 
00139 /*@-exportlocal@*/
00140 int rpmsxParse(rpmsx sx, /*@null@*/ const char *fn)
00141         /*@globals rpmGlobalMacroContext, h_errno,
00142                 fileSystem, internalState @*/
00143         /*@modifies sx, rpmGlobalMacroContext, h_errno,
00144                 fileSystem, internalState @*/;
00145 /*@=exportlocal@*/
00146 
00152 /*@null@*/
00153 rpmsx rpmsxNew(const char * fn)
00154         /*@globals rpmGlobalMacroContext, h_errno,
00155                 fileSystem, internalState @*/
00156         /*@modifies rpmGlobalMacroContext, h_errno,
00157                 fileSystem, internalState @*/;
00158 
00164 int rpmsxCount(/*@null@*/ const rpmsx sx)
00165         /*@*/;
00166 
00172 int rpmsxIx(/*@null@*/ const rpmsx sx)
00173         /*@*/;
00174 
00181 int rpmsxSetIx(/*@null@*/ rpmsx sx, int ix)
00182         /*@modifies sx @*/;
00183 
00189 /*@-exportlocal@*/
00190 /*@observer@*/ /*@null@*/
00191 extern const char * rpmsxPattern(/*@null@*/ const rpmsx sx)
00192         /*@*/;
00193 /*@=exportlocal@*/
00194 
00200 /*@-exportlocal@*/
00201 /*@observer@*/ /*@null@*/
00202 extern const char * rpmsxType(/*@null@*/ const rpmsx sx)
00203         /*@*/;
00204 /*@=exportlocal@*/
00205 
00211 /*@-exportlocal@*/
00212 /*@observer@*/ /*@null@*/
00213 extern const char * rpmsxContext(/*@null@*/ const rpmsx sx)
00214         /*@*/;
00215 /*@=exportlocal@*/
00216 
00222 /*@-exportlocal@*/
00223 /*@observer@*/ /*@null@*/
00224 extern regex_t * rpmsxRE(/*@null@*/ const rpmsx sx)
00225         /*@*/;
00226 /*@=exportlocal@*/
00227 
00233 /*@-exportlocal@*/
00234 extern mode_t rpmsxFMode(/*@null@*/ const rpmsx sx)
00235         /*@*/;
00236 /*@=exportlocal@*/
00237 
00243 /*@-exportlocal@*/
00244 extern int rpmsxFStem(/*@null@*/ const rpmsx sx)
00245         /*@*/;
00246 /*@=exportlocal@*/
00247 
00253 /*@-exportlocal@*/
00254 int rpmsxNext(/*@null@*/ rpmsx sx)
00255         /*@modifies sx @*/;
00256 /*@=exportlocal@*/
00257 
00264 /*@-exportlocal@*/
00265 /*@null@*/
00266 rpmsx rpmsxInit(/*@null@*/ rpmsx sx, int reverse)
00267         /*@modifies sx @*/;
00268 /*@=exportlocal@*/
00269 
00277 /*@owned@*/ /*@null@*/
00278 const char * rpmsxFContext(/*@null@*/ rpmsx sx, const char * fn, mode_t fmode)
00279         /*@modifies sx @*/;
00280 
00281 #ifdef __cplusplus
00282 }
00283 #endif
00284 
00285 #endif  /* H_RPMSX */

Generated on Mon Nov 29 2010 05:18:44 for rpm by  doxygen 1.7.2