From a59445e61419af46698380a210019f457e1ef5a6 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 12 Jul 2016 15:00:35 +0200 Subject: blaze822: avoid tolower --- blaze822.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'blaze822.c') diff --git a/blaze822.c b/blaze822.c index 3df50a8..8a9d00c 100644 --- a/blaze822.c +++ b/blaze822.c @@ -16,6 +16,9 @@ // WSP = SP / HTAB #define iswsp(c) (((c) == ' ' || (c) == '\t')) +// ASCII lowercase without alpha check (wrong for "@[\]^_") +#define lc(c) ((c) | 0x20) + #define bufsiz 4096 struct message { @@ -310,7 +313,7 @@ blaze822(char *file) if (s-2 > buf && *(s-2) == '\n') // ex-crlf *(s-2) = 0; while (s < end && *s != ':') { - *s = tolower(*s); + *s = lc(*s); s++; } } -- cgit 1.4.1