summaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-05-09 01:34:35 +0000
committerDavid Robillard <d@drobilla.net>2007-05-09 01:34:35 +0000
commit3433ad241b069037d780c528ff462b3ce7c2c3be (patch)
treecb7caceaf721cbc7d658a814838dcd924356fb02 /src/world.c
parent9b0b42f31a6e03a5caed14cd73802729c31b6b6e (diff)
downloadlilv-3433ad241b069037d780c528ff462b3ce7c2c3be.tar.gz
lilv-3433ad241b069037d780c528ff462b3ce7c2c3be.tar.bz2
lilv-3433ad241b069037d780c528ff462b3ce7c2c3be.zip
Ontology install path fixes.
0.0.1 versioning stuff. Removed GNU 'standard' files I don't maintain anyway and make automake shutup about it. git-svn-id: http://svn.drobilla.net/lad/slv2@521 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/world.c b/src/world.c
index ff91ead..913a3ff 100644
--- a/src/world.c
+++ b/src/world.c
@@ -294,11 +294,20 @@ slv2_world_load_all(SLV2World world)
char* lv2_path = getenv("LV2_PATH");
/* 1. Read LV2 ontology into model */
- librdf_uri* ontology_uri = librdf_new_uri(world->world,
- (const unsigned char*)"file://" LV2_TTL_PATH);
- librdf_parser_parse_into_model(world->parser, ontology_uri, NULL, world->model);
- librdf_free_uri(ontology_uri);
+ const char* ontology_path = "/usr/local/share/slv2/lv2.ttl";
+ FILE* ontology = fopen(ontology_path, "r");
+ if (ontology == NULL) {
+ ontology_path = "/usr/share/slv2/lv2.ttl";
+ ontology = fopen(ontology_path, "r");
+ }
+ if (ontology) {
+ fclose(ontology);
+ librdf_uri* ontology_uri = librdf_new_uri_from_filename(world->world,
+ ontology_path);
+ librdf_parser_parse_into_model(world->parser, ontology_uri, NULL, world->model);
+ librdf_free_uri(ontology_uri);
+ }
/* 2. Read all manifest files into model */