| 908 | ----------------------------------------------------------*/ |
| 909 | |
| 910 | static BOOL init_termios(struct termios *ttyset) |
| 911 | { |
| 912 | ENTER("init_termios"); |
| 913 | |
| 914 | if (!ttyset) |
| 915 | { |
| 916 | return FALSE; |
| 917 | } |
| 918 | |
| 919 | memset(ttyset, 0, sizeof(struct termios)); |
| 920 | cfsetospeed(ttyset, B9600); |
| 921 | cfmakeraw(ttyset); |
| 922 | ttyset->c_cc[VINTR] = 0x03; /* 0: C-c */ |
| 923 | ttyset->c_cc[VQUIT] = 0x1c; /* 1: C-\ */ |
| 924 | ttyset->c_cc[VERASE] = 0x7f; /* 2: <del> */ |
| 925 | ttyset->c_cc[VKILL] = 0x15; /* 3: C-u */ |
| 926 | ttyset->c_cc[VEOF] = 0x04; /* 4: C-d */ |
| 927 | ttyset->c_cc[VTIME] = 0; /* 5: read timeout */ |
| 928 | ttyset->c_cc[VMIN] = 1; /* 6: read returns after this |
| 929 | many bytes */ |
| 930 | ttyset->c_cc[VSUSP] = 0x1a; /* 10: C-z */ |
| 931 | ttyset->c_cc[VEOL] = '\r'; /* 11: */ |
| 932 | ttyset->c_cc[VREPRINT] = 0x12; /* 12: C-r */ |
| 933 | /* |
| 934 | ttyset->c_cc[VDISCARD] = 0x; 13: IEXTEN only |
| 935 | */ |
| 936 | ttyset->c_cc[VWERASE] = 0x17; /* 14: C-w */ |
| 937 | ttyset->c_cc[VLNEXT] = 0x16; /* 15: C-w */ |
| 938 | ttyset->c_cc[VEOL2] = '\n'; /* 16: */ |
| 939 | LEAVE("init_termios"); |
| 940 | return TRUE; |
| 941 | /* default VTIME = 0, VMIN = 1: read blocks forever until one byte */ |
| 942 | } |
| 943 | |
| 944 | /*---------------------------------------------------------- |
| 945 | port_opened() |
no test coverage detected