mirror of
https://codeberg.org/1414codeforge/ubgpsuite.git
synced 2025-06-05 21:29:11 +02:00
[*] Initial commit
This commit is contained in:
41
lonetix/sys/con_windows.c
Executable file
41
lonetix/sys/con_windows.c
Executable file
@@ -0,0 +1,41 @@
|
||||
// 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);
|
||||
}
|
Reference in New Issue
Block a user