diff options
author | David Robillard <d@drobilla.net> | 2011-04-29 18:48:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-29 18:48:45 +0000 |
commit | 9839d7e46892d695bbfdf0ddcf2fcb616e41b1ec (patch) | |
tree | d502826e4fb60c78aa25889d029aa674f57f13d8 /src | |
parent | 1e7b27c7b322476c437a8524cff4a88245c5efbf (diff) | |
download | lilv-9839d7e46892d695bbfdf0ddcf2fcb616e41b1ec.tar.gz lilv-9839d7e46892d695bbfdf0ddcf2fcb616e41b1ec.tar.bz2 lilv-9839d7e46892d695bbfdf0ddcf2fcb616e41b1ec.zip |
Rename command line utilities to avoid clashing with slv2.
Fix indentation.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3235 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/collections.c | 2 | ||||
-rw-r--r-- | src/instance.c | 11 | ||||
-rw-r--r-- | src/lilv_internal.h | 2 | ||||
-rw-r--r-- | src/plugin.c | 10 | ||||
-rw-r--r-- | src/pluginclass.c | 2 | ||||
-rw-r--r-- | src/port.c | 4 | ||||
-rw-r--r-- | src/query.c | 4 | ||||
-rw-r--r-- | src/util.c | 6 | ||||
-rw-r--r-- | src/world.c | 3 |
9 files changed, 23 insertions, 21 deletions
diff --git a/src/collections.c b/src/collections.c index 11f3bfc..6439f09 100644 --- a/src/collections.c +++ b/src/collections.c @@ -201,5 +201,5 @@ LILV_API LilvNode* lilv_nodes_get_first(const LilvNodes* collection) { return (LilvNode*)lilv_collection_get(collection, - lilv_collection_begin(collection)); + lilv_collection_begin(collection)); } diff --git a/src/instance.c b/src/instance.c index 9f99534..717bdb6 100644 --- a/src/instance.c +++ b/src/instance.c @@ -61,14 +61,14 @@ lilv_plugin_instantiate(const LilvPlugin* plugin, } else { // Search for plugin by URI - const char* bundle_path = lilv_uri_to_path(lilv_node_as_uri( - lilv_plugin_get_bundle_uri(plugin))); + const char* bundle_path = lilv_uri_to_path( + lilv_node_as_uri(lilv_plugin_get_bundle_uri(plugin))); for (uint32_t i = 0; true; ++i) { const LV2_Descriptor* ld = df(i); if (!ld) { LILV_ERRORF("Did not find plugin %s in %s\n", - lilv_node_as_uri(lilv_plugin_get_uri(plugin)), lib_path); + lilv_node_as_uri(lilv_plugin_get_uri(plugin)), lib_path); dlclose(lib); break; // return NULL } else { @@ -96,8 +96,9 @@ lilv_plugin_instantiate(const LilvPlugin* plugin, // Create LilvInstance to return result = malloc(sizeof(struct LilvInstanceImpl)); result->lv2_descriptor = ld; - result->lv2_handle = ld->instantiate(ld, sample_rate, (char*)bundle_path, - (features) ? features : local_features); + result->lv2_handle = ld->instantiate( + ld, sample_rate, (char*)bundle_path, + (features) ? features : local_features); result->pimpl = lib; serd_node_free(&abs_uri_node); break; diff --git a/src/lilv_internal.h b/src/lilv_internal.h index 78b377d..32c3420 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -354,7 +354,7 @@ static inline bool lilv_matches_end(SordIter* matches) { } LilvNodes* lilv_nodes_from_stream_objects(LilvWorld* w, - SordIter* stream); + SordIter* stream); /* ********* Utilities ********* */ diff --git a/src/plugin.c b/src/plugin.c index 3682896..b13bbb8 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -337,7 +337,7 @@ lilv_plugin_get_class(const LilvPlugin* const_p) if ( ! lilv_node_equals(class, p->world->lv2_plugin_class->uri)) { const LilvPluginClass* plugin_class = lilv_plugin_classes_get_by_uri( - p->world->plugin_classes, class); + p->world->plugin_classes, class); if (plugin_class) { ((LilvPlugin*)p)->plugin_class = plugin_class; @@ -390,7 +390,7 @@ LilvNode* lilv_plugin_get_name(const LilvPlugin* plugin) { LilvNodes* results = lilv_plugin_get_value(plugin, - plugin->world->doap_name_val); + plugin->world->doap_name_val); LilvNode* ret = NULL; if (results) { @@ -437,9 +437,9 @@ lilv_plugin_get_value_for_subject(const LilvPlugin* p, (const uint8_t*)lilv_node_as_blank(subject)); LilvNodes* ret = lilv_world_query_values(p->world, - subject_node, - predicate->val.uri_val, - NULL); + subject_node, + predicate->val.uri_val, + NULL); sord_node_free(p->world->world, subject_node); return ret; diff --git a/src/pluginclass.c b/src/pluginclass.c index cceda49..eb6923d 100644 --- a/src/pluginclass.c +++ b/src/pluginclass.c @@ -90,7 +90,7 @@ lilv_plugin_class_get_children(const LilvPluginClass* plugin_class) const LilvPluginClass* c = g_sequence_get(i); const LilvNode* parent = lilv_plugin_class_get_parent_uri(c); if (parent && lilv_node_equals(lilv_plugin_class_get_uri(plugin_class), - parent)) + parent)) lilv_sequence_insert(result, (LilvPluginClass*)c); } @@ -73,7 +73,7 @@ lilv_port_get_node(const LilvPlugin* p, p->world->lv2_symbol_node); const bool matches = lilv_node_equals(symbol, - lilv_port_get_symbol(p, port)); + lilv_port_get_symbol(p, port)); lilv_node_free(symbol); if (matches) { @@ -173,7 +173,7 @@ lilv_port_get_name(const LilvPlugin* p, const LilvPort* port) { LilvNodes* results = lilv_port_get_value(p, port, - p->world->lv2_name_val); + p->world->lv2_name_val); LilvNode* ret = NULL; if (results) { diff --git a/src/query.c b/src/query.c index c64b8c4..1155e44 100644 --- a/src/query.c +++ b/src/query.c @@ -55,7 +55,7 @@ lilv_lang_matches(const char* a, const char* b) LilvNodes* lilv_nodes_from_stream_objects_i18n(LilvWorld* world, - SordIter* stream) + SordIter* stream) { LilvNodes* values = lilv_nodes_new(); const SordNode* nolang = NULL; // Untranslated value @@ -118,7 +118,7 @@ lilv_nodes_from_stream_objects_i18n(LilvWorld* world, LilvNodes* lilv_nodes_from_stream_objects(LilvWorld* world, - SordIter* stream) + SordIter* stream) { if (lilv_matches_end(stream)) { lilv_match_end(stream); @@ -65,13 +65,13 @@ lilv_uri_to_path(const char* uri) #ifdef __WIN32__ if (!strncmp(uri, "file:///", (size_t)8)) { return (char*)(uri + 8); + } #else if (!strncmp(uri, "file://", (size_t)7)) { return (char*)(uri + 7); -#endif - } else { - return NULL; } +#endif + return NULL; } /** Return the current LANG converted to Turtle (i.e. RFC3066) style. diff --git a/src/world.c b/src/world.c index 9d6ac45..7d1c307 100644 --- a/src/world.c +++ b/src/world.c @@ -228,7 +228,8 @@ lilv_world_query_values(LilvWorld* world, const SordNode* predicate, const SordNode* object) { - return lilv_nodes_from_stream_objects(world, + return lilv_nodes_from_stream_objects( + world, lilv_world_query(world, subject, predicate, object)); } |