From d288ce4b8180e4c79f61bed85f0fa5d4cd36acc3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 25 Feb 2007 06:08:54 +0000 Subject: Command line app loads again. Loading fixes, works now (except init is messed up). git-svn-id: http://svn.drobilla.net/lad/machina@339 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/Loader.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/engine/Loader.cpp') diff --git a/src/engine/Loader.cpp b/src/engine/Loader.cpp index 078d783..edc4ac4 100644 --- a/src/engine/Loader.cpp +++ b/src/engine/Loader.cpp @@ -57,12 +57,15 @@ Loader::load(const Glib::ustring& uri) rasqal_init(); - //unsigned char* document_uri_str = raptor_uri_filename_to_uri_string(filename.c_str()); - //assert(document_uri_str); - //raptor_uri* document_raptor_uri = raptor_new_uri(document_uri_str); - raptor_uri* document_raptor_uri = raptor_new_uri((const unsigned char*)uri.c_str()); + raptor_uri* base_uri = raptor_new_uri((const unsigned char*)"file:."); - if (!document_raptor_uri) + raptor_uri* document_raptor_uri = raptor_new_uri_relative_to_base( + base_uri, (const unsigned char*)uri.c_str()); + + //raptor_uri* document_raptor_uri = raptor_new_uri_for_retrieval(rel_uri); + //raptor_free_uri(rel_uri); + + if (!document_raptor_uri) return machine; // NULL machine = SharedPtr(new Machine()); @@ -210,6 +213,9 @@ Loader::load(const Glib::ustring& uri) //free(document_uri_str); raptor_free_uri(document_raptor_uri); + raptor_free_uri(base_uri); + + machine->reset(); return machine; } -- cgit v1.2.1