diff options
author | David Robillard <d@drobilla.net> | 2020-12-16 16:59:26 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-16 16:59:26 +0100 |
commit | a0a127b5c6395fc402861f95852b9624f9d2621f (patch) | |
tree | ebb8efcb3c132d3e1e17cbaff9bae439c90c5a2f | |
parent | 644cf095d12f74c67f323c355dbae0059d02f1f3 (diff) | |
download | lilv-a0a127b5c6395fc402861f95852b9624f9d2621f.tar.gz lilv-a0a127b5c6395fc402861f95852b9624f9d2621f.tar.bz2 lilv-a0a127b5c6395fc402861f95852b9624f9d2621f.zip |
Clean up includes
-rw-r--r-- | lilv/lilv.h | 3 | ||||
-rw-r--r-- | lilv/lilvmm.hpp | 18 | ||||
-rw-r--r-- | src/lilv_internal.h | 15 | ||||
-rw-r--r-- | test/bad_syntax.lv2/test_bad_syntax.c | 2 | ||||
-rw-r--r-- | test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c | 2 | ||||
-rw-r--r-- | test/lib_descriptor.lv2/test_lib_descriptor.c | 2 | ||||
-rw-r--r-- | test/lilv_test_uri_map.h | 4 | ||||
-rw-r--r-- | test/missing_descriptor.lv2/test_missing_descriptor.c | 2 | ||||
-rw-r--r-- | test/missing_name.lv2/test_missing_name.c | 2 | ||||
-rw-r--r-- | test/missing_plugin.lv2/test_missing_plugin.c | 2 | ||||
-rw-r--r-- | test/missing_port.lv2/test_missing_port.c | 2 | ||||
-rw-r--r-- | test/missing_port_name.lv2/test_missing_port_name.c | 2 | ||||
-rw-r--r-- | test/test_state.c | 1 | ||||
-rw-r--r-- | utils/bench.h | 13 | ||||
-rw-r--r-- | utils/uri_table.h | 2 |
15 files changed, 45 insertions, 27 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h index 83b28e2..8c9ee22 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -26,7 +26,6 @@ #include <stdarg.h> #include <stdbool.h> -#include <stddef.h> #include <stdint.h> #include <stdio.h> @@ -80,6 +79,8 @@ extern "C" { #define LILV_URI_OUTPUT_PORT "http://lv2plug.in/ns/lv2core#OutputPort" #define LILV_URI_PORT "http://lv2plug.in/ns/lv2core#Port" +struct LilvInstanceImpl; + typedef struct LilvPluginImpl LilvPlugin; /**< LV2 Plugin. */ typedef struct LilvPluginClassImpl LilvPluginClass; /**< Plugin Class. */ typedef struct LilvPortImpl LilvPort; /**< Port. */ diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp index 4a90e6d..c42de2f 100644 --- a/lilv/lilvmm.hpp +++ b/lilv/lilvmm.hpp @@ -18,6 +18,10 @@ #define LILV_LILVMM_HPP #include "lilv/lilv.h" +#include "lv2/core/lv2.h" + +#include <cstdarg> +#include <cstdint> namespace Lilv { @@ -29,6 +33,20 @@ namespace Lilv { # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +struct Instance; +struct Node; +struct Nodes; +struct Plugin; +struct PluginClass; +struct PluginClasses; +struct Plugins; +struct Port; +struct ScalePoint; +struct ScalePoints; +struct UI; +struct UIs; +struct World; + LILV_DEPRECATED static inline const char* uri_to_path(const char* uri) { diff --git a/src/lilv_internal.h b/src/lilv_internal.h index d603df7..90cd89b 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -21,17 +21,17 @@ extern "C" { #endif -#include "lilv_config.h" +#include "lilv_config.h" // IWYU pragma: keep #include "lilv/lilv.h" +#include "lv2/core/lv2.h" #include "serd/serd.h" #include "sord/sord.h" #include "zix/tree.h" -#include <float.h> -#include <stddef.h> +#include <stdbool.h> #include <stdint.h> -#include <stdlib.h> +#include <stdio.h> #ifdef _WIN32 # include <windows.h> @@ -54,7 +54,6 @@ extern "C" { static inline const char* dlerror(void) { return "Unknown error"; } #else # include <dlfcn.h> -# include <unistd.h> #endif #ifdef LILV_DYN_MANIFEST @@ -67,8 +66,6 @@ static inline const char* dlerror(void) { return "Unknown error"; } * */ -typedef struct LilvSpecImpl LilvSpec; - typedef void LilvCollection; struct LilvPortImpl { @@ -78,12 +75,12 @@ struct LilvPortImpl { LilvNodes* classes; ///< rdf:type }; -struct LilvSpecImpl { +typedef struct LilvSpecImpl { SordNode* spec; SordNode* bundle; LilvNodes* data_uris; struct LilvSpecImpl* next; -}; +} LilvSpec; /** Header of an LilvPlugin, LilvPluginClass, or LilvUI. diff --git a/test/bad_syntax.lv2/test_bad_syntax.c b/test/bad_syntax.lv2/test_bad_syntax.c index e7afcfc..10aa4da 100644 --- a/test/bad_syntax.lv2/test_bad_syntax.c +++ b/test/bad_syntax.lv2/test_bad_syntax.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c b/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c index 5347ade..63e81f3 100644 --- a/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c +++ b/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/lib_descriptor.lv2/test_lib_descriptor.c b/test/lib_descriptor.lv2/test_lib_descriptor.c index fdc5107..e0ba585 100644 --- a/test/lib_descriptor.lv2/test_lib_descriptor.c +++ b/test/lib_descriptor.lv2/test_lib_descriptor.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/lilv_test_uri_map.h b/test/lilv_test_uri_map.h index d6badc1..e56445a 100644 --- a/test/lilv_test_uri_map.h +++ b/test/lilv_test_uri_map.h @@ -17,14 +17,14 @@ #ifndef LILV_TEST_URI_MAP_H #define LILV_TEST_URI_MAP_H -#include "lilv_test_utils.h" - #include "../src/lilv_internal.h" +#include "lv2/urid/urid.h" #include "serd/serd.h" #include <assert.h> #include <stddef.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> diff --git a/test/missing_descriptor.lv2/test_missing_descriptor.c b/test/missing_descriptor.lv2/test_missing_descriptor.c index 023545d..f7b5ceb 100644 --- a/test/missing_descriptor.lv2/test_missing_descriptor.c +++ b/test/missing_descriptor.lv2/test_missing_descriptor.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/missing_name.lv2/test_missing_name.c b/test/missing_name.lv2/test_missing_name.c index 416442b..bf8cf95 100644 --- a/test/missing_name.lv2/test_missing_name.c +++ b/test/missing_name.lv2/test_missing_name.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/missing_plugin.lv2/test_missing_plugin.c b/test/missing_plugin.lv2/test_missing_plugin.c index 04daf31..c2a8259 100644 --- a/test/missing_plugin.lv2/test_missing_plugin.c +++ b/test/missing_plugin.lv2/test_missing_plugin.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/missing_port.lv2/test_missing_port.c b/test/missing_port.lv2/test_missing_port.c index 36b583e..a966d93 100644 --- a/test/missing_port.lv2/test_missing_port.c +++ b/test/missing_port.lv2/test_missing_port.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/missing_port_name.lv2/test_missing_port_name.c b/test/missing_port_name.lv2/test_missing_port_name.c index 9a68b00..9a68065 100644 --- a/test/missing_port_name.lv2/test_missing_port_name.c +++ b/test/missing_port_name.lv2/test_missing_port_name.c @@ -2,8 +2,8 @@ #include "../src/filesystem.h" -#include "serd/serd.h" #include "lilv/lilv.h" +#include "serd/serd.h" #include <assert.h> #include <stdbool.h> diff --git a/test/test_state.c b/test/test_state.c index a9260b9..330aa47 100644 --- a/test/test_state.c +++ b/test/test_state.c @@ -20,7 +20,6 @@ #include "lilv_test_utils.h" #include "../src/filesystem.h" -#include "../src/lilv_internal.h" #include "lilv/lilv.h" #include "lv2/core/lv2.h" diff --git a/utils/bench.h b/utils/bench.h index 7b8da82..a04996b 100644 --- a/utils/bench.h +++ b/utils/bench.h @@ -23,28 +23,29 @@ #define _POSIX_C_SOURCE 200809L -#include <sys/time.h> #include <time.h> +typedef struct timespec BenchmarkTime; + static inline double -bench_elapsed_s(const struct timespec* start, const struct timespec* end) +bench_elapsed_s(const BenchmarkTime* start, const BenchmarkTime* end) { return ((end->tv_sec - start->tv_sec) + ((end->tv_nsec - start->tv_nsec) * 0.000000001)); } -static inline struct timespec +static inline BenchmarkTime bench_start(void) { - struct timespec start_t; + BenchmarkTime start_t; clock_gettime(CLOCK_REALTIME, &start_t); return start_t; } static inline double -bench_end(const struct timespec* start_t) +bench_end(const BenchmarkTime* start_t) { - struct timespec end_t; + BenchmarkTime end_t; clock_gettime(CLOCK_REALTIME, &end_t); return bench_elapsed_s(start_t, &end_t); } diff --git a/utils/uri_table.h b/utils/uri_table.h index 3b374bb..70635a3 100644 --- a/utils/uri_table.h +++ b/utils/uri_table.h @@ -23,6 +23,8 @@ #ifndef URI_TABLE_H #define URI_TABLE_H +#include "lv2/urid/urid.h" + #include <stdlib.h> #include <string.h> |