diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-01-19 08:30:52 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-01-19 08:30:52 +0900 |
| commit | d764632f8601db38fedef22253607a1c8e60c929 (patch) | |
| tree | 1d9fcc97b4221212f6dd9f4b4708ae7dc50ffb94 | |
| parent | 1c48be7822f73330236539bb7fd6b94dac8a2ee3 (diff) | |
| parent | 71548aabb7c399a0c70d0ab3816762f6f5d4eb03 (diff) | |
| download | mruby-d764632f8601db38fedef22253607a1c8e60c929.tar.gz mruby-d764632f8601db38fedef22253607a1c8e60c929.zip | |
Merge pull request #2680 from sdottaka/add-fflush
mrdb, mirb: Add fflush() so that a external program can read output imme...
| -rwxr-xr-x | mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c | 1 | ||||
| -rwxr-xr-x | mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c | 1 | ||||
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c index a4e7fbffb..b40915909 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c @@ -466,6 +466,7 @@ dbgcmd_quit(mrb_state *mrb, mrdb_state *mrdb) int buf; printf("The program is running. Exit anyway? (y or n) "); + fflush(stdout); if ((buf = getchar()) == EOF) { mrdb->dbg->xm = DBG_QUIT; diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c index 06270401c..da235fad8 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c @@ -478,6 +478,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); } diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 59f7fd5e6..0f3649a35 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -278,6 +278,7 @@ print_cmdline(int code_block_open) else { printf("> "); } + fflush(stdout); } #endif |
