From fcdfb13091eee0066e7e45ba6fcae375202b6389 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Jan 2011 20:19:05 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/serd/trunk@26 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/reader.c | 14 +++++++++----- 1 file 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; } -- cgit v1.2.1