summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-18 04:16:24 +0000
committerDavid Robillard <d@drobilla.net>2007-02-18 04:16:24 +0000
commita80e895b0b23d478807377360b85b4bb1d7073b7 (patch)
treee2ea19db66cd44bce0d84176c4c87a90d9b5d9e0 /src/util.c
parent07c3b4ce3ed385368147bd4f2e058f83d9064b0d (diff)
downloadlilv-a80e895b0b23d478807377360b85b4bb1d7073b7.tar.gz
lilv-a80e895b0b23d478807377360b85b4bb1d7073b7.tar.bz2
lilv-a80e895b0b23d478807377360b85b4bb1d7073b7.zip
Implemented discovery of plugin extension bundles.
git-svn-id: http://svn.drobilla.net/lad/slv2@309 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/util.c b/src/util.c
index 135c256..35624c1 100644
--- a/src/util.c
+++ b/src/util.c
@@ -18,15 +18,15 @@
#define _XOPEN_SOURCE 500
-#include <util.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdarg.h>
+#include <slv2/util.h>
void
-strappend(char** dst, const char* suffix)
+slv2_strappend(char** dst, const char* suffix)
{
assert(dst);
assert(*dst);
@@ -40,7 +40,7 @@ strappend(char** dst, const char* suffix)
char*
-strjoin(const char* first, ...)
+slv2_strjoin(const char* first, ...)
{
size_t len = strlen(first);
char* result = NULL;
@@ -73,23 +73,14 @@ strjoin(const char* first, ...)
}
-/** Convert a URL to a local filesystem path (ie by chopping off the
- * leading "file://".
- *
- * Returns NULL if URL is not a valid URL on the local filesystem.
- * Result is simply a pointer in to \a url and must not be free()'d.
- */
const char*
-url2path(const char* const url)
+slv2_uri_to_path(const char* uri)
{
- /*assert(strlen((char*)url) > 8);
- char* result = calloc(strlen((char*)url)-7+1, sizeof(char));
- strcpy(result, (char*)url+7);
- return result;*/
- if (!strncmp((char*)url, "file://", (size_t)7))
- return (char*)url + 7;
+ if (!strncmp(uri, "file://", (size_t)7))
+ return (char*)(uri + 7);
else
return NULL;
}
+