nouveau.hidd: disable warnings about not initialized variables
[AROS.git] / arch / all-mingw32 / kernel / host_debug.c
blobc00e7724246c313e61e002b8068fcf5ba4d9b819
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <windows.h>
8 #include "host_intern.h"
10 HANDLE conin, conout;
12 int __declspec(dllexport) __aros core_putc(char c)
14 DWORD cnt;
16 WriteConsole(conout, &c, 1, &cnt, NULL);
17 return cnt;
20 int __declspec(dllexport) __aros core_getc(void)
22 DWORD cnt;
23 INPUT_RECORD input;
27 if (!PeekConsoleInput(conin, &input, 1, &cnt))
28 return -1;
29 if (cnt < 1)
30 return -1;
32 if (!ReadConsoleInput(conin, &input, 1, &cnt))
33 return -1;
34 /* Control keys also generate events with zero character, so we ignore them */
35 } while ((input.EventType != KEY_EVENT) || (!input.Event.KeyEvent.bKeyDown) ||
36 (!input.Event.KeyEvent.uChar.AsciiChar));
38 return input.Event.KeyEvent.uChar.AsciiChar;
41 void __declspec(dllexport) __aros core_alert(const char *text)
43 MessageBox(NULL, text, "AROS guru meditation", MB_ICONERROR|MB_SETFOREGROUND);