static char *sccsid
= "@(#)wwgets.c 2.1.1.1 83/08/09";
while (wwforce(&imask
) < 0)
if ((imask
& 1 << 0) == 0)
n
= (ibuf
+ sizeof ibuf
) - p
;
if ((n
= read(0, p
, n
)) > 0) {
while ((c
= bgetc()) < 0)
if (c
== wwoldtty
.ww_sgttyb
.sg_erase
) {
} else if (c
== wwoldtty
.ww_sgttyb
.sg_kill
) {
} else if (c
== wwoldtty
.ww_ltchars
.t_werasc
) {
while (--p
>= buf
&& (*p
== ' ' || *p
== '\t'))
while (p
>= buf
&& *p
!= ' ' && *p
!= '\t')
} else if (c
== '\r' || c
== '\n') {
(void) wwputs(unctrl(*p
++ = c
), w
);
for (i
= strlen(unctrl(c
)); --i
>= 0;)
(void) wwputs("\b \b", w
);