From 504e8231cbb379a0b3f41d7bcfb0bd4e3ff16f50 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 10 Oct 2008 15:59:38 +0300 Subject: [PATCH] Yank out legacy.h, make the conversion functions static --- lib/Makefile.am | 2 +- lib/legacy.c | 10 +++------- lib/legacy.h | 39 --------------------------------------- lib/rpmlead.c | 3 ++- 4 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 lib/legacy.h diff --git a/lib/Makefile.am b/lib/Makefile.am index a68146b..cb4f376 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -34,7 +34,7 @@ librpm_la_SOURCES = \ rpmte.c rpmte_internal.h rpmts.c \ rpmvercmp.c signature.c signature.h transaction.c \ verify.c rpmlock.c rpmlock.h misc.h \ - legacy.c legacy.h merge.c + legacy.c merge.c if SQLITE3 librpm_la_SOURCES += backend/sqlite.c endif diff --git a/lib/legacy.c b/lib/legacy.c index d2d0f5b..6d3129e 100644 --- a/lib/legacy.c +++ b/lib/legacy.c @@ -10,12 +10,8 @@ #include #include -#include "lib/legacy.h" - #include "debug.h" -int _noDirTokens = 0; - static int dncmp(const void * a, const void * b) { const char *const * first = a; @@ -23,7 +19,7 @@ static int dncmp(const void * a, const void * b) return strcmp(*first, *second); } -void compressFilelist(Header h) +static void compressFilelist(Header h) { struct rpmtd_s fileNames; char ** dirNames; @@ -113,7 +109,7 @@ exit: xx = headerDel(h, RPMTAG_OLDFILENAMES); } -void expandFilelist(Header h) +static void expandFilelist(Header h) { struct rpmtd_s filenames; @@ -191,7 +187,7 @@ exit: free(pEVR); } -void legacyRetrofit(Header h) +static void legacyRetrofit(Header h) { struct rpmtd_s dprefix; diff --git a/lib/legacy.h b/lib/legacy.h deleted file mode 100644 index 48bd9c5..0000000 --- a/lib/legacy.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef H_LEGACY -#define H_LEGACY - -/** - * \file lib/legacy.h - * - */ - -/** - */ -extern int _noDirTokens; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Convert absolute path tag to (dirname,basename,dirindex) tags. - * @param h header - */ -void compressFilelist(Header h); - -/** - * Convert (dirname,basename,dirindex) tags to absolute path tag. - * @param h header - */ -void expandFilelist(Header h); - -/** - * Do all necessary retrofits for a package header. - * @param h header - */ -void legacyRetrofit(Header h); - -#ifdef __cplusplus -} -#endif - -#endif /* H_LEGACY */ diff --git a/lib/rpmlead.c b/lib/rpmlead.c index 8bb8779..e20dd32 100644 --- a/lib/rpmlead.c +++ b/lib/rpmlead.c @@ -12,10 +12,11 @@ #include "lib/signature.h" #include "lib/rpmlead.h" -#include "lib/legacy.h" #include "debug.h" +int _noDirTokens = 0; + static unsigned char const lead_magic[] = { RPMLEAD_MAGIC0, RPMLEAD_MAGIC1, RPMLEAD_MAGIC2, RPMLEAD_MAGIC3 }; -- 2.7.4