1 | #ifndef INIT_H_ |
1 | #ifndef INIT_H_ |
2 | #define INIT_H_ |
2 | #define INIT_H_ |
3 | |
3 | |
4 | #undef CERASE /* TODO */ |
4 | #undef CERASE /* TODO */ |
5 | #define CERASE '\010' /* ^H */ |
5 | #define CERASE '\010' /* ^H */ |
6 | |
|
|
7 | /* ways to deal with getting/setting termios structure */ |
|
|
8 | |
|
|
9 | /* termios interface */ |
|
|
10 | #define GET_TERMIOS(fd,tios) tcgetattr (fd, tios) |
|
|
11 | #define SET_TERMIOS(fd,tios) \ |
|
|
12 | cfsetospeed (tios, BAUDRATE), \ |
|
|
13 | cfsetispeed (tios, BAUDRATE), \ |
|
|
14 | tcsetattr (fd, TCSANOW, tios) |
|
|
15 | |
6 | |
16 | /* use the fastest baud-rate */ |
7 | /* use the fastest baud-rate */ |
17 | #ifdef B38400 |
8 | #ifdef B38400 |
18 | # define BAUDRATE B38400 |
9 | # define BAUDRATE B38400 |
19 | #else |
10 | #else |