summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/port.c62
-rw-r--r--src/query.c48
3 files changed, 5 insertions, 109 deletions
diff --git a/configure.ac b/configure.ac
index 925dff3..da53a36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,8 +91,8 @@ AC_ARG_ENABLE(strict,
[AS_HELP_STRING(--enable-strict, [Enable strict compiler warnings and errors (false)])],
[strict="$enableval"])
if test "$strict" = "yes"; then
- CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Wextra -Winit-self"
- CXXFLAGS="$CFLAGS -ansi -pedantic -Wall -Wextra -Wconversion -Winit-self"
+ CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Wextra -Winit-self -Wno-unused-parameter"
+ CXXFLAGS="$CFLAGS -ansi -pedantic -Wall -Wextra -Wconversion -Winit-self -Wno-unused-parameter"
fi
# SWIG bindings
diff --git a/src/port.c b/src/port.c
index 3fafede..b7414be 100644
--- a/src/port.c
+++ b/src/port.c
@@ -62,68 +62,6 @@ slv2_port_duplicate(SLV2Port port)
return result;
}
-#if 0
-SLV2PortDirection
-slv2_port_get_direction(SLV2Plugin p,
- SLV2Port port)
-{
- SLV2Values direction = slv2_port_get_value(p, port, "rdf:type");
-
- SLV2PortDirection ret = SLV2_PORT_DIRECTION_UNKNOWN;
-
- if (!direction)
- return ret;
-
- for (unsigned i=0; i < slv2_values_size(direction); ++i) {
- SLV2Value val = slv2_values_get_at(direction, i);
- if (slv2_value_is_uri(val)) {
- const char* uri = slv2_value_as_uri(val);
- if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#InputPort"))
- ret = SLV2_PORT_DIRECTION_INPUT;
- else if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#OutputPort"))
- ret = SLV2_PORT_DIRECTION_OUTPUT;
- }
- }
-
- slv2_values_free(direction);
-
- return ret;
-}
-
-
-SLV2PortDataType
-slv2_port_get_data_type(SLV2Plugin p,
- SLV2Port port)
-{
- SLV2Values type = slv2_port_get_value(p, port, "rdf:type");
-
- SLV2PortDataType ret = SLV2_PORT_DATA_TYPE_UNKNOWN;
-
- if (!type)
- return ret;
-
- for (unsigned i=0; i < slv2_values_size(type); ++i) {
- SLV2Value val = slv2_values_get_at(type, i);
- if (slv2_value_is_uri(val)) {
- const char* uri = slv2_value_as_uri(val);
- if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#ControlPort"))
- ret = SLV2_PORT_DATA_TYPE_CONTROL;
- else if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#AudioPort"))
- ret = SLV2_PORT_DATA_TYPE_AUDIO;
- else if (!strcmp(uri, "http://ll-plugins.nongnu.org/lv2/ext/MidiPort"))
- ret = SLV2_PORT_DATA_TYPE_MIDI;
- else if (!strcmp(uri, "http://drobilla.net/ns/lv2ext/osc/0#OSCPort"))
- ret = SLV2_PORT_DATA_TYPE_OSC;
- else if (!strcmp(uri, "http://lv2plug.in/ns/ext/event#EventPort"))
- ret = SLV2_PORT_DATA_TYPE_EVENT;
- }
- }
-
- slv2_values_free(type);
-
- return ret;
-}
-#endif
bool
slv2_port_is_a(SLV2Plugin plugin,
diff --git a/src/query.c b/src/query.c
index fc3b132..54dcda4 100644
--- a/src/query.c
+++ b/src/query.c
@@ -36,23 +36,6 @@ static const char* slv2_query_prefixes =
"PREFIX lv2: <http://lv2plug.in/ns/lv2core#>\n"
"PREFIX lv2ev: <http://lv2plug.in/ns/ext/event#>\n";
-#if 0
-char*
-slv2_query_lang_filter(const char* variable)
-{
- char* result = NULL;
- char* const lang = (char*)getenv("LANG");
- if (lang) {
- // FILTER( LANG(?value) = "en" || LANG(?value) = "" )
- result = slv2_strjoin(
- //"FILTER (lang(?value) = \"", lang, "\"\n"), 0);
- "FILTER( lang(?", variable, ") = \"", lang,
- "\" || lang(?", variable, ") = \"\" )\n", NULL);
- }
-
- return result;
-}
-#endif
SLV2Values
slv2_query_get_variable_bindings(SLV2World world,
@@ -186,6 +169,9 @@ slv2_plugin_simple_query(SLV2Plugin plugin,
*
* More efficient than slv2_plugin_simple_query if you're only interested
* in the number of results (ie slv2_plugin_num_ports).
+ *
+ * Note the result of this function is probably meaningless unless the query
+ * is a SELECT DISTINCT.
*/
unsigned
slv2_plugin_query_count(SLV2Plugin plugin,
@@ -203,31 +189,3 @@ slv2_plugin_query_count(SLV2Plugin plugin,
return ret;
}
-/*
-size_t
-slv2_query_count_results(SLV2Plugin p,
- const char* query)
-{
- char* query_str = slv2_strjoin(slv2_query_prefixes, query, NULL);
-
- assert(p);
- assert(query_str);
-
- librdf_query *rq = librdf_new_query(p->world->world, "sparql", NULL,
- (unsigned char*)query_str, NULL);
-
- //printf("Query: \n%s\n\n", query_str);
-
- librdf_query_results* results = librdf_query_execute(rq, p->world->model);
- assert(results);
-
- size_t count = slv2_query_count_bindings(results);
-
- librdf_free_query_results(results);
- librdf_free_query(rq);
-
- free(query_str);
-
- return count;
-}
-*/