static char *sccsid
= "@(#)main.c 1.7 83/07/27";
gettimeofday(&starttime
, &timezone
);
fprintf("Can't do windows on this terminal.\n");
if ((cmdwin
= wwopen(WW_NONE
, 0, 1, wwncol
, 0, 0)) == 0) {
fprintf(stderr
, "Can't open command window.\r\n");
for (n
= 0; n
< wwncol
; n
++) /* XXX */
Waputc(0, WINVERSE
|WBUF
, cmdwin
->ww_win
);
(void) signal(SIGCHLD
, wwchild
);
* Loop until we get some keyboard input.
wwsetcursor(WCurRow(curwin
->ww_win
),
WCurCol(curwin
->ww_win
));
while (wwforce(&imask
) < 0)
if ((imask
& 1 << 0) == 0)
if ((ibufc
= read(0, ibuf
, sizeof ibuf
)) < 0) {
* Weird loop. Copy the buffer to the pty stopping
* on the escape character in a hopefully efficient
* Probably a good thing to make ibufc == 1 a special
for (p
= ibufp
, n
= ibufc
;;) {
write(curwin
->ww_pty
, ibufp
, ibufc
);
} else if (*p
++ == ESCAPE
) {
write(curwin
->ww_pty
, ibufp
, n
- 1);