lib/rpmsx.h

Go to the documentation of this file.
00001 #ifndef H_RPMSX
00002 #define H_RPMSX
00003 
00009 #include <regex.h>
00010 
00013 /*@-exportlocal@*/
00014 /*@unchecked@*/
00015 extern int _rpmsx_debug;
00016 /*@=exportlocal@*/
00017 
00020 /*@-exportlocal@*/
00021 /*@unchecked@*/
00022 extern int _rpmsx_nopromote;
00023 /*@=exportlocal@*/
00024 
00025 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmsx_s * rpmsx;
00026 typedef struct rpmsxp_s * rpmsxp;
00027 typedef struct rpmsxs_s * rpmsxs;
00028 
00029 #if defined(_RPMSX_INTERNAL)
00030 
00033 struct rpmsxp_s {
00034 /*@only@*/ /*@relnull@*/
00035     const char * pattern;       
00036 /*@only@*/ /*@relnull@*/
00037     const char * type;          
00038 /*@only@*/ /*@relnull@*/
00039     const char * context;       
00040 /*@only@*/ /*@relnull@*/
00041     regex_t * preg;             
00042     mode_t fmode;               
00043     int matches;
00044     int hasMetaChars;
00045     int fstem;                  
00046 };
00047 
00051 struct rpmsxs_s {
00052 /*@only@*/ /*@relnull@*/
00053     const char * stem;
00054     int len;
00055 };
00056 
00060 struct rpmsx_s {
00061 /*@only@*/ /*@relnull@*/
00062     rpmsxp sxp;                 
00063     int Count;                  
00064     int i;                      
00065 /*@only@*/ /*@relnull@*/
00066     rpmsxs sxs;                 
00067     int nsxs;                   
00068     int maxsxs;                 
00069     int reverse;                
00070 /*@refs@*/
00071     int nrefs;                  
00072 };
00073 #endif /* defined(_RPMSX_INTERNAL) */
00074 
00075 #ifdef __cplusplus
00076 extern "C" {
00077 #endif
00078 
00085 /*@unused@*/ /*@null@*/
00086 rpmsx rpmsxUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx,
00087                 /*@null@*/ const char * msg)
00088         /*@modifies sx @*/;
00089 
00091 /*@-exportlocal@*/
00092 /*@null@*/
00093 rpmsx XrpmsxUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx,
00094                 /*@null@*/ const char * msg, const char * fn, unsigned ln)
00095         /*@modifies sx @*/;
00096 /*@=exportlocal@*/
00097 #define rpmsxUnlink(_sx, _msg)  XrpmsxUnlink(_sx, _msg, __FILE__, __LINE__)
00098 
00105 /*@-exportlocal@*/
00106 /*@unused@*/ /*@newref@*/ /*@null@*/
00107 rpmsx rpmsxLink (/*@null@*/ rpmsx sx, /*@null@*/ const char * msg)
00108         /*@modifies sx @*/;
00109 
00111 /*@newref@*/ /*@null@*/
00112 rpmsx XrpmsxLink (/*@null@*/ rpmsx sx, /*@null@*/ const char * msg,
00113                 const char * fn, unsigned ln)
00114         /*@modifies sx @*/;
00115 /*@=exportlocal@*/
00116 #define rpmsxLink(_sx, _msg)    XrpmsxLink(_sx, _msg, __FILE__, __LINE__)
00117 
00123 /*@-exportlocal@*/
00124 /*@null@*/
00125 rpmsx rpmsxFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx)
00126         /*@modifies sx@*/;
00127 /*@=exportlocal@*/
00128 
00135 /*@-exportlocal@*/
00136 int rpmsxParse(rpmsx sx, /*@null@*/ const char *fn)
00137         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00138         /*@modifies sx, rpmGlobalMacroContext, h_errno, fileSystem @*/;
00139 /*@=exportlocal@*/
00140 
00146 /*@null@*/
00147 rpmsx rpmsxNew(const char * fn)
00148         /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
00149         /*@modifies rpmGlobalMacroContext, h_errno, fileSystem @*/;
00150 
00156 int rpmsxCount(/*@null@*/ const rpmsx sx)
00157         /*@*/;
00158 
00164 int rpmsxIx(/*@null@*/ const rpmsx sx)
00165         /*@*/;
00166 
00173 int rpmsxSetIx(/*@null@*/ rpmsx sx, int ix)
00174         /*@modifies sx @*/;
00175 
00181 /*@-exportlocal@*/
00182 /*@observer@*/ /*@null@*/
00183 extern const char * rpmsxPattern(/*@null@*/ const rpmsx sx)
00184         /*@*/;
00185 /*@=exportlocal@*/
00186 
00192 /*@-exportlocal@*/
00193 /*@observer@*/ /*@null@*/
00194 extern const char * rpmsxType(/*@null@*/ const rpmsx sx)
00195         /*@*/;
00196 /*@=exportlocal@*/
00197 
00203 /*@-exportlocal@*/
00204 /*@observer@*/ /*@null@*/
00205 extern const char * rpmsxContext(/*@null@*/ const rpmsx sx)
00206         /*@*/;
00207 /*@=exportlocal@*/
00208 
00214 /*@-exportlocal@*/
00215 /*@observer@*/ /*@null@*/
00216 extern regex_t * rpmsxRE(/*@null@*/ const rpmsx sx)
00217         /*@*/;
00218 /*@=exportlocal@*/
00219 
00225 /*@-exportlocal@*/
00226 extern mode_t rpmsxFMode(/*@null@*/ const rpmsx sx)
00227         /*@*/;
00228 /*@=exportlocal@*/
00229 
00235 /*@-exportlocal@*/
00236 extern int rpmsxFStem(/*@null@*/ const rpmsx sx)
00237         /*@*/;
00238 /*@=exportlocal@*/
00239 
00245 /*@-exportlocal@*/
00246 int rpmsxNext(/*@null@*/ rpmsx sx)
00247         /*@modifies sx @*/;
00248 /*@=exportlocal@*/
00249 
00256 /*@-exportlocal@*/
00257 /*@null@*/
00258 rpmsx rpmsxInit(/*@null@*/ rpmsx sx, int reverse)
00259         /*@modifies sx @*/;
00260 /*@=exportlocal@*/
00261 
00269 /*@owned@*/ /*@null@*/
00270 const char * rpmsxFContext(/*@null@*/ rpmsx sx, const char * fn, mode_t fmode)
00271         /*@modifies sx @*/;
00272 
00273 #ifdef __cplusplus
00274 }
00275 #endif
00276 
00277 #endif  /* H_RPMSX */

Generated on Fri Oct 12 08:44:54 2007 for rpm by  doxygen 1.5.2