From 230ee3eb976320cec9e55450c24e6c66fe6ea059 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Apr 2011 21:49:31 +0000 Subject: Update copyright headers git-svn-id: http://svn.drobilla.net/sord/trunk@75 3d64ff67-21c5-427c-a301-fe4f08042e5a --- src/sord.c | 8 ++++---- src/sord_test.c | 4 ++-- src/sordi.c | 4 ++-- src/syntax.c | 9 ++++----- 4 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src') 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 " \n"); - printf("Copyright (C) 2011 David Robillard .\n" + printf("Copyright 2011-2011 David Robillard .\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, -- cgit v1.2.1