diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/globals.h | 1 | ||||
| -rw-r--r-- | src/menu.c | 2 | ||||
| -rw-r--r-- | src/util.c | 8 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/globals.h b/src/globals.h index bf37e8b..bb5450e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -98,6 +98,7 @@ extern bool have_color; /* restricted mode disables things that would be considered "dangerous" when used in a web-facing script such as interactive loading/saving */ extern bool restricted; +extern bool batch_mode; #define COL_NORM 0 #define COL_RED 1 @@ -72,6 +72,8 @@ exec_cmd: if(best_command >= 0) { + if(batch_mode) + output("\n"); commands[best_command].handler(player); output("\n"); } @@ -531,13 +531,9 @@ void curses_init(void) } } -int dummy_output(const char* f, ...) -{ - (void) f; - return 0; -} +bool batch_mode = false; void batch_init(void) { - output = dummy_output; + batch_mode = true; } |