aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-14 10:07:03 -0500
committerDavid Robillard <d@drobilla.net>2024-11-14 12:41:38 -0500
commit0184686c237b0c1f6b30e5e88a3ba357bce98748 (patch)
tree73804713f845b8b378770cdddeeeb0087f23e41d /src
parent1bbeb108d4b1e7e56050040e8eb0de83601a33d4 (diff)
downloadjalv-0184686c237b0c1f6b30e5e88a3ba357bce98748.tar.gz
jalv-0184686c237b0c1f6b30e5e88a3ba357bce98748.tar.bz2
jalv-0184686c237b0c1f6b30e5e88a3ba357bce98748.zip
Remove unused prototypes and make functions static where possible
Diffstat (limited to 'src')
-rw-r--r--src/control.c3
-rw-r--r--src/control.h4
-rw-r--r--src/jalv.c17
-rw-r--r--src/jalv_internal.h19
-rw-r--r--src/log.c3
-rw-r--r--src/log.h4
6 files changed, 16 insertions, 34 deletions
diff --git a/src/control.c b/src/control.c
index 68a5bfb..d663078 100644
--- a/src/control.c
+++ b/src/control.c
@@ -15,7 +15,8 @@
#include <stdlib.h>
#include <string.h>
-int
+/// Order scale points by value
+static int
scale_point_cmp(const ScalePoint* a, const ScalePoint* b)
{
if (a->value < b->value) {
diff --git a/src/control.h b/src/control.h
index 46ca360..e0966f5 100644
--- a/src/control.h
+++ b/src/control.h
@@ -70,10 +70,6 @@ typedef struct {
// Followed immediately by size bytes of data
} ControlChange;
-/// Order scale points by value
-int
-scale_point_cmp(const ScalePoint* a, const ScalePoint* b);
-
/// Create a new ID for a control port
ControlID*
new_port_control(LilvWorld* world,
diff --git a/src/jalv.c b/src/jalv.c
index 5faac70..6c131bc 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -224,7 +224,7 @@ create_port(Jalv* jalv, uint32_t port_index, float default_value)
}
/// Create port structures from data (via create_port()) for all ports
-void
+static void
jalv_create_ports(Jalv* jalv)
{
jalv->num_ports = lilv_plugin_get_num_ports(jalv->plugin);
@@ -302,7 +302,7 @@ jalv_port_by_symbol(Jalv* jalv, const char* sym)
return NULL;
}
-ControlID*
+static ControlID*
jalv_control_by_symbol(Jalv* jalv, const char* sym)
{
for (size_t i = 0; i < jalv->controls.n_controls; ++i) {
@@ -313,7 +313,7 @@ jalv_control_by_symbol(Jalv* jalv, const char* sym)
return NULL;
}
-void
+static void
jalv_create_controls(Jalv* jalv, bool writable)
{
const LilvPlugin* plugin = jalv->plugin;
@@ -371,6 +371,13 @@ jalv_create_controls(Jalv* jalv, bool writable)
lilv_node_free(patch_writable);
}
+static void
+jalv_send_to_plugin(void* jalv_handle,
+ uint32_t port_index,
+ uint32_t buffer_size,
+ uint32_t protocol,
+ const void* buffer);
+
void
jalv_set_control(Jalv* jalv,
const ControlID* control,
@@ -528,7 +535,7 @@ jalv_send_event_to_plugin(Jalv* const jalv,
}
}
-void
+static void
jalv_send_to_plugin(void* const jalv_handle,
uint32_t port_index,
uint32_t buffer_size,
@@ -554,7 +561,7 @@ jalv_send_to_plugin(void* const jalv_handle,
}
}
-void
+static void
jalv_apply_ui_events(Jalv* jalv, uint32_t nframes)
{
if (!jalv->has_ui) {
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index 3934e86..ee2a11e 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -125,21 +125,12 @@ int
jalv_close(Jalv* jalv);
void
-jalv_create_ports(Jalv* jalv);
-
-void
jalv_allocate_port_buffers(Jalv* jalv);
struct Port*
jalv_port_by_symbol(Jalv* jalv, const char* sym);
void
-jalv_create_controls(Jalv* jalv, bool writable);
-
-ControlID*
-jalv_control_by_symbol(Jalv* jalv, const char* sym);
-
-void
jalv_set_control(Jalv* jalv,
const ControlID* control,
uint32_t size,
@@ -156,16 +147,6 @@ bool
jalv_ui_is_resizable(Jalv* jalv);
void
-jalv_send_to_plugin(void* jalv_handle,
- uint32_t port_index,
- uint32_t buffer_size,
- uint32_t protocol,
- const void* buffer);
-
-void
-jalv_apply_ui_events(Jalv* jalv, uint32_t nframes);
-
-void
jalv_ui_port_event(Jalv* jalv,
uint32_t port_index,
uint32_t buffer_size,
diff --git a/src/log.c b/src/log.c
index a624a2f..95f0949 100644
--- a/src/log.c
+++ b/src/log.c
@@ -53,7 +53,8 @@ jalv_strjoin(const char* const a, const char* const b)
return out;
}
-int
+JALV_LOG_FUNC(2, 0)
+static int
jalv_vlog(const JalvLogLevel level, const char* const fmt, va_list ap)
{
bool fancy = false;
diff --git a/src/log.h b/src/log.h
index 7981cf5..9528a3d 100644
--- a/src/log.h
+++ b/src/log.h
@@ -47,10 +47,6 @@ jalv_strdup(const char* str);
char*
jalv_strjoin(const char* a, const char* b);
-JALV_LOG_FUNC(2, 0)
-int
-jalv_vlog(JalvLogLevel level, const char* fmt, va_list ap);
-
JALV_LOG_FUNC(2, 3)
int
jalv_log(JalvLogLevel level, const char* fmt, ...);