• 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     size_t len;
00059 };
00060 
00064 struct rpmsx_s {
00065     struct rpmioItem_s _item;   
00066 /*@only@*/ /*@relnull@*/
00067     rpmsxp sxp;                 
00068     int Count;                  
00069     int i;                      
00070 /*@only@*/ /*@relnull@*/
00071     rpmsxs sxs;                 
00072     int nsxs;                   
00073     int maxsxs;                 
00074     int reverse;                
00075 #if defined(__LCLINT__)
00076 /*@refs@*/
00077     int nrefs;                  
00078 #endif
00079 };
00080 #endif /* defined(_RPMSX_INTERNAL) */
00081 
00082 #ifdef __cplusplus
00083 extern "C" {
00084 #endif
00085 
00092 /*@unused@*/ /*@null@*/
00093 rpmsx rpmsxUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx,
00094                 /*@null@*/ const char * msg)
00095         /*@modifies sx @*/;
00096 #define rpmsxUnlink(_sx, _msg)  \
00097     ((rpmsx)rpmioUnlinkPoolItem((rpmioItem)(_sx), _msg, __FILE__, __LINE__))
00098 
00105 /*@unused@*/ /*@newref@*/ /*@null@*/
00106 rpmsx rpmsxLink (/*@null@*/ rpmsx sx, /*@null@*/ const char * msg)
00107         /*@modifies sx @*/;
00108 #define rpmsxLink(_sx, _msg)    \
00109     ((rpmsx)rpmioLinkPoolItem((rpmioItem)(_sx), _msg, __FILE__, __LINE__))
00110 
00116 /*@null@*/
00117 rpmsx rpmsxFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx)
00118         /*@modifies sx@*/;
00119 #define rpmsxFree(_sx)  \
00120     ((rpmsx)rpmioFreePoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__))
00121 
00128 /*@-exportlocal@*/
00129 int rpmsxParse(rpmsx sx, /*@null@*/ const char *fn)
00130         /*@globals rpmGlobalMacroContext, h_errno,
00131                 fileSystem, internalState @*/
00132         /*@modifies sx, rpmGlobalMacroContext, h_errno,
00133                 fileSystem, internalState @*/;
00134 /*@=exportlocal@*/
00135 
00141 /*@null@*/
00142 rpmsx rpmsxNew(const char * fn)
00143         /*@globals rpmGlobalMacroContext, h_errno,
00144                 fileSystem, internalState @*/
00145         /*@modifies rpmGlobalMacroContext, h_errno,
00146                 fileSystem, internalState @*/;
00147 
00153 int rpmsxCount(/*@null@*/ const rpmsx sx)
00154         /*@*/;
00155 
00161 int rpmsxIx(/*@null@*/ const rpmsx sx)
00162         /*@*/;
00163 
00170 int rpmsxSetIx(/*@null@*/ rpmsx sx, int ix)
00171         /*@modifies sx @*/;
00172 
00178 /*@-exportlocal@*/
00179 /*@observer@*/ /*@null@*/
00180 extern const char * rpmsxPattern(/*@null@*/ const rpmsx sx)
00181         /*@*/;
00182 /*@=exportlocal@*/
00183 
00189 /*@-exportlocal@*/
00190 /*@observer@*/ /*@null@*/
00191 extern const char * rpmsxType(/*@null@*/ const rpmsx sx)
00192         /*@*/;
00193 /*@=exportlocal@*/
00194 
00200 /*@-exportlocal@*/
00201 /*@observer@*/ /*@null@*/
00202 extern const char * rpmsxContext(/*@null@*/ const rpmsx sx)
00203         /*@*/;
00204 /*@=exportlocal@*/
00205 
00211 /*@-exportlocal@*/
00212 /*@observer@*/ /*@null@*/
00213 extern regex_t * rpmsxRE(/*@null@*/ const rpmsx sx)
00214         /*@*/;
00215 /*@=exportlocal@*/
00216 
00222 /*@-exportlocal@*/
00223 extern mode_t rpmsxFMode(/*@null@*/ const rpmsx sx)
00224         /*@*/;
00225 /*@=exportlocal@*/
00226 
00232 /*@-exportlocal@*/
00233 extern int rpmsxFStem(/*@null@*/ const rpmsx sx)
00234         /*@*/;
00235 /*@=exportlocal@*/
00236 
00242 /*@-exportlocal@*/
00243 int rpmsxNext(/*@null@*/ rpmsx sx)
00244         /*@modifies sx @*/;
00245 /*@=exportlocal@*/
00246 
00253 /*@-exportlocal@*/
00254 /*@null@*/
00255 rpmsx rpmsxInit(/*@null@*/ rpmsx sx, int reverse)
00256         /*@modifies sx @*/;
00257 /*@=exportlocal@*/
00258 
00266 /*@owned@*/ /*@null@*/
00267 const char * rpmsxFContext(/*@null@*/ rpmsx sx, const char * fn, mode_t fmode)
00268         /*@modifies sx @*/;
00269 
00270 #ifdef __cplusplus
00271 }
00272 #endif
00273 
00274 #endif  /* H_RPMSX */

Generated on Fri Dec 3 2010 20:53:45 for rpm by  doxygen 1.7.2