From 1719b2f3419bf5ff1f77350a3725ac0412f06fe2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 24 Aug 2010 12:38:50 +0300 Subject: [PATCH] Eliminate newOpenFileInfo() from librpmbuild API - Nothing outside parseSpec.c needs, bury it there and make static --- build/parseSpec.c | 15 +++++++++++++++ build/rpmspec.h | 4 ---- build/spec.c | 15 --------------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/build/parseSpec.c b/build/parseSpec.c index 45eb1c0a3..47d8a5c1e 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -96,6 +96,21 @@ void handleComments(char *s) *s = '\0'; } +static struct OpenFileInfo * newOpenFileInfo(void) +{ + struct OpenFileInfo *ofi; + + ofi = xmalloc(sizeof(*ofi)); + ofi->fp = NULL; + ofi->fileName = NULL; + ofi->lineNum = 0; + ofi->readBuf[0] = '\0'; + ofi->readPtr = NULL; + ofi->next = NULL; + + return ofi; +} + /** */ static void forceIncludeFile(rpmSpec spec, const char * fileName) diff --git a/build/rpmspec.h b/build/rpmspec.h index ef68c7950..f4b4c9355 100644 --- a/build/rpmspec.h +++ b/build/rpmspec.h @@ -197,10 +197,6 @@ rpmSpec freeSpec(rpmSpec spec); */ int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg); -/** \ingroup rpmbuild - */ -struct OpenFileInfo * newOpenFileInfo(void); - /** \ingroup rpmbuild * stashSt. * @param spec spec file control structure diff --git a/build/spec.c b/build/spec.c index aee609bde..63e082888 100644 --- a/build/spec.c +++ b/build/spec.c @@ -342,21 +342,6 @@ rpmSpec freeSpec(rpmSpec spec) return spec; } -struct OpenFileInfo * newOpenFileInfo(void) -{ - struct OpenFileInfo *ofi; - - ofi = xmalloc(sizeof(*ofi)); - ofi->fp = NULL; - ofi->fileName = NULL; - ofi->lineNum = 0; - ofi->readBuf[0] = '\0'; - ofi->readPtr = NULL; - ofi->next = NULL; - - return ofi; -} - int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg) { rpmSpec spec = NULL;