From f53c32337238b84bb2c555ca12cdc07f6a963361 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Sun, 3 Feb 2008 16:24:07 +0200 Subject: [PATCH] Make rpmtag.h standalone, include from rpmtypes.h - permits header.h to use the tag types - revert other includes back to header.h, more crazy #include churn... - rpmTagTable etc in header.h for now, don't really belong there but... --- build/parseChangelog.c | 2 +- build/parseDescription.c | 2 +- build/parsePreamble.c | 2 +- build/parsePrep.c | 2 +- build/parseScript.c | 2 +- build/reqprov.c | 2 +- build/rpmfc.c | 2 +- build/spec.c | 2 +- lib/legacy.c | 2 +- lib/query.c | 2 +- lib/rpmfi_internal.h | 2 +- lib/rpmtag.h | 34 ++++++++++++---------------------- lib/rpmtypes.h | 1 + lib/verify.c | 2 +- python/rpmdb-py.c | 2 +- rpmdb/hdrNVR.c | 2 +- rpmdb/header.h | 32 ++++++++++++++++++++------------ rpmdb/tagname.c | 2 +- 18 files changed, 48 insertions(+), 49 deletions(-) diff --git a/build/parseChangelog.c b/build/parseChangelog.c index fa744af..15734b8 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include #include "debug.h" diff --git a/build/parseDescription.c b/build/parseDescription.c index 1676044..c3529d4 100644 --- a/build/parseDescription.c +++ b/build/parseDescription.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include #include "debug.h" diff --git a/build/parsePreamble.c b/build/parsePreamble.c index a8f832d..348fb0c 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include #include diff --git a/build/parsePrep.c b/build/parsePrep.c index 570b026..bee7050 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include #include diff --git a/build/parseScript.c b/build/parseScript.c index d70c213..a0b21a3 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include diff --git a/build/reqprov.c b/build/reqprov.c index 2fdedf4..344f197 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include "debug.h" diff --git a/build/rpmfc.c b/build/rpmfc.c index 5b28b44..d08fcd0 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -10,7 +10,7 @@ #endif -#include +#include #include #include #include diff --git a/build/spec.c b/build/spec.c index ebd46c9..23cd918 100644 --- a/build/spec.c +++ b/build/spec.c @@ -5,7 +5,7 @@ #include "system.h" -#include +#include #include #include #include diff --git a/lib/legacy.c b/lib/legacy.c index 18af33d..a2dc385 100644 --- a/lib/legacy.c +++ b/lib/legacy.c @@ -4,7 +4,7 @@ #include "system.h" -#include +#include #include #include #include diff --git a/lib/query.c b/lib/query.c index c36207c..c8644e1 100644 --- a/lib/query.c +++ b/lib/query.c @@ -11,7 +11,7 @@ #include -#include +#include #include #include #include diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h index 095d2f5..6511105 100644 --- a/lib/rpmfi_internal.h +++ b/lib/rpmfi_internal.h @@ -1,7 +1,7 @@ #ifndef _RPMFI_INTERNAL_H #define _RPMFI_INTERNAL_H -#include +#include #include #include "lib/fsm.h" /* for FSM_t */ diff --git a/lib/rpmtag.h b/lib/rpmtag.h index 2b08767..a7c4333 100644 --- a/lib/rpmtag.h +++ b/lib/rpmtag.h @@ -1,32 +1,10 @@ #ifndef _RPMTAG_H #define _RPMTAG_H -#include - #ifdef __cplusplus extern "C" { #endif -/** \ingroup rpmtag - * Automatically generated table of tag name/value pairs. - */ -extern const struct headerTagTableEntry_s * rpmTagTable; - -/** \ingroup rpmtag - * Number of entries in rpmTagTable. - */ -extern const int rpmTagTableSize; - -/** \ingroup rpmtag - */ -extern headerTagIndices rpmTags; - -/** \ingroup header - * Table of query format extensions. - * @note Chains to headerDefaultFormats[]. - */ -extern const struct headerSprintfExtension_s rpmHeaderFormats[]; - /** * Pseudo-tags used by the rpmdb and rpmgi iterator API's. */ @@ -40,6 +18,18 @@ extern const struct headerSprintfExtension_s rpmHeaderFormats[]; #define RPMDBI_ARGLIST 7 /* (rpmgi) Argument list. */ #define RPMDBI_FTSWALK 8 /* (rpmgi) File tree walk. */ +/** + * Header private tags. + * @note General use tags should start at 1000 (RPM's tag space starts there). + */ +#define HEADER_IMAGE 61 +#define HEADER_SIGNATURES 62 +#define HEADER_IMMUTABLE 63 +#define HEADER_REGIONS 64 +#define HEADER_I18NTABLE 100 +#define HEADER_SIGBASE 256 +#define HEADER_TAGBASE 1000 + /** \ingroup rpmtag * Tags identify data in package headers. * @note tags should not have value 0! diff --git a/lib/rpmtypes.h b/lib/rpmtypes.h index 150ee8f..07ae98c 100644 --- a/lib/rpmtypes.h +++ b/lib/rpmtypes.h @@ -9,6 +9,7 @@ */ #include +#include #ifdef __cplusplus extern "C" { diff --git a/lib/verify.c b/lib/verify.c index 5616f9d..8984d84 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -6,7 +6,7 @@ #include "system.h" #include -#include +#include #include #include #include diff --git a/python/rpmdb-py.c b/python/rpmdb-py.c index c6d6ccb..154e977 100644 --- a/python/rpmdb-py.c +++ b/python/rpmdb-py.c @@ -4,7 +4,7 @@ #include "system.h" -#include +#include #include "rpmdb-py.h" #include "rpmmi-py.h" diff --git a/rpmdb/hdrNVR.c b/rpmdb/hdrNVR.c index 17790cb..04480a0 100644 --- a/rpmdb/hdrNVR.c +++ b/rpmdb/hdrNVR.c @@ -5,7 +5,7 @@ #include "system.h" #include -#include +#include #include "debug.h" diff --git a/rpmdb/header.h b/rpmdb/header.h index eec2468..04cae17 100644 --- a/rpmdb/header.h +++ b/rpmdb/header.h @@ -162,6 +162,26 @@ struct headerSprintfExtension_s { */ extern const struct headerSprintfExtension_s headerDefaultFormats[]; +/** \ingroup rpmtag + * Automatically generated table of tag name/value pairs. + */ +extern const struct headerTagTableEntry_s * rpmTagTable; + +/** \ingroup rpmtag + * Number of entries in rpmTagTable. + */ +extern const int rpmTagTableSize; + +/** \ingroup rpmtag + */ +extern headerTagIndices rpmTags; + +/** \ingroup header + * Table of query format extensions. + * @note Chains to headerDefaultFormats[]. + */ +extern const struct headerSprintfExtension_s rpmHeaderFormats[]; + /** \ingroup header * Include calculation for 8 bytes of (magic, 0)? */ @@ -170,18 +190,6 @@ enum hMagic { HEADER_MAGIC_YES = 1 }; -/** - * Header private tags. - * @note General use tags should start at 1000 (RPM's tag space starts there). - */ -#define HEADER_IMAGE 61 -#define HEADER_SIGNATURES 62 -#define HEADER_IMMUTABLE 63 -#define HEADER_REGIONS 64 -#define HEADER_I18NTABLE 100 -#define HEADER_SIGBASE 256 -#define HEADER_TAGBASE 1000 - /* Return types for header data. Not yet... */ #if 0 /** diff --git a/rpmdb/tagname.c b/rpmdb/tagname.c index 6b6476f..242c5ff 100644 --- a/rpmdb/tagname.c +++ b/rpmdb/tagname.c @@ -4,7 +4,7 @@ #include "system.h" -#include +#include #include #include "debug.h" -- 2.7.4