Mass convert (back) to rpmTag as it's usable everywhere now

- cast away a few cases where the enum usage causes ridiculous amount
  of compiler warnings from unhandled switch-cases
This commit is contained in:
Panu Matilainen 2008-02-05 17:42:19 +02:00
parent 53ca9c775f
commit d718b12f5b
48 changed files with 202 additions and 193 deletions

View File

@ -1617,7 +1617,7 @@ static rpmRC recurseDir(FileList fl, const char * diskURL)
* @return RPMRC_OK on success
*/
static rpmRC processMetadataFile(Package pkg, FileList fl, const char * fileURL,
rpm_tag_t tag)
rpmTag tag)
{
const char * buildURL = "%{_builddir}/%{?buildsubdir}/";
const char * urlfn = NULL;
@ -2017,7 +2017,7 @@ void initSourceHeader(rpmSpec spec)
{
HeaderIterator hi;
rpmTagType type;
rpm_tag_t tag;
rpmTag tag;
rpm_count_t count;
rpm_data_t ptr;

View File

@ -144,7 +144,7 @@ static StringBuf addFileToTagAux(rpmSpec spec,
/**
*/
static int addFileToTag(rpmSpec spec, const char * file, Header h, rpm_tag_t tag)
static int addFileToTag(rpmSpec spec, const char * file, Header h, rpmTag tag)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
StringBuf sb = newStringBuf();
@ -166,7 +166,7 @@ static int addFileToTag(rpmSpec spec, const char * file, Header h, rpm_tag_t tag
/**
*/
static int addFileToArrayTag(rpmSpec spec, const char *file, Header h, rpm_tag_t tag)
static int addFileToArrayTag(rpmSpec spec, const char *file, Header h, rpmTag tag)
{
StringBuf sb = newStringBuf();
char *s;
@ -593,7 +593,7 @@ exit:
return rc;
}
static rpm_tag_t copyTags[] = {
static rpmTag copyTags[] = {
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,

View File

@ -16,7 +16,7 @@
/**
*/
static rpm_tag_t copyTagsDuringParse[] = {
static rpmTag copyTagsDuringParse[] = {
RPMTAG_EPOCH,
RPMTAG_VERSION,
RPMTAG_RELEASE,
@ -39,7 +39,7 @@ static rpm_tag_t copyTagsDuringParse[] = {
/**
*/
static rpm_tag_t requiredTags[] = {
static rpmTag requiredTags[] = {
RPMTAG_NAME,
RPMTAG_VERSION,
RPMTAG_RELEASE,
@ -51,7 +51,7 @@ static rpm_tag_t requiredTags[] = {
/**
*/
static void addOrAppendListEntry(Header h, rpm_tag_t tag, const char * line)
static void addOrAppendListEntry(Header h, rpmTag tag, const char * line)
{
int xx;
int argc;
@ -188,7 +188,7 @@ static inline char * findLastChar(char * s)
/**
*/
static int isMemberInEntry(Header h, const char *name, rpm_tag_t tag)
static int isMemberInEntry(Header h, const char *name, rpmTag tag)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
HFD_t hfd = headerFreeData;
@ -250,7 +250,7 @@ static int checkForRequired(Header h, const char * NVR)
/* LCL: parse error here with modifies */
{
int res = RPMRC_OK;
rpm_tag_t * p;
rpmTag * p;
for (p = requiredTags; *p != 0; p++) {
if (!headerIsEntry(h, *p)) {
@ -273,7 +273,7 @@ static int checkForRequired(Header h, const char * NVR)
static int checkForDuplicates(Header h, const char * NVR)
{
int res = RPMRC_OK;
rpm_tag_t lastTag, tag;
rpmTag lastTag, tag;
HeaderIterator hi;
for (hi = headerInitIterator(h), lastTag = 0;
@ -294,7 +294,7 @@ static int checkForDuplicates(Header h, const char * NVR)
/**
*/
static struct optionalTag {
rpm_tag_t ot_tag;
rpmTag ot_tag;
const char * ot_mac;
} optionalTags[] = {
{ RPMTAG_VENDOR, "%{vendor}" },
@ -378,7 +378,7 @@ exit:
return rc;
}
spectag stashSt(rpmSpec spec, Header h, rpm_tag_t tag, const char * lang)
spectag stashSt(rpmSpec spec, Header h, rpmTag tag, const char * lang)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
spectag t = NULL;
@ -418,7 +418,7 @@ extern int noLang;
/**
*/
static int handlePreambleTag(rpmSpec spec, Package pkg, rpm_tag_t tag,
static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
const char *macro, const char *lang)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
@ -676,7 +676,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpm_tag_t tag,
/**
*/
typedef struct PreambleRec_s {
rpm_tag_t tag;
rpmTag tag;
size_t len;
int multiLang;
int obsolete;
@ -743,7 +743,7 @@ static inline void initPreambleList(void)
/**
*/
static int findPreambleTag(rpmSpec spec,rpm_tag_t * tag,
static int findPreambleTag(rpmSpec spec,rpmTag * tag,
const char ** macro, char * lang)
{
PreambleRec p;
@ -847,7 +847,7 @@ int parsePreamble(rpmSpec spec, int initialPackage)
return rc;
while (! (nextPart = isPart(spec->line))) {
const char * macro;
rpm_tag_t tag;
rpmTag tag;
/* Skip blank lines */
linep = spec->line;
@ -892,7 +892,7 @@ int parsePreamble(rpmSpec spec, int initialPackage)
if (pkg != spec->packages)
headerCopyTags(spec->packages->header, pkg->header,
(rpm_tag_t *)copyTagsDuringParse);
(rpmTag *)copyTagsDuringParse);
if (checkForRequired(pkg->header, NVR))
return RPMRC_FAIL;

View File

@ -33,7 +33,7 @@ const char * token;
#define SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
#define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpm_tag_t tagN,
rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
int index, rpmsenseFlags tagflags)
{
const char *r, *re, *v, *ve;

View File

@ -77,10 +77,10 @@ int parseScript(rpmSpec spec, int parsePart)
const char **progArgv = NULL;
int progArgc;
const char *partname = NULL;
rpm_tag_t reqtag = 0;
rpm_tag_t tag = 0;
rpmTag reqtag = 0;
rpmTag tag = 0;
rpmsenseFlags tagflags = 0;
rpm_tag_t progtag = 0;
rpmTag progtag = 0;
int flag = PART_SUBNAME;
Package pkg;
StringBuf sb = NULL;

View File

@ -9,7 +9,7 @@
#include <rpm/rpmbuild.h>
#include "debug.h"
int addReqProv(rpmSpec spec, Header h, rpm_tag_t tagN,
int addReqProv(rpmSpec spec, Header h, rpmTag tagN,
const char * N, const char * EVR, rpmsenseFlags Flags,
int index)
{
@ -17,10 +17,10 @@ int addReqProv(rpmSpec spec, Header h, rpm_tag_t tagN,
HFD_t hfd = headerFreeData;
const char ** names;
rpmTagType dnt;
rpm_tag_t nametag = 0;
rpm_tag_t versiontag = 0;
rpm_tag_t flagtag = 0;
rpm_tag_t indextag = 0;
rpmTag nametag = 0;
rpmTag versiontag = 0;
rpmTag flagtag = 0;
rpmTag indextag = 0;
rpm_count_t len;
rpmsenseFlags extra = RPMSENSE_ANY;
int xx;

View File

@ -244,7 +244,7 @@ int parsePrep(rpmSpec spec);
* @param tagflags dependency flags already known from context
* @return RPMRC_OK on success, RPMRC_FAIL on failure
*/
rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char * field, rpm_tag_t tagN,
rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char * field, rpmTag tagN,
int index, rpmsenseFlags tagflags);
/** \ingroup rpmbuild
@ -327,7 +327,7 @@ Package freePackage(Package pkg);
* @param index (0 always)
* @return 0 always
*/
int addReqProv(rpmSpec spec, Header h, rpm_tag_t tagN,
int addReqProv(rpmSpec spec, Header h, rpmTag tagN,
const char * N, const char * EVR, rpmsenseFlags Flags,
int index);

View File

@ -301,11 +301,11 @@ static int rpmfcSaveArg(ARGV_t * argvp, const char * key)
static char * rpmfcFileDep(char * buf, int ix,
rpmds ds)
{
rpm_tag_t tagN = rpmdsTagN(ds);
rpmTag tagN = rpmdsTagN(ds);
char deptype = 'X';
buf[0] = '\0';
switch (tagN) {
switch ((rpm_tag_t) tagN) {
case RPMTAG_PROVIDENAME:
deptype = 'P';
break;
@ -805,7 +805,7 @@ static int rpmfcELF(rpmfc fc)
struct stat sb, * st = &sb;
char * soname = NULL;
rpmds * depsp, ds;
rpm_tag_t tagN;
rpmTag tagN;
int32_t dsContext;
char * t;
int xx;
@ -1345,9 +1345,9 @@ typedef struct DepMsg_s * DepMsg_t;
struct DepMsg_s {
const char * msg;
const char * argv[4];
rpm_tag_t ntag;
rpm_tag_t vtag;
rpm_tag_t ftag;
rpmTag ntag;
rpmTag vtag;
rpmTag ftag;
int mask;
int xor;
};
@ -1457,7 +1457,7 @@ static int rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi)
appendLineStringBuf(sb_stdin, rpmfiFN(fi));
for (dm = DepMsgs; dm->msg != NULL; dm++) {
rpm_tag_t tag;
rpmTag tag;
rpmsenseFlags tagflags;
char * s;
int xx;

View File

@ -209,7 +209,7 @@ struct OpenFileInfo * newOpenFileInfo(void);
* @param tag tag
* @param lang locale
*/
spectag stashSt(rpmSpec spec, Header h, rpm_tag_t tag, const char * lang);
spectag stashSt(rpmSpec spec, Header h, rpmTag tag, const char * lang);
/** \ingroup rpmbuild
* addSource.
@ -218,7 +218,7 @@ spectag stashSt(rpmSpec spec, Header h, rpm_tag_t tag, const char * lang);
* @param field field to parse
* @param tag tag
*/
int addSource(rpmSpec spec, Package pkg, const char * field, rpm_tag_t tag);
int addSource(rpmSpec spec, Package pkg, const char * field, rpmTag tag);
/** \ingroup rpmbuild
* parseNoSource.
@ -226,7 +226,7 @@ int addSource(rpmSpec spec, Package pkg, const char * field, rpm_tag_t tag);
* @param field field to parse
* @param tag tag
*/
int parseNoSource(rpmSpec spec, const char * field, rpm_tag_t tag);
int parseNoSource(rpmSpec spec, const char * field, rpmTag tag);
#ifdef __cplusplus
}

View File

@ -200,7 +200,7 @@ static inline struct Source *findSource(rpmSpec spec, int num, int flag)
return NULL;
}
int parseNoSource(rpmSpec spec, const char * field, rpm_tag_t tag)
int parseNoSource(rpmSpec spec, const char * field, rpmTag tag)
{
const char *f, *fe;
const char *name;
@ -244,7 +244,7 @@ int parseNoSource(rpmSpec spec, const char * field, rpm_tag_t tag)
return 0;
}
int addSource(rpmSpec spec, Package pkg, const char *field, rpm_tag_t tag)
int addSource(rpmSpec spec, Package pkg, const char *field, rpmTag tag)
{
struct Source *p;
int flag = 0;
@ -255,7 +255,7 @@ int addSource(rpmSpec spec, Package pkg, const char *field, rpm_tag_t tag)
int num = 0;
buf[0] = '\0';
switch (tag) {
switch ((rpm_tag_t) tag) {
case RPMTAG_SOURCE:
flag = RPMBUILD_ISSOURCE;
name = "source";

View File

@ -818,7 +818,7 @@ static const char * _macro_i18ndomains = "%{?_i18ndomains}";
* @retval *freeData data-was-malloc'ed indicator
* @return 0 on success
*/
static int i18nTag(Header h, rpm_tag_t tag, rpmTagType* type,
static int i18nTag(Header h, rpmTag tag, rpmTagType* type,
rpm_data_t * data, rpm_count_t * count,
int * freeData)
{

View File

@ -67,7 +67,7 @@ IDTX IDTXsort(IDTX idtx)
return idtx;
}
IDTX IDTXload(rpmts ts, rpm_tag_t tag)
IDTX IDTXload(rpmts ts, rpmTag tag)
{
IDTX idtx = NULL;
rpmdbMatchIterator mi;
@ -110,7 +110,7 @@ IDTX IDTXload(rpmts ts, rpm_tag_t tag)
return IDTXsort(idtx);
}
IDTX IDTXglob(rpmts ts, const char * globstr, rpm_tag_t tag)
IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag)
{
IDTX idtx = NULL;
HGE_t hge = (HGE_t) headerGetEntry;

View File

@ -64,7 +64,7 @@ IDTX IDTXsort(IDTX idtx);
* @param tag rpm tag
* @return id index
*/
IDTX IDTXload(rpmts ts, rpm_tag_t tag);
IDTX IDTXload(rpmts ts, rpmTag tag);
/**
* Load tag (instance,value) pairs from packages, and return sorted id index.
@ -73,7 +73,7 @@ IDTX IDTXload(rpmts ts, rpm_tag_t tag);
* @param tag rpm tag
* @return id index
*/
IDTX IDTXglob(rpmts ts, const char * globstr, rpm_tag_t tag);
IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag);
#ifdef __cplusplus
}

View File

@ -87,7 +87,7 @@ void headerMergeLegacySigs(Header h, const Header sigh)
HAE_t hae = (HAE_t) headerAddEntry;
HeaderIterator hi;
rpmTagType type;
rpm_tag_t tag;
rpmTag tag;
rpm_count_t count;
rpm_data_t ptr;
int xx;
@ -169,7 +169,7 @@ Header headerRegenSigHeader(const Header h, int noArchiveSize)
Header sigh = rpmNewSignature();
HeaderIterator hi;
rpm_count_t count;
rpm_tag_t tag, stag;
rpmTag tag, stag;
rpmTagType type;
rpm_data_t ptr;
int xx;
@ -682,7 +682,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
ssize_t count;
rpmlead l = NULL;
Header sigh = NULL;
rpm_tag_t sigtag;
rpmSigTag sigtag;
rpmTagType sigtype;
rpm_data_t sig;
rpm_count_t siglen;
@ -897,6 +897,14 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
fdStealDigest(fd, dig);
break;
/* shut up gcc */
case RPMSIGTAG_LEMD5_1:
case RPMSIGTAG_LEMD5_2:
case RPMSIGTAG_BADSHA1_1:
case RPMSIGTAG_BADSHA1_2:
case RPMSIGTAG_SIZE:
case RPMSIGTAG_PAYLOADSIZE:
break;
}
/** @todo Implement disable/enable/warn/error/anal policy. */

View File

@ -108,7 +108,7 @@ int rpmVersionCompare(Header first, Header second)
*/
static struct tagMacro {
const char * macroname; /*!< Macro name to define. */
rpm_tag_t tag; /*!< Header tag to use for value. */
rpmTag tag; /*!< Header tag to use for value. */
} tagMacros[] = {
{ "name", RPMTAG_NAME },
{ "version", RPMTAG_VERSION },
@ -439,9 +439,9 @@ static const char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6
* @param tag scriptlet tag
* @return name of scriptlet
*/
static const char * tag2sln(rpm_tag_t tag)
static const char * tag2sln(rpmTag tag)
{
switch (tag) {
switch ((rpm_tag_t) tag) {
case RPMTAG_PRETRANS: return "%pretrans";
case RPMTAG_TRIGGERPREIN: return "%triggerprein";
case RPMTAG_PREIN: return "%pre";
@ -453,13 +453,14 @@ static const char * tag2sln(rpm_tag_t tag)
case RPMTAG_POSTTRANS: return "%posttrans";
case RPMTAG_TRIGGERPOSTUN: return "%triggerpostun";
case RPMTAG_VERIFYSCRIPT: return "%verify";
default: break;
}
return "%unknownscript";
}
static rpm_tag_t triggertag(rpmsenseFlags sense)
static rpmTag triggertag(rpmsenseFlags sense)
{
rpm_tag_t tag = RPMTAG_NOT_FOUND;
rpmTag tag = RPMTAG_NOT_FOUND;
switch (sense) {
case RPMSENSE_TRIGGERIN:
tag = RPMTAG_TRIGGERIN;
@ -506,7 +507,7 @@ static pid_t psmWait(rpmpsm psm)
/**
* Run internal Lua script.
*/
static rpmRC runLuaScript(rpmpsm psm, Header h, rpm_tag_t stag,
static rpmRC runLuaScript(rpmpsm psm, Header h, rpmTag stag,
unsigned int progArgc, const char **progArgv,
const char *script, int arg1, int arg2)
{
@ -603,7 +604,7 @@ static const char * ldconfig_path = "/sbin/ldconfig";
* @param arg2 ditto, but for the target package
* @return 0 on success
*/
static rpmRC runScript(rpmpsm psm, Header h, rpm_tag_t stag,
static rpmRC runScript(rpmpsm psm, Header h, rpmTag stag,
unsigned int progArgc, const char ** progArgv,
const char * script, int arg1, int arg2)
{
@ -1224,7 +1225,7 @@ void rpmpsmSetAsync(rpmpsm psm, int async)
psm->unorderedSuccessor = async;
}
rpmRC rpmpsmScriptStage(rpmpsm psm, rpm_tag_t scriptTag, rpm_tag_t progTag)
rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag)
{
assert(psm != NULL);
psm->scriptTag = scriptTag;
@ -1528,7 +1529,7 @@ assert(psm->mi == NULL);
{
HeaderIterator hi;
rpmTagType type;
rpm_tag_t tag;
rpmTag tag;
rpm_count_t count;
rpm_data_t ptr;
Header oh;

View File

@ -113,7 +113,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage);
* @param progTag scriptlet prog tag to execute
* @return 0 on success
*/
rpmRC rpmpsmScriptStage(rpmpsm psm, rpm_tag_t scriptTag, rpm_tag_t progTag);
rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag);
/**
* @param psm package state machine data

View File

@ -211,7 +211,7 @@ static int rpmReSign(rpmts ts,
if (headerGetEntry(sigh, RPMTAG_HEADERSIGNATURES, &uht, &uh, &uhc)) {
HeaderIterator hi;
rpmTagType type;
rpm_tag_t tag;
rpmTag tag;
rpm_count_t count;
rpm_data_t ptr;
Header oh;
@ -524,7 +524,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
char buf[8192], * b;
char missingKeys[7164], * m;
char untrustedKeys[7164], * u;
rpmSigTag sigtag;
rpmTag sigtag;
rpmTagType sigtype;
rpm_data_t sig;
pgpDig dig;

View File

@ -35,7 +35,7 @@ struct rpmds_s {
rpm_color_t * Color; /*!< Bit(s) calculated from file color(s). */
int32_t * Refs; /*!< No. of file refs. */
time_t BT; /*!< Package build time tie breaker. */
rpm_tag_t tagN; /*!< Header tag. */
rpmTag tagN; /*!< Header tag. */
rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */
int32_t Count; /*!< No. of elements */
int i; /*!< Element index. */
@ -45,13 +45,13 @@ struct rpmds_s {
int nrefs; /*!< Reference count. */
};
static int dsType(rpm_tag_t tag,
const char ** Type, rpm_tag_t * tagEVR, rpm_tag_t * tagF)
static int dsType(rpmTag tag,
const char ** Type, rpmTag * tagEVR, rpmTag * tagF)
{
int rc = 0;
const char *t = NULL;
rpm_tag_t evr = RPMTAG_NOT_FOUND;
rpm_tag_t f = RPMTAG_NOT_FOUND;
rpmTag evr = RPMTAG_NOT_FOUND;
rpmTag f = RPMTAG_NOT_FOUND;
if (tag == RPMTAG_PROVIDENAME) {
t = "Provides";
@ -105,7 +105,7 @@ fprintf(stderr, "--> ds %p ++ %d %s\n", ds, ds->nrefs, msg);
rpmds rpmdsFree(rpmds ds)
{
HFD_t hfd = headerFreeData;
rpm_tag_t tagEVR, tagF;
rpmTag tagEVR, tagF;
if (ds == NULL)
return NULL;
@ -136,15 +136,15 @@ fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count);
return NULL;
}
rpmds rpmdsNew(Header h, rpm_tag_t tagN, int flags)
rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
{
int scareMem = (flags & 0x1);
HGE_t hge =
(scareMem ? (HGE_t) headerGetEntryMinMemory : (HGE_t) headerGetEntry);
rpm_tag_t tagBT = RPMTAG_BUILDTIME;
rpmTag tagBT = RPMTAG_BUILDTIME;
rpmTagType BTt;
rpm_time_t * BTp;
rpm_tag_t tagEVR, tagF;
rpmTag tagEVR, tagF;
rpmds ds = NULL;
const char * Type;
const char ** N;
@ -236,7 +236,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
return tbuf;
}
rpmds rpmdsThis(Header h, rpm_tag_t tagN, rpmsenseFlags Flags)
rpmds rpmdsThis(Header h, rpmTag tagN, rpmsenseFlags Flags)
{
HGE_t hge = (HGE_t) headerGetEntryMinMemory;
rpmds ds = NULL;
@ -295,7 +295,7 @@ exit:
return rpmdsLink(ds, (ds ? ds->Type : RPMDBG()));
}
rpmds rpmdsSingle(rpm_tag_t tagN, const char * N, const char * EVR, rpmsenseFlags Flags)
rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, rpmsenseFlags Flags)
{
rpmds ds = NULL;
const char * Type;
@ -392,9 +392,9 @@ rpmsenseFlags rpmdsFlags(const rpmds ds)
return Flags;
}
rpm_tag_t rpmdsTagN(const rpmds ds)
rpmTag rpmdsTagN(const rpmds ds)
{
rpm_tag_t tagN = 0;
rpmTag tagN = 0;
if (ds != NULL)
tagN = ds->tagN;

View File

@ -121,7 +121,7 @@ rpmds rpmdsFree(rpmds ds);
* @param flags scareMem(0x1)
* @return new dependency set
*/
rpmds rpmdsNew(Header h, rpm_tag_t tagN, int flags);
rpmds rpmdsNew(Header h, rpmTag tagN, int flags);
/** \ingroup rpmds
* Return new formatted dependency string.
@ -138,7 +138,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds);
* @param Flags comparison flags
* @return new dependency set
*/
rpmds rpmdsThis(Header h, rpm_tag_t tagN, rpmsenseFlags Flags);
rpmds rpmdsThis(Header h, rpmTag tagN, rpmsenseFlags Flags);
/** \ingroup rpmds
* Create, load and initialize a dependency set of size 1.
@ -148,7 +148,7 @@ rpmds rpmdsThis(Header h, rpm_tag_t tagN, rpmsenseFlags Flags);
* @param Flags comparison flags
* @return new dependency set
*/
rpmds rpmdsSingle(rpm_tag_t tagN, const char * N, const char * EVR, rpmsenseFlags Flags);
rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, rpmsenseFlags Flags);
/** \ingroup rpmds
* Return dependency set count.
@ -205,7 +205,7 @@ rpmsenseFlags rpmdsFlags(const rpmds ds);
* @param ds dependency set
* @return current dependency type, 0 on invalid
*/
rpm_tag_t rpmdsTagN(const rpmds ds);
rpmTag rpmdsTagN(const rpmds ds);
/** \ingroup rpmds
* Return dependency build time.

View File

@ -1137,7 +1137,7 @@ static inline unsigned char nibble(char c)
if (hge((_h), (_tag), NULL, (rpm_data_t *) &(_data), NULL)) \
_data = xstrdup(_data)
rpmfi rpmfiNew(const rpmts ts, Header h, rpm_tag_t tagN, int scareMem)
rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int scareMem)
{
HGE_t hge =
(scareMem ? (HGE_t) headerGetEntryMinMemory : (HGE_t) headerGetEntry);
@ -1384,7 +1384,7 @@ exit:
if (fcp) *fcp = ac;
}
void rpmfiBuildFDeps(Header h, rpm_tag_t tagN,
void rpmfiBuildFDeps(Header h, rpmTag tagN,
const char *** fdepsp, rpm_count_t * fcp)
{
int scareMem = 0;
@ -1479,7 +1479,7 @@ exit:
if (fcp) *fcp = ac;
}
void rpmfiBuildFNames(Header h, rpm_tag_t tagN,
void rpmfiBuildFNames(Header h, rpmTag tagN,
const char *** fnp, rpm_count_t * fcp)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
@ -1490,8 +1490,8 @@ void rpmfiBuildFNames(Header h, rpm_tag_t tagN,
rpm_count_t count;
const char ** fileNames;
int size;
rpm_tag_t dirNameTag = 0;
rpm_tag_t dirIndexesTag = 0;
rpmTag dirNameTag = 0;
rpmTag dirIndexesTag = 0;
rpmTagType bnt, dnt;
char * t;
int i, xx;

View File

@ -351,7 +351,7 @@ rpmfi rpmfiFree(rpmfi fi);
* @param scareMem Use pointers to refcounted header memory?
* @return new file info set
*/
rpmfi rpmfiNew(const rpmts ts, Header h, rpm_tag_t tagN, int scareMem);
rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int scareMem);
/** \ingroup rpmfi
* Retrieve file classes from header.
@ -376,7 +376,7 @@ void rpmfiBuildFClasses(Header h,
* @retval *fdepsp array of file dependencies
* @retval *fcp number of files
*/
void rpmfiBuildFDeps(Header h, rpm_tag_t tagN,
void rpmfiBuildFDeps(Header h, rpmTag tagN,
const char *** fdepsp, rpm_count_t * fcp);
/** \ingroup rpmfi
@ -396,7 +396,7 @@ void rpmfiBuildFDeps(Header h, rpm_tag_t tagN,
* @retval *fnp array of file names
* @retval *fcp number of files
*/
void rpmfiBuildFNames(Header h, rpm_tag_t tagN,
void rpmfiBuildFNames(Header h, rpmTag tagN,
const char *** fnp, rpm_count_t * fcp);
/** \ingroup rpmfi

View File

@ -27,7 +27,7 @@ struct rpmfi_s {
const char * Type; /*!< Tag name. */
rpm_tag_t tagN; /*!< Header tag. */
rpmTag tagN; /*!< Header tag. */
Header h; /*!< Header for file info set (or NULL) */
/*?null?*/

View File

@ -26,7 +26,7 @@ rpmgiFlags giFlags = RPMGI_NONE;
*/
struct rpmgi_s {
rpmts ts; /*!< Iterator transaction set. */
rpm_tag_t tag; /*!< Iterator type. */
rpmTag tag; /*!< Iterator type. */
const void * keyp; /*!< Iterator key. */
size_t keylen; /*!< Iterator key length. */
@ -341,7 +341,7 @@ fprintf(stderr, "*** gi %p\tmi %p\n", gi, gi->mi);
if (gi->argv != NULL)
for (av = (const char **) gi->argv; *av != NULL; av++) {
rpm_tag_t tag = RPMTAG_NAME;
rpmTag tag = RPMTAG_NAME;
const char * pat;
char * a, * ae;
@ -434,7 +434,7 @@ rpmgi rpmgiFree(rpmgi gi)
return NULL;
}
rpmgi rpmgiNew(rpmts ts, rpm_tag_t tag, const void * keyp, size_t keylen)
rpmgi rpmgiNew(rpmts ts, rpmTag tag, const void * keyp, size_t keylen)
{
rpmgi gi = xcalloc(1, sizeof(*gi));

View File

@ -72,7 +72,7 @@ rpmgi rpmgiFree(rpmgi gi);
* @param keylen key data length (0 will use strlen(keyp))
* @return new iterator
*/
rpmgi rpmgiNew(rpmts ts, rpm_tag_t tag, const void * keyp,
rpmgi rpmgiNew(rpmts ts, rpmTag tag, const void * keyp,
size_t keylen);
/** \ingroup rpmgi

View File

@ -471,7 +471,7 @@ fnpyKey rpmteKey(rpmte te)
return (te != NULL ? te->key : NULL);
}
rpmds rpmteDS(rpmte te, rpm_tag_t tag)
rpmds rpmteDS(rpmte te, rpmTag tag)
{
if (te == NULL)
return NULL;
@ -494,7 +494,7 @@ rpmds rpmteDS(rpmte te, rpm_tag_t tag)
return NULL;
}
rpmfi rpmteFI(rpmte te, rpm_tag_t tag)
rpmfi rpmteFI(rpmte te, rpmTag tag)
{
if (te == NULL)
return NULL;
@ -505,7 +505,7 @@ rpmfi rpmteFI(rpmte te, rpm_tag_t tag)
return NULL;
}
void rpmteColorDS(rpmte te, rpm_tag_t tag)
void rpmteColorDS(rpmte te, rpmTag tag)
{
rpmfi fi = rpmteFI(te, RPMTAG_BASENAMES);
rpmds ds = rpmteDS(te, tag);

View File

@ -346,7 +346,7 @@ fnpyKey rpmteKey(rpmte te);
* @param tag dependency tag
* @return dependency tag set
*/
rpmds rpmteDS(rpmte te, rpm_tag_t tag);
rpmds rpmteDS(rpmte te, rpmTag tag);
/** \ingroup rpmte
* Retrieve file info tag set from transaction element.
@ -354,14 +354,14 @@ rpmds rpmteDS(rpmte te, rpm_tag_t tag);
* @param tag file info tag (RPMTAG_BASENAMES)
* @return file info tag set
*/
rpmfi rpmteFI(rpmte te, rpm_tag_t tag);
rpmfi rpmteFI(rpmte te, rpmTag tag);
/** \ingroup rpmte
* Calculate transaction element dependency colors/refs from file info.
* @param te transaction element
* @param tag dependency tag (RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME)
*/
void rpmteColorDS(rpmte te, rpm_tag_t tag);
void rpmteColorDS(rpmte te, rpmTag tag);
/** \ingroup rpmte
* Return transaction element index.

View File

@ -177,7 +177,7 @@ static int isArch(const char * arch)
}
/* keyp might no be defined. */
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpm_tag_t rpmtag,
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
const void * keyp, size_t keylen)
{
rpmdbMatchIterator mi;
@ -598,7 +598,7 @@ int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
Header h;
size_t bhnamelen;
time_t bhtime;
rpm_tag_t rpmtag;
rpmTag rpmtag;
const char * keyp;
size_t keylen;
int rc = 1; /* assume not found */

View File

@ -283,7 +283,7 @@ int rpmtsVerifyDB(rpmts ts);
* @param keylen key data length (0 will use strlen(keyp))
* @return NULL on failure
*/
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpm_tag_t rpmtag,
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
const void * keyp, size_t keylen);
/** \ingroup rpmts

View File

@ -9,7 +9,7 @@ extern int _rpmds_debug;
int main(int argc, char *argv[])
{
rpm_tag_t tagN = RPMTAG_REQUIRENAME;
rpmTag tagN = RPMTAG_REQUIRENAME;
rpmds ds = NULL;
rpmds dsA;
rpmds dsA1;

View File

@ -83,7 +83,7 @@ main(int argc, char *argv[])
rpmts ts = NULL;
rpmVSFlags vsflags;
rpmgi gi = NULL;
rpm_tag_t gitag = RPMDBI_PACKAGES;
rpmTag gitag = RPMDBI_PACKAGES;
const char ** av;
int ac;
int rc = 0;

View File

@ -143,7 +143,7 @@ static PyObject * hdrKeyList(hdrObject * s)
{
PyObject * list, *o;
HeaderIterator hi;
rpm_tag_t tag;
rpmTag tag;
rpmTagType type;
list = PyList_New(0);
@ -336,7 +336,7 @@ static void hdr_dealloc(hdrObject * s)
/** \ingroup py_c
*/
rpm_tag_t tagNumFromPyObject (PyObject *item)
rpmTag tagNumFromPyObject (PyObject *item)
{
char * str;
@ -362,7 +362,7 @@ rpm_tag_t tagNumFromPyObject (PyObject *item)
* @retval c address of number of values
* @return 0 on success, 1 on bad magic, 2 on error
*/
static int dressedHeaderGetEntry(Header h, rpm_tag_t tag, rpmTagType *type,
static int dressedHeaderGetEntry(Header h, rpmTag tag, rpmTagType *type,
void **p, rpm_count_t *c)
{
switch (tag) {
@ -414,7 +414,7 @@ static int dressedHeaderGetEntry(Header h, rpm_tag_t tag, rpmTagType *type,
static PyObject * hdr_subscript(hdrObject * s, PyObject * item)
{
rpmTagType tagtype, type;
rpm_tag_t tag = RPMTAG_NOT_FOUND;
rpmTag tag = RPMTAG_NOT_FOUND;
rpm_count_t count, i;
rpm_data_t data;
PyObject * o, * metao;
@ -780,7 +780,7 @@ int rpmMergeHeaders(PyObject * list, FD_t fd, int matchTag)
int32_t * oldMatch;
hdrObject * hdr;
rpm_count_t c, count = 0;
rpm_tag_t tag;
rpmTag tag;
rpmTagType type;
void * p;

View File

@ -21,7 +21,7 @@ hdrObject * hdr_Wrap(Header h);
Header hdrGetHeader(hdrObject * h);
rpm_tag_t tagNumFromPyObject (PyObject *item);
rpmTag tagNumFromPyObject (PyObject *item);
PyObject * labelCompare (PyObject * self, PyObject * args);
PyObject * versionCompare (PyObject * self, PyObject * args, PyObject * kwds);

View File

@ -109,7 +109,7 @@ rpmdb_Match (rpmdbObject * s, PyObject * args, PyObject * kwds)
PyObject *TagN = NULL;
char *key = NULL;
int len = 0;
rpm_tag_t tag = RPMDBI_PACKAGES;
rpmTag tag = RPMDBI_PACKAGES;
char * kwlist[] = {"tagNumber", "key", "len", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Ozi", kwlist,

View File

@ -213,7 +213,7 @@ rpmds_iternext(rpmdsObject * s)
if (rpmdsNext(s->ds) >= 0) {
const char * N = rpmdsN(s->ds);
const char * EVR = rpmdsEVR(s->ds);
rpm_tag_t tagN = rpmdsTagN(s->ds);
rpmTag tagN = rpmdsTagN(s->ds);
rpmsenseFlags Flags = rpmdsFlags(s->ds);
if (N != NULL) N = xstrdup(N);
@ -485,7 +485,7 @@ static int rpmds_init(rpmdsObject * s, PyObject *args, PyObject *kwds)
{
hdrObject * ho = NULL;
PyObject * to = NULL;
rpm_tag_t tagN = RPMTAG_REQUIRENAME;
rpmTag tagN = RPMTAG_REQUIRENAME;
rpmsenseFlags flags = 0;
char * kwlist[] = {"header", "tag", "flags", NULL};
@ -625,7 +625,7 @@ rpmdsObject *
rpmds_Single(PyObject * s, PyObject * args, PyObject * kwds)
{
PyObject * to = NULL;
rpm_tag_t tagN = RPMTAG_PROVIDENAME;
rpmTag tagN = RPMTAG_PROVIDENAME;
const char * N;
const char * EVR = NULL;
rpmsenseFlags Flags = 0;
@ -652,7 +652,7 @@ hdr_dsFromHeader(PyObject * s, PyObject * args, PyObject * kwds)
{
hdrObject * ho = (hdrObject *)s;
PyObject * to = NULL;
rpm_tag_t tagN = RPMTAG_REQUIRENAME;
rpmTag tagN = RPMTAG_REQUIRENAME;
rpmsenseFlags flags = 0;
char * kwlist[] = {"to", "flags", NULL};
@ -674,7 +674,7 @@ rpmdsObject *
hdr_dsOfHeader(PyObject * s)
{
hdrObject * ho = (hdrObject *)s;
rpm_tag_t tagN = RPMTAG_PROVIDENAME;
rpmTag tagN = RPMTAG_PROVIDENAME;
rpmsenseFlags Flags = RPMSENSE_EQUAL;
return rpmds_Wrap( rpmdsThis(hdrGetHeader(ho), tagN, Flags) );

View File

@ -398,7 +398,7 @@ static int rpmfi_init(rpmfiObject * s, PyObject *args, PyObject *kwds)
hdrObject * ho = NULL;
PyObject * to = NULL;
rpmts ts = NULL; /* XXX FIXME: fiFromHeader should be a ts method. */
rpm_tag_t tagN = RPMTAG_BASENAMES;
rpmTag tagN = RPMTAG_BASENAMES;
int flags = 0;
char * kwlist[] = {"header", "tag", "flags", NULL};
@ -539,7 +539,7 @@ hdr_fiFromHeader(PyObject * s, PyObject * args, PyObject * kwds)
hdrObject * ho = (hdrObject *)s;
PyObject * to = NULL;
rpmts ts = NULL; /* XXX FIXME: fiFromHeader should be a ts method. */
rpm_tag_t tagN = RPMTAG_BASENAMES;
rpmTag tagN = RPMTAG_BASENAMES;
int flags = 0;
char * kwlist[] = {"tag", "flags", NULL};

View File

@ -137,7 +137,7 @@ rpmmi_Pattern(rpmmiObject * s, PyObject * args, PyObject * kwds)
PyObject *TagN = NULL;
int type;
char * pattern;
rpm_tag_t tag;
rpmTag tag;
char * kwlist[] = {"tag", "type", "patern", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "Ois:Pattern", kwlist,

View File

@ -186,7 +186,7 @@ rpmte_DS(rpmteObject * s, PyObject * args, PyObject * kwds)
{
PyObject * TagN = NULL;
rpmds ds;
rpm_tag_t tag;
rpmTag tag;
char * kwlist[] = {"tag", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:DS", kwlist, &TagN))
@ -216,7 +216,7 @@ rpmte_FI(rpmteObject * s, PyObject * args, PyObject * kwds)
{
PyObject * TagN = NULL;
rpmfi fi;
rpm_tag_t tag;
rpmTag tag;
char * kwlist[] = {"tag", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:FI", kwlist, &TagN))

View File

@ -499,7 +499,7 @@ static PyObject *
rpmts_IDTXload(rpmtsObject * s)
{
PyObject * result = NULL;
rpm_tag_t tag = RPMTAG_INSTALLTID;
rpmTag tag = RPMTAG_INSTALLTID;
IDTX idtx;
if (_rpmts_debug)
@ -539,7 +539,7 @@ static PyObject *
rpmts_IDTXglob(rpmtsObject * s)
{
PyObject * result = NULL;
rpm_tag_t tag = RPMTAG_REMOVETID;
rpmTag tag = RPMTAG_REMOVETID;
char * globstr;
IDTX idtx;
@ -1255,7 +1255,7 @@ rpmts_Match(rpmtsObject * s, PyObject * args, PyObject * kwds)
/* XXX lkey *must* be a 32 bit integer, int "works" on all known platforms. */
int lkey = 0;
int len = 0;
rpm_tag_t tag = RPMDBI_PACKAGES;
rpmTag tag = RPMDBI_PACKAGES;
char * kwlist[] = {"tagNumber", "key", NULL};
if (_rpmts_debug)

View File

@ -762,7 +762,7 @@ exit:
return rc;
}
static int db3open(rpmdb rpmdb, rpm_tag_t rpmtag, dbiIndex * dbip)
static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
{
extern struct _dbiVec db3vec;
char * urlfn = NULL;

View File

@ -264,7 +264,7 @@ dbiIndex db3Free(dbiIndex dbi)
static const char *db3_config_default =
"db3:hash:mpool:cdb:usecursors:verbose:mp_mmapsize=8Mb:cachesize=512Kb:pagesize=512:perms=0644";
dbiIndex db3New(rpmdb rpmdb, rpm_tag_t rpmtag)
dbiIndex db3New(rpmdb rpmdb, rpmTag rpmtag)
{
dbiIndex dbi = xcalloc(1, sizeof(*dbi));
char dbiTagMacro[128];

View File

@ -734,7 +734,7 @@ void * headerUnload(Header h)
* @return header entry
*/
static
indexEntry findEntry(Header h, rpm_tag_t tag, rpmTagType type)
indexEntry findEntry(Header h, rpmTag tag, rpmTagType type)
{
indexEntry entry, entry2, last;
struct indexEntry_s key;
@ -770,7 +770,7 @@ indexEntry findEntry(Header h, rpm_tag_t tag, rpmTagType type)
return NULL;
}
int headerRemoveEntry(Header h, rpm_tag_t tag)
int headerRemoveEntry(Header h, rpmTag tag)
{
indexEntry last = h->index + h->indexUsed;
indexEntry entry, first;
@ -948,7 +948,7 @@ errxit:
return h;
}
Header headerReload(Header h, rpm_tag_t tag)
Header headerReload(Header h, rpmTag tag)
{
Header nh;
size_t length;
@ -1088,7 +1088,7 @@ exit:
return (nb == length ? 0 : 1);
}
int headerIsEntry(Header h, rpm_tag_t tag)
int headerIsEntry(Header h, rpmTag tag)
{
/* FIX: h modified by sort. */
return (findEntry(h, tag, RPM_NULL_TYPE) ? 1 : 0);
@ -1339,7 +1339,7 @@ headerFindI18NString(Header h, indexEntry entry)
* @param minMem string pointers reference header memory?
* @return 1 on success, 0 on not found
*/
static int intGetEntry(Header h, rpm_tag_t tag,
static int intGetEntry(Header h, rpmTag tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c,
@ -1386,7 +1386,7 @@ void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type)
return NULL;
}
int headerGetEntry(Header h, rpm_tag_t tag,
int headerGetEntry(Header h, rpmTag tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c)
@ -1394,7 +1394,7 @@ int headerGetEntry(Header h, rpm_tag_t tag,
return intGetEntry(h, tag, type, p, c, 0);
}
int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
int headerGetEntryMinMemory(Header h, rpmTag tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c)
@ -1402,7 +1402,7 @@ int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
return intGetEntry(h, tag, type, (rpm_data_t) p, c, 1);
}
int headerGetRawEntry(Header h, rpm_tag_t tag, rpmTagType * type, rpm_data_t * p,
int headerGetRawEntry(Header h, rpmTag tag, rpmTagType * type, rpm_data_t * p,
rpm_count_t * c)
{
indexEntry entry;
@ -1477,7 +1477,7 @@ grabData(rpmTagType type, rpm_constdata_t p, rpm_count_t c, int * lengthPtr)
return data;
}
int headerAddEntry(Header h, rpm_tag_t tag, rpmTagType type,
int headerAddEntry(Header h, rpmTag 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, rpmTagType type,
return 1;
}
int headerAppendEntry(Header h, rpm_tag_t tag, rpmTagType type,
int headerAppendEntry(Header h, rpmTag 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, rpmTagType type,
return 1;
}
int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpmTagType type,
int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
rpm_constdata_t p, rpm_count_t c)
{
return (findEntry(h, tag, type)
@ -1565,7 +1565,7 @@ int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpmTagType type,
: headerAddEntry(h, tag, type, p, c));
}
int headerAddI18NString(Header h, rpm_tag_t tag, const char * string,
int headerAddI18NString(Header h, rpmTag tag, const char * string,
const char * lang)
{
indexEntry table, entry;
@ -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, rpmTagType type,
int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
rpm_constdata_t p, rpm_count_t c)
{
indexEntry entry;
@ -1811,7 +1811,7 @@ HeaderIterator headerInitIterator(Header h)
}
int headerNextIterator(HeaderIterator hi,
rpm_tag_t * tag,
rpmTag * tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c)
@ -1852,7 +1852,7 @@ Header headerCopy(Header h)
Header nh = headerNew();
HeaderIterator hi;
rpmTagType type;
rpm_tag_t tag;
rpmTag tag;
rpm_count_t count;
rpm_data_t ptr;
@ -1927,7 +1927,7 @@ static sprintfToken hsaNext(headerSprintfArgs hsa)
if (hsa->hi == NULL) {
hsa->i++;
} else {
rpm_tag_t tagno;
rpmTag tagno;
rpmTagType type;
rpm_count_t count;
@ -3041,9 +3041,9 @@ const struct headerSprintfExtension_s headerDefaultFormats[] = {
{ HEADER_EXT_LAST, NULL, { NULL } }
};
void headerCopyTags(Header headerFrom, Header headerTo, rpm_tag_t * tagstocopy)
void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy)
{
rpm_tag_t * p;
rpmTag * p;
if (headerFrom == headerTo)
return;

View File

@ -92,7 +92,7 @@ extern "C" {
typedef struct headerTagTableEntry_s * headerTagTableEntry;
struct headerTagTableEntry_s {
const char * name; /*!< Tag name. */
rpm_tag_t val; /*!< Tag numeric value. */
rpmTag val; /*!< Tag numeric value. */
rpmTagType type; /*!< Tag type. */
};
@ -208,7 +208,7 @@ typedef union hRET_s {
/**
*/
typedef struct HE_s {
rpm_tag_t tag;
rpmTag tag;
rpmTagType * typ;
union {
hPTR_t * ptr;
@ -279,7 +279,7 @@ void * headerUnload(Header h);
* @param tag region tag
* @return on-disk header (with offsets)
*/
Header headerReload(Header h, int tag);
Header headerReload(Header h, rpmTag tag);
/** \ingroup header
* Duplicate a header.
@ -325,7 +325,7 @@ int headerWrite(FD_t fd, Header h, enum hMagic magicp);
* @param tag tag
* @return 1 on success, 0 on failure
*/
int headerIsEntry(Header h, rpm_tag_t tag);
int headerIsEntry(Header h, rpmTag tag);
/** \ingroup header
* Free data allocated when retrieved from header.
@ -349,7 +349,7 @@ void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type);
* @retval *c number of values (or NULL)
* @return 1 on success, 0 on failure
*/
int headerGetEntry(Header h, rpm_tag_t tag,
int headerGetEntry(Header h, rpmTag tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c);
@ -366,7 +366,7 @@ int headerGetEntry(Header h, rpm_tag_t tag,
* @retval *c number of values (or NULL)
* @return 1 on success, 0 on failure
*/
int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
int headerGetEntryMinMemory(Header h, rpmTag tag,
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, rpmTagType type, rpm_constdata_t p, rpm_count_t c);
int headerAddEntry(Header h, rpmTag 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, rpmTagType type, rpm_constdata_t p,
* @param c number of values
* @return 1 on success, 0 on failure
*/
int headerAppendEntry(Header h, rpm_tag_t tag, rpmTagType type,
int headerAppendEntry(Header h, rpmTag 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, rpmTagType type,
* @param c number of values
* @return 1 on success, 0 on failure
*/
int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpmTagType type,
int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
rpm_constdata_t p, rpm_count_t c);
/** \ingroup header
@ -437,7 +437,7 @@ int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpmTagType type,
* @param lang locale
* @return 1 on success, 0 on failure
*/
int headerAddI18NString(Header h, rpm_tag_t tag, const char * string,
int headerAddI18NString(Header h, rpmTag tag, const char * string,
const char * lang);
/** \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, rpmTagType type,
int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
rpm_constdata_t p, rpm_count_t c);
/** \ingroup header
@ -462,7 +462,7 @@ int headerModifyEntry(Header h, rpm_tag_t tag, rpmTagType type,
* @param tag tag
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
int headerRemoveEntry(Header h, rpm_tag_t tag);
int headerRemoveEntry(Header h, rpmTag tag);
/** \ingroup header
* Return formatted output string from header tags.
@ -486,7 +486,7 @@ char * headerSprintf(Header h, const char * fmt,
* @param headerTo destination header
* @param tagstocopy array of tags that are copied
*/
void headerCopyTags(Header headerFrom, Header headerTo, rpm_tag_t * tagstocopy);
void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy);
/** \ingroup header
* Destroy header tag iterator.
@ -512,7 +512,7 @@ HeaderIterator headerInitIterator(Header h);
* @return 1 on success, 0 on failure
*/
int headerNextIterator(HeaderIterator hi,
rpm_tag_t * tag,
rpmTag * tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c);
@ -616,7 +616,7 @@ typedef
* @retval c address of number of values (or NULL)
* @return 1 on success, 0 on failure
*/
typedef int (*HGE_t) (Header h, rpm_tag_t tag,
typedef int (*HGE_t) (Header h, rpmTag tag,
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, rpmTagType type,
typedef int (*HAE_t) (Header h, rpmTag 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, rpmTagType type,
* @param c number of values
* @return 1 on success, 0 on failure
*/
typedef int (*HME_t) (Header h, rpm_tag_t tag, rpmTagType type,
typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
rpm_constdata_t p, rpm_count_t c);
/**
@ -663,7 +663,7 @@ typedef int (*HME_t) (Header h, rpm_tag_t tag, rpmTagType type,
* @param tag tag
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
typedef int (*HRE_t) (Header h, rpm_tag_t tag);
typedef int (*HRE_t) (Header h, rpmTag tag);
#ifdef __cplusplus
}

View File

@ -22,7 +22,7 @@
*/
typedef struct entryInfo_s * entryInfo;
struct entryInfo_s {
rpm_tag_t tag; /*!< Tag identifier. */
rpmTag tag; /*!< Tag identifier. */
rpmTagType type; /*!< Tag data type. */
int32_t offset; /*!< Offset into data segment (ondisk only). */
rpm_count_t count; /*!< Number of tag elements. */
@ -69,7 +69,7 @@ struct sprintfTag_s {
headerTagFormatFunction fmt;
headerTagTagFunction ext; /*!< NULL if tag element is invalid */
int extNum;
rpm_tag_t tag;
rpmTag tag;
int justOne;
int arrayCount;
char * format;
@ -145,7 +145,7 @@ char ** headerGetLangs(Header h);
* @retval c address of number of values (or NULL)
* @return 1 on success, 0 on failure
*/
int headerGetRawEntry(Header h, rpm_tag_t tag,
int headerGetRawEntry(Header h, rpmTag tag,
rpmTagType * type,
rpm_data_t * p,
rpm_count_t * c);

View File

@ -40,8 +40,8 @@ static int _db_filter_dups = 0;
#define _DBI_PERMS 0644
#define _DBI_MAJOR -1
rpm_tag_t * dbiTags = NULL;
rpm_tag_t dbiTagsMax = 0;
rpmTag * dbiTags = NULL;
rpmTag dbiTagsMax = 0;
/* We use this to comunicate back to the the rpm transaction
* what their install instance was on a rpmdbAdd().
@ -124,7 +124,7 @@ static int printable(const void * ptr, size_t len)
* @param rpmtag rpm header tag
* @return dbi index, -1 on error
*/
static int dbiTagToDbix(rpm_tag_t rpmtag)
static int dbiTagToDbix(rpmTag rpmtag)
{
int dbix;
@ -145,7 +145,7 @@ static void dbiTagsInit(void)
"Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Sigmd5:Sha1header:Filemd5s:Depends:Pubkeys";
char * dbiTagStr = NULL;
char * o, * oe;
rpm_tag_t rpmtag;
rpmTag rpmtag;
dbiTagStr = rpmExpand("%{?_dbi_tags}", NULL);
if (!(dbiTagStr && *dbiTagStr)) {
@ -211,7 +211,7 @@ static struct _dbiVec *mydbvecs[] = {
DB1vec, DB1vec, DB2vec, DB3vec, SQLITEvec, NULL
};
dbiIndex dbiOpen(rpmdb db, rpm_tag_t rpmtag, unsigned int flags)
dbiIndex dbiOpen(rpmdb db, rpmTag rpmtag, unsigned int flags)
{
int dbix;
dbiIndex dbi = NULL;
@ -578,7 +578,7 @@ dbiIndexSet dbiFreeIndexSet(dbiIndexSet set) {
}
typedef struct miRE_s {
rpm_tag_t tag; /*!< header tag */
rpmTag tag; /*!< header tag */
rpmMireMode mode; /*!< pattern match mode */
char * pattern; /*!< pattern string */
int notmatch; /*!< like "grep -v" */
@ -593,7 +593,7 @@ struct rpmdbMatchIterator_s {
void * mi_keyp;
size_t mi_keylen;
rpmdb mi_db;
rpm_tag_t mi_rpmtag;
rpmTag mi_rpmtag;
dbiIndexSet mi_set;
DBC * mi_dbc;
DBT mi_key;
@ -705,7 +705,7 @@ static struct rpmdb_s dbTemplate = {
_DB_MAJOR, _DB_ERRPFX
};
static int isTemporaryDB(rpm_tag_t rpmtag)
static int isTemporaryDB(rpmTag rpmtag)
{
int rc = 0;
switch (rpmtag) {
@ -769,7 +769,7 @@ int rpmdbOpenAll(rpmdb db)
return rc;
}
int rpmdbCloseDBI(rpmdb db, rpm_tag_t rpmtag)
int rpmdbCloseDBI(rpmdb db, rpmTag rpmtag)
{
int dbix;
int rc = 0;
@ -966,7 +966,7 @@ static int openDatabase(const char * prefix,
if (dbiTags != NULL)
for (dbix = 0; rc == 0 && dbix < dbiTagsMax; dbix++) {
dbiIndex dbi;
rpm_tag_t rpmtag;
rpmTag rpmtag;
/* Filter out temporary databases */
if (isTemporaryDB((rpmtag = dbiTags[dbix])))
@ -1641,7 +1641,7 @@ static int mireCmp(const void * a, const void * b)
* @param pattern pattern to duplicate
* @return duplicated pattern
*/
static char * mireDup(rpm_tag_t tag, rpmMireMode *modep,
static char * mireDup(rpmTag tag, rpmMireMode *modep,
const char * pattern)
{
const char * s;
@ -1729,7 +1729,7 @@ static char * mireDup(rpm_tag_t tag, rpmMireMode *modep,
return pat;
}
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpm_tag_t tag,
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag,
rpmMireMode mode, const char * pattern)
{
static rpmMireMode defmode = (rpmMireMode)-1;
@ -2280,7 +2280,7 @@ int rpmdbAppendIterator(rpmdbMatchIterator mi, const int * hdrNums, int nHdrNums
return 0;
}
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpm_tag_t rpmtag,
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmTag rpmtag,
const void * keyp, size_t keylen)
{
rpmdbMatchIterator mi;
@ -2473,7 +2473,7 @@ memset(data, 0, sizeof(*data));
const char ** rpmvals = NULL;
rpmTagType rpmtype = 0;
rpm_count_t rpmcnt = 0;
rpm_tag_t rpmtag;
rpmTag rpmtag;
int xx;
rpm_count_t i, j;
@ -2484,7 +2484,7 @@ memset(data, 0, sizeof(*data));
if (isTemporaryDB(rpmtag))
continue;
switch (rpmtag) {
switch ((rpm_tag_t) rpmtag) {
case RPMDBI_PACKAGES:
dbi = dbiOpen(db, rpmtag, 0);
if (dbi == NULL) /* XXX shouldn't happen */
@ -2826,7 +2826,7 @@ memset(data, 0, sizeof(*data));
const char **rpmvals = NULL;
rpmTagType rpmtype = 0;
rpm_count_t rpmcnt = 0;
rpm_tag_t rpmtag;
rpmTag rpmtag;
rpm_flag_t * requireFlags;
rpmRC rpmrc;
int i, j;
@ -3345,7 +3345,7 @@ static int rpmdbMoveDatabase(const char * prefix,
if (dbiTags != NULL)
for (i = 0; i < dbiTagsMax; i++) {
const char * base;
rpm_tag_t rpmtag;
rpmTag rpmtag;
/* Filter out temporary databases */
if (isTemporaryDB((rpmtag = dbiTags[i])))

View File

@ -118,7 +118,7 @@ int rpmdbVerify(const char * prefix);
* @param rpmtag rpm tag
* @return 0 on success
*/
int rpmdbCloseDBI(rpmdb db, rpm_tag_t rpmtag);
int rpmdbCloseDBI(rpmdb db, rpmTag rpmtag);
/** \ingroup rpmdb
* Close all database indices and free rpmdb.
@ -197,7 +197,7 @@ int rpmdbPruneIterator(rpmdbMatchIterator mi,
* @param pattern pattern to match
* @return 0 on success
*/
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpm_tag_t tag,
int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag,
rpmMireMode mode, const char * pattern);
/** \ingroup rpmdb
@ -235,7 +235,7 @@ int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts,
* @param keylen key data length (0 will use strlen(keyp))
* @return NULL on failure
*/
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpm_tag_t rpmtag,
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmTag rpmtag,
const void * keyp, size_t keylen);
/** \ingroup rpmdb

View File

@ -54,7 +54,7 @@ struct _dbiVec {
* @param rpmtag rpm tag
* @return 0 on success
*/
int (*open) (rpmdb rpmdb, rpm_tag_t rpmtag, dbiIndex * dbip);
int (*open) (rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip);
/** \ingroup dbi
* Close index database, and destroy database handle.
@ -292,7 +292,7 @@ unsigned char * dbi_lk_conflicts;
unsigned int dbi_q_extentsize;
rpmdb dbi_rpmdb; /*!< the parent rpm database */
rpm_tag_t dbi_rpmtag; /*!< rpm tag used for index */
rpmTag dbi_rpmtag; /*!< rpm tag used for index */
int dbi_jlen; /*!< size of join key */
DB * dbi_db; /*!< Berkeley DB * handle */
@ -358,7 +358,7 @@ extern "C" {
* @param rpmtag rpm tag
* @return index database handle
*/
dbiIndex db3New(rpmdb rpmdb, rpm_tag_t rpmtag);
dbiIndex db3New(rpmdb rpmdb, rpmTag rpmtag);
/** \ingroup db3
* Destroy index database handle instance.
@ -382,7 +382,7 @@ extern const char * prDbiOpenFlags(int dbflags, int print_dbenv_flags);
* @param flags (unused)
* @return index database handle
*/
dbiIndex dbiOpen(rpmdb db, rpm_tag_t rpmtag,
dbiIndex dbiOpen(rpmdb db, rpmTag rpmtag,
unsigned int flags);
/* FIX: vector annotations */
@ -655,8 +655,8 @@ unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, int recno);
/** \ingroup rpmdb
* Tags for which rpmdb indices will be built.
*/
extern rpm_tag_t * dbiTags;
extern rpm_tag_t dbiTagsMax;
extern rpmTag * dbiTags;
extern rpmTag dbiTagsMax;
#ifndef __APPLE__
/**

View File

@ -766,7 +766,7 @@ leaveChroot(dbi);
* @param dbip
* @return 0 on success
*/
static int sql_open(rpmdb rpmdb, rpm_tag_t rpmtag, dbiIndex * dbip)
static int sql_open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
{
extern struct _dbiVec sqlitevec;

View File

@ -119,7 +119,7 @@ static enum cvtaction convertAMD(enum cvtaction ca, rpmTagType type,
return ca;
}
static enum cvtaction convertExistingAMD(rpm_tag_t tag, rpmTagType type,
static enum cvtaction convertExistingAMD(rpmTag tag, rpmTagType type,
rpm_data_t valsp, rpm_count_t *countp, void ** nvalsp, rpm_count_t *ncountp,
cmd_t *cmds[], int ncmds)
{
@ -193,7 +193,7 @@ static enum cvtaction convertExistingAMD(rpm_tag_t tag, rpmTagType type,
static
Header headerCopyWithConvert(Header h, cmd_t *cmds[], int ncmds)
{
rpm_tag_t tag;
rpmTag tag;
rpmTagType type;
rpm_count_t count;
rpm_data_t vals;