summaryrefslogtreecommitdiff
path: root/rpmdb/hdrNVR.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-10-21 21:43:32 +0000
committerjbj <devnull@localhost>2001-10-21 21:43:32 +0000
commit1ad22a0bc4efaad2113975267bf5bf0708cb870e (patch)
treeae4d2e9f20d1a79002a838d5265bc54fa9b0851d /rpmdb/hdrNVR.c
parentd5dd3dfbc6f0e9128e055eaf84635c85de7b8139 (diff)
downloadlibrpm-tizen-1ad22a0bc4efaad2113975267bf5bf0708cb870e.tar.gz
librpm-tizen-1ad22a0bc4efaad2113975267bf5bf0708cb870e.tar.bz2
librpm-tizen-1ad22a0bc4efaad2113975267bf5bf0708cb870e.zip
- all symbols but hdrVec are now forward references in linkage.
CVS patchset: 5128 CVS date: 2001/10/21 21:43:32
Diffstat (limited to 'rpmdb/hdrNVR.c')
-rw-r--r--rpmdb/hdrNVR.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/rpmdb/hdrNVR.c b/rpmdb/hdrNVR.c
new file mode 100644
index 000000000..b739c894c
--- /dev/null
+++ b/rpmdb/hdrNVR.c
@@ -0,0 +1,30 @@
+/** \ingroup rpmdb
+ * \file rpmdb/hdrNVR.c
+ */
+
+#include "system.h"
+#include "lib/rpmlib.h"
+#include "debug.h"
+
+int headerNVR(Header h, const char **np, const char **vp, const char **rp)
+{
+ int type;
+ int count;
+
+ if (np) {
+ if (!(headerGetEntry(h, RPMTAG_NAME, &type, (void **) np, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *np = NULL;
+ }
+ if (vp) {
+ if (!(headerGetEntry(h, RPMTAG_VERSION, &type, (void **) vp, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *vp = NULL;
+ }
+ if (rp) {
+ if (!(headerGetEntry(h, RPMTAG_RELEASE, &type, (void **) rp, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *rp = NULL;
+ }
+ return 0;
+}