From 3ed6969828fd56257c7cfcbc335f4e4e428a3faa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 23 Jan 2008 20:20:07 +0000 Subject: Trim useless cruft. Disable unused parameter warning with --enable-strict. git-svn-id: http://svn.drobilla.net/lad/slv2@1106 a436a847-0d15-0410-975c-d299462d15a1 --- src/query.c | 48 +++--------------------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) (limited to 'src/query.c') 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: \n" "PREFIX lv2ev: \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; -} -*/ -- cgit v1.2.1