diff options
author | jbj <devnull@localhost> | 2001-04-29 01:05:43 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-04-29 01:05:43 +0000 |
commit | 3b5820c4205e440d9aad5c5d626721ee30b12292 (patch) | |
tree | b1f0a694903aef1dd937539e1b06c8b0947fb67c /build/reqprov.c | |
parent | 6a0524ed57548de92daa4b6cf8ee9d2ab39d7a42 (diff) | |
download | librpm-tizen-3b5820c4205e440d9aad5c5d626721ee30b12292.tar.gz librpm-tizen-3b5820c4205e440d9aad5c5d626721ee30b12292.tar.bz2 librpm-tizen-3b5820c4205e440d9aad5c5d626721ee30b12292.zip |
- globalize _free(3) wrapper in rpmlib.h, consistent usage throughout.
- internalize locale insensitive ctype(3) in rpmio.h
- boring lclint annotations and fiddles.
CVS patchset: 4721
CVS date: 2001/04/29 01:05:43
Diffstat (limited to 'build/reqprov.c')
-rw-r--r-- | build/reqprov.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/build/reqprov.c b/build/reqprov.c index 5ee4b96a9..6eeb80ec7 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -9,15 +9,19 @@ #include "debug.h" int addReqProv(/*@unused@*/ Spec spec, Header h, - int depFlags, const char *depName, const char *depEVR, int index) + rpmsenseFlags depFlags, const char *depName, const char *depEVR, + int index) { - const char **names; + HGE_t hge = (HGE_t)headerGetEntryMinMemory; + HFD_t hfd = headerFreeData; + const char ** names; + int dnt; int nametag = 0; int versiontag = 0; int flagtag = 0; int indextag = 0; int len; - int extra = 0; + rpmsenseFlags extra = RPMSENSE_ANY; if (depFlags & RPMSENSE_PROVIDES) { nametag = RPMTAG_PROVIDENAME; @@ -56,18 +60,19 @@ int addReqProv(/*@unused@*/ Spec spec, Header h, depEVR = ""; /* Check for duplicate dependencies. */ - if (headerGetEntry(h, nametag, NULL, (void **) &names, &len)) { - const char **versions = NULL; + if (hge(h, nametag, &dnt, (void **) &names, &len)) { + const char ** versions = NULL; + int dvt; int *flags = NULL; int *indexes = NULL; int duplicate = 0; if (flagtag) { - headerGetEntry(h, versiontag, NULL, (void **) &versions, NULL); - headerGetEntry(h, flagtag, NULL, (void **) &flags, NULL); + hge(h, versiontag, &dvt, (void **) &versions, NULL); + hge(h, flagtag, NULL, (void **) &flags, NULL); } if (indextag) - headerGetEntry(h, indextag, NULL, (void **) &indexes, NULL); + hge(h, indextag, NULL, (void **) &indexes, NULL); while (len > 0) { len--; @@ -89,8 +94,8 @@ int addReqProv(/*@unused@*/ Spec spec, Header h, break; } - FREE(names); - FREE(versions); + names = hfd(names, dnt); + versions = hfd(versions, dvt); if (duplicate) return 0; } |