summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-01-13 13:59:29 +0100
committerDavid Robillard <d@drobilla.net>2019-01-13 13:59:29 +0100
commit162d540a7a78bcd75aea002b4afa101133315e8b (patch)
treef59f5adbc21f4156a1a8b4e33abe9124a6f526cb /utils
parent4b4c1797d93e6efb93b12df21c1cd9f04341b61e (diff)
downloadlilv-162d540a7a78bcd75aea002b4afa101133315e8b.tar.gz
lilv-162d540a7a78bcd75aea002b4afa101133315e8b.tar.bz2
lilv-162d540a7a78bcd75aea002b4afa101133315e8b.zip
Clean up includes
Sorts includes from local to global (which catches errors) and fixes missing includes found by the resulting breakage and include-what-you-use.
Diffstat (limited to 'utils')
-rw-r--r--utils/bench.h2
-rw-r--r--utils/lilv-bench.c4
-rw-r--r--utils/lv2apply.c9
-rw-r--r--utils/lv2bench.c17
-rw-r--r--utils/lv2info.c19
-rw-r--r--utils/lv2ls.c7
-rw-r--r--utils/uri_table.h3
7 files changed, 35 insertions, 26 deletions
diff --git a/utils/bench.h b/utils/bench.h
index 83d7853..9006cf5 100644
--- a/utils/bench.h
+++ b/utils/bench.h
@@ -23,8 +23,8 @@
#define _POSIX_C_SOURCE 200809L
-#include <time.h>
#include <sys/time.h>
+#include <time.h>
static inline double
bench_elapsed_s(const struct timespec* start, const struct timespec* end)
diff --git a/utils/lilv-bench.c b/utils/lilv-bench.c
index c0355df..59e49fe 100644
--- a/utils/lilv-bench.c
+++ b/utils/lilv-bench.c
@@ -14,12 +14,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-
#include "lilv/lilv.h"
-#include "lilv_config.h"
-
int
main(int argc, char** argv)
{
diff --git a/utils/lv2apply.c b/utils/lv2apply.c
index 66a8c3a..84f4ca1 100644
--- a/utils/lv2apply.c
+++ b/utils/lv2apply.c
@@ -14,16 +14,19 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <assert.h>
+#include "lilv/lilv.h"
+
+#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
+
#include <math.h>
#include <sndfile.h>
#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "lilv/lilv.h"
-
/** Control port value set from the command line */
typedef struct Param {
const char* sym; ///< Port symbol
diff --git a/utils/lv2bench.c b/utils/lv2bench.c
index e3eb57f..bbe8818 100644
--- a/utils/lv2bench.c
+++ b/utils/lv2bench.c
@@ -16,18 +16,23 @@
#define _POSIX_C_SOURCE 200809L
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "lilv/lilv.h"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
+#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
+#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
-#include "lilv_config.h"
#include "bench.h"
+#include "lilv_config.h"
#include "uri_table.h"
+#include <math.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
static LilvNode* atom_AtomPort = NULL;
static LilvNode* atom_Sequence = NULL;
static LilvNode* lv2_AudioPort = NULL;
diff --git a/utils/lv2info.c b/utils/lv2info.c
index 75a093f..5869195 100644
--- a/utils/lv2info.c
+++ b/utils/lv2info.c
@@ -14,19 +14,20 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <float.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "lilv_config.h"
+#include "lilv/lilv.h"
+#include "lv2/lv2plug.in/ns/ext/event/event.h"
#include "lv2/lv2plug.in/ns/ext/port-groups/port-groups.h"
#include "lv2/lv2plug.in/ns/ext/presets/presets.h"
-#include "lv2/lv2plug.in/ns/ext/event/event.h"
+#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
-#include "lilv/lilv.h"
-
-#include "lilv_config.h"
+#include <math.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef _MSC_VER
# define isnan _isnan
diff --git a/utils/lv2ls.c b/utils/lv2ls.c
index 1f007f1..677e055 100644
--- a/utils/lv2ls.c
+++ b/utils/lv2ls.c
@@ -14,12 +14,13 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-#include <string.h>
+#include "lilv_config.h"
#include "lilv/lilv.h"
-#include "lilv_config.h"
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
static void
list_plugins(const LilvPlugins* list, bool show_names)
diff --git a/utils/uri_table.h b/utils/uri_table.h
index 880d560..4c494e7 100644
--- a/utils/uri_table.h
+++ b/utils/uri_table.h
@@ -23,6 +23,9 @@
#ifndef URI_TABLE_H
#define URI_TABLE_H
+#include <stdlib.h>
+#include <string.h>
+
typedef struct {
char** uris;
size_t n_uris;