Warning and documentation fixes.

git-svn-id: http://svn.drobilla.net/lad@111 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
dave 2006-09-03 03:24:32 +00:00
parent 3a79a86998
commit 8d3c9f7caa
5 changed files with 20 additions and 24 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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,

View File

@ -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

View File

@ -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);
}