From a5a6b51126875e578ef1834c8af06141934df7dd Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 25 Mar 2019 21:06:54 +0900 Subject: Use uppercase version of `ctype` macros e.g. `ISSPACE`; fix #4338 --- mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'mrbgems/mruby-bin-mirb/tools/mirb/mirb.c') diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 9519d88bb..17b2ca16c 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -6,6 +6,15 @@ ** immediately. It's a REPL... */ +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -49,15 +58,6 @@ #define SIGJMP_BUF jmp_buf #endif -#include -#include -#include -#include -#include -#include -#include -#include - #ifdef ENABLE_READLINE static const char history_file_name[] = ".mirb_history"; @@ -373,7 +373,7 @@ check_keyword(const char *buf, const char *word) size_t len = strlen(word); /* skip preceding spaces */ - while (*p && isspace((unsigned char)*p)) { + while (*p && ISSPACE(*p)) { p++; } /* check keyword */ @@ -383,7 +383,7 @@ check_keyword(const char *buf, const char *word) p += len; /* skip trailing spaces */ while (*p) { - if (!isspace((unsigned char)*p)) return 0; + if (!ISSPACE(*p)) return 0; p++; } return 1; -- cgit v1.2.3