summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-07-26 03:25:08 +0000
committerDavid Robillard <d@drobilla.net>2006-07-26 03:25:08 +0000
commit2cd84e4209633e59439c445f821bed8410347bab (patch)
treeba34505505795cff5cf35c2958ed21933b822e12 /src/util.c
parentdeca2cc89850dffc051d0a0aafc9d681af838934 (diff)
downloadlilv-2cd84e4209633e59439c445f821bed8410347bab.tar.gz
lilv-2cd84e4209633e59439c445f821bed8410347bab.tar.bz2
lilv-2cd84e4209633e59439c445f821bed8410347bab.zip
- Removed all the unsigned char garbage from the API
- Updated types in lv2.h to be non-machine-dependant (removed unsigned long in favour of uint32_t) - Updated schema - Updated example plugin to work with the above (partially) git-svn-id: http://svn.drobilla.net/lad/libslv2@101 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/util.c b/src/util.c
index 4a3ea47..99564eb 100644
--- a/src/util.c
+++ b/src/util.c
@@ -26,7 +26,7 @@
void
-ustrappend(uchar** dst, const uchar* suffix)
+strappend(char** dst, const char* suffix)
{
assert(dst);
assert(*dst);
@@ -39,21 +39,13 @@ ustrappend(uchar** dst, const uchar* suffix)
}
-uchar*
-ustrdup(const uchar* src)
-{
- assert(src);
- return (uchar*)strdup((char*)src);
-}
-
-
-uchar*
-ustrjoin(const uchar* first, ...)
+char*
+strjoin(const char* first, ...)
{
va_list args_list;
va_start(args_list, first);
- uchar* result = vstrjoin(first, args_list);
+ char* result = vstrjoin(first, args_list);
va_end(args_list);
@@ -61,17 +53,17 @@ ustrjoin(const uchar* first, ...)
}
-uchar*
-vstrjoin(const uchar* first, va_list args_list)
+char*
+vstrjoin(const char* first, va_list args_list)
{
// FIXME: this is horribly, awfully, disgracefully slow.
// so I'm lazy.
- const uchar* arg = NULL;
- uchar* result = ustrdup(first);
+ const char* arg = NULL;
+ char* result = strdup(first);
- while ((arg = va_arg(args_list, const uchar*)) != NULL)
- ustrappend(&result, arg);
+ while ((arg = va_arg(args_list, const char*)) != NULL)
+ strappend(&result, arg);
//va_end(args_list);
@@ -87,7 +79,7 @@ vstrjoin(const uchar* first, va_list args_list)
* Result is simply a pointer in to \a url and must not be free()'d.
*/
const char*
-url2path(const uchar* const url)
+url2path(const char* const url)
{
/*assert(strlen((char*)url) > 8);
char* result = calloc(strlen((char*)url)-7+1, sizeof(char));