gochatai/pachi_py/pachi/uct/slave.c
/* Read and discard any binary arguments. The number of
 * bytes to be skipped is given by @size in the command. */
Read and discard any binary arguments. The number of
bytes to be skipped is given by @size in the command.
Read and discard any binary arguments . The number of bytes to be skipped is given by @size in the command .
static void
discard_bin_args(char *args)
{
	char *s = strchr(args, '@');
	int size = 0;
	if (s) size = atoi(s+1);
	while (size) {
		char buf[64*1024];
		int len = sizeof(buf);
		if (len > size) len = size;
		len = fread(buf, 1, len, stdin);
		if (len <= 0) break;
		size -= len;
	}
}
static void discard_bin_args ( char * args ) { char * s = strchr ( args , ' ' ) ; int size = 0 ; if ( s ) size = atoi ( s + 1 ) ; while ( size ) { char buf [ 64 * 1024 ] ; int len = sizeof ( buf ) ; if ( len > size ) len = size ; len = fread ( buf , 1 , len , stdin ) ; if ( len <= 0 ) break ; size -= len ; } }
Read and discard any binary arguments.
Read and discard any binary arguments .