Commit 71c7d587 authored by cremno's avatar cremno

partially revert 1a5841b4 for mirb

Fix compilation fail caused by GNU Readline and `ISPRINT`.
Also add missing `unsigned char` cast.
parent 1a5841b4
...@@ -258,7 +258,7 @@ check_keyword(const char *buf, const char *word) ...@@ -258,7 +258,7 @@ check_keyword(const char *buf, const char *word)
size_t len = strlen(word); size_t len = strlen(word);
/* skip preceding spaces */ /* skip preceding spaces */
while (*p && ISSPACE(*p)) { while (*p && isspace((unsigned char)*p)) {
p++; p++;
} }
/* check keyword */ /* check keyword */
...@@ -268,7 +268,7 @@ check_keyword(const char *buf, const char *word) ...@@ -268,7 +268,7 @@ check_keyword(const char *buf, const char *word)
p += len; p += len;
/* skip trailing spaces */ /* skip trailing spaces */
while (*p) { while (*p) {
if (!ISSPACE(*p)) return 0; if (!isspace((unsigned char)*p)) return 0;
p++; p++;
} }
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment