static char *sccsid
= "@(#)tk.c 4.2 (Berkeley) %G%";
* optimize output for Tek 4014
while (--argc
> 0 && (++argv
)[0][0]=='-')
if (i
= atoi(&argv
[0][2]))
if (i
= atoi(&argv
[0][1])) {
if ((ttyin
= fopen("/dev/tty", "r")) != NULL
)
setbuf(ttyin
, (char *)NULL
);
if (freopen(argv
[0], "r", stdin
) == NULL
) {
fprintf(stderr
, "tk: cannot open %s\n", argv
[0]);
while ((i
= getchar()) != EOF
) {
case '\t': /*tabstops at 8*31=248*/
ohx
= oxb
= olx
= ohy
= oly
= -1;
fputs("\033\014\033;", stdout
);
fputs("\033;\037", stdout
);
while ((c
=getc(ttyin
))!='\n') {
si
= signal(SIGINT
, SIG_IGN
);
sq
= signal(SIGQUIT
, SIG_IGN
);
if (isatty(fileno(stdin
)) == 0) {
if (freopen("/dev/tty", "r", stdin
)==NULL
)
freopen("/dev/null", "r", stdin
);
execl("/bin/sh", "sh", "-t", 0);
xb
= ((xx
& 03) + ((zz
<<2) & 014) & 017);
if ((ly
!= oly
) || (hx
!= ohx
) || (xb
!= oxb
))