summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-11 18:08:50 +0000
committerDavid Robillard <d@drobilla.net>2006-06-11 18:08:50 +0000
commitaf72224cba09c873c1f8e81d7bd9db9747f9553d (patch)
tree7cc8379be2362ab7312eb50c4020bdd9feb4adfa /src/util.c
parent7fd4168fe8581e46f4ee35cc182db6220b6eed04 (diff)
downloadlilv-af72224cba09c873c1f8e81d7bd9db9747f9553d.tar.gz
lilv-af72224cba09c873c1f8e81d7bd9db9747f9553d.tar.bz2
lilv-af72224cba09c873c1f8e81d7bd9db9747f9553d.zip
Fixed query problems on 64-bit
git-svn-id: http://svn.drobilla.net/lad/libslv2@23 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/util.c b/src/util.c
index 55953b8..1058b8d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -50,49 +50,30 @@ ustrdup(const uchar* src)
uchar*
ustrjoin(const uchar* first, ...)
{
- // FIXME: this is horribly, awfully, disgracefully slow
-
va_list args_list;
va_start(args_list, first);
- va_list args_copy;
- va_copy(args_copy, args_list);
-
- uchar* result = vstrjoin(first, args_copy);
-
- //va_end(args_copy);
+ uchar* result = vstrjoin(first, args_list);
+
va_end(args_list);
return result;
-
- /*
- va_list args_list;
- uchar* arg = NULL;
- uchar* result = ustrdup(first);
-
- va_start(args_list, first);
-
- while ((arg = va_arg(args_list, uchar*)) != (uchar*)0)
- ustrappend(&result, arg);
-
- va_end(args_list);
-
- return result;*/
}
uchar*
vstrjoin(const uchar* first, va_list args_list)
{
- // FIXME: this is horribly, awfully, disgracefully slow
+ // FIXME: this is horribly, awfully, disgracefully slow.
+ // so I'm lazy.
uchar* arg = NULL;
uchar* result = ustrdup(first);
-
- while ((arg = va_arg(args_list, uchar*)) != NULL)
+
+ while ((arg = va_arg(args_list, const uchar*)) != NULL)
ustrappend(&result, arg);
- va_end(args_list);
+ //va_end(args_list);
return result;
}
@@ -112,7 +93,7 @@ url2path(const uchar* const url)
char* result = calloc(strlen((char*)url)-7+1, sizeof(char));
strcpy(result, (char*)url+7);
return result;*/
- if (!strncmp((char*)url, "file://", 7))
+ if (!strncmp((char*)url, "file://", (size_t)7))
return (char*)url + 7;
else
return NULL;