	struct {
		char tty[8];
		char name[8];
		int time[2];
	} who;

main(a,v)
char *v[];
{
	register int i;
	register char *t;
	short fd;
	long s;

	t = "/usr/adm/wtmp";
	if(a > 1)
		t = *++v;
	if((fd = open(t, 0)) == -1){
		printf("Can't open %s\n", t);
		exit(1);
	}

	s = lseek(fd, -20L, 2);

	while(s != -1L){
		read(fd,&who,20);
		t = ctime(who.time) + 4;
		t[12] = 0;
		printf("%-8.8s %-8.8s %s\n", who.name, who.tty, t);
		s = lseek(fd, -40L, 1);
	}
	close(fd);
}
