aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-23 07:54:33 +0000
committerDavid Robillard <d@drobilla.net>2011-01-23 07:54:33 +0000
commita3c9e1dacb76cf0282d8419fa13a41d322046e60 (patch)
treeab46bd50bbf51994ab9779c698ebc35efa16aa01 /src/reader.c
parent983c964a11919f68f62d0a2193204789c27dc99c (diff)
downloadserd-a3c9e1dacb76cf0282d8419fa13a41d322046e60.tar.gz
serd-a3c9e1dacb76cf0282d8419fa13a41d322046e60.tar.bz2
serd-a3c9e1dacb76cf0282d8419fa13a41d322046e60.zip
Test language tags with hyphens.
Remove unused reader->err. git-svn-id: http://svn.drobilla.net/serd/trunk@42 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/reader.c b/src/reader.c
index 057775c8..1c7f6f1c 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -99,7 +99,6 @@ error(SerdReader reader, const char* fmt, ...)
fprintf(stderr, "error: %s:%u:%u: ",
reader->cur.filename, reader->cur.line, reader->cur.col);
vfprintf(stderr, fmt, args);
- reader->err = 1;
return 0;
}
@@ -795,10 +794,6 @@ read_qname(SerdReader reader)
TRY_THROW(eat_byte(reader, ':'));
push_byte(reader, prefix, ':');
Ref str = read_name(reader, prefix, false);
- if (reader->err) {
- pop_string(reader, prefix);
- return 0;
- }
return str ? str : prefix;
except:
pop_string(reader, prefix);
@@ -1315,10 +1310,10 @@ read_statement(SerdReader reader)
static bool
read_turtleDoc(SerdReader reader)
{
- while (!reader->err && !reader->eof) {
+ while (!reader->eof) {
TRY_RET(read_statement(reader));
}
- return !reader->err;
+ return true;
}
SERD_API
@@ -1341,7 +1336,6 @@ serd_reader_new(SerdSyntax syntax,
reader->stack = serd_stack_new(STACK_PAGE_SIZE);
reader->cur = cur;
reader->next_id = 1;
- reader->err = 0;
reader->read_buf = (uint8_t*)malloc(READ_BUF_LEN * 2);
reader->read_head = 0;
reader->eof = false;