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: 16-Oct-2007 20:33:16
Branch: HEAD Handle: 2007101619331600
Modified files:
rpm/rpmdb hdrfmt.c hdrinline.h header.c header.h
Log:
- drill rpmTagType through existing methods.
Summary:
Revision Changes Path
1.11 +11 -10 rpm/rpmdb/hdrfmt.c
1.17 +4 -4 rpm/rpmdb/hdrinline.h
1.82 +17 -17 rpm/rpmdb/header.c
1.34 +5 -5 rpm/rpmdb/header.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrfmt.c
============================================================================
$ cvs diff -u -r1.10 -r1.11 hdrfmt.c
--- rpm/rpmdb/hdrfmt.c 16 Oct 2007 00:48:14 -0000 1.10
+++ rpm/rpmdb/hdrfmt.c 16 Oct 2007 18:33:16 -0000 1.11
@@ -77,7 +77,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * triggertypeFormat(int_32 type, const void * data,
+static /*@only@*/ char * triggertypeFormat(rpmTagType type, const void * data,
/*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
/*@unused@*/ int element)
/*@requires maxRead(data) >= 0 @*/
@@ -109,7 +109,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * permsFormat(int_32 type, const void * data,
+static /*@only@*/ char * permsFormat(rpmTagType type, const void * data,
char * formatPrefix, int padding, /*@unused@*/ int element)
/*@modifies formatPrefix @*/
/*@requires maxRead(data) >= 0 @*/
@@ -141,7 +141,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * fflagsFormat(int_32 type, const void * data,
+static /*@only@*/ char * fflagsFormat(rpmTagType type, const void * data,
char * formatPrefix, int padding, /*@unused@*/ int element)
/*@modifies formatPrefix @*/
/*@requires maxRead(data) >= 0 @*/
@@ -191,7 +191,7 @@
* @param element no. bytes of binary data
* @return formatted string
*/
-static /*@only@*/ char * armorFormat(int_32 type, const void * data,
+static /*@only@*/ char * armorFormat(rpmTagType type, const void * data,
/*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
int element)
/*@*/
@@ -251,7 +251,7 @@
* @param element
* @return formatted string
*/
-static /*@only@*/ char * base64Format(int_32 type, const void * data,
+static /*@only@*/ char * base64Format(rpmTagType type, const void * data,
/*@unused@*/ char * formatPrefix, int padding, int element)
/*@*/
{
@@ -354,7 +354,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
+static /*@only@*/ char * xmlFormat(rpmTagType type, const void * data,
char * formatPrefix, int padding,
/*@unused@*/ int element)
/*@modifies formatPrefix @*/
@@ -517,7 +517,7 @@
* @param element element index (or -1 for non-array).
* @return formatted string
*/
-static /*@only@*/ char * yamlFormat(int_32 type, const void * data,
+static /*@only@*/ char * yamlFormat(rpmTagType type, const void * data,
char * formatPrefix, int padding,
int element)
/*@modifies formatPrefix @*/
@@ -673,7 +673,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * pgpsigFormat(int_32 type, const void * data,
+static /*@only@*/ char * pgpsigFormat(rpmTagType type, const void * data,
/*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
/*@unused@*/ int element)
/*@globals fileSystem, internalState @*/
@@ -782,7 +782,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * depflagsFormat(int_32 type, const void * data,
+static /*@only@*/ char * depflagsFormat(rpmTagType type, const void * data,
char * formatPrefix, int padding, /*@unused@*/ int element)
/*@modifies formatPrefix @*/
/*@requires maxRead(data) >= 0 @*/
@@ -870,7 +870,8 @@
int_32 * indices, * flags;
char ** names, ** versions;
int numNames, numScripts;
- char ** conds, ** s;
+ const char ** conds;
+ char ** s;
char * item, * flagsStr;
char * chptr;
int i, j, xx;
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrinline.h
============================================================================
$ cvs diff -u -r1.16 -r1.17 hdrinline.h
--- rpm/rpmdb/hdrinline.h 7 Oct 2007 19:25:22 -0000 1.16
+++ rpm/rpmdb/hdrinline.h 16 Oct 2007 18:33:16 -0000 1.17
@@ -335,7 +335,7 @@
*/
/*@mayexit@*/
/*@unused@*/ static inline
-int headerAddEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int headerAddEntry(Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
/*@modifies h @*/
{
return (h2hv(h)->hdradd) (h, tag, type, p, c);
@@ -356,7 +356,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerAppendEntry(Header h, int_32 tag, int_32 type,
+int headerAppendEntry(Header h, int_32 tag, rpmTagType type,
const void * p, int_32 c)
/*@modifies h @*/
{
@@ -374,7 +374,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
+int headerAddOrAppendEntry(Header h, int_32 tag, rpmTagType type,
const void * p, int_32 c)
/*@modifies h @*/
{
@@ -420,7 +420,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerModifyEntry(Header h, int_32 tag, int_32 type,
+int headerModifyEntry(Header h, int_32 tag, rpmTagType type,
const void * p, int_32 c)
/*@modifies h @*/
{
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.c
============================================================================
$ cvs diff -u -r1.81 -r1.82 header.c
--- rpm/rpmdb/header.c 16 Oct 2007 18:14:25 -0000 1.81
+++ rpm/rpmdb/header.c 16 Oct 2007 18:33:16 -0000 1.82
@@ -324,7 +324,7 @@
for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) {
unsigned diff;
- int_32 type;
+ rpmTagType type;
/* Regions go in as is ... */
if (ENTRY_IS_REGION(entry)) {
@@ -368,7 +368,7 @@
* @param pend pointer to end of data (or NULL)
* @return no. bytes in data, -1 on failure
*/
-static int dataLength(int_32 type, hPTR_t p, int_32 count, int onDisk,
+static int dataLength(rpmTagType type, hPTR_t p, int_32 count, int onDisk,
/*@null@*/ hPTR_t pend)
/*@*/
{
@@ -466,7 +466,7 @@
memset(&ieprev, 0, sizeof(ieprev));
for (; il > 0; il--, pe++) {
struct indexEntry_s ie;
- int_32 type;
+ rpmTagType type;
ie.info.tag = ntohl(pe->tag);
ie.info.type = ntohl(pe->type);
@@ -606,7 +606,7 @@
int_32 il = 0;
int_32 dl = 0;
indexEntry entry;
- int_32 type;
+ rpmTagType type;
int i;
int drlen, ndribbles;
int driplen, ndrips;
@@ -871,7 +871,7 @@
* @return header entry
*/
static /*@null@*/
-indexEntry findEntry(/*@null@*/ Header h, int_32 tag, int_32 type)
+indexEntry findEntry(/*@null@*/ Header h, int_32 tag, rpmTagType type)
/*@modifies h @*/
{
indexEntry entry, entry2, last;
@@ -1997,7 +1997,7 @@
/**
*/
-static void copyData(int_32 type, /*@out@*/ void * dstPtr, const void * srcPtr,
+static void copyData(rpmTagType type, /*@out@*/ void * dstPtr, const void * srcPtr,
int_32 cnt, int dataLength)
/*@modifies *dstPtr @*/
{
@@ -2033,7 +2033,7 @@
*/
/*@null@*/
static void *
-grabData(int_32 type, hPTR_t p, int_32 c, /*@out@*/ int * lenp)
+grabData(rpmTagType type, hPTR_t p, int_32 c, /*@out@*/ int * lenp)
/*@modifies *lenp @*/
/*@requires maxSet(lenp) >= 0 @*/
{
@@ -2066,7 +2066,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAddEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int headerAddEntry(Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
/*@modifies h @*/
{
indexEntry entry;
@@ -2124,7 +2124,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAppendEntry(Header h, int_32 tag, int_32 type,
+int headerAppendEntry(Header h, int_32 tag, rpmTagType type,
const void * p, int_32 c)
/*@modifies h @*/
{
@@ -2172,7 +2172,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
+int headerAddOrAppendEntry(Header h, int_32 tag, rpmTagType type,
const void * p, int_32 c)
/*@modifies h @*/
{
@@ -2345,7 +2345,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerModifyEntry(Header h, int_32 tag, int_32 type,
+int headerModifyEntry(Header h, int_32 tag, rpmTagType type,
const void * p, int_32 c)
/*@modifies h @*/
{
@@ -3772,7 +3772,7 @@
* @param element (unused)
* @return formatted string
*/
-static char * octalFormat(int_32 type, hPTR_t data,
+static char * octalFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/int element)
/*@modifies formatPrefix @*/
{
@@ -3805,7 +3805,7 @@
* @param element (unused)
* @return formatted string
*/
-static char * hexFormat(int_32 type, hPTR_t data,
+static char * hexFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/int element)
/*@modifies formatPrefix @*/
{
@@ -3839,7 +3839,7 @@
* @param strftimeFormat strftime(3) format
* @return formatted string
*/
-static char * realDateFormat(int_32 type, hPTR_t data,
+static char * realDateFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/int element,
const char * strftimeFormat)
/*@modifies formatPrefix @*/
@@ -3879,7 +3879,7 @@
* @param element (unused)
* @return formatted string
*/
-static char * dateFormat(int_32 type, hPTR_t data,
+static char * dateFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, int element)
/*@modifies formatPrefix @*/
{
@@ -3896,7 +3896,7 @@
* @param element (unused)
* @return formatted string
*/
-static char * dayFormat(int_32 type, hPTR_t data,
+static char * dayFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, int element)
/*@modifies formatPrefix @*/
{
@@ -3913,7 +3913,7 @@
* @param element (unused)
* @return formatted string
*/
-static char * shescapeFormat(int_32 type, hPTR_t data,
+static char * shescapeFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/int element)
/*@modifies formatPrefix @*/
{
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.h
============================================================================
$ cvs diff -u -r1.33 -r1.34 header.h
--- rpm/rpmdb/header.h 16 Oct 2007 16:23:13 -0000 1.33
+++ rpm/rpmdb/header.h 16 Oct 2007 18:33:16 -0000 1.34
@@ -225,7 +225,7 @@
* @param element RPM_BIN_TYPE: no. bytes of data
* @return formatted string
*/
-typedef /*only@*/ char * (*headerTagFormatFunction)(int_32 type,
+typedef /*only@*/ char * (*headerTagFormatFunction)(rpmTagType type,
const void * data, char * formatPrefix,
int padding, int element)
/*@requires maxSet(data) >= 0 @*/;
@@ -646,7 +646,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRadd) (Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int (*HDRadd) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
/*@modifies h @*/;
/** \ingroup header
@@ -664,7 +664,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRappend) (Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int (*HDRappend) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
/*@modifies h @*/;
/** \ingroup header
@@ -678,7 +678,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddorappend) (Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int (*HDRaddorappend) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
/*@modifies h @*/;
/** \ingroup header
@@ -717,7 +717,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRmodify) (Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int (*HDRmodify) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
/*@modifies h @*/;
/** \ingroup header
@@ .
Received on Tue Oct 16 20:33:16 2007