aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-15 09:23:33 -0500
committerDavid Robillard <d@drobilla.net>2024-11-17 14:40:27 -0500
commit9e71c9372d25b699d63a8110ab26a3239ca48cd6 (patch)
tree3415c03bd253bb990d98ee823bb21b5ffa63989e /src/log.c
parent9e74b423c87f50c6f50cc40cece057e439ddca57 (diff)
downloadjalv-9e71c9372d25b699d63a8110ab26a3239ca48cd6.tar.gz
jalv-9e71c9372d25b699d63a8110ab26a3239ca48cd6.tar.bz2
jalv-9e71c9372d25b699d63a8110ab26a3239ca48cd6.zip
Move string utilities to a separate compilation unit
These don't really have anything to do with logging. Also replace a call to the non-standard strdup() in the process.
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/log.c b/src/log.c
index 95f0949..7de6e70 100644
--- a/src/log.c
+++ b/src/log.c
@@ -18,8 +18,6 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
void
jalv_print_control(const Jalv* const jalv,
@@ -30,29 +28,6 @@ jalv_print_control(const Jalv* const jalv,
jalv_log(JALV_LOG_INFO, "%s = %f\n", lilv_node_as_string(sym), value);
}
-char*
-jalv_strdup(const char* const str)
-{
- const size_t len = strlen(str);
- char* copy = (char*)malloc(len + 1);
- memcpy(copy, str, len + 1);
- return copy;
-}
-
-char*
-jalv_strjoin(const char* const a, const char* const b)
-{
- const size_t a_len = strlen(a);
- const size_t b_len = strlen(b);
- char* const out = (char*)malloc(a_len + b_len + 1);
-
- memcpy(out, a, a_len);
- memcpy(out + a_len, b, b_len);
- out[a_len + b_len] = '\0';
-
- return out;
-}
-
JALV_LOG_FUNC(2, 0)
static int
jalv_vlog(const JalvLogLevel level, const char* const fmt, va_list ap)