aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-25 00:46:17 +0000
committerDavid Robillard <d@drobilla.net>2011-01-25 00:46:17 +0000
commite03b4041c0e53c041073402687d7a8a018be83d7 (patch)
tree2e2262d39ddb7a3555a8814f69d51012c8cb5d87
parent18563159fbee5c305719e782ff05482430f43ce6 (diff)
downloadserd-e03b4041c0e53c041073402687d7a8a018be83d7.tar.gz
serd-e03b4041c0e53c041073402687d7a8a018be83d7.tar.bz2
serd-e03b4041c0e53c041073402687d7a8a018be83d7.zip
Remove unused character escape code.
git-svn-id: http://svn.drobilla.net/serd/trunk@58 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r--src/reader.c9
-rw-r--r--tests/test-uri.ttl1
2 files changed, 1 insertions, 9 deletions
diff --git a/src/reader.c b/src/reader.c
index 6d7badbf..468e0f21 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -449,18 +449,11 @@ static inline SerdStatus
read_character(SerdReader reader, Ref dest)
{
const uint8_t c = peek_byte(reader);
+ assert(c != '\\'); // Only called from methods that handle escapes first
switch (c) {
case '\0':
error(reader, "unexpected end of file\n", peek_byte(reader));
return SERD_ERROR;
- case '\\': // 0x5C
- eat_byte(reader, '\\');
- if (read_character_escape(reader, dest)) {
- return SERD_SUCCESS;
- } else {
- error(reader, "invalid escape `\\%c'\n", peek_byte(reader));
- return SERD_ERROR;
- }
default:
if (c < 0x20) { // ASCII control character
error(reader, "unexpected control character\n");
diff --git a/tests/test-uri.ttl b/tests/test-uri.ttl
index d2b4711d..4cae4157 100644
--- a/tests/test-uri.ttl
+++ b/tests/test-uri.ttl
@@ -34,4 +34,3 @@
<http://A#afragment> owl:sameAs <http://A#afragment> .
<?aquery> owl:sameAs <http://a/b/c/d;p?aquery> .
<#afragment> owl:sameAs <http://a/b/c/d;p?q#afragment> .
-