mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrdb, mirb: Add fflush() so that a external program can read output immediately.
This commit is contained in:
@@ -480,6 +480,7 @@ get_and_parse_command(mrb_state *mrb, mrdb_state *mrdb)
|
||||
while (!cmd) {
|
||||
for (p=NULL; !p || *p=='\0'; ) {
|
||||
printf("(%s:%d) ", mrdb->dbg->prvfile, mrdb->dbg->prvline);
|
||||
fflush(stdout);
|
||||
p = get_command(mrb, mrdb);
|
||||
}
|
||||
|
||||
|
||||
@@ -281,6 +281,7 @@ print_cmdline(int code_block_open)
|
||||
else {
|
||||
printf("> ");
|
||||
}
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user