diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-30 09:40:53 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-30 09:40:53 +0900 |
| commit | d0c1b7b4a8cad2c5a01ccfbe97ffd0381f592f39 (patch) | |
| tree | 71714f97815fddc471da37f97ceca13f8fd26a45 /tools | |
| parent | bd035bcbb6b6ed79501b073111ca2c5ea8b29dee (diff) | |
| parent | 179b2aceeadcd3c5fdac425737280bb09e0ba2d0 (diff) | |
| download | mruby-d0c1b7b4a8cad2c5a01ccfbe97ffd0381f592f39.tar.gz mruby-d0c1b7b4a8cad2c5a01ccfbe97ffd0381f592f39.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mrbc/mrbc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index 428a3b781..f9810aa4f 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -135,7 +135,10 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args) if (outfile == NULL) outfile = get_outfilename(infile, args->ext); - if ((args->wfp = fopen(outfile, "wb")) == NULL) { + if (strcmp("-", outfile) == 0) { + args->wfp = stdout; + } + else if ((args->wfp = fopen(outfile, "wb")) == NULL) { printf("%s: Cannot open output file. (%s)\n", *origargv, outfile); return 0; } |
