check_PROGRAMS =
CLEANFILES =
-EXTRA_DIST = gentagtbl.sh
+EXTRA_DIST = gentagtbl.sh tagtbl.c
EXTRA_PROGRAMS =
usrlibdir = $(libdir)
backend/dbconfig.c backend/db3.c \
hdrNVR.c header.c headerfmt.c header_internal.c header_internal.h \
poptDB.c rpmhash.c rpmhash.h rpmdb.c rpmdb_internal.h \
- fprint.c fprint.h tagname.c tagtbl.c rpmtd.c \
+ fprint.c fprint.h tagname.c rpmtd.c \
cpio.c cpio.h depends.c formats.c tagexts.c fs.c fsm.c fsm.h \
manifest.c manifest.h misc.c package.c \
poptALL.c poptI.c poptQV.c psm.c psm.h query.c \
#!/bin/sh
cat << EOF
-#include "system.h"
-#include <rpm/header.h>
-#include <rpm/rpmtag.h>
-#include "debug.h"
-
-static const struct headerTagTableEntry_s rpmTagTbl[] = {
+static const struct headerTagTableEntry_s rpmTagTable[] = {
EOF
${AWK} '/[\t ](RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ {
cat << EOF
{ NULL, NULL, 0, 0, 0 }
};
-
-const struct headerTagTableEntry_s * const rpmTagTable = rpmTagTbl;
-const int rpmTagTableSize = sizeof(rpmTagTbl) / sizeof(rpmTagTbl[0]) - 1;
EOF
#endif
/** \ingroup header
- * Associate tag names with numeric values.
- */
-typedef const struct headerTagTableEntry_s * headerTagTableEntry;
-struct headerTagTableEntry_s {
- const char * name; /*!< Tag name. */
- const char * shortname; /*!< "Human readable" short name. */
- rpmTag val; /*!< Tag numeric value. */
- rpmTagType type; /*!< Tag type. */
- int extension; /*!< Extension or "real" tag */
-};
-
-/**
- */
-typedef struct headerTagIndices_s * headerTagIndices;
-
-/** \ingroup rpmtag
- * Automatically generated table of tag name/value pairs.
- */
-extern const struct headerTagTableEntry_s * const rpmTagTable;
-
-/** \ingroup rpmtag
- * Number of entries in rpmTagTable.
- */
-extern const int rpmTagTableSize;
-
-/** \ingroup rpmtag
- */
-extern headerTagIndices const rpmTags;
-
-/** \ingroup header
* Include calculation for 8 bytes of (magic, 0)?
*/
enum hMagic {
#include <rpm/rpmstring.h>
#include "debug.h"
+/** \ingroup header
+ * Associate tag names with numeric values.
+ */
+typedef const struct headerTagTableEntry_s * headerTagTableEntry;
+struct headerTagTableEntry_s {
+ const char * name; /*!< Tag name. */
+ const char * shortname; /*!< "Human readable" short name. */
+ rpmTag val; /*!< Tag numeric value. */
+ rpmTagType type; /*!< Tag type. */
+ int extension; /*!< Extension or "real" tag */
+};
+
+#include "tagtbl.c"
+
+static const int rpmTagTableSize = sizeof(rpmTagTable) / sizeof(rpmTagTable[0]) - 1;
+
+/**
+ */
+typedef struct headerTagIndices_s * headerTagIndices;
+
struct headerTagIndices_s {
int (*loadIndex) (headerTagTableEntry ** ipp, int * np,
int (*cmp) (const void * avp, const void * bvp));
NULL, 0, tagCmpValue, _tagName, _tagType,
};
-headerTagIndices const rpmTags = &_rpmTags;
+static headerTagIndices const rpmTags = &_rpmTags;
static const char * _tagName(rpmTag tag)
{