(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
This commit is contained in:
@@ -52,8 +52,8 @@ bool NetworkCoreInitialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // __AMIGA__
|
||||
#endif // __MORPHOS__ / __AMIGA__
|
||||
#endif /* __AMIGA__ */
|
||||
#endif /* __MORPHOS__ / __AMIGA__ */
|
||||
|
||||
/* Let's load the network in windows */
|
||||
#ifdef WIN32
|
||||
|
@@ -200,7 +200,7 @@ void NetworkFindBroadcastIPs(uint32 *broadcast, int limit)
|
||||
/* Now display to the debug all the detected ips */
|
||||
DEBUG(net, 3, "Detected broadcast addresses:");
|
||||
for (int i = 0; broadcast[i] != 0; i++) {
|
||||
DEBUG(net, 3, "%d) %s", i, inet_ntoa(*(struct in_addr *)&broadcast[i])); //inet_ntoa(inaddr));
|
||||
DEBUG(net, 3, "%d) %s", i, inet_ntoa(*(struct in_addr *)&broadcast[i])); // inet_ntoa(inaddr));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ typedef unsigned long in_addr_t;
|
||||
# include <sys/ioctl.h>
|
||||
# if defined(__BEOS__) && defined(BEOS_NET_SERVER)
|
||||
# include <be/net/socket.h>
|
||||
# include <be/kernel/OS.h> // snooze()
|
||||
# include <be/kernel/OS.h> /* snooze() */
|
||||
# include <be/net/netdb.h>
|
||||
typedef unsigned long in_addr_t;
|
||||
# define INADDR_NONE INADDR_BROADCAST
|
||||
@@ -85,7 +85,7 @@ typedef unsigned long in_addr_t;
|
||||
# include <errno.h>
|
||||
# include <sys/time.h>
|
||||
# include <netdb.h>
|
||||
#endif // UNIX
|
||||
#endif /* UNIX */
|
||||
|
||||
#ifdef __BEOS__
|
||||
typedef int socklen_t;
|
||||
@@ -146,13 +146,13 @@ typedef unsigned long in_addr_t;
|
||||
/* MorphOS and Amiga stuff */
|
||||
#if defined(__MORPHOS__) || defined(__AMIGA__)
|
||||
# include <exec/types.h>
|
||||
# include <proto/exec.h> // required for Open/CloseLibrary()
|
||||
# include <proto/exec.h> /* required for Open/CloseLibrary() */
|
||||
/* MorphOS defines his network functions with UBYTE arrays while we
|
||||
* use char arrays. This gives tons of unneeded warnings */
|
||||
# define UBYTE char
|
||||
# if defined(__MORPHOS__)
|
||||
# include <sys/filio.h> // FIO* defines
|
||||
# include <sys/sockio.h> // SIO* defines
|
||||
# include <sys/filio.h> /* FIO* defines */
|
||||
# include <sys/sockio.h> /* SIO* defines */
|
||||
# include <netinet/in.h>
|
||||
# else /* __AMIGA__ */
|
||||
# include <proto/socket.h>
|
||||
@@ -174,7 +174,7 @@ typedef unsigned long in_addr_t;
|
||||
extern struct MsgPort *TimerPort;
|
||||
extern struct timerequest *TimerRequest;
|
||||
# endif
|
||||
#endif // __MORPHOS__ || __AMIGA__
|
||||
#endif /* __MORPHOS__ || __AMIGA__ */
|
||||
|
||||
static inline bool SetNonBlocking(SOCKET d)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ static inline bool SetNonBlocking(SOCKET d)
|
||||
static inline bool SetNoDelay(SOCKET d)
|
||||
{
|
||||
/* XXX should this be done at all? */
|
||||
#if !defined(BEOS_NET_SERVER) // not implemented on BeOS net_server
|
||||
#if !defined(BEOS_NET_SERVER) /* not implemented on BeOS net_server */
|
||||
int b = 1;
|
||||
/* The (const char*) cast is needed for windows */
|
||||
return setsockopt(d, IPPROTO_TCP, TCP_NODELAY, (const char*)&b, sizeof(b)) == 0;
|
||||
|
@@ -50,7 +50,7 @@ bool NetworkUDPSocketHandler::Listen(const uint32 host, const uint16 port, const
|
||||
if (broadcast) {
|
||||
/* Enable broadcast */
|
||||
unsigned long val = 1;
|
||||
#ifndef BEOS_NET_SERVER // will work around this, some day; maybe.
|
||||
#ifndef BEOS_NET_SERVER /* will work around this, some day; maybe. */
|
||||
setsockopt(this->sock, SOL_SOCKET, SO_BROADCAST, (char *) &val , sizeof(val));
|
||||
#endif
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i
|
||||
*dst = c;
|
||||
dst = &c->next;
|
||||
}
|
||||
} /* Fallthrough */
|
||||
} // Fallthrough
|
||||
case 3:
|
||||
info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
|
||||
info->start_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
|
||||
|
Reference in New Issue
Block a user