From 62753ec36958c40f151fa223605aea5e6a50bd89 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 5 Jul 2022 15:50:09 +0200 Subject: Cleanup: Get rid of libfstree "internal.h" header Signed-off-by: David Oberhollenzer --- include/fstree.h | 2 ++ lib/fstree/Makemodule.am | 3 +-- lib/fstree/fstree.c | 4 +++- lib/fstree/fstree_from_dir.c | 2 +- lib/fstree/internal.h | 15 --------------- lib/fstree/mknode.c | 3 +-- lib/fstree/post_process.c | 3 ++- tests/libfstree/Makemodule.am | 1 - tests/libfstree/fstree_init.c | 1 - 9 files changed, 10 insertions(+), 24 deletions(-) delete mode 100644 lib/fstree/internal.h diff --git a/include/fstree.h b/include/fstree.h index 7bdbddf..1c5e5ef 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -269,4 +269,6 @@ int fstree_from_subdir(fstree_t *fs, tree_node_t *root, int fstree_sort_files(fstree_t *fs, istream_t *sortfile); +void fstree_insert_sorted(tree_node_t *root, tree_node_t *n); + #endif /* FSTREE_H */ diff --git a/lib/fstree/Makemodule.am b/lib/fstree/Makemodule.am index a72b820..4388bde 100644 --- a/lib/fstree/Makemodule.am +++ b/lib/fstree/Makemodule.am @@ -3,8 +3,7 @@ libfstree_a_SOURCES += lib/fstree/hardlink.c libfstree_a_SOURCES += lib/fstree/post_process.c lib/fstree/get_path.c libfstree_a_SOURCES += lib/fstree/mknode.c lib/fstree/fstree_from_dir.c libfstree_a_SOURCES += lib/fstree/add_by_path.c lib/fstree/get_by_path.c -libfstree_a_SOURCES += include/fstree.h lib/fstree/internal.h -libfstree_a_SOURCES += lib/fstree/sort_by_file.c +libfstree_a_SOURCES += include/fstree.h lib/fstree/sort_by_file.c libfstree_a_CFLAGS = $(AM_CFLAGS) libfstree_a_CPPFLAGS = $(AM_CPPFLAGS) diff --git a/lib/fstree/fstree.c b/lib/fstree/fstree.c index 2ea5fa2..d44a8ae 100644 --- a/lib/fstree/fstree.c +++ b/lib/fstree/fstree.c @@ -4,7 +4,9 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "internal.h" +#include "config.h" +#include "fstree.h" + #include "util/util.h" #include diff --git a/lib/fstree/fstree_from_dir.c b/lib/fstree/fstree_from_dir.c index a11f383..01f331d 100644 --- a/lib/fstree/fstree_from_dir.c +++ b/lib/fstree/fstree_from_dir.c @@ -5,7 +5,7 @@ * Copyright (C) 2019 David Oberhollenzer */ #include "config.h" -#include "internal.h" +#include "fstree.h" #include #include diff --git a/lib/fstree/internal.h b/lib/fstree/internal.h deleted file mode 100644 index b876e45..0000000 --- a/lib/fstree/internal.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * internal.h - * - * Copyright (C) 2019 David Oberhollenzer - */ -#ifndef FSTREE_INTERNAL_H -#define FSTREE_INTERNAL_H - -#include "config.h" -#include "fstree.h" - -void fstree_insert_sorted(tree_node_t *root, tree_node_t *n); - -#endif /* FSTREE_INTERNAL_H */ diff --git a/lib/fstree/mknode.c b/lib/fstree/mknode.c index 2b1f89d..2faf901 100644 --- a/lib/fstree/mknode.c +++ b/lib/fstree/mknode.c @@ -5,8 +5,7 @@ * Copyright (C) 2019 David Oberhollenzer */ #include "config.h" - -#include "internal.h" +#include "fstree.h" #include #include diff --git a/lib/fstree/post_process.c b/lib/fstree/post_process.c index 93a7664..088916b 100644 --- a/lib/fstree/post_process.c +++ b/lib/fstree/post_process.c @@ -4,7 +4,8 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "internal.h" +#include "config.h" +#include "fstree.h" #include #include diff --git a/tests/libfstree/Makemodule.am b/tests/libfstree/Makemodule.am index 2e22967..7826cf8 100644 --- a/tests/libfstree/Makemodule.am +++ b/tests/libfstree/Makemodule.am @@ -40,7 +40,6 @@ test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/libtar/data test_fstree_from_dir_LDADD = libfstree.a libutil.a libcompat.a test_fstree_init_SOURCES = tests/libfstree/fstree_init.c -test_fstree_init_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree test_fstree_init_LDADD = libfstree.a libio.a libutil.a libcompat.a test_sort_file_SOURCES = tests/libfstree/sort_file.c diff --git a/tests/libfstree/fstree_init.c b/tests/libfstree/fstree_init.c index 47c24ae..186f25b 100644 --- a/tests/libfstree/fstree_init.c +++ b/tests/libfstree/fstree_init.c @@ -7,7 +7,6 @@ #include "config.h" #include "fstree.h" -#include "internal.h" #include "util/test.h" #include "util/util.h" -- cgit v1.2.3