diff options
author | David Robillard <d@drobilla.net> | 2017-09-24 16:35:44 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-09-24 19:02:59 +0200 |
commit | f1d036ccba93c9e9d89dcbdae720887a630a35e5 (patch) | |
tree | cc19501cdb1aaa59c17bc2ccef4495c528c2cfc6 /src/reader.c | |
parent | 8d954ab071e286f0b2bdfc542bb3725eb5a2ab0e (diff) | |
download | serd-f1d036ccba93c9e9d89dcbdae720887a630a35e5.tar.gz serd-f1d036ccba93c9e9d89dcbdae720887a630a35e5.tar.bz2 serd-f1d036ccba93c9e9d89dcbdae720887a630a35e5.zip |
Make serdi syntax options case-insensitive
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/reader.c b/src/reader.c index 9e30f9c1..788d0a74 100644 --- a/src/reader.c +++ b/src/reader.c @@ -1593,14 +1593,7 @@ tokcmp(SerdReader* reader, Ref ref, const char* tok, size_t n) if (!node || node->n_bytes != n) { return -1; } - const char* s1 = (const char*)node->buf; - const char* s2 = tok; - for (; n > 0 && *s2; s1++, s2++, --n) { - if (toupper(*s1) != toupper(*s2)) { - return ((*(uint8_t*)s1 < *(uint8_t*)s2) ? -1 : +1); - } - } - return 0; + return serd_strncasecmp((const char*)node->buf, tok, n); } static bool |