-static int headerGetWrap(Header h, rpmTag tag,
- rpmTagType * type,
- rpm_data_t * p,
- rpm_count_t * c,
- headerGetFlags flags)
-{
- struct rpmtd_s td;
- int rc;
-
- rc = headerGet(h, tag, &td, flags);
- TDWRAP();
- return rc;
-}
-
-int headerGetEntry(Header h, rpmTag tag,
- rpmTagType * 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,
- rpm_data_t * p,
- rpm_count_t * c)
-{
- return headerGetWrap(h, tag, type, (rpm_data_t) p, c, HEADERGET_MINMEM);
-}
-
-int headerGetRawEntry(Header h, rpmTag tag, rpmTagType * type, rpm_data_t * p,
- rpm_count_t * c)
-{
- indexEntry entry;
- int rc;
-
- if (p == NULL) return headerIsEntry(h, tag);
-
- /* First find the tag */
- /* FIX: h modified by sort. */
- entry = findEntry(h, tag, RPM_NULL_TYPE);
- if (!entry) {
- if (p) *p = NULL;
- if (c) *c = 0;
- return 0;
- }
-
- rc = copyEntry(entry, type, p, c, 0);
-
- /* XXX 1 on success */
- return ((rc == 1) ? 1 : 0);
-}
-