int * mtime;
const char ** files;
rpmTagType fnt;
- int count, x;
+ rpm_count_t count, x;
time_t currentTime = time(NULL);
x = hge(h, RPMTAG_OLDFILENAMES, &fnt, (void **) &files, &count);
void initSourceHeader(rpmSpec spec)
{
HeaderIterator hi;
- int32_t tag, type, count;
+ int32_t tag, type;
+ rpm_count_t count;
const void * ptr;
spec->sourceHeader = headerNew();
if (sig != NULL && pkgidp != NULL) {
int32_t tagType;
unsigned char * MD5 = NULL;
- int32_t c;
+ rpm_count_t c;
int xx;
xx = headerGetEntry(sig, RPMSIGTAG_MD5, &tagType, (void **)&MD5, &c);
if (tagType == RPM_BIN_TYPE && MD5 != NULL && c == 16)
HFD_t hfd = headerFreeData;
const char ** names;
rpmTagType type;
- int count;
+ rpm_count_t count;
if (!hge(h, tag, &type, (void **)&names, &count))
return -1;
rpmsenseFlags tagflags;
rpmTagType type;
int len;
- int num;
+ rpm_count_t num;
int rc;
int xx;
delMacro(NULL, "_docdir");
addMacro(NULL, "_docdir", NULL, field, RMIL_SPEC);
break;
- case RPMTAG_EPOCH:
+ case RPMTAG_EPOCH: {
SINGLE_TOKEN_ONLY;
- if (parseNum(field, &num)) {
+ int epoch;
+ if (parseNum(field, &epoch)) {
rpmlog(RPMLOG_ERR,
_("line %d: Epoch/Serial field must be a number: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
- xx = headerAddEntry(pkg->header, tag, RPM_INT32_TYPE, &num, 1);
+ xx = headerAddEntry(pkg->header, tag, RPM_INT32_TYPE, &epoch, 1);
break;
+ }
case RPMTAG_AUTOREQPROV:
pkg->autoReq = parseYesNo(field);
pkg->autoProv = pkg->autoReq;
rpmTag versiontag = 0;
rpmTag flagtag = 0;
rpmTag indextag = 0;
- int len;
+ rpm_count_t len;
rpmsenseFlags extra = RPMSENSE_ANY;
int xx;
* @return 0 on success
*/
static int fsnamesTag( Header h, int32_t * type,
- void ** data, int32_t * count,
+ void ** data, rpm_count_t * count,
int * freeData)
{
const char ** list;
*/
static int instprefixTag(Header h, rpmTagType * type,
const void ** data,
- int32_t * count,
+ rpm_count_t * count,
int * freeData)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
* @return 0 on success
*/
static int fssizesTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
const char ** filenames;
int32_t * filesizes;
uint32_t * usages;
- int numFiles;
+ rpm_count_t numFiles;
if (!hge(h, RPMTAG_FILESIZES, NULL, (void **) &filesizes, &numFiles)) {
filesizes = NULL;
* @return 0 on success
*/
static int triggercondsTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
rpmTagType tnt, tvt, tst;
int32_t * indices, * flags;
char ** names, ** versions;
- int numNames, numScripts;
+ rpm_count_t numNames, numScripts;
+ rpm_count_t i, j;
char ** conds, ** s;
char * item, * flagsStr;
char * chptr;
- int i, j, xx;
+ int xx;
char buf[5];
if (!hge(h, RPMTAG_TRIGGERNAME, &tnt, (void **) &names, &numNames)) {
* @return 0 on success
*/
static int triggertypeTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
int32_t * indices, * flags;
const char ** conds;
const char ** s;
- int i, j, xx;
- int numScripts, numNames;
+ int xx;
+ rpm_count_t numScripts, numNames;
+ rpm_count_t i, j;
if (!hge(h, RPMTAG_TRIGGERINDEX, NULL, (void **) &indices, &numNames)) {
*freeData = 0;
* @return 0 on success
*/
static int filenamesTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
*type = RPM_STRING_ARRAY_TYPE;
* @return 0 on success
*/
static int fileclassTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
*type = RPM_STRING_ARRAY_TYPE;
* @return 0 on success
*/
static int fileprovideTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
*type = RPM_STRING_ARRAY_TYPE;
* @return 0 on success
*/
static int filerequireTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
*type = RPM_STRING_ARRAY_TYPE;
* @return 0 on success
*/
static int i18nTag(Header h, int32_t tag, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
* @return 0 on success
*/
static int summaryTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
return i18nTag(h, RPMTAG_SUMMARY, type, data, count, freeData);
* @return 0 on success
*/
static int descriptionTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData);
* @return 0 on success
*/
static int groupTag(Header h, rpmTagType * type,
- const void ** data, int32_t * count,
+ const void ** data, rpm_count_t * count,
int * freeData)
{
return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData);
}
#endif /* HAVE_MNTCTL */
-int rpmGetFilesystemList(const char *** listptr, int * num)
+int rpmGetFilesystemList(const char *** listptr, unsigned int * num)
{
if (!fsnames)
if (getFilesystemList())
return 0;
}
-int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes, int numFiles,
+int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes,
+ unsigned int numFiles,
uint32_t ** usagesPtr, int flags)
{
uint32_t * usages;
#endif
while ((h = rpmdbNextIterator(mi)) != NULL) {
rpmTagType type = RPM_NULL_TYPE;
- int32_t count = 0;
+ rpm_count_t count = 0;
int32_t * tidp;
tidp = NULL;
if (xx == 0)
for (i = 0; i < ac; i++) {
rpmTagType type;
- int32_t count;
+ rpm_count_t count;
int isSource;
fd = Fopen(av[i], "r.ufdio");
const char ** baseNames;
uint32_t * dirIndexes;
rpmTagType fnt;
- int count;
- int i, xx;
+ rpm_count_t count, i;
+ int xx;
int dirIndex = -1;
/*
HAE_t hae = (HAE_t)headerAddEntry;
HRE_t hre = (HRE_t)headerRemoveEntry;
const char ** fileNames = NULL;
- int count = 0;
+ rpm_count_t count = 0;
int xx;
if (!headerIsEntry(h, RPMTAG_OLDFILENAMES)) {
const char ** providesEVR = NULL;
rpmTagType pnt, pvt;
int32_t * provideFlags = NULL;
- int providesCount;
- int i, xx;
+ rpm_count_t providesCount, i;
+ int xx;
int bingo = 1;
/* Generate provides for this package name-version-release. */
HFD_t hfd = (HFD_t) headerFreeData;
HAE_t hae = (HAE_t) headerAddEntry;
HeaderIterator hi;
- int32_t tag, type, count;
+ int32_t tag, type;
+ rpm_count_t count;
const void * ptr;
int xx;
HFD_t hfd = (HFD_t) headerFreeData;
Header sigh = rpmNewSignature();
HeaderIterator hi;
- int32_t tag, stag, type, count;
+ rpm_count_t count;
+ int32_t tag, stag, type;
const void * ptr;
int xx;
int32_t sigtag;
int32_t sigtype;
const void * sig;
- int32_t siglen;
+ rpm_count_t siglen;
rpmtsOpX opx;
size_t nb;
Header h = NULL;
}
{ void * uh = NULL;
int32_t uht;
- int32_t uhc;
+ rpm_count_t uhc;
if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc))
break;
case RPMSIGTAG_SHA1:
{ void * uh = NULL;
int32_t uht;
- int32_t uhc;
+ rpm_count_t uhc;
if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc))
break;
while ((h = rpmdbNextIterator(mi)) != NULL) {
char * secStates;
int modified;
- int count;
+ rpm_count_t count;
modified = 0;
const char ** argv = NULL;
int argc = 0;
const char ** prefixes = NULL;
- int numPrefixes;
+ rpm_count_t numPrefixes;
rpmTagType ipt;
const char * oldPrefix;
int maxPrefixLength;
HGE_t hge = fi->hge;
HFD_t hfd = (fi->hfd ? fi->hfd : headerFreeData);
void ** progArgv;
- int progArgc;
+ rpm_count_t progArgc;
const char ** argv;
rpmTagType ptt, stt;
const char * script;
HGE_t hge = fi->hge;
HFD_t hfd = (fi->hfd ? fi->hfd : headerFreeData);
const char ** triggerNames;
- int numTriggers;
- int32_t * triggerIndices;
+ rpm_count_t numTriggers, numTriggerIndices;
+ rpm_count_t * triggerIndices;
rpmTagType tnt, tit;
- int numTriggerIndices;
unsigned char * triggersRun;
rpmRC rc = RPMRC_OK;
/* Regenerate original header. */
{ void * uh = NULL;
- int32_t uht, uhc;
+ int32_t uht;
+ rpm_count_t uhc;
if (headerGetEntry(fi->h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)) {
psm->oh = headerCopyLoad(uh);
if (headerGetEntry(fi->h, RPMTAG_HEADERIMAGE, &uht, &uh, &uhc))
{
HeaderIterator hi;
- int32_t tag, type, count;
+ int32_t tag, type;
+ rpm_count_t count;
hPTR_t ptr;
Header oh;
{
void * pkt = NULL;
int32_t pkttyp = 0;
- int32_t pktlen = 0;
+ rpm_count_t pktlen = 0;
int rc = 1;
if (headerGetEntry(sig, sigtag, &pkttyp, &pkt, &pktlen) && pkt != NULL) {
Header sigh = NULL;
const char * msg;
void * uh = NULL;
- int32_t uht, uhc;
+ int32_t uht;
+ rpm_count_t uhc;
int res = EXIT_FAILURE;
int deleting = (qva->qva_mode == RPMSIGN_DEL_SIGNATURE);
rpmRC rc;
/* Dump the immutable region (if present). */
if (headerGetEntry(sigh, RPMTAG_HEADERSIGNATURES, &uht, &uh, &uhc)) {
HeaderIterator hi;
- int32_t tag, type, count;
+ int32_t tag, type;
+ rpm_count_t count;
hPTR_t ptr;
Header oh;
Header nh;
if (headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) {
void * uh;
- int32_t uht, uhc;
+ int32_t uht;
+ rpm_count_t uhc;
if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)
|| uh == NULL)
const void * sig;
pgpDig dig;
pgpDigParams sigp;
- int32_t siglen;
+ rpm_count_t siglen;
Header sigh = NULL;
HeaderIterator hi;
const char * msg;
const char * Type;
const char ** N;
rpmTagType Nt;
- int32_t Count;
+ rpm_count_t Count;
if (tagN == RPMTAG_PROVIDENAME) {
Type = "Provides";
int numRelocations;
const char ** validRelocations;
rpmTagType validType;
- int numValid;
const char ** baseNames;
const char ** dirNames;
uint32_t * dirIndexes;
uint32_t * newDirIndexes;
- int32_t fileCount;
- int32_t dirCount;
+ rpm_count_t fileCount, dirCount, numValid;
uint32_t mydColor = rpmExpandNumeric("%{?_autorelocate_dcolor}");
uint32_t * fFlags = NULL;
uint32_t * fColors = NULL;
/* Save original filenames in header and replace (relocated) filenames. */
if (nrelocated) {
- int c;
+ rpm_count_t c;
void * d;
rpmTagType t;
return rpmfiLink(fi, (fi ? fi->Type : NULL));
}
-void rpmfiBuildFClasses(Header h,
- const char *** fclassp, int * fcp)
+void rpmfiBuildFClasses(Header h, const char *** fclassp, rpm_count_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
}
void rpmfiBuildFDeps(Header h, rpmTag tagN,
- const char *** fdepsp, int * fcp)
+ const char *** fdepsp, rpm_count_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
}
void rpmfiBuildFNames(Header h, rpmTag tagN,
- const char *** fnp, int * fcp)
+ const char *** fnp, rpm_count_t * fcp)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
HFD_t hfd = headerFreeData;
const char ** baseNames;
const char ** dirNames;
uint32_t * dirIndexes;
- int count;
+ rpm_count_t count;
const char ** fileNames;
int size;
rpmTag dirNameTag = 0;
* @retval *fcp number of files
*/
void rpmfiBuildFClasses(Header h,
- const char *** fclassp, int * fcp);
+ const char *** fclassp, rpm_count_t * fcp);
/** \ingroup rpmfi
* @retval *fcp number of files
*/
void rpmfiBuildFDeps(Header h, rpmTag tagN,
- const char *** fdepsp, int * fcp);
+ const char *** fdepsp, rpm_count_t * fcp);
/** \ingroup rpmfi
* Retrieve file names from header.
* @retval *fcp number of files
*/
void rpmfiBuildFNames(Header h, rpmTag tagN,
- const char *** fnp, int * fcp);
+ const char *** fnp, rpm_count_t * fcp);
/** \ingroup rpmfi
* Return file type from mode_t.
const char ** fcontexts; /*! FIle security contexts. */
const char ** cdict; /*!< File class dictionary (header) */
- int32_t ncdict; /*!< No. of class entries. */
+ rpm_count_t ncdict; /*!< No. of class entries. */
const uint32_t * fcdictx; /*!< File class dictionary index (header) */
const uint32_t * ddict; /*!< File depends dictionary (header) */
- int32_t nddict; /*!< No. of depends entries. */
+ rpm_count_t nddict; /*!< No. of depends entries. */
const uint32_t * fddictx; /*!< File depends dictionary start (header) */
const uint32_t * fddictn; /*!< File depends dictionary count (header) */
/*?null?*/
const uint32_t * vflags; /*!< File verify flag(s) (from header) */
- int32_t dc; /*!< No. of directories. */
- int32_t fc; /*!< No. of files. */
+ rpm_count_t dc; /*!< No. of directories. */
+ rpm_count_t fc; /*!< No. of files. */
/*=============================*/
rpmte te;
if (eiu->relocations) {
const char ** paths;
int pft;
- int c;
+ rpm_count_t c;
if (headerGetEntry(eiu->h, RPMTAG_PREFIXES, &pft,
(void **) &paths, &c) && (c == 1))
typedef int (*HGE_t) (Header h, rpmTag tag,
rpmTagType * type,
void ** p,
- int32_t * c);
+ rpm_count_t * c);
/**
* Prototype for headerAddEntry() vector.
* @return 1 on success, 0 on failure
*/
typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
- const void * p, int32_t c);
+ const void * p, rpm_count_t c);
/**
* Prototype for headerModifyEntry() vector.
* @return 1 on success, 0 on failure
*/
typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
- const void * p, int32_t c);
+ const void * p, rpm_count_t c);
/**
* Prototype for headerRemoveEntry() vector.
* @return 0 on success, 1 on error
*/
int rpmGetFilesystemList( const char *** listptr,
- int * num);
+ unsigned int * num);
/**
* Determine per-file system usage for a list of files.
* @return 0 on success, 1 on error
*/
int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes,
- int numFiles, uint32_t ** usagesPtr,
+ unsigned int numFiles, uint32_t ** usagesPtr,
int flags);
/* ==================================================================== */
mi = rpmtsInitIterator(ts, RPMTAG_PUBKEYS, sigp->signid, sizeof(sigp->signid));
while ((h = rpmdbNextIterator(mi)) != NULL) {
const char ** pubkeys;
- int32_t pt, pc;
+ int32_t pt;
+ rpm_count_t pc;
if (!headerGetEntry(h, RPMTAG_PUBKEYS, &pt, (void **)&pubkeys, &pc))
continue;
rpmprobFilterFlags ignoreSet;
/*!< Bits to filter current problems. */
- int filesystemCount; /*!< No. of mounted filesystems. */
+ unsigned int filesystemCount; /*!< No. of mounted filesystems. */
const char ** filesystems; /*!< Mounted filesystem names. */
rpmDiskSpaceInfo dsi; /*!< Per filesystem disk/inode usage. */
if (headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) {
DIGEST_CTX ctx;
void * uh;
- int32_t uht, uhc;
+ int32_t uht;
+ rpm_count_t uhc;
if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)
|| uh == NULL)
static void mungeFilelist(Header h)
{
const char ** fileNames = NULL;
- int count = 0;
+ rpm_count_t count = 0;
if (!headerIsEntry (h, RPMTAG_BASENAMES)
|| !headerIsEntry (h, RPMTAG_DIRNAMES)
* @return 0 on success, 1 on bad magic, 2 on error
*/
static int dressedHeaderGetEntry(Header h, int32_t tag, int32_t *type,
- void **p, int32_t *c)
+ void **p, rpm_count_t *c)
{
switch (tag) {
case RPMTAG_OLDFILENAMES:
{ const char ** fl = NULL;
- int count;
+ rpm_count_t count;
rpmfiBuildFNames(h, RPMTAG_BASENAMES, &fl, &count);
if (count > 0) {
*p = fl;
*/
static PyObject * hdr_subscript(hdrObject * s, PyObject * item)
{
- int tagtype, type, count, i, tag = -1;
+ int tagtype, type, tag = -1;
+ rpm_count_t count, i;
void * data;
PyObject * o, * metao;
char ** stringArray;
int32_t * newMatch;
int32_t * oldMatch;
hdrObject * hdr;
- int count = 0;
- int type, c, tag;
+ rpm_count_t c, count = 0;
+ int type, tag;
void * p;
Py_BEGIN_ALLOW_THREADS
int headerNVR(Header h, const char **np, const char **vp, const char **rp)
{
int type;
- int count;
+ rpm_count_t count;
if (np) {
if (!(headerGetEntry(h, RPMTAG_NAME, &type, (void **) np, &count)
const char **ap)
{
int type;
- int count;
+ rpm_count_t count;
headerNVR(h, np, vp, rp);
if (ap) {
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
uint32_t hcolor = 0;
uint32_t * fcolors;
- int32_t ncolors;
+ rpm_count_t ncolors;
int i;
fcolors = NULL;
* @param pend pointer to end of data (or NULL)
* @return no. bytes in data, -1 on failure
*/
-static int dataLength(int32_t type, hPTR_t p, int32_t count, int onDisk,
+static int dataLength(int32_t type, hPTR_t p, rpm_count_t count, int onDisk,
hPTR_t pend)
{
const unsigned char * s = p;
static int copyEntry(const indexEntry entry,
hTYP_t type,
hPTR_t * p,
- hCNT_t c,
+ rpm_count_t * c,
int minMem)
{
- int32_t count = entry->info.count;
+ rpm_count_t count = entry->info.count;
int rc = 1; /* XXX 1 on success. */
if (p)
static int intGetEntry(Header h, int32_t tag,
hTAG_t type,
hPTR_t * p,
- hCNT_t c,
+ rpm_count_t * c,
int minMem)
{
indexEntry entry;
int _headerGetEntry(Header h, int32_t tag,
hTYP_t type,
void ** p,
- hCNT_t c)
+ rpm_count_t * c)
{
return intGetEntry(h, tag, type, (hPTR_t *)p, c, 0);
}
int _headerGetEntryMinMemory(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c)
+ rpm_count_t * c)
{
return intGetEntry(h, tag, type, p, c, 1);
}
int headerGetRawEntry(Header h, int32_t tag, int32_t * type, hPTR_t * p,
- int32_t * c)
+ rpm_count_t * c)
{
indexEntry entry;
int rc;
/**
*/
static void copyData(int32_t type, void * dstPtr, const void * srcPtr,
- int32_t cnt, int dataLength)
+ rpm_count_t cnt, int dataLength)
{
switch (type) {
case RPM_STRING_ARRAY_TYPE:
* @return (malloc'ed) copy of entry data, NULL on error
*/
static void *
-grabData(int32_t type, hPTR_t p, int32_t c, int * lengthPtr)
+grabData(int32_t type, hPTR_t p, rpm_count_t c, int * lengthPtr)
{
void * data = NULL;
int length;
* @return 1 on success, 0 on failure
*/
static
-int _headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, int32_t c)
+int _headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c)
{
indexEntry entry;
void * data;
*/
static
int _headerAppendEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c)
+ const void * p, rpm_count_t c)
{
indexEntry entry;
int length;
*/
static
int _headerAddOrAppendEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c)
+ const void * p, rpm_count_t c)
{
return (findEntry(h, tag, type)
? _headerAppendEntry(h, tag, type, p, c)
*/
static
int _headerModifyEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c)
+ const void * p, rpm_count_t c)
{
indexEntry entry;
void * oldData;
hTAG_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c)
+ rpm_count_t * c)
{
Header h = hi->h;
int slot = hi->next_index;
{
Header nh = _headerNew();
HeaderIterator hi;
- int32_t tag, type, count;
+ int32_t tag, type;
+ rpm_count_t count;
hPTR_t ptr;
for (hi = _headerInitIterator(h);
} else {
int32_t tagno;
int32_t type;
- int32_t count;
+ rpm_count_t count;
if (!_headerNextIterator(hsa->hi, &tagno, &type, NULL, &count))
fmt = NULL;
static int getExtension(headerSprintfArgs hsa, headerTagTagFunction fn,
hTYP_t typeptr,
hPTR_t * data,
- hCNT_t countptr,
+ rpm_count_t * countptr,
rpmec ec)
{
if (!ec->avail) {
size_t need = 0;
char * t, * te;
char buf[20];
- int32_t count, type;
+ int32_t type;
+ rpm_count_t count;
hPTR_t data;
unsigned int intVal;
const char ** strarray;
int i, j;
int numElements;
int32_t type;
- int32_t count;
+ rpm_count_t count;
sprintfToken spft;
int condNumFormats;
size_t need;
for (p = tagstocopy; *p != 0; p++) {
char *s;
int32_t type;
- int32_t count;
+ rpm_count_t count;
if (_headerIsEntry(headerTo, *p))
continue;
if (!_headerGetEntryMinMemory(headerFrom, *p, &type,
typedef int32_t * hTAG_t;
typedef int32_t * hTYP_t;
typedef const void * hPTR_t;
-typedef int32_t * hCNT_t;
+
+typedef uint32_t rpm_count_t;
/** \ingroup header
*/
typedef int (*headerTagTagFunction) (Header h,
hTYP_t type,
hPTR_t * data,
- hCNT_t count,
+ rpm_count_t * count,
int * freeData);
/** \ingroup header
hPTR_t * ptr;
hRET_t * ret;
} u;
- hCNT_t cnt;
+ rpm_count_t * cnt;
} * HE_t;
#endif
int headerGetEntry(Header h, int32_t tag,
hTYP_t type,
void ** p,
- hCNT_t c);
+ rpm_count_t * c);
/** \ingroup header
* Retrieve tag value using header internal array.
int headerGetEntryMinMemory(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c);
+ rpm_count_t * c);
/** \ingroup header
* Add tag to header.
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, int32_t c);
+int headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c);
/** \ingroup header
* Append element to tag array in header.
* @return 1 on success, 0 on failure
*/
int headerAppendEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c);
+ const void * p, rpm_count_t c);
/** \ingroup header
* Add or append element to tag array in header.
* @return 1 on success, 0 on failure
*/
int headerAddOrAppendEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c);
+ const void * p, rpm_count_t c);
/** \ingroup header
* Add locale specific tag to header.
* @return 1 on success, 0 on failure
*/
int headerModifyEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c);
+ const void * p, rpm_count_t c);
/** \ingroup header
* Delete tag in header.
hTAG_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c);
+ rpm_count_t * c);
int headerGetEntry(Header h, int32_t tag,
hTYP_t type,
void ** p,
- hCNT_t c)
+ rpm_count_t * c)
{
return (h2hv(h)->hdrget) (h, tag, type, p, c);
}
int headerGetEntryMinMemory(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c)
+ rpm_count_t * c)
{
return (h2hv(h)->hdrgetmin) (h, tag, type, p, c);
}
-int headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, int32_t c)
+int headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c)
{
return (h2hv(h)->hdradd) (h, tag, type, p, c);
}
int headerAppendEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c)
+ const void * p, rpm_count_t c)
{
return (h2hv(h)->hdrappend) (h, tag, type, p, c);
}
int headerAddOrAppendEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c)
+ const void * p, rpm_count_t c)
{
return (h2hv(h)->hdraddorappend) (h, tag, type, p, c);
}
}
int headerModifyEntry(Header h, int32_t tag, int32_t type,
- const void * p, int32_t c)
+ const void * p, rpm_count_t c)
{
return (h2hv(h)->hdrmodify) (h, tag, type, p, c);
}
hTAG_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c)
+ rpm_count_t * c)
{
return hdrVec->hdrnextiter(hi, tag, type, p, c);
}
char ** headerGetLangs(Header h)
{
char **s, *e, **table;
- int i, type, count;
+ int type;
+ rpm_count_t i, count;
if (!headerGetRawEntry(h, HEADER_I18NTABLE, &type, (const void **)&s, &count))
return NULL;
int32_t tag; /*!< Tag identifier. */
int32_t type; /*!< Tag data type. */
int32_t offset; /*!< Offset into data segment (ondisk only). */
- int32_t count; /*!< Number of tag elements. */
+ rpm_count_t count; /*!< Number of tag elements. */
};
#define REGION_TAG_TYPE RPM_BIN_TYPE
typedef struct rpmec_s * rpmec;
struct rpmec_s {
int32_t type;
- int32_t count;
+ rpm_count_t count;
int avail;
int freeit;
const void * data;
int headerGetRawEntry(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c);
+ rpm_count_t * c);
/** \ingroup header
* Return header reference count.
int (*HDRget) (Header h, int32_t tag,
hTYP_t type,
void ** p,
- hCNT_t c);
+ rpm_count_t * c);
/** \ingroup header
* Retrieve tag value using header internal array.
int (*HDRgetmin) (Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c);
+ rpm_count_t * c);
/** \ingroup header
* Add tag to header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRadd) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
+int (*HDRadd) (Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c);
/** \ingroup header
* Append element to tag array in header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRappend) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
+int (*HDRappend) (Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c);
/** \ingroup header
* Add or append element to tag array in header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddorappend) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
+int (*HDRaddorappend) (Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c);
/** \ingroup header
* Add locale specific tag to header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRmodify) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
+int (*HDRmodify) (Header h, int32_t tag, int32_t type, const void * p, rpm_count_t c);
/** \ingroup header
* Delete tag in header.
hTAG_t tag,
hTYP_t type,
hPTR_t * p,
- hCNT_t c);
+ rpm_count_t * c);
/** \ingroup header
* Header method vectors.
} u;
char numbuf[32];
rpmTagType t;
- int32_t c;
+ rpm_count_t c;
miRE mire;
static int32_t zero = 0;
int ntags = 0;
const char *av[1];
const char ** rpmvals = NULL;
rpmTagType rpmtype = 0;
- int rpmcnt = 0;
+ rpm_count_t rpmcnt = 0;
int rpmtag;
int xx;
- int i, j;
+ rpm_count_t i, j;
dbi = NULL;
rpmtag = dbiTags[dbix];
sigset_t signalMask;
const char ** baseNames;
rpmTagType bnt;
- int count = 0;
+ rpm_count_t count = 0;
dbiIndex dbi;
int dbix;
union _dbswap mi_offset;
const char *av[1];
const char **rpmvals = NULL;
rpmTagType rpmtype = 0;
- int rpmcnt = 0;
+ rpm_count_t rpmcnt = 0;
int rpmtag;
int32_t * requireFlags;
rpmRC rpmrc;
break;
}
- if (rpmcnt <= 0) {
+ if (rpmcnt == 0) {
if (rpmtag != RPMTAG_GROUP)
continue;