RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 14-Oct-2007 21:26:02
Branch: HEAD Handle: 2007101420260101
Modified files:
rpm CHANGES
rpm/lib rpmlib.h
rpm/rpmdb header.h
Log:
- jbj: move rpmTag typedef and HGE_t et al protos to header.h.
Summary:
Revision Changes Path
1.1706 +1 -0 rpm/CHANGES
2.442 +2 -80 rpm/lib/rpmlib.h
1.31 +82 -0 rpm/rpmdb/header.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1705 -r1.1706 CHANGES
--- rpm/CHANGES 14 Oct 2007 19:05:36 -0000 1.1705
+++ rpm/CHANGES 14 Oct 2007 19:26:01 -0000 1.1706
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - jbj: move rpmTag typedef and HGE_t et al protos to header.h.
- jbj: lose the rpmfi hge/hae/hme/hre/hfd vectors.
- jbj: yet more hge fixups.
- jbj: reqprov.c: use headerGetExtension everywhere.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmlib.h
============================================================================
$ cvs diff -u -r2.441 -r2.442 rpmlib.h
--- rpm/lib/rpmlib.h 14 Oct 2007 15:15:14 -0000 2.441
+++ rpm/lib/rpmlib.h 14 Oct 2007 19:26:01 -0000 2.442
@@ -158,7 +158,7 @@
* @note tags should not have value 0!
*/
/** @todo: Somehow supply type **/
-typedef enum rpmTag_e {
+enum rpmTag_e {
RPMTAG_HEADERIMAGE = HEADER_IMAGE, /*!< internal Current image. */
RPMTAG_HEADERSIGNATURES = HEADER_SIGNATURES, /*!< internal Signatures. */
@@ -415,7 +415,7 @@
/*@-enummemuse@*/
RPMTAG_FIRSTFREE_TAG /*!< internal */
/*@=enummemuse@*/
-} rpmTag;
+};
#define RPMTAG_EXTERNAL_TAG 1000000
@@ -591,84 +591,6 @@
/** \name RPMTS */
/*@{*/
/**
- * Prototype for headerFreeData() vector.
- *
- * @param data address of data (or NULL)
- * @param type type of data (or -1 to force free)
- * @return NULL always
- */
-typedef /*@null@*/
- void * (*HFD_t) (/*@only@*/ /*@null@*/ const void * data, rpmTagType type)
- /*@modifies data @*/;
-
-/**
- * Prototype for headerGetEntry() vector.
- *
- * Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with
- * RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE
- * entry is present).
- *
- * @param h header
- * @param tag tag
- * @retval *type tag value data type (or NULL)
- * @retval *p tag value(s) (or NULL)
- * @retval *c number of values (or NULL)
- * @return 1 on success, 0 on failure
- */
-typedef int (*HGE_t) (Header h, rpmTag tag,
- /*@null@*/ /*@out@*/ hTYP_t t,
- /*@null@*/ /*@out@*/ hRET_t * p,
- /*@null@*/ /*@out@*/ hCNT_t c)
- /*@modifies *t, *p, *c @*/;
-
-/**
- * Prototype for headerAddEntry() vector.
- *
- * Duplicate tags are okay, but only defined for iteration (with the
- * exceptions noted below). While you are allowed to add i18n string
- * arrays through this function, you probably don't mean to. See
- * headerAddI18NString() instead.
- *
- * @param h header
- * @param tag tag
- * @param type tag value data type
- * @param p tag value(s)
- * @param c number of values
- * @return 1 on success, 0 on failure
- */
-typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
- const void * p, int_32 c)
- /*@modifies h @*/;
-
-/**
- * Prototype for headerModifyEntry() vector.
- * If there are multiple entries with this tag, the first one gets replaced.
- *
- * @param h header
- * @param tag tag
- * @param type tag value data type
- * @param p tag value(s)
- * @param c number of values
- * @return 1 on success, 0 on failure
- */
-typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
- const void * p, int_32 c)
- /*@modifies h @*/;
-
-/**
- * Prototype for headerRemoveEntry() vector.
- * Delete tag in header.
- * Removes all entries of type tag from the header, returns 1 if none were
- * found.
- *
- * @param h header
- * @param tag tag
- * @return 0 on success, 1 on failure (INCONSISTENT)
- */
-typedef int (*HRE_t) (Header h, int_32 tag)
- /*@modifies h @*/;
-
-/**
* @todo Generalize filter mechanism.
*/
typedef enum rpmprobFilterFlags_e {
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.h
============================================================================
$ cvs diff -u -r1.30 -r1.31 header.h
--- rpm/rpmdb/header.h 12 Oct 2007 20:23:04 -0000 1.30
+++ rpm/rpmdb/header.h 14 Oct 2007 19:26:02 -0000 1.31
@@ -238,6 +238,10 @@
extern const struct headerSprintfExtension_s headerCompoundFormats[];
/*@=redecl@*/
+/**
+ */
+typedef enum rpmTag_e rpmTag;
+
/** \ingroup header
* The basic types of data in tags from headers.
*/
@@ -344,6 +348,84 @@
typedef HE_s * HE_t;
/*@=typeuse =fielduse@*/
+/**
+ * Prototype for headerFreeData() vector.
+ *
+ * @param data address of data (or NULL)
+ * @param type type of data (or -1 to force free)
+ * @return NULL always
+ */
+typedef /*@null@*/
+ void * (*HFD_t) (/*@only@*/ /*@null@*/ const void * data, rpmTagType type)
+ /*@modifies data @*/;
+
+/**
+ * Prototype for headerGetEntry() vector.
+ *
+ * Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with
+ * RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE
+ * entry is present).
+ *
+ * @param h header
+ * @param tag tag
+ * @retval *type tag value data type (or NULL)
+ * @retval *p tag value(s) (or NULL)
+ * @retval *c number of values (or NULL)
+ * @return 1 on success, 0 on failure
+ */
+typedef int (*HGE_t) (Header h, rpmTag tag,
+ /*@null@*/ /*@out@*/ hTYP_t t,
+ /*@null@*/ /*@out@*/ hRET_t * p,
+ /*@null@*/ /*@out@*/ hCNT_t c)
+ /*@modifies *t, *p, *c @*/;
+
+/**
+ * Prototype for headerAddEntry() vector.
+ *
+ * Duplicate tags are okay, but only defined for iteration (with the
+ * exceptions noted below). While you are allowed to add i18n string
+ * arrays through this function, you probably don't mean to. See
+ * headerAddI18NString() instead.
+ *
+ * @param h header
+ * @param tag tag
+ * @param type tag value data type
+ * @param p tag value(s)
+ * @param c number of values
+ * @return 1 on success, 0 on failure
+ */
+typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
+ const void * p, int_32 c)
+ /*@modifies h @*/;
+
+/**
+ * Prototype for headerModifyEntry() vector.
+ * If there are multiple entries with this tag, the first one gets replaced.
+ *
+ * @param h header
+ * @param tag tag
+ * @param type tag value data type
+ * @param p tag value(s)
+ * @param c number of values
+ * @return 1 on success, 0 on failure
+ */
+typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
+ const void * p, int_32 c)
+ /*@modifies h @*/;
+
+/**
+ * Prototype for headerRemoveEntry() vector.
+ * Delete tag in header.
+ * Removes all entries of type tag from the header, returns 1 if none were
+ * found.
+ *
+ * @param h header
+ * @param tag tag
+ * @return 0 on success, 1 on failure (INCONSISTENT)
+ */
+typedef int (*HRE_t) (Header h, int_32 tag)
+ /*@modifies h @*/;
+
/** \ingroup header
* Create new (empty) header instance.
* @return header
@@ .
Received on Sun Oct 14 21:26:02 2007