* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)keyboard.c 5.2 (Berkeley) %G%";
* Keyboard input support.
if (ch
== 0177 && ferror(stdin
)) {
if (ch
>= 'A' && ch
<= 'Z')
#define mask(s) (1 << ((s) - 1))
oldmask
= sigblock(mask(SIGALRM
));
oldmask
= sigblock(mask(SIGALRM
));
if (ch
== _tty
.sg_erase
&& col
> 0) {
if (col
== 1 && line
[0] == ':')
if (ch
== CTRL('w') && col
> 0) {
while (--col
>= 0 && isspace(line
[col
]))
while (--col
>= 0 && !isspace(line
[col
]))
if (col
== 0 && line
[0] == ':')
if (ch
== _tty
.sg_kill
&& col
> 0) {
if (isprint(ch
) || ch
== ' ') {
mvaddch(CMDLINE
, col
, ch
);
} while (col
== 0 || (ch
!= '\r' && ch
!= '\n'));
oldmask
= sigblock(mask(SIGALRM
));