view terminal_win.c @ 801:092524bb2e8f

Fix GDB remote debugging support
author Michael Pavone <pavone@retrodev.com>
date Sun, 26 Jul 2015 16:32:34 -0700
parents 792be135d3af
children 1af7d1cdcc66
line wrap: on
line source

#include <windows.h>
#include <stdio.h>

void init_terminal()
{
	static init_done;
	if (!init_done) {
		AllocConsole();
		freopen("CONIN$", "r", stdin);
		freopen("CONOUT$", "w", stdout);
		freopen("CONOUT$", "w", stderr);
	}
}