summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-16 21:49:31 +0000
committerDavid Robillard <d@drobilla.net>2011-04-16 21:49:31 +0000
commit230ee3eb976320cec9e55450c24e6c66fe6ea059 (patch)
tree0d33ba2b209646ca8bd0da2f79b9d73f0ede8a67
parent443928c063df9cdad1b25b1ee6d3b4fd85faf0d0 (diff)
downloadsord-230ee3eb976320cec9e55450c24e6c66fe6ea059.tar.gz
sord-230ee3eb976320cec9e55450c24e6c66fe6ea059.tar.bz2
sord-230ee3eb976320cec9e55450c24e6c66fe6ea059.zip
Update copyright headers
git-svn-id: http://svn.drobilla.net/sord/trunk@75 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r--sord/sordmm.hpp3
-rw-r--r--src/sord.c8
-rw-r--r--src/sord_test.c4
-rw-r--r--src/sordi.c4
-rw-r--r--src/syntax.c9
5 files changed, 13 insertions, 15 deletions
diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp
index a2c8d73..b9c2d08 100644
--- a/sord/sordmm.hpp
+++ b/sord/sordmm.hpp
@@ -109,7 +109,7 @@ public:
inline ~World() {
sord_world_free(_c_obj);
}
-
+
inline uint64_t blank_id() { return _next_blank_id++; }
inline void add_prefix(const std::string& prefix, const std::string& uri) {
@@ -371,7 +371,6 @@ struct Iter : public Wrapper<SordIter> {
World& _world;
};
-
/** An RDF Model (collection of triples).
*/
class Model : public boost::noncopyable, public Wrapper<SordModel> {
diff --git a/src/sord.c b/src/sord.c
index 3152505..6061aa8 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -152,7 +152,7 @@ sord_literal_hash(const void* n)
SordNode node = (SordNode)n;
return g_str_hash(node->buf) + (node->lang ? g_str_hash(node->lang) : 0);
}
-
+
static gboolean
sord_literal_equal(const void* a, const void* b)
{
@@ -1015,7 +1015,7 @@ void
sord_remove(SordModel sord, const SordQuad tup)
{
SORD_WRITE_LOG("Remove " TUP_FMT "\n", TUP_FMT_ARGS(tup));
-
+
for (unsigned i = 0; i < NUM_ORDERS; ++i) {
if (sord->indices[i]) {
const int* const ordering = orderings[i];
@@ -1045,7 +1045,7 @@ sord_remove_iter(SordModel sord, SordIter iter)
sord_iter_get(iter, tup);
SORD_WRITE_LOG("Remove " TUP_FMT "\n", TUP_FMT_ARGS(tup));
-
+
// TODO: Directly remove the iterator's index (avoid one search)
for (unsigned i = 0; i < NUM_ORDERS; ++i) {
@@ -1062,7 +1062,7 @@ sord_remove_iter(SordModel sord, SordIter iter)
}
}
}
-
+
for (int i = 0; i < TUP_LEN; ++i)
sord_drop_quad_ref(sord, tup[i]);
diff --git a/src/sord_test.c b/src/sord_test.c
index feaead2..3178539 100644
--- a/src/sord_test.c
+++ b/src/sord_test.c
@@ -269,7 +269,7 @@ test_write(SordModel sord, const size_t n_quads, const int n_objects_per)
int ret = EXIT_SUCCESS;
fprintf(stderr, "Removing Statements... ");
-
+
// Remove statements
SordIter iter;
for (iter = sord_begin(sord); !sord_iter_end(iter);) {
@@ -284,7 +284,7 @@ test_write(SordModel sord, const size_t n_quads, const int n_objects_per)
}
fprintf(stderr, "OK\n\n");
-
+
return ret;
}
diff --git a/src/sordi.c b/src/sordi.c
index 0ff05af..8237b79 100644
--- a/src/sordi.c
+++ b/src/sordi.c
@@ -43,7 +43,7 @@ int
print_version()
{
printf("sordi " SORD_VERSION " <http://drobilla.net/software/sord>\n");
- printf("Copyright (C) 2011 David Robillard <http://drobilla.net>.\n"
+ printf("Copyright 2011-2011 David Robillard <http://drobilla.net>.\n"
"\nLicense: Simplified BSD License.\n"
"This is free software; you are free to change and redistribute it."
"\nThere is NO WARRANTY, to the extent permitted by law.\n");
@@ -164,6 +164,6 @@ main(int argc, char** argv)
serd_env_free(env);
sord_free(sord);
-
+
return success ? 0 : 1;
}
diff --git a/src/syntax.c b/src/syntax.c
index e2a2df2..91faf8b 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -284,7 +284,7 @@ sord_read_string(SordModel model,
}
SerdEnv env = serd_env_new();
-
+
SerdReadState read_state = serd_read_state_new(env, base_uri_str);
ReadState state = { NULL, env, read_state, NULL,
@@ -353,11 +353,11 @@ sord_write(const SordModel model,
sord_node_to_serd_node(quad[SORD_SUBJECT], &subject);
sord_node_to_serd_node(quad[SORD_PREDICATE], &predicate);
sord_node_to_serd_node(quad[SORD_OBJECT], &object);
-
+
sord_node_to_serd_node(sord_node_get_datatype(quad[SORD_OBJECT]), &datatype);
const char* lang_str = sord_node_get_language(quad[SORD_OBJECT]);
size_t lang_len = lang_str ? strlen(lang_str) : 0;
-
+
SerdNode language = SERD_NODE_NULL;
if (lang_str) {
language.type = SERD_LITERAL;
@@ -365,14 +365,13 @@ sord_write(const SordModel model,
language.n_chars = lang_len; // FIXME: UTF-8
language.buf = (const uint8_t*)lang_str;
};
-
+
serd_writer_write_statement(writer, &s_graph,
&subject, &predicate, &object,
&datatype, &language);
}
}
-
static SerdWriter
make_writer(SerdEnv env,
const uint8_t* base_uri_str_in,