From: Michael Tremer Date: Fri, 29 Dec 2017 11:20:30 +0000 (+0000) Subject: Move all header files into src/loc and install them X-Git-Tag: 0.9.0~158 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Flibloc.git;a=commitdiff_plain;h=9fc7f0017d4d09eefa3fc601b3b7af3a797f72c1 Move all header files into src/loc and install them Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 30a7652..eddef93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,23 +36,24 @@ pkgconfigdir = $(libdir)/pkgconfig $(SED_PROCESS) pkginclude_HEADERS = \ - src/loc/format.h \ src/loc/libloc.h \ + src/loc/as.h \ + src/loc/database.h \ + src/loc/format.h \ + src/loc/network.h \ + src/loc/private.h \ + src/loc/stringpool.h \ src/loc/writer.h lib_LTLIBRARIES = \ src/libloc.la -src_libloc_la_SOURCES =\ - src/libloc-private.h \ +src_libloc_la_SOURCES = \ src/libloc.c \ src/as.c \ - src/as.h \ src/database.c \ - src/database.h \ src/network.c \ src/stringpool.c \ - src/stringpool.h \ src/writer.c EXTRA_DIST += src/libloc.sym diff --git a/src/as.c b/src/as.c index 654ab26..d82e44b 100644 --- a/src/as.c +++ b/src/as.c @@ -20,11 +20,10 @@ #include #include +#include #include - -#include "libloc-private.h" -#include "as.h" -#include "stringpool.h" +#include +#include struct loc_as { struct loc_ctx* ctx; diff --git a/src/database.c b/src/database.c index f2450aa..07cb66c 100644 --- a/src/database.c +++ b/src/database.c @@ -27,12 +27,11 @@ #include #include +#include +#include #include - -#include "libloc-private.h" -#include "as.h" -#include "database.h" -#include "stringpool.h" +#include +#include struct loc_database { struct loc_ctx* ctx; diff --git a/src/libloc.c b/src/libloc.c index 667fd7c..8b8872c 100644 --- a/src/libloc.c +++ b/src/libloc.c @@ -24,8 +24,8 @@ #include #include -#include "libloc-private.h" -#include "database.h" +#include +#include struct loc_ctx { int refcount; diff --git a/src/as.h b/src/loc/as.h similarity index 98% rename from src/as.h rename to src/loc/as.h index 1aefe30..14e9cf3 100644 --- a/src/as.h +++ b/src/loc/as.h @@ -21,8 +21,7 @@ #include #include - -#include "stringpool.h" +#include struct loc_as; int loc_as_new(struct loc_ctx* ctx, struct loc_stringpool* pool, struct loc_as** as, uint32_t number); diff --git a/src/database.h b/src/loc/database.h similarity index 98% rename from src/database.h rename to src/loc/database.h index 38dc4ef..28c29e9 100644 --- a/src/database.h +++ b/src/loc/database.h @@ -21,8 +21,7 @@ #include #include - -#include "as.h" +#include struct loc_database; int loc_database_new(struct loc_ctx* ctx, struct loc_database** database, FILE* f); diff --git a/src/libloc-private.h b/src/loc/private.h similarity index 100% rename from src/libloc-private.h rename to src/loc/private.h diff --git a/src/stringpool.h b/src/loc/stringpool.h similarity index 100% rename from src/stringpool.h rename to src/loc/stringpool.h diff --git a/src/loc/writer.h b/src/loc/writer.h index 82923d0..9b05ec7 100644 --- a/src/loc/writer.h +++ b/src/loc/writer.h @@ -20,10 +20,9 @@ #include #include +#include #include -#include "as.h" - struct loc_writer; int loc_writer_new(struct loc_ctx* ctx, struct loc_writer** writer); diff --git a/src/network.c b/src/network.c index bc359f6..8617fd5 100644 --- a/src/network.c +++ b/src/network.c @@ -22,10 +22,9 @@ #include #include +#include #include - -#include "libloc-private.h" -#include "as.h" +#include struct loc_network { struct loc_ctx* ctx; diff --git a/src/python/database.c b/src/python/database.c index 154debc..0e3ddea 100644 --- a/src/python/database.c +++ b/src/python/database.c @@ -16,7 +16,9 @@ #include -#include "../database.h" +#include +#include + #include "database.h" static PyObject* Database_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { diff --git a/src/stringpool.c b/src/stringpool.c index cbb1fb7..119740c 100644 --- a/src/stringpool.c +++ b/src/stringpool.c @@ -24,8 +24,8 @@ #include #include -#include "libloc-private.h" -#include "stringpool.h" +#include +#include enum loc_stringpool_mode { STRINGPOOL_DEFAULT, diff --git a/src/test-as.c b/src/test-as.c index 0c4d391..08c8730 100644 --- a/src/test-as.c +++ b/src/test-as.c @@ -19,8 +19,8 @@ #include #include +#include #include -#include "database.h" #define TEST_AS_COUNT 5000 diff --git a/src/test-database.c b/src/test-database.c index 600a983..b8890cb 100644 --- a/src/test-database.c +++ b/src/test-database.c @@ -24,8 +24,8 @@ #include #include +#include #include -#include "database.h" const char* VENDOR = "Test Vendor"; const char* DESCRIPTION = diff --git a/src/test-stringpool.c b/src/test-stringpool.c index 1b219f3..11653fe 100644 --- a/src/test-stringpool.c +++ b/src/test-stringpool.c @@ -25,7 +25,7 @@ #include #include -#include "stringpool.h" +#include static const char* characters = "012345789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; diff --git a/src/writer.c b/src/writer.c index 4c9bcf6..8c6ed88 100644 --- a/src/writer.c +++ b/src/writer.c @@ -21,13 +21,13 @@ #include #include +#include +#include #include #include +#include #include -#include "libloc-private.h" -#include "as.h" - struct loc_writer { struct loc_ctx* ctx; int refcount;