From 588601a22c421404c9db24e0a47330d2186977f9 Mon Sep 17 00:00:00 2001 From: nanardon Date: Tue, 4 Oct 2005 04:07:38 +0000 Subject: - move to trunk git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@35 971eb68f-4bfb-0310-8326-d2484c010a4c --- rpmconstant/rpmconstant.h | 209 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 rpmconstant/rpmconstant.h (limited to 'rpmconstant/rpmconstant.h') diff --git a/rpmconstant/rpmconstant.h b/rpmconstant/rpmconstant.h new file mode 100644 index 0000000..bc0cfbb --- /dev/null +++ b/rpmconstant/rpmconstant.h @@ -0,0 +1,209 @@ +/* Nanar + * $Id$ + */ + +#ifndef H_RPMCONSTANT +#define H_RPMCONSTANT + +#ifndef xcalloc +#define xcalloc(n,s) calloc((n),(s)) +#endif + +#define PREFIXED_YES 0 +#define PREFIXED_NO 1 + +#define WITH_PREFIX (1 << 0) +#define WITHOUT_PREFIX (1 << 1) +#define ALLCASE_PREFIX (WITH_PREFIX | WITHOUT_PREFIX) + +/** + * \ingroup rpmconstant + * \file rpmconstant.h + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * A constant pair name/value + */ +typedef /*@abstract@*/ struct rpmconstant_s *rpmconstant; + + +/** + * A constant list set + */ +typedef /*@abstract@*/ struct rpmconstantlist_s * rpmconstantlist; + +typedef struct rpmconst_s * rpmconst; + +#ifdef RPMCONSTANT_INTERNAL + +/** + * A constant pair name/value + */ +struct rpmconstant_s { + const char * name; /*!< Constant name. */ +/*@null@*/ + int value; /*!< Constant value. */ +}; + +/** + * A contantlist entry + */ +struct rpmconstantlist_s { + const rpmconstant constant; /*