rpmdb/tagname.c File Reference

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

Go to the source code of this file.

Functions

static int tagcmp (const void *a, const void *b)
int tagType (int tag)
 Return tag data type from value.
const char *const tagName (int tag)
 Return tag name from value.
int tagValue (const char *tagstr)
 Return tag value from name.


Detailed Description

Definition in file tagname.c.


Function Documentation

static int tagcmp ( const void *  a,
const void *  b 
) [static]

Definition at line 12 of file tagname.c.

References headerTagTableEntry_s::val.

Referenced by tagType().

const char* const tagName ( int  tag  ) 

Return tag name from value.

Parameters:
tag tag value
Returns:
tag name, "(unknown)" on not found

Definition at line 35 of file tagname.c.

References RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_DEPENDS, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_PACKAGES, RPMDBI_REMOVED, rpmTagTable, rpmTagTableSize, and xtolower().

Referenced by checkForDuplicates(), checkForRequired(), db3close(), db3New(), db3open(), dbiFindMatches(), dbiOpen(), handlePreambleTag(), i18nTag(), miFreeHeader(), printNewSpecfile(), rpmdbAdd(), rpmdbCountPackages(), rpmdbFindByFile(), rpmdbGrowIterator(), rpmdbInitIterator(), rpmdbMoveDatabase(), rpmdbRemove(), rpmdbRemoveDatabase(), rpmgiInitFilter(), rpmHeaderGetEntry(), and stashSt().

int tagType ( int  tag  ) 

Return tag data type from value.

Parameters:
tag tag value
Returns:
tag data type, RPM_NULL_TYPE on not found.

Definition at line 20 of file tagname.c.

References alloca(), RPM_NULL_TYPE, rpmTagTable, rpmTagTableSize, tagcmp(), and headerTagTableEntry_s::type.

Referenced by writeRPM().

int tagValue ( const char *  tagstr  ) 

Return tag value from name.

Parameters:
tagstr name of tag
Returns:
tag value, -1 on not found

Definition at line 85 of file tagname.c.

References headerTagTableEntry_s::name, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_DEPENDS, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMDBI_PACKAGES, RPMDBI_REMOVED, rpmTagTable, headerTagTableEntry_s::val, and xstrcasecmp().

Referenced by dbiTagsInit(), and rpmgiInitFilter().


Generated on Fri Oct 12 08:44:56 2007 for rpm by  doxygen 1.5.2