1 | #ifndef INIT_H_ |
1 | #ifndef INIT_H_ |
2 | #define INIT_H_ |
2 | #define INIT_H_ |
3 | |
3 | |
4 | #undef CERASE /* TODO */ |
|
|
5 | #define CERASE '\010' /* ^H */ |
|
|
6 | |
|
|
7 | /* use the fastest baud-rate */ |
4 | /* use the fastest baud-rate */ |
|
|
5 | //#if defined(B4000000) |
|
|
6 | //# define BAUDRATE B4000000 |
|
|
7 | //#elif defined(B921600) |
|
|
8 | //# define BAUDRATE B921600 |
|
|
9 | //#elif defined(B115200) |
|
|
10 | //# define BAUDRATE B115200 |
|
|
11 | //#elif defined(B38400) |
8 | #ifdef B38400 |
12 | #if defined(B38400) |
9 | # define BAUDRATE B38400 |
13 | # define BAUDRATE B38400 |
|
|
14 | #elif defined(B19200) |
|
|
15 | # define BAUDRATE B19200 |
10 | #else |
16 | #else |
11 | # ifdef B19200 |
|
|
12 | # define BAUDRATE B19200 |
|
|
13 | # else |
|
|
14 | # define BAUDRATE B9600 |
17 | # define BAUDRATE B9600 |
15 | # endif |
|
|
16 | #endif |
18 | #endif |
17 | |
19 | |
18 | /* Disable special character functions */ |
20 | /* Disable special character functions */ |
19 | #ifdef _POSIX_VDISABLE |
21 | #ifdef _POSIX_VDISABLE |
20 | # define VDISABLE _POSIX_VDISABLE |
22 | # define VDISABLE _POSIX_VDISABLE |
… | |
… | |
30 | #endif |
32 | #endif |
31 | #ifndef CQUIT |
33 | #ifndef CQUIT |
32 | # define CQUIT '\034' /* ^\ */ |
34 | # define CQUIT '\034' /* ^\ */ |
33 | #endif |
35 | #endif |
34 | #ifndef CERASE |
36 | #ifndef CERASE |
35 | # ifdef linux |
37 | # ifdef __linux__ |
36 | # define CERASE '\177' /* ^? */ |
38 | # define CERASE '\177' /* ^? */ |
37 | # else |
39 | # else |
38 | # define CERASE '\010' /* ^H */ |
40 | # define CERASE '\010' /* ^H */ |
39 | # endif |
41 | # endif |
40 | #endif |
42 | #endif |
… | |
… | |
79 | # ifdef VWERASE |
81 | # ifdef VWERASE |
80 | # define VWERSE VWERASE |
82 | # define VWERSE VWERASE |
81 | # endif |
83 | # endif |
82 | #endif |
84 | #endif |
83 | |
85 | |
84 | #ifndef O_NOCTTY |
|
|
85 | # define O_NOCTTY 0 |
|
|
86 | #endif |
|
|
87 | #ifndef ONLCR |
86 | #ifndef ONLCR |
88 | # define ONLCR 0 |
87 | # define ONLCR 0 |
89 | #endif |
88 | #endif |
90 | |
89 | |
91 | #define CONSOLE "/dev/console" /* console device */ |
90 | #define CONSOLE "/dev/console" /* console device */ |