#include "quakedef.h"
#include "winquake.h"
-extern cvar_t hostname;
-
#define MAXHOSTNAMELEN 256
static int net_acceptsocket = -1; // socket for fielding new connections
MSG msg;
BOOL ret;
- if ((Sys_FloatTime() - blocktime) > 2.0)
+ if ((Sys_DoubleTime() - blocktime) > 2.0)
{
WSACancelBlockingCall();
- return FALSE;
+ return false;
}
/* get the next message, if any */
DispatchMessage(&msg);
}
- /* TRUE if we got a message */
+ /* true if we got a message */
return ret;
}
-void WINS_GetLocalAddress()
+void WINS_GetLocalAddress(void)
{
struct hostent *local = NULL;
char buff[MAXHOSTNAMELEN];
if (pgethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
return;
- blocktime = Sys_FloatTime();
+ blocktime = Sys_DoubleTime();
WSASetBlockingHook(BlockingHook);
local = pgethostbyname(buff);
WSAUnhookBlockingHook();
myAddr = *(int *)local->h_addr_list[0];
addr = ntohl(myAddr);
- sprintf(my_tcpip_address, "%d.%d.%d.%d", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
+ sprintf(my_tcpip_address, "%d.%d.%d.%d", (int) ((addr >> 24) & 0xff), (int) ((addr >> 16) & 0xff), (int) ((addr >> 8) & 0xff), (int) (addr & 0xff));
}
//=============================================================================
-int WINS_Read (int socket, byte *buf, int len, struct qsockaddr *addr)
+int WINS_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr)
{
int addrlen = sizeof (struct qsockaddr);
int ret;
//=============================================================================
-int WINS_Broadcast (int socket, byte *buf, int len)
+int WINS_Broadcast (int socket, qbyte *buf, int len)
{
int ret;
//=============================================================================
-int WINS_Write (int socket, byte *buf, int len, struct qsockaddr *addr)
+int WINS_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr)
{
int ret;
return 0;
}
-//=============================================================================