// conproc.c
#include <windows.h>
-#include "conproc.h"
+#include <wchar.h>
#include "quakedef.h"
+#include "conproc.h"
HANDLE heventDone;
HANDLE hfileBuffer;
heventChildSend = heventChild;
// so we'll know when to go away.
- heventDone = CreateEvent (NULL, FALSE, FALSE, NULL);
+ heventDone = CreateEvent (NULL, false, false, NULL);
if (!heventDone)
{
- Con_SafePrintf ("Couldn't create heventDone\n");
+ Con_Print("Couldn't create heventDone\n");
return;
}
&dwID))
{
CloseHandle (heventDone);
- Con_SafePrintf ("Couldn't create QHOST thread\n");
+ Con_Print("Couldn't create QHOST thread\n");
return;
}
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)
// hfileBuffer is invalid. Just leave.
if (!pBuffer)
{
- Con_SafePrintf ("Invalid hfileBuffer\n");
+ Con_Print("Invalid hfileBuffer\n");
break;
}
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;
}