diff options
| author | cremno <[email protected]> | 2014-01-31 16:06:45 +0100 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-01-31 18:00:36 +0100 |
| commit | 4507985c3ea2b3a7d14745f1f432e544ddeafe93 (patch) | |
| tree | 8dce9e42e85ea6a953b37b7dcce73ce56c277fe4 /tools | |
| parent | 7c9a1accff4c42ec781f14b1ba5abaf0ad1bb037 (diff) | |
| download | mruby-4507985c3ea2b3a7d14745f1f432e544ddeafe93.tar.gz mruby-4507985c3ea2b3a7d14745f1f432e544ddeafe93.zip | |
use mrb_bool, FALSE and TRUE more
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mrbc/mrbc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index e2179d708..8c66a293e 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -110,14 +110,14 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct mrbc_args *args) } break; case 'c': - args->check_syntax = 1; + args->check_syntax = TRUE; break; case 'v': if (!args->verbose) mrb_show_version(mrb); - args->verbose = 1; + args->verbose = TRUE; break; case 'g': - args->debug_info = 1; + args->debug_info = TRUE; break; case 'h': return -1; @@ -130,7 +130,7 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct mrbc_args *args) exit(EXIT_SUCCESS); } else if (strcmp(argv[i] + 2, "verbose") == 0) { - args->verbose = 1; + args->verbose = TRUE; break; } else if (strcmp(argv[i] + 2, "copyright") == 0) { @@ -186,12 +186,12 @@ load_file(mrb_state *mrb, struct mrbc_args *args) mrb_value result; char *input = args->argv[args->idx]; FILE *infile; - int need_close = FALSE; + mrb_bool need_close = FALSE; c = mrbc_context_new(mrb); if (args->verbose) - c->dump_result = 1; - c->no_exec = 1; + c->dump_result = TRUE; + c->no_exec = TRUE; if (input[0] == '-' && input[1] == '\0') { infile = stdin; } |
