mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove strncmp(). It enables to process various options.
This commit is contained in:
+5
-3
@@ -71,9 +71,11 @@ main(int argc, char **argv)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc == 2 && strncmp(argv[1], "-v", 2) == 0) {
|
if (argc == 2 && argv[1][0] == '-') {
|
||||||
printf("verbose mode: enable\n\n");
|
if (argv[1][1] == 'v') {
|
||||||
mrb_gv_set(mrb, mrb_intern(mrb, "$mrbtest_verbose"), mrb_true_value());
|
printf("verbose mode: enable\n\n");
|
||||||
|
mrb_gv_set(mrb, mrb_intern(mrb, "$mrbtest_verbose"), mrb_true_value());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mrb_init_mrbtest(mrb);
|
mrb_init_mrbtest(mrb);
|
||||||
|
|||||||
Reference in New Issue
Block a user