
/*
 * Copyright (c) 1991    Jon Wesener 
 * Gaming Software
 *
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that the above copyright
 * notice appear in all copies and that both that copyright
 * notice and this permission notice appear in supporting
 * documentation.  No representations are made about the
 * suitability of this software for any purpose.  It is
 * provided "as is" without express or implied warranty.
 *
 */

#ident	"@(#)tankmsg_clnt.c	1.2 :/usr/key/jojow/X/src/guts/SCCS/s.tankmsg_clnt.c 3/19/91 10:16:32 "

#include <rpc/rpc.h>
#include <sys/time.h>
#include "tankmsg.h"

/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };

char **
tenter_1(argp, clnt)
	char **argp;
	CLIENT *clnt;
{
	static char *res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, TENTER, xdr_wrapstring, argp, xdr_wrapstring, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}


char **
getpos_1(argp, clnt)
	char **argp;
	CLIENT *clnt;
{
	static char *res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, GETPOS, xdr_wrapstring, argp, xdr_wrapstring, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}


char **
getmaze_1(argp, clnt)
	int *argp;
	CLIENT *clnt;
{
	static char *res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, GETMAZE, xdr_int, argp, xdr_wrapstring, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}


char **
texit_1(argp, clnt)
	char **argp;
	CLIENT *clnt;
{
	static char *res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, TEXIT, xdr_wrapstring, argp, xdr_wrapstring, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}


int *
getplyrcnt_1(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static int res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, GETPLYRCNT, xdr_void, argp, xdr_int, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}

