summaryrefslogtreecommitdiff
path: root/lib/formats.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-05-12 17:08:12 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-05-12 17:08:12 +0300
commitfe3ba9991019dcf5de7f92577cfd04872fe7584d (patch)
treee7b500b62665115364521eee0c1a3bc56528a82f /lib/formats.c
parentecd8c6c44149b880e672accc416d593c551de72e (diff)
downloadlibrpm-tizen-fe3ba9991019dcf5de7f92577cfd04872fe7584d.tar.gz
librpm-tizen-fe3ba9991019dcf5de7f92577cfd04872fe7584d.tar.bz2
librpm-tizen-fe3ba9991019dcf5de7f92577cfd04872fe7584d.zip
Simplify header extension handling
- remove the now unnecessary chaining to different extension tables
Diffstat (limited to 'lib/formats.c')
-rw-r--r--lib/formats.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/formats.c b/lib/formats.c
index e32d3fb58..66493a302 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -1076,17 +1076,6 @@ static int groupTag(Header h, rpmTagType* type,
return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData);
}
-/* FIX: cast? */
-const struct headerSprintfExtension_s headerDefaultFormats[] = {
- { HEADER_EXT_FORMAT, "octal", { octalFormat } },
- { HEADER_EXT_FORMAT, "hex", { hexFormat } },
- { HEADER_EXT_FORMAT, "date", { dateFormat } },
- { HEADER_EXT_FORMAT, "day", { dayFormat } },
- { HEADER_EXT_FORMAT, "shescape", { shescapeFormat } },
- { HEADER_EXT_LAST, NULL, { NULL } }
-};
-
-/* FIX: cast? */
const struct headerSprintfExtension_s rpmHeaderFormats[] = {
{ HEADER_EXT_TAG, "RPMTAG_GROUP", { groupTag } },
{ HEADER_EXT_TAG, "RPMTAG_DESCRIPTION", { descriptionTag } },
@@ -1109,5 +1098,10 @@ const struct headerSprintfExtension_s rpmHeaderFormats[] = {
{ HEADER_EXT_FORMAT, "permissions", { permsFormat } },
{ HEADER_EXT_FORMAT, "triggertype", { triggertypeFormat } },
{ HEADER_EXT_FORMAT, "xml", { xmlFormat } },
- { HEADER_EXT_MORE, NULL, { (void *) headerDefaultFormats } }
-} ;
+ { HEADER_EXT_FORMAT, "octal", { octalFormat } },
+ { HEADER_EXT_FORMAT, "hex", { hexFormat } },
+ { HEADER_EXT_FORMAT, "date", { dateFormat } },
+ { HEADER_EXT_FORMAT, "day", { dayFormat } },
+ { HEADER_EXT_FORMAT, "shescape", { shescapeFormat } },
+ { HEADER_EXT_LAST, NULL, { NULL } }
+};