diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-25 21:06:54 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-25 22:05:31 +0900 |
| commit | a5a6b51126875e578ef1834c8af06141934df7dd (patch) | |
| tree | c4ea44615f5b3ee1e9fdb3b9514bfe7e8200d712 /mrbgems/mruby-bin-mirb | |
| parent | 1e14afa4e4c73f268ee406a6de081cfdad635fa7 (diff) | |
| download | mruby-a5a6b51126875e578ef1834c8af06141934df7dd.tar.gz mruby-a5a6b51126875e578ef1834c8af06141934df7dd.zip | |
Use uppercase version of `ctype` macros e.g. `ISSPACE`; fix #4338
Diffstat (limited to 'mrbgems/mruby-bin-mirb')
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 22 |
1 files changed, 11 insertions, 11 deletions
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 <mruby.h> +#include <mruby/array.h> +#include <mruby/proc.h> +#include <mruby/compile.h> +#include <mruby/dump.h> +#include <mruby/string.h> +#include <mruby/variable.h> +#include <mruby/throw.h> + #include <stdlib.h> #include <string.h> #include <stdio.h> @@ -49,15 +58,6 @@ #define SIGJMP_BUF jmp_buf #endif -#include <mruby.h> -#include <mruby/array.h> -#include <mruby/proc.h> -#include <mruby/compile.h> -#include <mruby/dump.h> -#include <mruby/string.h> -#include <mruby/variable.h> -#include <mruby/throw.h> - #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; |
