view terminal_win.c @ 1529:f7fe240a7da6

Updated fibonacci benchmark code to work with current test harness
author Michael Pavone <pavone@retrodev.com>
date Fri, 23 Mar 2018 22:23:39 -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;
	}
}