diff options
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/fprint.c | 2 | ||||
-rw-r--r-- | rpmdb/hdrNVR.c | 4 | ||||
-rw-r--r-- | rpmdb/header.c | 62 | ||||
-rw-r--r-- | rpmdb/header.h | 34 | ||||
-rw-r--r-- | rpmdb/header_internal.c | 2 | ||||
-rw-r--r-- | rpmdb/header_internal.h | 6 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 12 |
7 files changed, 61 insertions, 61 deletions
diff --git a/rpmdb/fprint.c b/rpmdb/fprint.c index 0efdf4e39..5103da62b 100644 --- a/rpmdb/fprint.c +++ b/rpmdb/fprint.c @@ -244,7 +244,7 @@ void fpLookupHeader(fingerPrintCache cache, Header h, fingerPrint * fpList); HGE_t hge = (HGE_t)headerGetEntryMinMemory; HFD_t hfd = headerFreeData; const char ** baseNames, ** dirNames; - rpm_tagtype_tbnt, dnt; + rpmTagTypebnt, dnt; uint32_t * dirIndexes; int fileCount; int xx; diff --git a/rpmdb/hdrNVR.c b/rpmdb/hdrNVR.c index c7813bf61..e9d46ef5f 100644 --- a/rpmdb/hdrNVR.c +++ b/rpmdb/hdrNVR.c @@ -11,7 +11,7 @@ int headerNVR(Header h, const char **np, const char **vp, const char **rp) { - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count; if (np) { @@ -36,7 +36,7 @@ int headerNEVRA(Header h, const char **np, const char **ep, const char **vp, const char **rp, const char **ap) { - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count; headerNVR(h, np, vp, rp); diff --git a/rpmdb/header.c b/rpmdb/header.c index 6f19c5c5a..d2325c573 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -238,7 +238,7 @@ unsigned headerSizeof(Header h, enum hMagic magicp) for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) { unsigned diff; - rpm_tagtype_t type; + rpmTagType type; /* Regions go in as is ... */ if (ENTRY_IS_REGION(entry)) { @@ -278,7 +278,7 @@ unsigned headerSizeof(Header h, enum hMagic magicp) * @param pend pointer to end of data (or NULL) * @return no. bytes in data, -1 on failure */ -static int dataLength(rpm_tagtype_t type, rpm_constdata_t p, rpm_count_t count, +static int dataLength(rpmTagType type, rpm_constdata_t p, rpm_count_t count, int onDisk, rpm_constdata_t pend) { const unsigned char * s = p; @@ -373,7 +373,7 @@ static int regionSwab(indexEntry entry, int il, int dl, memset(&ieprev, 0, sizeof(ieprev)); for (; il > 0; il--, pe++) { struct indexEntry_s ie; - rpm_tagtype_t type; + rpmTagType type; ie.info.tag = ntohl(pe->tag); ie.info.type = ntohl(pe->type); @@ -491,7 +491,7 @@ static void * doHeaderUnload(Header h, int32_t il = 0; int32_t dl = 0; indexEntry entry; - rpm_tagtype_t type; + rpmTagType type; int i; int drlen, ndribbles; int driplen, ndrips; @@ -734,7 +734,7 @@ void * headerUnload(Header h) * @return header entry */ static -indexEntry findEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type) +indexEntry findEntry(Header h, rpm_tag_t tag, rpmTagType type) { indexEntry entry, entry2, last; struct indexEntry_s key; @@ -1106,7 +1106,7 @@ int headerIsEntry(Header h, rpm_tag_t tag) * @return 1 on success, otherwise error. */ static int copyEntry(const indexEntry entry, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c, int minMem) @@ -1340,7 +1340,7 @@ headerFindI18NString(Header h, indexEntry entry) * @return 1 on success, 0 on not found */ static int intGetEntry(Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c, int minMem) @@ -1374,7 +1374,7 @@ static int intGetEntry(Header h, rpm_tag_t tag, return ((rc == 1) ? 1 : 0); } -void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type) +void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type) { if (data) { if (type == RPM_FORCEFREE_TYPE || @@ -1387,7 +1387,7 @@ void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type) } int headerGetEntry(Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c) { @@ -1395,14 +1395,14 @@ int headerGetEntry(Header h, rpm_tag_t tag, } int headerGetEntryMinMemory(Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c) { return intGetEntry(h, tag, type, (rpm_data_t) p, c, 1); } -int headerGetRawEntry(Header h, rpm_tag_t tag, rpm_tagtype_t * type, rpm_data_t * p, +int headerGetRawEntry(Header h, rpm_tag_t tag, rpmTagType * type, rpm_data_t * p, rpm_count_t * c) { indexEntry entry; @@ -1427,7 +1427,7 @@ int headerGetRawEntry(Header h, rpm_tag_t tag, rpm_tagtype_t * type, rpm_data_t /** */ -static void copyData(rpm_tagtype_t type, rpm_data_t dstPtr, +static void copyData(rpmTagType type, rpm_data_t dstPtr, rpm_constdata_t srcPtr, rpm_count_t cnt, int dataLength) { switch (type) { @@ -1461,7 +1461,7 @@ static void copyData(rpm_tagtype_t type, rpm_data_t dstPtr, * @return (malloc'ed) copy of entry data, NULL on error */ static void * -grabData(rpm_tagtype_t type, rpm_constdata_t p, rpm_count_t c, int * lengthPtr) +grabData(rpmTagType type, rpm_constdata_t p, rpm_count_t c, int * lengthPtr) { rpm_data_t data = NULL; int length; @@ -1477,7 +1477,7 @@ grabData(rpm_tagtype_t type, rpm_constdata_t p, rpm_count_t c, int * lengthPtr) return data; } -int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerAddEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c) { indexEntry entry; @@ -1520,7 +1520,7 @@ int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, return 1; } -int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerAppendEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c) { indexEntry entry; @@ -1557,7 +1557,7 @@ int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, return 1; } -int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c) { return (findEntry(h, tag, type) @@ -1688,7 +1688,7 @@ int headerAddI18NString(Header h, rpm_tag_t tag, const char * string, return 0; } -int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerModifyEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c) { indexEntry entry; @@ -1812,7 +1812,7 @@ HeaderIterator headerInitIterator(Header h) int headerNextIterator(HeaderIterator hi, rpm_tag_t * tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c) { @@ -1851,7 +1851,7 @@ Header headerCopy(Header h) { Header nh = headerNew(); HeaderIterator hi; - rpm_tagtype_t type; + rpmTagType type; rpm_tag_t tag; rpm_count_t count; rpm_data_t ptr; @@ -1928,7 +1928,7 @@ static sprintfToken hsaNext(headerSprintfArgs hsa) hsa->i++; } else { rpm_tag_t tagno; - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count; if (!headerNextIterator(hsa->hi, &tagno, &type, NULL, &count)) @@ -2428,7 +2428,7 @@ static int parseExpression(headerSprintfArgs hsa, sprintfToken token, * @return 0 on success, 1 on failure */ static int getExtension(headerSprintfArgs hsa, headerTagTagFunction fn, - rpm_tagtype_t * typeptr, + rpmTagType * typeptr, rpm_data_t * data, rpm_count_t * countptr, rpmec ec) @@ -2459,7 +2459,7 @@ static char * formatValue(headerSprintfArgs hsa, sprintfTag tag, int element) size_t need = 0; char * t, * te; char buf[20]; - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count; rpm_data_t data; unsigned int intVal; @@ -2621,7 +2621,7 @@ static char * singleSprintf(headerSprintfArgs hsa, sprintfToken token, { char * t, * te; int i, j, found; - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count, numElements; sprintfToken spft; int condNumFormats; @@ -2885,7 +2885,7 @@ exit: * @param element (unused) * @return formatted string */ -static char * octalFormat(rpm_tagtype_t type, rpm_constdata_t data, +static char * octalFormat(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding,int element) { char * val; @@ -2910,7 +2910,7 @@ static char * octalFormat(rpm_tagtype_t type, rpm_constdata_t data, * @param element (unused) * @return formatted string */ -static char * hexFormat(rpm_tagtype_t type, rpm_constdata_t data, +static char * hexFormat(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding,int element) { char * val; @@ -2928,7 +2928,7 @@ static char * hexFormat(rpm_tagtype_t type, rpm_constdata_t data, /** */ -static char * realDateFormat(rpm_tagtype_t type, rpm_constdata_t data, +static char * realDateFormat(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding,int element, const char * strftimeFormat) { @@ -2965,7 +2965,7 @@ static char * realDateFormat(rpm_tagtype_t type, rpm_constdata_t data, * @param element (unused) * @return formatted string */ -static char * dateFormat(rpm_tagtype_t type, rpm_constdata_t data, +static char * dateFormat(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding, int element) { return realDateFormat(type, data, formatPrefix, padding, element, @@ -2981,7 +2981,7 @@ static char * dateFormat(rpm_tagtype_t type, rpm_constdata_t data, * @param element (unused) * @return formatted string */ -static char * dayFormat(rpm_tagtype_t type, rpm_constdata_t data, +static char * dayFormat(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding, int element) { return realDateFormat(type, data, formatPrefix, padding, element, @@ -2997,7 +2997,7 @@ static char * dayFormat(rpm_tagtype_t type, rpm_constdata_t data, * @param element (unused) * @return formatted string */ -static char * shescapeFormat(rpm_tagtype_t type, rpm_constdata_t data, +static char * shescapeFormat(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding,int element) { char * result, * dst, * src, * buf; @@ -3050,7 +3050,7 @@ void headerCopyTags(Header headerFrom, Header headerTo, rpm_tag_t * tagstocopy) for (p = tagstocopy; *p != 0; p++) { rpm_data_t s; - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count; if (headerIsEntry(headerTo, *p)) continue; @@ -3062,7 +3062,7 @@ void headerCopyTags(Header headerFrom, Header headerTo, rpm_tag_t * tagstocopy) } } -void * headerFreeData(rpm_data_t data, rpm_tagtype_t type) +void * headerFreeData(rpm_data_t data, rpmTagType type) { if (data) { if (type == RPM_FORCEFREE_TYPE || diff --git a/rpmdb/header.h b/rpmdb/header.h index 805a90dda..740eb1071 100644 --- a/rpmdb/header.h +++ b/rpmdb/header.h @@ -93,7 +93,7 @@ typedef struct headerTagTableEntry_s * headerTagTableEntry; struct headerTagTableEntry_s { const char * name; /*!< Tag name. */ rpm_tag_t val; /*!< Tag numeric value. */ - rpm_tagtype_t type; /*!< Tag type. */ + rpmTagType type; /*!< Tag type. */ }; /** @@ -121,7 +121,7 @@ enum headerSprintfExtensionType { * @param element RPM_BIN_TYPE: no. bytes of data * @return formatted string */ -typedef char * (*headerTagFormatFunction)(rpm_tagtype_t type, +typedef char * (*headerTagFormatFunction)(rpmTagType type, rpm_constdata_t data, char * formatPrefix, size_t padding, rpm_count_t element); @@ -137,7 +137,7 @@ typedef char * (*headerTagFormatFunction)(rpm_tagtype_t type, * @return 0 on success */ typedef int (*headerTagTagFunction) (Header h, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * data, rpm_count_t * count, int * freeData); @@ -209,7 +209,7 @@ typedef union hRET_s { */ typedef struct HE_s { rpm_tag_t tag; - rpm_tagtype_t * typ; + rpmTagType * typ; union { hPTR_t * ptr; hRET_t * ret; @@ -334,7 +334,7 @@ int headerIsEntry(Header h, rpm_tag_t tag); * @param type type of data (or -1 to force free) * @return NULL always */ -void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type); +void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type); /** \ingroup header * Retrieve tag value. @@ -350,7 +350,7 @@ void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type); * @return 1 on success, 0 on failure */ int headerGetEntry(Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c); @@ -367,7 +367,7 @@ int headerGetEntry(Header h, rpm_tag_t tag, * @return 1 on success, 0 on failure */ int headerGetEntryMinMemory(Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c); @@ -385,7 +385,7 @@ int headerGetEntryMinMemory(Header h, rpm_tag_t tag, * @param c number of values * @return 1 on success, 0 on failure */ -int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, rpm_constdata_t p, rpm_count_t c); +int headerAddEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c); /** \ingroup header * Append element to tag array in header. @@ -401,7 +401,7 @@ int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, rpm_constdata_t * @param c number of values * @return 1 on success, 0 on failure */ -int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerAppendEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c); /** \ingroup header @@ -414,7 +414,7 @@ int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, * @param c number of values * @return 1 on success, 0 on failure */ -int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c); /** \ingroup header @@ -450,7 +450,7 @@ int headerAddI18NString(Header h, rpm_tag_t tag, const char * string, * @param c number of values * @return 1 on success, 0 on failure */ -int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type, +int headerModifyEntry(Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c); /** \ingroup header @@ -513,7 +513,7 @@ HeaderIterator headerInitIterator(Header h); */ int headerNextIterator(HeaderIterator hi, rpm_tag_t * tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c); @@ -528,7 +528,7 @@ int headerNextIterator(HeaderIterator hi, * @param type type of data (or RPM_FORCEFREE_TYPE to force free) * @return NULL always */ -void * headerFreeData(rpm_data_t data, rpm_tagtype_t type); +void * headerFreeData(rpm_data_t data, rpmTagType type); /** \ingroup header * Return name, version, release strings from header. @@ -600,7 +600,7 @@ int headerIsSource(Header h); * @return NULL always */ typedef - void * (*HFD_t) (rpm_data_t data, rpm_tagtype_t type); + void * (*HFD_t) (rpm_data_t data, rpmTagType type); /** * Prototype for headerGetEntry() vector. @@ -617,7 +617,7 @@ typedef * @return 1 on success, 0 on failure */ typedef int (*HGE_t) (Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c); @@ -636,7 +636,7 @@ typedef int (*HGE_t) (Header h, rpm_tag_t tag, * @param c number of values * @return 1 on success, 0 on failure */ -typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type, +typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c); /** @@ -650,7 +650,7 @@ typedef int (*HAE_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type, * @param c number of values * @return 1 on success, 0 on failure */ -typedef int (*HME_t) (Header h, rpm_tag_t tag, rpm_tagtype_t type, +typedef int (*HME_t) (Header h, rpm_tag_t tag, rpmTagType type, rpm_constdata_t p, rpm_count_t c); /** diff --git a/rpmdb/header_internal.c b/rpmdb/header_internal.c index 4f2f32a17..2cbb712c0 100644 --- a/rpmdb/header_internal.c +++ b/rpmdb/header_internal.c @@ -12,7 +12,7 @@ char ** headerGetLangs(Header h) { char **s, *e, **table; - rpm_tagtype_t type; + rpmTagType type; rpm_count_t i, count; if (!headerGetRawEntry(h, HEADER_I18NTABLE, &type, (rpm_data_t)&s, &count)) diff --git a/rpmdb/header_internal.h b/rpmdb/header_internal.h index d13915c5c..36e3e6f89 100644 --- a/rpmdb/header_internal.h +++ b/rpmdb/header_internal.h @@ -23,7 +23,7 @@ typedef struct entryInfo_s * entryInfo; struct entryInfo_s { rpm_tag_t tag; /*!< Tag identifier. */ - rpm_tagtype_t type; /*!< Tag data type. */ + rpmTagType type; /*!< Tag data type. */ int32_t offset; /*!< Offset into data segment (ondisk only). */ rpm_count_t count; /*!< Number of tag elements. */ }; @@ -82,7 +82,7 @@ struct sprintfTag_s { */ typedef struct rpmec_s * rpmec; struct rpmec_s { - rpm_tagtype_t type; + rpmTagType type; rpm_count_t count; int avail; int freeit; @@ -146,7 +146,7 @@ char ** headerGetLangs(Header h); * @return 1 on success, 0 on failure */ int headerGetRawEntry(Header h, rpm_tag_t tag, - rpm_tagtype_t * type, + rpmTagType * type, rpm_data_t * p, rpm_count_t * c); diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 5ae15bcec..3f8d0757a 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -1098,7 +1098,7 @@ static int rpmdbFindByFile(rpmdb db, const char * filespec, HFD_t hfd = headerFreeData; const char * dirName; const char * baseName; - rpm_tagtype_t bnt, dnt; + rpmTagType bnt, dnt; fingerPrintCache fpc; fingerPrint fp1; dbiIndex dbi = NULL; @@ -1843,7 +1843,7 @@ static int mireSkip (const rpmdbMatchIterator mi) int8_t * i8p; } u; char numbuf[32]; - rpm_tagtype_t t; + rpmTagType t; rpm_count_t c; miRE mire; static int32_t zero = 0; @@ -2471,7 +2471,7 @@ memset(data, 0, sizeof(*data)); dbiIndex dbi; const char *av[1]; const char ** rpmvals = NULL; - rpm_tagtype_t rpmtype = 0; + rpmTagType rpmtype = 0; rpm_count_t rpmcnt = 0; rpm_tag_t rpmtag; int xx; @@ -2704,7 +2704,7 @@ DBT * data = alloca(sizeof(*data)); HFD_t hfd = headerFreeData; sigset_t signalMask; const char ** baseNames; - rpm_tagtype_t bnt; + rpmTagType bnt; rpm_count_t count = 0; dbiIndex dbi; int dbix; @@ -2824,7 +2824,7 @@ memset(data, 0, sizeof(*data)); for (dbix = 0; dbix < dbiTagsMax; dbix++) { const char *av[1]; const char **rpmvals = NULL; - rpm_tagtype_t rpmtype = 0; + rpmTagType rpmtype = 0; rpm_count_t rpmcnt = 0; rpm_tag_t rpmtag; rpm_flag_t * requireFlags; @@ -3161,7 +3161,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ const char ** dirNames; const char ** baseNames; const char ** fullBaseNames; - rpm_tagtype_t bnt, dnt; + rpmTagType bnt, dnt; uint32_t * dirIndexes; uint32_t * fullDirIndexes; fingerPrint * fps; |