/* rmsqit.c - kick a remote-rms server task in the quit bit
	also a nice demo & test-bed for packet interface to rms server */

#include	<stdio.h>
#include	<cx.h>
#include	"rrms.h"
#include	<algol68.h>

int	packet[256];
extern	rad50	rmssrv[2];		/* RMS server task name */

main(argc,argv)
int	argc;
char **	argv;
BEGIN
int	s,v,r,n;

	IF	(argc<2)
	THEN	rmscs();	/* rmssrv = RTTTnn */
	ELSE	ascr50(6,argv[1],rmssrv);
	FI
	rmspkt($QUIT,0,0,0123456,packet,12,rmssrv,&s,&v,&r,&n);
	IF	(s)
	THEN	printf("status=%oo value=%oo rab=%oo number=%oo\n",s,v,r,n);
	FI
END

/* end: rmsqit.c */
