rpmsx.h
Go to the documentation of this file.
#ifndef H_RPMSX
#define H_RPMSX
#if defined(WITH_PCRE) && defined(WITH_PCRE_POSIX)
#include <pcreposix.h>
#else
#include <regex.h>
#endif
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmsx_debug;
/*@=exportlocal@*/
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmsx_nopromote;
/*@=exportlocal@*/
typedef /*@abstract@*/ /*@refcounted@*/ struct rpmsx_s * rpmsx;
typedef struct rpmsxp_s * rpmsxp;
typedef struct rpmsxs_s * rpmsxs;
#if defined(_RPMSX_INTERNAL)
struct rpmsxp_s {
/*@only@*/ /*@relnull@*/
const char * pattern;
/*@only@*/ /*@relnull@*/
const char * type;
/*@only@*/ /*@relnull@*/
const char * context;
/*@only@*/ /*@relnull@*/
regex_t * preg;
mode_t fmode;
int matches;
int hasMetaChars;
int fstem;
};
struct rpmsxs_s {
/*@only@*/ /*@relnull@*/
const char * stem;
size_t len;
};
struct rpmsx_s {
struct rpmioItem_s _item;
/*@only@*/ /*@relnull@*/
rpmsxp sxp;
int Count;
int i;
/*@only@*/ /*@relnull@*/
rpmsxs sxs;
int nsxs;
int maxsxs;
int reverse;
#if defined(__LCLINT__)
/*@refs@*/
int nrefs;
#endif
};
#endif /* defined(_RPMSX_INTERNAL) */
#ifdef __cplusplus
extern "C" {
#endif
/*@unused@*/ /*@null@*/
rpmsx rpmsxUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx,
/*@null@*/ const char * msg)
/*@modifies sx @*/;
#define rpmsxUnlink(_sx, _msg) \
((rpmsx)rpmioUnlinkPoolItem((rpmioItem)(_sx), _msg, __FILE__, __LINE__))
/*@unused@*/ /*@newref@*/ /*@null@*/
rpmsx rpmsxLink (/*@null@*/ rpmsx sx, /*@null@*/ const char * msg)
/*@modifies sx @*/;
#define rpmsxLink(_sx, _msg) \
((rpmsx)rpmioLinkPoolItem((rpmioItem)(_sx), _msg, __FILE__, __LINE__))
/*@null@*/
rpmsx rpmsxFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmsx sx)
/*@modifies sx@*/;
#define rpmsxFree(_sx) \
((rpmsx)rpmioFreePoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__))
/*@-exportlocal@*/
int rpmsxParse(rpmsx sx, /*@null@*/ const char *fn)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies sx, rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/;
/*@=exportlocal@*/
/*@null@*/
rpmsx rpmsxNew(const char * fn)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/;
int rpmsxCount(/*@null@*/ const rpmsx sx)
/*@*/;
int rpmsxIx(/*@null@*/ const rpmsx sx)
/*@*/;
int rpmsxSetIx(/*@null@*/ rpmsx sx, int ix)
/*@modifies sx @*/;
/*@-exportlocal@*/
/*@observer@*/ /*@null@*/
extern const char * rpmsxPattern(/*@null@*/ const rpmsx sx)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
/*@observer@*/ /*@null@*/
extern const char * rpmsxType(/*@null@*/ const rpmsx sx)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
/*@observer@*/ /*@null@*/
extern const char * rpmsxContext(/*@null@*/ const rpmsx sx)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
/*@observer@*/ /*@null@*/
extern regex_t * rpmsxRE(/*@null@*/ const rpmsx sx)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
extern mode_t rpmsxFMode(/*@null@*/ const rpmsx sx)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
extern int rpmsxFStem(/*@null@*/ const rpmsx sx)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
int rpmsxNext(/*@null@*/ rpmsx sx)
/*@modifies sx @*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
/*@null@*/
rpmsx rpmsxInit(/*@null@*/ rpmsx sx, int reverse)
/*@modifies sx @*/;
/*@=exportlocal@*/
/*@owned@*/ /*@null@*/
const char * rpmsxFContext(/*@null@*/ rpmsx sx, const char * fn, mode_t fmode)
/*@modifies sx @*/;
#ifdef __cplusplus
}
#endif
#endif /* H_RPMSX */