summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-03 03:24:32 +0000
committerDavid Robillard <d@drobilla.net>2006-09-03 03:24:32 +0000
commit133415ab52c297199acb29822fc7ec572fbafa2f (patch)
tree6d684bddede123e2808287aad82c559126ab54df
parent69e52cb83cf0233648695730c81cdc4f7c4f2a00 (diff)
downloadlilv-133415ab52c297199acb29822fc7ec572fbafa2f.tar.gz
lilv-133415ab52c297199acb29822fc7ec572fbafa2f.tar.bz2
lilv-133415ab52c297199acb29822fc7ec572fbafa2f.zip
Warning and documentation fixes.
git-svn-id: http://svn.drobilla.net/lad/libslv2@111 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--examples/hosts/test_host.c1
-rw-r--r--slv2/plugin.h2
-rw-r--r--slv2/pluginlist.h16
-rw-r--r--src/pluginlist.c19
-rw-r--r--src/query.c6
5 files changed, 20 insertions, 24 deletions
diff --git a/examples/hosts/test_host.c b/examples/hosts/test_host.c
index c1c96ed..0eabee5 100644
--- a/examples/hosts/test_host.c
+++ b/examples/hosts/test_host.c
@@ -60,7 +60,6 @@ create_audio_output()
void
create_port(SLV2Plugin* plugin,
- SLV2Instance* instance,
uint32_t port_index)
{
enum SLV2PortClass class = slv2_port_get_class(plugin, port_index);
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 2b2a295..57fa266 100644
--- a/slv2/plugin.h
+++ b/slv2/plugin.h
@@ -63,7 +63,7 @@ slv2_plugin_verify(const SLV2Plugin* plugin);
* Use this if you want to keep an SLV2Plugin around but free the list it came
* from.
*
- * \return a newly allocated SLV2Plugin identical to \a plugin (a deep copy).
+ * \return a newly allocated deep copy of \a plugin.
*/
SLV2Plugin*
slv2_plugin_duplicate(const SLV2Plugin* plugin);
diff --git a/slv2/pluginlist.h b/slv2/pluginlist.h
index 198ced8..7a0f967 100644
--- a/slv2/pluginlist.h
+++ b/slv2/pluginlist.h
@@ -77,8 +77,8 @@ slv2_list_free(SLV2List list);
* like to be visible in apps (or conversely a blacklist of plugins they do
* not wish to use).
*
- * Use of any of the other functions for locating plugins is highly
- * discouraged without specific reason to do so. Use this one.
+ * Use of any functions for locating plugins other than this one is \em highly
+ * discouraged without a special reason to do so - use this one.
*/
void
slv2_list_load_all(SLV2List list);
@@ -88,9 +88,7 @@ slv2_list_load_all(SLV2List list);
*
* If \a search_path is NULL, \a list will be unmodified.
*
- * Use of this function is not recommended. Use \ref slv2_list_load_all.
- *
- * Returned value must be cleaned up by slv2list_free.
+ * Use of this function is \b not recommended. Use \ref slv2_list_load_all.
*/
void
slv2_list_load_path(SLV2List list,
@@ -102,12 +100,12 @@ slv2_list_load_path(SLV2List list,
* \arg bundle_base_url is a fully qualified path to the bundle directory, eg.
* "file:///usr/lib/lv2/someBundle"
*
- * Use of this function is <b>strongly</b> discouraged, hosts should not attach
- * any significance to bundle paths as there are no guarantees they will
+ * Use of this function is \b strongly discouraged - hosts should not attach
+ * \em any significance to bundle paths as there are no guarantees they will
* remain consistent whatsoever. This function should only be used by apps
* which ship with a special bundle (which it knows exists at some path).
- * It is <b>not</b> to be used by normal hosts that want to load system
- * installed plugins. Use \ref slv2_list_load_all.
+ * It is \b not to be used by normal hosts that want to load system
+ * installed plugins. Use \ref slv2_list_load_all for that.
*/
void
slv2_list_load_bundle(SLV2List list,
diff --git a/src/pluginlist.c b/src/pluginlist.c
index 2879e53..8c5ba11 100644
--- a/src/pluginlist.c
+++ b/src/pluginlist.c
@@ -77,14 +77,13 @@ void
slv2_list_load_bundle(SLV2List list,
const char* bundle_base_uri)
{
- // FIXME: ew
unsigned char* manifest_uri = malloc(
(strlen((char*)bundle_base_uri) + strlen("manifest.ttl") + 2) * sizeof(unsigned char));
memcpy(manifest_uri, bundle_base_uri, strlen((char*)bundle_base_uri)+1 * sizeof(unsigned char));
- if (bundle_base_uri[strlen((char*)bundle_base_uri)-1] == '/')
- strcat((char*)manifest_uri, (char*)"manifest.ttl");
+ if (bundle_base_uri[strlen(bundle_base_uri)-1] == '/')
+ strcat((char*)manifest_uri, "manifest.ttl");
else
- strcat((char*)manifest_uri, (char*)"/manifest.ttl");
+ strcat((char*)manifest_uri, "/manifest.ttl");
rasqal_init();
rasqal_query_results *results;
@@ -113,17 +112,17 @@ slv2_list_load_bundle(SLV2List list,
rasqal_literal* literal = NULL;
- literal = rasqal_query_results_get_binding_value_by_name(results, "plugin_uri");
+ literal = rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)"plugin_uri");
if (literal)
- new_plugin->plugin_uri = strdup(rasqal_literal_as_string(literal));
+ new_plugin->plugin_uri = strdup((const char*)rasqal_literal_as_string(literal));
- literal = rasqal_query_results_get_binding_value_by_name(results, "data_url");
+ literal = rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)"data_url");
if (literal)
- new_plugin->data_url = strdup(rasqal_literal_as_string(literal));
+ new_plugin->data_url = strdup((const char*)rasqal_literal_as_string(literal));
- literal = rasqal_query_results_get_binding_value_by_name(results, "lib_url");
+ literal = rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)"lib_url");
if (literal)
- new_plugin->lib_url = strdup(rasqal_literal_as_string(literal));
+ new_plugin->lib_url = strdup((const char*)rasqal_literal_as_string(literal));
/* Add the plugin if it's valid */
if (new_plugin->lib_url && new_plugin->data_url && new_plugin->plugin_uri
diff --git a/src/query.c b/src/query.c
index 8f3ef40..56903ac 100644
--- a/src/query.c
+++ b/src/query.c
@@ -89,7 +89,7 @@ slv2_query_get_num_results(rasqal_query_results* results, const char* var_name)
size_t result = 0;
while (!rasqal_query_results_finished(results)) {
- if (!strcmp(rasqal_query_results_get_binding_name(results, 0), var_name)) {
+ if (!strcmp((const char*)rasqal_query_results_get_binding_name(results, 0), var_name)) {
++result;
}
rasqal_query_results_next(results);
@@ -112,7 +112,7 @@ slv2_query_get_results(rasqal_query_results* results, const char* var_name)
while (!rasqal_query_results_finished(results)) {
rasqal_literal* literal =
- rasqal_query_results_get_binding_value_by_name(results, var_name);
+ rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)var_name);
assert(literal != NULL);
// Add value on to the array, reallocing all the way.
@@ -120,7 +120,7 @@ slv2_query_get_results(rasqal_query_results* results, const char* var_name)
// results API. coincidentally.
result->num_values++;
result->values = realloc(result->values, result->num_values * sizeof(char*));
- result->values[result->num_values-1] = strdup(rasqal_literal_as_string(literal));
+ result->values[result->num_values-1] = strdup((const char*)rasqal_literal_as_string(literal));
rasqal_query_results_next(results);
}