return 0;
}
iter->next_index++;
-
- *tag = h->index[slot].info.tag;
+
+ if (tag) {
+ *tag = h->index[slot].info.tag;
+ }
copyEntry(h->index + slot, type, p, c);
return 1;
*type = entry->info.type;
if (c)
*c = entry->info.count;
+ if (!p)
+ return;
/* Now look it up */
switch (entry->info.type) {
return 1;
}
+int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
+ void * p, int_32 c)
+{
+ if (findEntry(h, tag, type)) {
+ return headerAppendEntry(h, tag, type, p, c);
+ } else {
+ return headerAddEntry(h, tag, type, p, c);
+ }
+}
+
int headerAppendEntry(Header h, int_32 tag, int_32 type, void * p, int_32 c) {
struct indexEntry *entry;
int length;
RPM_STRING_TYPE. Any pointers from headerGetEntry() for this entry
are invalid after this call has been made! */
int headerAppendEntry(Header h, int_32 tag, int_32 type, void * p, int_32 c);
+int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
+ void * p, int_32 c);
/* Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements w/
RPM_I18NSTRING_TYPE equivalent enreies are translated (if HEADER_I18NTABLE