Commit | Line | Data |
---|---|---|
1872c2ee KS |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | /* | |
3 | * reset - set the teletype mode bits to be sensible, erase to ^H, kill to @ | |
4 | * | |
5 | * Kurt Shoens | |
6 | * | |
7 | * Very useful after crapping out in raw. | |
8 | */ | |
9 | #include <sgtty.h> | |
10 | ||
11 | main() { | |
12 | struct sgttyb buf; | |
13 | gtty(2, &buf); | |
14 | buf.sg_flags |= XTABS|ECHO|CRMOD|ANYP; | |
15 | buf.sg_flags &= ~(RAW|CBREAK|VTDELAY); | |
16 | buf.sg_erase = 010; | |
17 | buf.sg_kill = '@'; | |
18 | ioctl(2, TIOCSETN, &buf); | |
19 | } |