#include <exec/types.h>
#include <exec/tasks.h>
#include <libraries/dos.h>
#include <proto/exec.h>
#include <proto/dos.h>
#include <string.h>
#include <stdlib.h>

#include "/lib/misc.h"

int main(int argc,char *argv[])
{	unsigned long size=2048;
	char *buffer;
	int error=0;
	long i=0;

	if(buffer=(char *)AllocMem(size,MEMF_PUBLIC | MEMF_CLEAR))
	{
		who(COM_WHO,NULL,buffer,(char *)size);
		while(buffer[i] && buffer[i]!='\n')
			++i;
		Write(Output(),buffer,i+1);
		FreeMem(buffer,size);
	}
	else
		error= 42;
	exit(error);
}

