diff options
Diffstat (limited to 'mrbgems/mruby-bin-mirb/tools/mirb/mirb.c')
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 8d7c719d8..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"; @@ -230,7 +230,7 @@ usage(const char *name) { static const char *const usage_msg[] = { "switches:", - "-d set $DEBUG to true (same as `mruby -d`)" + "-d set $DEBUG to true (same as `mruby -d`)", "-r library same as `mruby -r`", "-v print version number, then run in verbose mode", "--verbose run in verbose mode", @@ -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; |
