net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-06-21 12:20:25 +00:00
parent dd05f2d23b
commit 2bed6c79c9
6 changed files with 190 additions and 189 deletions

View file

@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h"
#include "net_defs.h"
#include "net_loop.h"
#include "net_dgrm.h"
#include "net_loop.h"
net_driver_t net_drivers[MAX_NET_DRIVERS] =
{
@ -43,8 +43,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
Loop_CanSendUnreliableMessage,
Loop_Close,
Loop_Shutdown
}
,
},
{
"Datagram",
false,

View file

@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// net_dgrm.h
int Datagram_Init (void);
void Datagram_Listen (qboolean state);
void Datagram_SearchForHosts (qboolean xmit);

View file

@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// net_loop.c
#include "arch_def.h"
@ -26,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "net_defs.h"
#include "net_loop.h"
qboolean localconnectpending = false;
qsocket_t *loop_client = NULL;
qsocket_t *loop_server = NULL;
static qboolean localconnectpending = false;
static qsocket_t *loop_client = NULL;
static qsocket_t *loop_server = NULL;
int Loop_Init (void)
{
@ -166,7 +167,7 @@ int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
if ((*bufferLength + data->cursize + 4) > NET_MAXMESSAGE)
Sys_Error("Loop_SendMessage: overflow\n");
Sys_Error("Loop_SendMessage: overflow");
buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
@ -247,3 +248,4 @@ void Loop_Close (qsocket_t *sock)
else
loop_server = NULL;
}

View file

@ -25,9 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h"
#include "net_defs.h"
#include "net_loop.h"
#include "net_dgrm.h"
#include "net_sdlnet.h"
#include "net_loop.h"
net_driver_t net_drivers[MAX_NET_DRIVERS] =
{
@ -46,8 +45,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
Loop_CanSendUnreliableMessage,
Loop_Close,
Loop_Shutdown
}
,
},
{
"Datagram",
false,
@ -68,6 +67,7 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
int net_numdrivers = 2;
#include "net_sdlnet.h"
net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
{

View file

@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h"
#include "net_defs.h"
#include "net_loop.h"
#include "net_dgrm.h"
#include "net_loop.h"
net_driver_t net_drivers[MAX_NET_DRIVERS] =
{
@ -44,8 +44,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
Loop_CanSendUnreliableMessage,
Loop_Close,
Loop_Shutdown
}
,
},
{
"Datagram",
false,
@ -95,6 +95,7 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
WINS_GetSocketPort,
WINS_SetSocketPort
},
{
"Winsock IPX",
false,
@ -118,7 +119,6 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
WIPX_GetSocketPort,
WIPX_SetSocketPort
}
};
int net_numlandrivers = 2;