view terminal_win.c @ 1079:329ff62ea391

Add a new memory map flag to support an auxilliary buffer for translating code from MMAP_PTR_IDX chunks for which the pointer is null
author Michael Pavone <pavone@retrodev.com>
date Tue, 04 Oct 2016 18:30:24 -0700
parents 0433fdd9ba66
children
line wrap: on
line source

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

static char init_done;

void force_no_terminal()
{
	init_done = 1;
}

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