~ubuntu-branches/ubuntu/precise/crossfire-client/precise

« back to all changes in this revision

Viewing changes to common/script.c

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2006-07-06 05:28:42 UTC
  • mfrom: (1.2.4 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060706052842-gyjncpvl56luk1nd
Tags: 1.9.1-1
* New upstream release
* asound [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] (Closes: #375398)
* Patched gcfclient2 to make Configure menu option not segfault when no
  existing configuration file is present

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
const char *rcsid_common_script_c =
2
 
    "$Id: script.c,v 1.19 2006/02/23 20:18:28 akirschbaum Exp $";
 
2
    "$Id: script.c,v 1.20 2006/02/26 10:08:35 ryo_saeba Exp $";
3
3
/*
4
4
    Crossfire client, a client program for the crossfire program.
5
5
 
186
186
   DWORD dwBytesRead;
187
187
   BOOL rc;
188
188
 
 
189
   FlushFileBuffers(fd);
189
190
   rc = ReadFile(fd, buf, len, &dwBytesRead, NULL);
190
191
   if (rc == FALSE)
191
192
      return(-1);
199
200
   DWORD dwBytesWritten;
200
201
   BOOL rc;
201
202
 
202
 
   rc = WriteFile(fd, buf, len, &dwBytesWritten, NULL);
 
203
   rc = WriteFile(fd, buf, len, &dwBytesWritten, NULL);
 
204
   FlushFileBuffers(fd);
203
205
   if (rc == FALSE)
204
206
      return(-1);
205
207
 
900
902
   /* Send the message */
901
903
   write(scripts[i].out_fd,"scripttell ",11);
902
904
   write(scripts[i].out_fd,params,strlen(params));
903
 
   write(scripts[i].out_fd,"\r\n",2);
 
905
   write(scripts[i].out_fd,"\n",1);
904
906
}
905
907
 
906
908
static int script_by_name(const char *name)