// conproc.c
#include <windows.h>
+#include <wchar.h>
#include "conproc.h"
#include "quakedef.h"
heventChildSend = heventChild;
// so we'll know when to go away.
- heventDone = CreateEvent (NULL, FALSE, FALSE, NULL);
+ heventDone = CreateEvent (NULL, false, false, NULL);
if (!heventDone)
{
while (1)
{
- dwRet = WaitForMultipleObjects (2, heventWait, FALSE, INFINITE);
+ dwRet = WaitForMultipleObjects (2, heventWait, false, INFINITE);
// heventDone fired, so we're exiting.
if (dwRet == WAIT_OBJECT_0 + 1)
upper = toupper(*sz);
rec.EventType = KEY_EVENT;
- rec.Event.KeyEvent.bKeyDown = TRUE;
+ rec.Event.KeyEvent.bKeyDown = true;
rec.Event.KeyEvent.wRepeatCount = 1;
rec.Event.KeyEvent.wVirtualKeyCode = upper;
rec.Event.KeyEvent.wVirtualScanCode = CharToCode (*sz);
1,
&dwWritten);
- rec.Event.KeyEvent.bKeyDown = FALSE;
+ rec.Event.KeyEvent.bKeyDown = false;
WriteConsoleInput(
hStdin,
sz++;
}
- return TRUE;
+ return true;
}
cx = coordMax.X;
if (!GetConsoleScreenBufferInfo(hStdout, &info))
- return FALSE;
+ return false;
// height
info.srWindow.Left = 0;
if (cy < info.dwSize.Y)
{
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
+ if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
+ return false;
info.dwSize.Y = cy;
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
+ return false;
}
else if (cy > info.dwSize.Y)
{
info.dwSize.Y = cy;
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
+ return false;
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
+ if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
+ return false;
}
if (!GetConsoleScreenBufferInfo(hStdout, &info))
- return FALSE;
+ return false;
// width
info.srWindow.Left = 0;
if (cx < info.dwSize.X)
{
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
+ if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
+ return false;
info.dwSize.X = cx;
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
+ return false;
}
else if (cx > info.dwSize.X)
{
info.dwSize.X = cx;
if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
+ return false;
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
+ if (!SetConsoleWindowInfo(hStdout, true, &info.srWindow))
+ return false;
}
- return TRUE;
+ return true;
}