rpmdb/tagname.c File Reference

#include "system.h"
#include <rpmlib.h>
#include "debug.h"

Include dependency graph for tagname.c:

Go to the source code of this file.

Functions

static int tagCmpName (const void *avp, const void *bvp)
 Compare tag table entries by name.
static int tagCmpValue (const void *avp, const void *bvp)
 Compare tag table entries by value.
static int tagLoadIndex (headerTagTableEntry **ipp, int *np, int(*cmp)(const void *avp, const void *bvp))
 Load/sort a tag index.
static const char * _tagName (int tag)
static int _tagType (int tag)
static int _tagValue (const char *tagstr)

Variables

static struct headerTagIndices_s _rpmTags
headerTagIndices rpmTags = &_rpmTags


Detailed Description

Definition in file tagname.c.


Function Documentation

static const char * _tagName ( int  tag  )  [static]

Definition at line 97 of file tagname.c.

References _rpmTags, headerTagIndices_s::byValue, headerTagIndices_s::byValueSize, headerTagTableEntry_s::name, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_DEPENDS, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_PACKAGES, RPMDBI_REMOVED, RPMTAG_CONFLICTS, RPMTAG_HDRID, tagCmpValue(), tagLoadIndex(), headerTagTableEntry_s::val, and xtolower().

static int _tagType ( int  tag  )  [static]

Definition at line 181 of file tagname.c.

References _rpmTags, headerTagIndices_s::byValue, headerTagIndices_s::byValueSize, RPM_NULL_TYPE, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_DEPENDS, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_PACKAGES, RPMDBI_REMOVED, tagCmpValue(), tagLoadIndex(), headerTagTableEntry_s::type, and headerTagTableEntry_s::val.

static int _tagValue ( const char *  tagstr  )  [static]

Definition at line 230 of file tagname.c.

References _rpmTags, headerTagIndices_s::byName, headerTagIndices_s::byNameSize, headerTagTableEntry_s::name, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_DEPENDS, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_PACKAGES, RPMDBI_REMOVED, tagCmpName(), tagLoadIndex(), headerTagTableEntry_s::val, and xstrcasecmp().

static int tagCmpName ( const void *  avp,
const void *  bvp 
) [static]

Compare tag table entries by name.

Parameters:
*avp tag table entry a
*bvp tag table entry b
Returns:
comparison

Definition at line 19 of file tagname.c.

References headerTagTableEntry_s::name.

Referenced by _tagValue().

static int tagCmpValue ( const void *  avp,
const void *  bvp 
) [static]

Compare tag table entries by value.

Parameters:
*avp tag table entry a
*bvp tag table entry b
Returns:
comparison

Definition at line 33 of file tagname.c.

References headerTagTableEntry_s::name, and headerTagTableEntry_s::val.

Referenced by _tagName(), and _tagType().

static int tagLoadIndex ( headerTagTableEntry **  ipp,
int *  np,
int(*)(const void *avp, const void *bvp)  cmp 
) [static]

Load/sort a tag index.

Return values:
*ipp tag index
*np no. of tags
Parameters:
cmp sort compare routine
Returns:
0 always

Definition at line 52 of file tagname.c.

References headerTagTableEntry_s::name, rpmTagTable, rpmTagTableSize, and xcalloc().

Referenced by _tagName(), _tagType(), and _tagValue().


Variable Documentation

struct headerTagIndices_s _rpmTags [static]

Initial value:

Definition at line 86 of file tagname.c.

Referenced by _tagName(), _tagType(), and _tagValue().

headerTagIndices rpmTags = &_rpmTags

Definition at line 94 of file tagname.c.

Referenced by rpmcliFini(), tagName(), tagType(), and tagValue().


Generated on Fri Sep 7 01:28:05 2007 for rpm by  doxygen 1.5.1