rpm
5.4.15
|
#include "system.h"
#include <rpmio_internal.h>
#include <rpmmacro.h>
#include <argv.h>
#include <rpmtag.h>
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _RPMTAG_INTERNAL |
Functions | |
static int | tagLoadATags (ARGV_t *argvp, int(*cmp)(const void *avp, const void *bvp)) |
Load/sort arbitrary tags. More... | |
static int | tagCmpName (const void *avp, const void *bvp) |
Compare tag table entries by name. More... | |
static int | tagCmpValue (const void *avp, const void *bvp) |
Compare tag table entries by value. More... | |
static int | tagLoadIndex (headerTagTableEntry **ipp, size_t *np, int(*cmp)(const void *avp, const void *bvp)) |
Load/sort a tag index. More... | |
static char * | _tagCanonicalize (const char *s) |
static rpmTag | _tagGenerate (const char *s) |
static const char * | _tagName (rpmTag tag) |
static unsigned int | _tagType (rpmTag tag) |
static rpmTag | _tagValue (const char *tagstr) |
const char * | tagName (rpmTag tag) |
Return tag name from value. More... | |
unsigned int | tagType (rpmTag tag) |
Return tag data type from value. More... | |
rpmTag | tagValue (const char *tagstr) |
Return tag value from name. More... | |
char * | tagCanonicalize (const char *s) |
Canonicalize a rpmTag string. More... | |
rpmTag | tagGenerate (const char *s) |
Generate a tag from arbitrary string. More... | |
void | tagClean (headerTagIndices _rpmTags) |
Free memory in header tag indices. More... | |
tagStore_t | tagStoreFree (tagStore_t dbiTags, size_t dbiNTags) |
Destroy tagStore array. More... | |
Variables | |
static struct headerTagIndices_s | _rpmTags |
headerTagIndices | rpmTags = &_rpmTags |
|
static |
Definition at line 115 of file tagname.c.
References xisalnum(), xmalloc, xtolower(), and xtoupper().
Referenced by _tagValue().
|
static |
Definition at line 142 of file tagname.c.
References _free(), PGPHASHALGO_SHA1, RPMDIGEST_NONE, rpmDigestFinal(), rpmDigestInit(), and rpmDigestUpdate().
Referenced by _tagValue().
|
static |
Definition at line 188 of file tagname.c.
References _free(), i, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_BTREE, RPMDBI_DEPCACHE, RPMDBI_FTSWALK, RPMDBI_HASH, RPMDBI_HDLIST, RPMDBI_HEAP, RPMDBI_PACKAGES, RPMDBI_QUEUE, RPMDBI_RECNO, RPMDBI_REMOVED, RPMDBI_SEQNO, RPMTAG_CONFLICTS, RPMTAG_HDRID, snprintf(), tagCmpValue(), tagLoadATags(), tagLoadIndex(), and xcalloc().
|
static |
Definition at line 306 of file tagname.c.
References i, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_BTREE, RPMDBI_DEPCACHE, RPMDBI_FTSWALK, RPMDBI_HASH, RPMDBI_HDLIST, RPMDBI_HEAP, RPMDBI_PACKAGES, RPMDBI_QUEUE, RPMDBI_RECNO, RPMDBI_REMOVED, RPMDBI_SEQNO, tagCmpValue(), tagLoadATags(), and tagLoadIndex().
|
static |
Definition at line 363 of file tagname.c.
References _free(), _tagCanonicalize(), _tagGenerate(), i, RPMDBI_ADDED, RPMDBI_ARGLIST, RPMDBI_AVAILABLE, RPMDBI_BTREE, RPMDBI_DEPCACHE, RPMDBI_FTSWALK, RPMDBI_HASH, RPMDBI_HDLIST, RPMDBI_HEAP, RPMDBI_PACKAGES, RPMDBI_QUEUE, RPMDBI_RECNO, RPMDBI_REMOVED, RPMDBI_SEQNO, tagCmpName(), tagLoadATags(), tagLoadIndex(), and xstrcasecmp().
char* tagCanonicalize | ( | const char * | s | ) |
Canonicalize a rpmTag string.
s | string |
Definition at line 451 of file tagname.c.
Referenced by fillOutMainPackage(), findPreambleTag(), and isPart().
void tagClean | ( | headerTagIndices | _rpmTags | ) |
Free memory in header tag indices.
_rpmTags | header tag indices (NULL uses rpmTags) |
Definition at line 461 of file tagname.c.
References _free(), argvFree(), and rpmTags.
Referenced by main(), and rpmcliFini().
|
static |
Compare tag table entries by name.
*avp | tag table entry a |
*bvp | tag table entry b |
Definition at line 58 of file tagname.c.
References b.
Referenced by _tagValue().
|
static |
Compare tag table entries by value.
*avp | tag table entry a |
*bvp | tag table entry b |
Definition at line 72 of file tagname.c.
References b.
Referenced by _tagName(), and _tagType().
rpmTag tagGenerate | ( | const char * | s | ) |
Generate a tag from arbitrary string.
s | string |
Definition at line 456 of file tagname.c.
Referenced by fillOutMainPackage(), findPreambleTag(), and isPart().
|
static |
Load/sort arbitrary tags.
*argvp | arbitrary tag array |
Definition at line 27 of file tagname.c.
References _free(), argvFree(), argvSort(), argvSplit(), cmp(), rpmExpand(), and xcalloc().
Referenced by _tagName(), _tagType(), and _tagValue().
|
static |
Load/sort a tag index.
*ipp | tag index |
*np | no. of tags |
cmp | sort compare routine |
Definition at line 91 of file tagname.c.
References cmp(), rpmTagTable, rpmTagTableSize, and xcalloc().
Referenced by _tagName(), _tagType(), and _tagValue().
const char* tagName | ( | rpmTag | tag | ) |
Return tag name from value.
tag | tag value |
Definition at line 436 of file tagname.c.
Referenced by checkForDuplicates(), checkForRequired(), db3Acallback(), db3associate(), db3associate_foreign(), db3open(), db_init(), dbiFindMatches(), dbiMireKeys(), dbiOpen(), findPreambleTag(), handlePreambleTag(), headerGet(), i18nTag(), isPart(), mapTagName(), miFreeHeader(), myTagName(), printNewSpecfile(), rpmcliVerify(), rpmdbCount(), rpmdbMireApply(), rpmdsTagName(), rpmfcMergePR(), rpmgiInitFilter(), rpmgiNext(), rpmmiAddPattern(), rpmmiGet(), rpmmiInit(), rpmmiNext(), rpmQueryVerify(), rpmtsRebuildDB(), rpmtsRunScript(), sql_copen(), sql_open(), stashSt(), str2uuid(), and tagValidate().
tagStore_t tagStoreFree | ( | tagStore_t | dbiTags, |
size_t | dbiNTags | ||
) |
Destroy tagStore array.
dbiTags | dbi tag storage |
dbiNTags | no. of dbi tags |
Definition at line 473 of file tagname.c.
References _free(), i, rpmiobFree(), and str.
Referenced by dbiTagsInit(), rpmdbClose(), and specFini().
unsigned int tagType | ( | rpmTag | tag | ) |
Return tag data type from value.
tag | tag value |
Definition at line 441 of file tagname.c.
Referenced by formatValue(), myTagName(), rpmmiInit(), sql_bind_key(), sql_copen(), and sql_initDB().
rpmTag tagValue | ( | const char * | tagstr | ) |
Return tag value from name.
tagstr | name of tag |
Definition at line 446 of file tagname.c.
Referenced by db3open(), dbiTagsInit(), debconflictsTag(), debdependsTag(), debmd5sumsTag(), debobsoletesTag(), debprovidesTag(), doIcon(), filenamesTag(), findTag(), hdrColumn(), initSourceHeader(), initSourceHeaderScriptlets(), myTagValue(), rpmDisplayQueryTags(), rpmdsSysinfo(), rpmgiInitFilter(), rpmhdrLoadTag(), tagLoadArgv(), and tagNumFromPyObject().
|
static |
headerTagIndices rpmTags = &_rpmTags |
Definition at line 184 of file tagname.c.
Referenced by findPreambleTag(), isPart(), and tagClean().