commit: 98b3632c7e28b4f7d5eebb7b7ffc255adabe81b7
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 5 16:08:00 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 16:08:00 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=98b3632c
libq/tree: make some unused functions private (static)
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
libq/tree.c | 8 ++++----
libq/tree.h | 3 ---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/libq/tree.c b/libq/tree.c
index bb3aa69..0b01f14 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -27,6 +27,8 @@
#include <xalloc.h>
static int tree_pkg_compar(const void *l, const void *r);
+static tree_pkg_ctx * tree_next_pkg_int(tree_cat_ctx *cat_ctx);
+static void tree_close_meta(tree_pkg_meta *cache);
static tree_ctx *
tree_open_int(const char *sroot, const char *tdir, bool quiet)
@@ -363,8 +365,6 @@ tree_pkg_compar(const void *l, const void *r)
return atom_compar_cb(al, ar);
}
-static tree_pkg_ctx *
-tree_next_pkg_int(tree_cat_ctx *cat_ctx);
static tree_pkg_ctx *
tree_next_pkg_int(tree_cat_ctx *cat_ctx)
{
@@ -926,7 +926,7 @@ tree_read_file_binpkg(tree_pkg_ctx *pkg_ctx)
return m;
}
-tree_pkg_meta *
+static tree_pkg_meta *
tree_pkg_read(tree_pkg_ctx *pkg_ctx)
{
tree_ctx *ctx = pkg_ctx->cat_ctx->ctx;
@@ -963,7 +963,7 @@ tree_pkg_read(tree_pkg_ctx *pkg_ctx)
return NULL;
}
-void
+static void
tree_close_meta(tree_pkg_meta *cache)
{
if (cache == NULL)
diff --git a/libq/tree.h b/libq/tree.h
index c941172..6627e80 100644
--- a/libq/tree.h
+++ b/libq/tree.h
@@ -121,8 +121,6 @@ tree_cat_ctx *tree_open_cat(tree_ctx *ctx, const char
*name);
void tree_close_cat(tree_cat_ctx *cat_ctx);
tree_pkg_ctx *tree_open_pkg(tree_cat_ctx *cat_ctx, const char *name);
tree_pkg_ctx *tree_next_pkg(tree_cat_ctx *cat_ctx);
-tree_pkg_meta *tree_pkg_read(tree_pkg_ctx *pkg_ctx);
-void tree_close_meta(tree_pkg_meta *cache);
char *tree_pkg_meta_get_int(tree_pkg_ctx *pkg_ctx, size_t offset, const char
*key);
#define tree_pkg_meta_get(P,X) \
tree_pkg_meta_get_int(P, offsetof(tree_pkg_meta, Q_##X), #X)
@@ -135,7 +133,6 @@ int tree_foreach_pkg(tree_ctx *ctx, tree_pkg_cb callback,
void *priv,
tree_foreach_pkg(ctx, cb, priv, false, query);
#define tree_foreach_pkg_sorted(ctx, cb, priv, query) \
tree_foreach_pkg(ctx, cb, priv, true, query);
-struct dirent *tree_get_next_dir(DIR *dir);
set *tree_get_atoms(tree_ctx *ctx, bool fullcpv, set *satoms);
depend_atom *tree_get_atom(tree_pkg_ctx *pkg_ctx, bool complete);