]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - conproc.c
-Changed HostCache to ServerList (and a few other pure name changes)
[xonotic/darkplaces.git] / conproc.c
index 38e031bd7b68333cd66d31fe050765cd91abe8c6..63a1e465355256b3066d01510e8b263f83cc24ba 100644 (file)
--- 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 <windows.h>
-#include "conproc.h"
+#include <wchar.h>
 #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;
 }