replaced bzero with memset, because bzero is not ansi C standart - Patch by Pak21@users.sourceforge.net

origin
stpohle 22 years ago
parent 97d379a0fb
commit 6cb5275081

@ -1,4 +1,11 @@
$Id: ChangeLog,v 1.39 2003/08/29 23:50:39 stpohle Exp $ $Id: ChangeLog,v 1.40 2003/09/11 19:32:00 stpohle Exp $
- BomberCloneMServ will have even a playerlist of
a game, so you will know who have joined a game.
- added big endian support, so non intel-style
computers will be able to play over the network
now too.
- added liquid and moving bombs special. - added liquid and moving bombs special.

@ -1,4 +1,4 @@
/* $Id: udp.c,v 1.9 2003/05/29 21:35:04 stpohle Exp $ */ /* $Id: udp.c,v 1.10 2003/09/11 19:32:01 stpohle Exp $ */
/* udp.c code for the network /* udp.c code for the network
File Version 0.2 File Version 0.2
*/ */
@ -25,7 +25,6 @@
#ifdef _WIN32 #ifdef _WIN32
#define _sockaddr sockaddr #define _sockaddr sockaddr
#define bzero(a,b) memset(a,'\0',b)
#else #else
#define _sockaddr sockaddr_in6 #define _sockaddr sockaddr_in6
#endif #endif
@ -97,8 +96,8 @@ dns_filladdr (char *host, int hostlen, char *port, int portlen, int ai_family,
else else
addrlen = sizeof (struct sockaddr_in6); addrlen = sizeof (struct sockaddr_in6);
bzero (host, hostlen); memset (host, '\0', hostlen);
bzero (port, portlen); memset (port, '\0', portlen);
if ((err = if ((err =
getnameinfo ((struct sockaddr *) sAddr, addrlen, host, hostlen, port, portlen, getnameinfo ((struct sockaddr *) sAddr, addrlen, host, hostlen, port, portlen,
@ -116,7 +115,7 @@ dns_filladdr (char *host, int hostlen, char *port, int portlen, int ai_family,
else { else {
/* we have to complete the sAddr struct */ /* we have to complete the sAddr struct */
bzero (&hints, sizeof (struct addrinfo)); memset (&hints, '\0', sizeof (struct addrinfo));
hints.ai_family = ai_family; hints.ai_family = ai_family;
hints.ai_socktype = SOCK_DGRAM; hints.ai_socktype = SOCK_DGRAM;
@ -187,7 +186,7 @@ udp_server (char *port, int ai_family)
sock, sock,
ai_family_; ai_family_;
bzero (&hints, sizeof (struct addrinfo)); memset (&hints, '\0', sizeof (struct addrinfo));
hints.ai_flags = AI_PASSIVE; hints.ai_flags = AI_PASSIVE;
hints.ai_family = ai_family; hints.ai_family = ai_family;
@ -261,7 +260,7 @@ udp_get (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family)
clen = sizeof (struct sockaddr_in6); clen = sizeof (struct sockaddr_in6);
#endif #endif
bzero (text, len); memset (text, '\0', len);
// check if we have got any data // check if we have got any data
FD_ZERO (&sockset); FD_ZERO (&sockset);

Loading…
Cancel
Save