--- deliantra/server/include/network.h 2006/12/15 19:59:19 1.1 +++ deliantra/server/include/network.h 2006/12/16 03:08:26 1.4 @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - The authors can be reached via e-mail at crossfire-devel@real-time.com + The authors can be reached via e-mail at crossfire@schmorp.de */ /* This file defines various flags that both the new client and @@ -41,8 +41,10 @@ */ -#ifndef NEWCLIENT_H -#define NEWCLIENT_H +#ifndef NETWORK_H +#define NETWORK_H + +#include /* Maximum size of any packet we expect. Using this makes it so we don't need to * allocated and deallocated the same buffer over and over again and the price @@ -308,7 +310,15 @@ packet &operator <<(const char *v); packet &operator <<(const shstr &sh) { return *this << data (&sh, sh.length ()); } - void printf (const char *format, ...); + void vprintf (const char *format, va_list ap); + + void printf (const char *format, ...) + { + va_list ap; + va_start (ap, format); + vprintf (format, ap); + va_end (ap); + } }; inline uint16 net_uint16 (uint8 *data) { return (data [0] << 8) | data [1]; }