Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

rpmdb/hdrNVR.c

Go to the documentation of this file.
00001 
00005 #include "system.h"
00006 #include "lib/rpmlib.h"
00007 #include "debug.h"
00008 
00009 int headerNVR(Header h, const char **np, const char **vp, const char **rp)
00010 {
00011     int type;
00012     int count;
00013 
00014 /*@-boundswrite@*/
00015     if (np) {
00016         if (!(headerGetEntry(h, RPMTAG_NAME, &type, (void **) np, &count)
00017             && type == RPM_STRING_TYPE && count == 1))
00018                 *np = NULL;
00019     }
00020     if (vp) {
00021         if (!(headerGetEntry(h, RPMTAG_VERSION, &type, (void **) vp, &count)
00022             && type == RPM_STRING_TYPE && count == 1))
00023                 *vp = NULL;
00024     }
00025     if (rp) {
00026         if (!(headerGetEntry(h, RPMTAG_RELEASE, &type, (void **) rp, &count)
00027             && type == RPM_STRING_TYPE && count == 1))
00028                 *rp = NULL;
00029     }
00030 /*@=boundswrite@*/
00031     return 0;
00032 }

Generated on Tue Sep 17 15:56:43 2002 for rpm by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002