X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=conproc.c;h=63a1e465355256b3066d01510e8b263f83cc24ba;hb=6e5e2170b2b4746be89fb3d736a2d23bad682717;hp=38e031bd7b68333cd66d31fe050765cd91abe8c6;hpb=8dcce44300385b12c46d494c06aadcfa35a8bc14;p=xonotic%2Fdarkplaces.git diff --git a/conproc.c b/conproc.c index 38e031bd..63a1e465 100644 --- a/conproc.c +++ b/conproc.c @@ -20,8 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // conproc.c #include -#include "conproc.h" +#include #include "quakedef.h" +#include "conproc.h" HANDLE heventDone; HANDLE hfileBuffer; @@ -54,11 +55,11 @@ void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild) 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; } @@ -70,7 +71,7 @@ void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild) &dwID)) { CloseHandle (heventDone); - Con_SafePrintf ("Couldn't create QHOST thread\n"); + Con_Print("Couldn't create QHOST thread\n"); return; } @@ -102,7 +103,7 @@ DWORD RequestProc (DWORD dwNichts) 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) @@ -113,7 +114,7 @@ DWORD RequestProc (DWORD dwNichts) // hfileBuffer is invalid. Just leave. if (!pBuffer) { - Con_SafePrintf ("Invalid hfileBuffer\n"); + Con_Print("Invalid hfileBuffer\n"); break; } @@ -231,7 +232,7 @@ BOOL WriteText (LPCTSTR szText) 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); @@ -245,7 +246,7 @@ BOOL WriteText (LPCTSTR szText) 1, &dwWritten); - rec.Event.KeyEvent.bKeyDown = FALSE; + rec.Event.KeyEvent.bKeyDown = false; WriteConsoleInput( hStdin, @@ -256,7 +257,7 @@ BOOL WriteText (LPCTSTR szText) sz++; } - return TRUE; + return true; } @@ -299,7 +300,7 @@ BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy) cx = coordMax.X; if (!GetConsoleScreenBufferInfo(hStdout, &info)) - return FALSE; + return false; // height info.srWindow.Left = 0; @@ -309,27 +310,27 @@ BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy) 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; @@ -339,25 +340,25 @@ BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy) 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; }