mirror of https://gitea.it/1414codeforge/ubgpsuite
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
688 B
C
42 lines
688 B
C
3 years ago
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||
|
|
||
|
/**
|
||
|
* \file sys/con_windows.c
|
||
|
*
|
||
|
* Implement Windows console Input/Output.
|
||
|
*
|
||
|
* \copyright The DoubleFourteen Code Forge (C) All Rights Reserved
|
||
|
* \author Lorenzo Cogotti
|
||
|
*/
|
||
|
|
||
|
#include "sys/con.h"
|
||
|
|
||
|
#include <windows.h>
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
#error "Sorry, not fully implemented yet!"
|
||
|
|
||
|
Fildes CON_FILDES(ConHn hn)
|
||
|
{
|
||
|
return GetStdHandle(hn);
|
||
|
}
|
||
|
|
||
|
void Sys_VPrintf(ConHn hn, const char *fmt, va_list va)
|
||
|
{
|
||
|
HANDLE con = GetStdHandle(hn);
|
||
|
if (!con)
|
||
|
return; // No console associated yet
|
||
|
|
||
|
// FIXME implement
|
||
|
}
|
||
|
|
||
|
void Sys_Printf(ConHn hn, const char *fmt, ...)
|
||
|
{
|
||
|
va_list va;
|
||
|
|
||
|
va_start(va, fmt);
|
||
|
Sys_VPrintf(hn, fmt, va);
|
||
|
va_end(va);
|
||
|
}
|