aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-21 20:19:05 +0000
committerDavid Robillard <d@drobilla.net>2011-01-21 20:19:05 +0000
commitfcdfb13091eee0066e7e45ba6fcae375202b6389 (patch)
treef46cae968584327889b7234d03ff3b0172403b5d /src/reader.c
parent846e313f10b21575119037581fbf985ef0793eb3 (diff)
downloadserd-fcdfb13091eee0066e7e45ba6fcae375202b6389.tar.gz
serd-fcdfb13091eee0066e7e45ba6fcae375202b6389.tar.bz2
serd-fcdfb13091eee0066e7e45ba6fcae375202b6389.zip
Tidy.
git-svn-id: http://svn.drobilla.net/serd/trunk@26 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/reader.c b/src/reader.c
index 1df3c110..bfdfa8ba 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1349,19 +1349,23 @@ serd_reader_read_file(SerdReader reader, FILE* file, const uint8_t* name)
#define RDF_FIRST "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
#define RDF_REST "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
#define RDF_NIL "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
- SerdReader const me = (SerdReader)reader;
- const Cursor cur = { name, 1, 1 };
- me->fd = file;
- me->cur = cur;
+ SerdReader const me = (SerdReader)reader;
+ const Cursor cur = { name, 1, 1 };
+
+ me->fd = file;
+ me->cur = cur;
me->rdf_first = make_node(URI, push_string(me, RDF_FIRST, 49), 0, 0);
me->rdf_rest = make_node(URI, push_string(me, RDF_REST, 48), 0, 0);
me->rdf_nil = make_node(URI, push_string(me, RDF_NIL, 47), 0, 0);
+
fread(me->read_buf, 1, READ_BUF_LEN, file);
const bool ret = read_turtleDoc(me);
+
pop_string(me, me->rdf_nil.value);
pop_string(me, me->rdf_rest.value);
pop_string(me, me->rdf_first.value);
- me->fd = 0;
me->cur = cur;
+ me->fd = 0;
+
return ret;
}