mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #406 from MobiRuby/mrbc_stdin
Added mrbc support output to stdout
This commit is contained in:
+4
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user