rpmfc.h
Go to the documentation of this file.
#ifndef _H_RPMFC_
#define _H_RPMFC_
/*@-exportlocal@*/
/*@unchecked@*/
extern int _rpmfc_debug;
/*@=exportlocal@*/
typedef /*@abstract@*/ /*@refcounted@*/ struct rpmfc_s * rpmfc;
typedef enum FCOLOR_e FCOLOR_t;
typedef struct rpmfcTokens_s * rpmfcToken;
enum FCOLOR_e {
RPMFC_BLACK = 0,
RPMFC_ELF32 = (1 << 0),
RPMFC_ELF64 = (1 << 1),
RPMFC_ELFMIPSN32 = (1 << 2),
#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
/* (1 << 3) leaks into package headers, reserved */
/* bits 4-7 unused */
RPMFC_PKGCONFIG = (1 << 8),
RPMFC_LIBTOOL = (1 << 9),
RPMFC_BOURNE = (1 << 10),
RPMFC_MONO = (1 << 11),
RPMFC_SCRIPT = (1 << 12),
RPMFC_STATIC = (1 << 13),
RPMFC_NOTSTRIPPED = (1 << 14),
/* bit 15 unused */
/* bits 16-19 are enumerated, not bits */
RPMFC_DIRECTORY = (1 << 16),
RPMFC_SYMLINK = (2 << 16),
RPMFC_DEVICE = (3 << 16),
RPMFC_LIBRARY = (4 << 16),
RPMFC_FONT = (5 << 16),
RPMFC_IMAGE = (6 << 16),
RPMFC_MANPAGE = (7 << 16),
RPMFC_TEXT = (8 << 16),
RPMFC_DOCUMENT = (9 << 16),
RPMFC_ARCHIVE = (1 << 20),
RPMFC_COMPRESSED = (1 << 21),
RPMFC_MODULE = (1 << 22),
RPMFC_EXECUTABLE = (1 << 23),
RPMFC_PERL = (1 << 24),
RPMFC_JAVA = (1 << 25),
RPMFC_PYTHON = (1 << 26),
RPMFC_PHP = (1 << 27),
RPMFC_TCL = (1 << 28),
RPMFC_WHITE = (1 << 29),
RPMFC_INCLUDE = (1 << 30),
RPMFC_ERROR = (1 << 31)
};
#if defined(_RPMFC_INTERNAL)
struct rpmfc_s {
struct rpmioItem_s _item;
size_t nfiles;
size_t fknown;
size_t fwhite;
size_t ix;
int skipProv;
int skipReq;
int tracked;
size_t brlen;
ARGV_t fn;
ARGI_t fcolor;
ARGI_t fcdictx;
ARGI_t fddictx;
ARGI_t fddictn;
ARGV_t cdict;
ARGV_t ddict;
ARGI_t ddictx;
/*@relnull@*/
rpmds provides;
/*@relnull@*/
rpmds requires;
rpmiob iob_java;
rpmiob iob_perl;
rpmiob iob_python;
rpmiob iob_php;
/*@null@*/
void * Pmires;
int Pnmire;
/*@null@*/
void * PFmires;
int PFnmire;
/*@null@*/
void * Rmires;
int Rnmire;
/*@null@*/
void * RFmires;
int RFnmire;
};
struct rpmfcTokens_s {
/*@observer@*/
const char * token;
int colors;
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
int rpmfcExec(const char ** av, rpmiob iob_stdin, /*@out@*/ rpmiob * iob_stdoutp,
int failnonzero)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies *iob_stdoutp, rpmGlobalMacroContext,
fileSystem, internalState @*/
/*@requires maxSet(iob_stdoutp) >= 0 @*/;
/*@-exportlocal@*/
int rpmfcColoring(const char * fmstr)
/*@*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
void rpmfcPrint(/*@null@*/ const char * msg, rpmfc fc, /*@null@*/ FILE * fp)
/*@globals fileSystem @*/
/*@modifies *fp, fc, fileSystem @*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
rpmRC rpmfcClassify(rpmfc fc, const char ** argv, /*@null@*/ rpmuint16_t * fmode)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
rpmRC rpmfcApply(rpmfc fc)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies fc, rpmGlobalMacroContext, internalState @*/;
/*@=exportlocal@*/
rpmRC rpmfcGenerateDepends(void * specp, void * pkgp)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
/*@unused@*/ /*@null@*/
rpmfc rpmfcUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfc fc)
/*@modifies fc @*/;
#define rpmfcUnlink(_fc) \
((rpmfc)rpmioUnlinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__))
/*@unused@*/ /*@newref@*/ /*@null@*/
rpmfc rpmfcLink (/*@null@*/ rpmfc fc)
/*@modifies fc @*/;
#define rpmfcLink(_fc) \
((rpmfc)rpmioLinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__))
/*@null@*/
rpmfc rpmfcFree(/*@only@*/ /*@null@*/ rpmfc fc)
/*@modifies fc @*/;
#define rpmfcFree(_fc) \
((rpmfc)rpmioFreePoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__))
/*@-exportlocal@*/
rpmfc rpmfcNew(void)
/*@*/;
/*@=exportlocal@*/
#ifdef __cplusplus
}
#endif
#endif /* _H_RPMFC_ */