Commit 179b2ace authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #406 from MobiRuby/mrbc_stdin

Added mrbc support output to stdout
parents e56cd70c ef993d75
...@@ -135,7 +135,10 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args) ...@@ -135,7 +135,10 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
if (outfile == NULL) if (outfile == NULL)
outfile = get_outfilename(infile, args->ext); 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); printf("%s: Cannot open output file. (%s)\n", *origargv, outfile);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment