const char ** baseNames;
uint32_t * dirIndexes;
rpm_count_t count;
- int xx, i;
+ int i;
int dirIndex = -1;
/*
*/
if (headerIsEntry(h, RPMTAG_DIRNAMES)) {
- xx = headerDel(h, RPMTAG_OLDFILENAMES);
+ headerDel(h, RPMTAG_OLDFILENAMES);
return; /* Already converted. */
}
}
}
+ /*
+ * XXX EVIL HACK, FIXME:
+ * This modifies (and then restores) a const string from rpmtd
+ * through basename retrieved from strrchr() which silently
+ * casts away const on return.
+ */
while ((i = rpmtdNext(&fileNames)) >= 0) {
char ** needle;
char savechar;
char * baseName;
size_t len;
- const char *filename = rpmtdGetString(&fileNames);
+ char *filename = (char *) rpmtdGetString(&fileNames); /* HACK HACK */
if (filename == NULL) /* XXX can't happen */
continue;
free(baseNames);
free(dirIndexes);
- xx = headerDel(h, RPMTAG_OLDFILENAMES);
+ headerDel(h, RPMTAG_OLDFILENAMES);
}
static void expandFilelist(Header h)
}
}
-int headerConvert(Header h, headerConvOps op)
+int headerConvert(Header h, int op)
{
int rc = 1;
if (c) \
*c = td.count
-int headerRemoveEntry(Header h, rpmTag tag)
+int headerRemoveEntry(Header h, rpm_tag_t tag)
{
return headerDel(h, tag);
}
-static void *_headerFreeData(rpm_data_t data, rpmTagType type)
+static void *_headerFreeData(rpm_data_t data, rpm_tagtype_t type)
{
if (data) {
if (type == RPM_FORCEFREE_TYPE ||
return NULL;
}
-void * headerFreeData(rpm_data_t data, rpmTagType type)
+void * headerFreeData(rpm_data_t data, rpm_tagtype_t type)
{
return _headerFreeData(data, type);
}
-void * headerFreeTag(Header h, rpm_data_t data, rpmTagType type)
+void * headerFreeTag(Header h, rpm_data_t data, rpm_tagtype_t type)
{
return _headerFreeData(data, type);
}
-static int headerGetWrap(Header h, rpmTag tag,
- rpmTagType * type,
+static int headerGetWrap(Header h, rpm_tag_t tag,
+ rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c,
headerGetFlags flags)
return rc;
}
-int headerGetEntry(Header h, rpmTag tag,
- rpmTagType * type,
+int headerGetEntry(Header h, rpm_tag_t tag,
+ rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c)
{
return headerGetWrap(h, tag, type, p, c, HEADERGET_DEFAULT);
}
-int headerGetEntryMinMemory(Header h, rpmTag tag,
- rpmTagType * type,
+int headerGetEntryMinMemory(Header h, rpm_tag_t tag,
+ rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c)
{
}
/* XXX shut up compiler warning from missing prototype */
-int headerGetRawEntry(Header h, rpmTag tag, rpmTagType * type, rpm_data_t * p,
+int headerGetRawEntry(Header h, rpm_tag_t tag, rpm_tagtype_t * type, rpm_data_t * p,
rpm_count_t * c);
-int headerGetRawEntry(Header h, rpmTag tag, rpmTagType * type, rpm_data_t * p,
+int headerGetRawEntry(Header h, rpm_tag_t tag, rpm_tagtype_t * type, rpm_data_t * p,
rpm_count_t * c)
{
if (p == NULL)
}
int headerNextIterator(HeaderIterator hi,
- rpmTag * tag,
- rpmTagType * type,
+ rpm_tag_t * tag,
+ rpm_tagtype_t * type,
rpm_data_t * p,
rpm_count_t * c)
{
return rc;
}
-int headerModifyEntry(Header h, rpmTag tag, rpmTagType type,
+int headerModifyEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c)
{
struct rpmtd_s td = {
return headerMod(h, &td);
}
-static int headerPutWrap(Header h, rpmTag tag, rpmTagType type,
+static int headerPutWrap(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c, headerPutFlags flags)
{
struct rpmtd_s td = {
return headerPut(h, &td, flags);
}
-int headerAddOrAppendEntry(Header h, rpmTag tag, rpmTagType type,
+int headerAddOrAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c)
{
return headerPutWrap(h, tag, type, p, c, HEADERPUT_APPEND);
}
-int headerAppendEntry(Header h, rpmTag tag, rpmTagType type,
+int headerAppendEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c)
{
return headerPutWrap(h, tag, type, p, c, HEADERPUT_APPEND);
}
-int headerAddEntry(Header h, rpmTag tag, rpmTagType type,
+int headerAddEntry(Header h, rpm_tag_t tag, rpm_tagtype_t type,
rpm_constdata_t p, rpm_count_t c)
{
return headerPutWrap(h, tag, type, p, c, HEADERPUT_DEFAULT);