diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-10-19 19:16:28 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-10-19 19:16:28 -0700 |
commit | da5249a364aac3ec1b6d28dd7200cf6cdd9a2913 (patch) | |
tree | e7edeec1163420ca06c59eacc88917fa72c8d110 /terminal_win.c | |
parent | 70a4bf6d6b7c79c936e96fc8e3cceb96c125695a (diff) |
Added a command line option to force BlastEm to not open a new terminal even if it detects that stdin/out are not terminals
Diffstat (limited to 'terminal_win.c')
-rw-r--r-- | terminal_win.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/terminal_win.c b/terminal_win.c index 1716fd4..f270308 100644 --- a/terminal_win.c +++ b/terminal_win.c @@ -1,13 +1,20 @@ #include <windows.h> #include <stdio.h> +static char init_done; + +void force_no_terminal() +{ + init_done = 1; +} + void init_terminal() { - static char init_done; if (!init_done) { AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); + init_done = 1; } } |