	continue;
			case 'R':
			case 'r':	line[i] = Cr;
					continue;
			default:	line[i] = blank;
					continue;
		}
	line[i] = 0;
	for (i=1; i<=NPAGES; i++) page(line,person,tim,message);
	flush();
}


page(line,person,tim,message)
{
	register int j,i;

	printf("%s%s\n%s%s\n",sep,sep,sep,sep);
	printf(fill);
	for (j=1; j<=3; j++) {
		wrt(line);
		printf("\n\n\n");
		for (i=1; i<=8; i++) printf("%-11s",person);
		printf("\n\n%s %s\n\n\n\n",message,tim);
	}
	printf(fill);
	printf("%s%s\n%s%s\n",sep,sep,sep,sep);
}


wrt(ap)
char ***ap;
{
	register char ***p;
	register int i;

	for (i=0; i<10; i++) {
		for (p=ap; *p; p++)
			printf("%s%s",(*p)[i],W);
		putchar('\n');
	}
}


# define NSMUDGE 100
# define WSMUDGE 200*8

# define PLOT 0200
# define TERMCOM 040

smudge()
{
	register int i,j,*st;
	int gs[3],ogs;

	st = gs;
	gtty(1,st);
	ogs = *st;
	flush();
	*st = PLOT;
	stty(1,st);
	*st =| TERMCOM;
	for (i=0; i<NSMUDGE; i++) {
		for (j=0; j<WSMUDGE/8; j++)
			putchar(0377);
	}
	flush();
	*st = ogs;
	stty(1,st);
}
sep)/* wc line and word count */

int	buf[256];
int	file;
int	lflg;
long int wordct;
long int linect;

main(argc,argv)
char **argv;
{
	int i, token;
	register char *p1, *p2;
	register int c;

	if(--argc>0 & **++argv=='-') {
		if(argv[0][1]=='l')
			lflg++;
		argc--;
		argv++;
	}
	i = 0;
	do {
		if(argc<=0) buf[0] = 0;
		else if((file=open(argv[i],0))<0) {
			diag(argv[i]);
			diag(": cannot open\n");
			continue;
		}
		p1 = 0;
		p2 = 0;
		linect = 0;
		wordct = 0;
		token = 0;
		for(;;) {
			if(p1 >= p2) {
				p1 = &buf;
				c = read(file, p1, 512);
				if(c <= 0)
					break;
				p2 = p1+c;
			}
			c = 0;
			c =| *p1++;
			if(' '<c&&c<0177) {
				if(!token++) {
					wordct++;
				}
			} else {
				if(c=='\n') {
					linect++;
				}
				else if(c!=' '&&c!='\t')
					continue;
				token = 0;
			}
		}
		printf("%7s ",locv(linect));
		if(lflg==0)
		printf("%7s ",locv(wordct));
		printf("%s\n", argc<=0?"":argv[i]);
		close(file);
	} while(++i<argc);
}

diag(s)
char *s;
{
	while(*s)
		write(2,s++,1);
}

putchar(c)
{
	write(1,&c,1);
}
 = read(file, p1, 512);
				if(c <= 0)
					break;
				p2 = p1+c;
			}
			c = 0;
			c =| *p1++;
			if(' '<c&&c<0177) {
				if(!token++) {
					wordct++;
				}
			} else {
				if(c=='\n') {
					linect++;
				}
				else if(c!=' '&&c!='\t')
					continue;
				token = 0;
			}
		}
		printf("%7s ",locv(linect));
		if(lflg==0)
		printf("%7s ",locv(wordct));
		printf("%s\n", argc<=0?"":argv[i]);
		close(file);
	} while(++i<argc);
}

diag(s)
char *s;
{
	while(*s)
		write(2,s++,1);
}

putchar(c)
{
	w#include	"stdio.h"
#include	"stat.h"
#include	"time.h"
#include	"dir.h"

struct statb sbuf;
struct dir dirb;
int low;
long comp;

main(argc,argv)
	int argc;
	char **argv;
{

	char newlist[64], newdate[64], command[65], *sptr;
	char base[25];
	int line, list, n, dfd;
	long atol();

	/* setup pathname for .newlist and .newdate */

	sptr = logdir();
	strcpy(base,sptr);
	strcpy(newlist,sptr);
	strcpy(newdate,newlist);
	strcat(newlist,"/.newlist");
	strcat(newdate,"/.newdate");

	list = fopen(newlist,"r");
	stat(newdate,&sbuf);
	comp = sbuf.i_mtime;

	argv++;
	if(--argc) {
		if(**argv == '-') {
			comp = atol(++*argv);
			if(comp < 700000L) {
				printf("bad date\n");
				exit