~ubuntu-branches/ubuntu/maverick/crossfire-client/maverick

« back to all changes in this revision

Viewing changes to common/newsocket.c

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2007-04-13 21:15:44 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070413211544-vjo6zesj6g0wgmwf
Tags: 1.10.0-1
* New upstream release
* Install the README, README-dev and TODO files specific to the GTK2
  client to the corresponding package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
const char *rcsid_common_newsocket_c =
2
 
    "$Id: newsocket.c,v 1.15 2006/05/21 10:32:55 akirschbaum Exp $";
 
2
    "$Id: newsocket.c 5010 2006-10-07 18:29:47Z qal21 $";
3
3
/*
4
4
    Crossfire client, a client program for the crossfire program.
5
5
 
28
28
 */
29
29
 
30
30
 
 
31
#ifdef WIN32
 
32
#include <windows.h>
 
33
#endif
31
34
#include <stdio.h>
32
35
#include <stdarg.h>
33
36
#include <errno.h>
88
91
 
89
92
 
90
93
 
91
 
void SockList_Init(SockList *sl, char *buf)
 
94
void SockList_Init(SockList *sl, uint8 *buf)
92
95
{
93
96
    sl->len=0;
94
97
    sl->buf=buf + 2;    /* reserve two bytes for total length */
260
263
{
261
264
    va_list args;
262
265
    SockList sl;
263
 
    char buf[MAX_BUF];
 
266
    uint8 buf[MAX_BUF];
264
267
 
265
268
    SockList_Init(&sl, buf);
266
269
    va_start(args, str);
267
 
    sl.len += vsprintf(sl.buf + sl.len, str, args);
 
270
    sl.len += vsprintf((char*)sl.buf + sl.len, str, args);
268
271
    va_end(args);
269
272
 
270
 
    script_monitor_str(sl.buf);
 
273
    script_monitor_str((char*)sl.buf);
271
274
 
272
275
    return SockList_Send(&sl, fd);
273
276
}