summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-29 18:14:16 +0000
committerDavid Robillard <d@drobilla.net>2011-01-29 18:14:16 +0000
commit26ddd2ade551d347794da9237f0a2a55ff88f9f0 (patch)
tree52332ff541c067a64db64e112eb4f71eea05f7d3 /src
parent4bd0ab43209ab81239cb7ff9ccc9365354a5fb91 (diff)
downloadlilv-26ddd2ade551d347794da9237f0a2a55ff88f9f0.tar.gz
lilv-26ddd2ade551d347794da9237f0a2a55ff88f9f0.tar.bz2
lilv-26ddd2ade551d347794da9237f0a2a55ff88f9f0.zip
Use uint8_t instead of the horribly verbose `unsigned char'.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2852 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/plugin.c2
-rw-r--r--src/plugininstance.c2
-rw-r--r--src/query.c2
-rw-r--r--src/slv2_internal.h11
-rw-r--r--src/value.c2
-rw-r--r--src/world.c12
6 files changed, 16 insertions, 15 deletions
diff --git a/src/plugin.c b/src/plugin.c
index b4fc579..4282be3 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -572,7 +572,7 @@ slv2_plugin_get_port_float_values(SLV2Plugin p,
for (uint32_t i = 0; i < p->num_ports; ++i)
values[i] = NAN;
- unsigned char* query = (unsigned char*)slv2_strjoin(
+ uint8_t* query = (uint8_t*)slv2_strjoin(
"PREFIX : <http://lv2plug.in/ns/lv2core#>\n"
"SELECT DISTINCT ?index ?value WHERE {\n"
"<> :port ?port .\n"
diff --git a/src/plugininstance.c b/src/plugininstance.c
index b021e42..237c2a5 100644
--- a/src/plugininstance.c
+++ b/src/plugininstance.c
@@ -82,7 +82,7 @@ slv2_plugin_instantiate(SLV2Plugin plugin,
} else {
librdf_uri* absolute_uri = librdf_new_uri_relative_to_base(
slv2_value_as_librdf_uri(slv2_plugin_get_bundle_uri(plugin)),
- (const unsigned char*)ld->URI);
+ (const uint8_t*)ld->URI);
if (!strcmp((const char*)librdf_uri_as_string(absolute_uri),
slv2_value_as_uri(slv2_plugin_get_uri(plugin)))) {
assert(plugin->plugin_uri);
diff --git a/src/query.c b/src/query.c
index 615eeaf..d190bf2 100644
--- a/src/query.c
+++ b/src/query.c
@@ -95,7 +95,7 @@ slv2_plugin_query_sparql(SLV2Plugin plugin,
char* query_str = slv2_strjoin(slv2_query_prefixes, sparql_str, NULL);
librdf_query* query = librdf_new_query(plugin->world->world, "sparql", NULL,
- (const unsigned char*)query_str, base_uri);
+ (const uint8_t*)query_str, base_uri);
if (!query) {
SLV2_ERRORF("Failed to create query:\n%s", query_str);
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index be2f243..8f614b5 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -27,6 +27,7 @@ extern "C" {
#include <stdbool.h>
#include <stddef.h>
+#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
#include <redland.h>
@@ -36,11 +37,11 @@ extern "C" {
#include "lv2/lv2plug.in/ns/ext/dyn-manifest/dyn-manifest.h"
#endif
-#define SLV2_NS_RDFS (const unsigned char*)"http://www.w3.org/2000/01/rdf-schema#"
-#define SLV2_NS_SLV2 (const unsigned char*)"http://drobilla.net/ns/slv2#"
-#define SLV2_NS_LV2 (const unsigned char*)"http://lv2plug.in/ns/lv2core#"
-#define SLV2_NS_XSD (const unsigned char*)"http://www.w3.org/2001/XMLSchema#"
-#define SLV2_NS_RDF (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+#define SLV2_NS_RDFS (const uint8_t*)"http://www.w3.org/2000/01/rdf-schema#"
+#define SLV2_NS_SLV2 (const uint8_t*)"http://drobilla.net/ns/slv2#"
+#define SLV2_NS_LV2 (const uint8_t*)"http://lv2plug.in/ns/lv2core#"
+#define SLV2_NS_XSD (const uint8_t*)"http://www.w3.org/2001/XMLSchema#"
+#define SLV2_NS_RDF (const uint8_t*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
/* ********* PORT ********* */
diff --git a/src/value.c b/src/value.c
index f4c48df..d9e8a9c 100644
--- a/src/value.c
+++ b/src/value.c
@@ -74,7 +74,7 @@ slv2_value_new(SLV2World world, SLV2ValueType type, const char* str)
switch (type) {
case SLV2_VALUE_URI:
- val->val.uri_val = librdf_new_uri(world->world, (const unsigned char*)str);
+ val->val.uri_val = librdf_new_uri(world->world, (const uint8_t*)str);
assert(val->val.uri_val);
val->str_val = (char*)librdf_uri_as_string(val->val.uri_val);
break;
diff --git a/src/world.c b/src/world.c
index b1e55fa..be1f1de 100644
--- a/src/world.c
+++ b/src/world.c
@@ -208,7 +208,7 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri)
}
librdf_uri* manifest_uri = librdf_new_uri_relative_to_base(
- bundle_uri->val.uri_val, (const unsigned char*)"manifest.ttl");
+ bundle_uri->val.uri_val, (const uint8_t*)"manifest.ttl");
/* Parse the manifest into a temporary model */
librdf_storage* manifest_storage = slv2_world_new_storage(world);
@@ -222,7 +222,7 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri)
typedef void* LV2_Dyn_Manifest_Handle;
LV2_Dyn_Manifest_Handle handle = NULL;
- const unsigned char* const query_str = (const unsigned char* const)
+ const uint8_t* const query_str = (const uint8_t* const)
"PREFIX : <http://lv2plug.in/ns/lv2core#>\n"
"PREFIX dynman: <http://lv2plug.in/ns/ext/dynmanifest#>\n"
"SELECT DISTINCT ?dynman ?binary WHERE {\n"
@@ -238,8 +238,8 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri)
if (librdf_node_get_type(binary_node) != LIBRDF_NODE_TYPE_RESOURCE)
continue;
- const unsigned char* lib_uri = librdf_uri_as_string(librdf_node_get_uri(binary_node));
- const char* lib_path = slv2_uri_to_path((const char*)lib_uri);
+ const uint8_t* lib_uri = librdf_uri_as_string(librdf_node_get_uri(binary_node));
+ const char* lib_path = slv2_uri_to_path((const char*)lib_uri);
if (!lib_path)
continue;
@@ -489,7 +489,7 @@ slv2_world_load_plugin_classes(SLV2World world)
// than the ontology (ie classes which aren't LV2 plugin_classes), it
// currently loads things that aren't actually plugin classes
- unsigned char* query_string = (unsigned char*)
+ uint8_t* query_string = (uint8_t*)
"PREFIX : <http://lv2plug.in/ns/lv2core#>\n"
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
"SELECT DISTINCT ?class ?parent ?label WHERE {\n"
@@ -625,7 +625,7 @@ slv2_world_load_all(SLV2World world)
slv2_world_load_plugin_classes(world);
// Find all plugins and associated data files
- const unsigned char* query_string = (unsigned char*)
+ const uint8_t* query_string = (uint8_t*)
"PREFIX : <http://lv2plug.in/ns/lv2core#>\n"
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
"PREFIX slv2: <http://drobilla.net/ns/slv2#>\n"