From bee8b42029900ca034675c54d98813a61ca4407a Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 26 Jul 2015 01:11:04 -0700 Subject: Spawn a terminal for the debugger when needed if we are not already attached to one --- terminal_win.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 terminal_win.c (limited to 'terminal_win.c') diff --git a/terminal_win.c b/terminal_win.c new file mode 100644 index 0000000..120a086 --- /dev/null +++ b/terminal_win.c @@ -0,0 +1,13 @@ +#include +#include + +void init_terminal() +{ + static init_done; + if (!init_done) { + AllocConsole(); + freopen("CONIN$", "r", stdin); + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } +} -- cgit v1.2.3