/* Copyright (c) 1979 Regents of the University of California */
* reset - set the teletype mode bits to be sensible, erase to ^H, kill to @
* Very useful after crapping out in raw.
buf
.sg_flags
|= XTABS
|ECHO
|CRMOD
|ANYP
;
buf
.sg_flags
&= ~(RAW
|CBREAK
|VTDELAY
);
ioctl(2, TIOCSETN
, &buf
);