static char *sccsid
= "@(#)reset.c 4.2 (Berkeley) 10/9/80";
#define CTRL(x) ('x'&037)
ioctl(2, TIOCGETC
, &tbuf
);
ioctl(2, TIOCGLTC
, <buf
);
buf
.sg_flags
&= ~(RAW
|CBREAK
|VTDELAY
|ALLDELAY
);
buf
.sg_flags
|= XTABS
|ECHO
|CRMOD
|ANYP
;
reset(&buf
.sg_erase
, CTRL(h
));
reset(&buf
.sg_kill
, '@');
reset(&tbuf
.t_intrc
, 0177);
reset(&tbuf
.t_quitc
, CTRL(\\\\));
reset(&tbuf
.t_startc
, CTRL(q
));
reset(&tbuf
.t_stopc
, CTRL(s
));
reset(&tbuf
.t_eofc
, CTRL(d
));
reset(<buf
.t_suspc
, CTRL(z
));
reset(<buf
.t_dsuspc
, CTRL(y
));
reset(<buf
.t_rprntc
, CTRL(r
));
reset(<buf
.t_flushc
, CTRL(o
));
reset(<buf
.t_lnextc
, CTRL(v
));
reset(<buf
.t_werasc
, CTRL(w
));
ioctl(2, TIOCSETN
, &buf
);
ioctl(2, TIOCSETC
, &tbuf
);
ioctl(2, TIOCSLTC
, <buf
);
if (*cp
== 0 || (*cp
&0377)==0377)