Lines Matching defs:termiosp

1135 from_compat(compat_state_t *csp, struct termios *termiosp)
1137 termiosp->c_iflag = 0;
1138 termiosp->c_oflag &= (ONLRET|ONOCR);
1140 termiosp->c_cflag = (termiosp->c_cflag &
1144 termiosp->c_cflag |= ((csp->t_ospeed - CBAUD - 1) & CBAUD) |
1147 termiosp->c_cflag |= csp->t_ospeed & CBAUD;
1152 termiosp->c_cflag |= CIBAUDEXT |
1156 termiosp->c_cflag |= (csp->t_ispeed << IBSHIFT) &
1161 termiosp->c_cflag &= ~CBAUD & ~CBAUDEXT;
1164 termiosp->c_cflag |= CSTOPB;
1165 termiosp->c_lflag = ECHOK;
1166 FROM_COMPAT_CHAR(termiosp->c_cc[VERASE], csp->t_erase);
1167 FROM_COMPAT_CHAR(termiosp->c_cc[VKILL], csp->t_kill);
1168 FROM_COMPAT_CHAR(termiosp->c_cc[VINTR], csp->t_intrc);
1169 FROM_COMPAT_CHAR(termiosp->c_cc[VQUIT], csp->t_quitc);
1170 FROM_COMPAT_CHAR(termiosp->c_cc[VSTART], csp->t_startc);
1171 FROM_COMPAT_CHAR(termiosp->c_cc[VSTOP], csp->t_stopc);
1172 termiosp->c_cc[VEOL2] = 0;
1173 FROM_COMPAT_CHAR(termiosp->c_cc[VSUSP], csp->t_suspc);
1175 FROM_COMPAT_CHAR(termiosp->c_cc[VDSUSP], csp->t_dsuspc);
1176 FROM_COMPAT_CHAR(termiosp->c_cc[VREPRINT], csp->t_rprntc);
1177 FROM_COMPAT_CHAR(termiosp->c_cc[VDISCARD], csp->t_flushc);
1178 FROM_COMPAT_CHAR(termiosp->c_cc[VWERASE], csp->t_werasc);
1179 FROM_COMPAT_CHAR(termiosp->c_cc[VLNEXT], csp->t_lnextc);
1181 termiosp->c_iflag |= IXOFF;
1183 termiosp->c_iflag |= IUCLC;
1184 termiosp->c_oflag |= OLCUC;
1185 termiosp->c_lflag |= XCASE;
1188 termiosp->c_lflag |= ECHO;
1190 termiosp->c_iflag |= ICRNL;
1191 termiosp->c_oflag |= ONLCR;
1195 termiosp->c_oflag |= CR2;
1199 termiosp->c_oflag |= CR3;
1204 termiosp->c_oflag |= ONLRET|CR1; /* tty37 */
1207 termiosp->c_oflag |= NL1;
1213 termiosp->c_cflag |= CS8;
1214 termiosp->c_iflag &= ~(ICRNL|IUCLC);
1215 termiosp->c_lflag &= ~(XCASE|IEXTEN);
1217 termiosp->c_iflag |= IMAXBEL|BRKINT|IGNPAR;
1218 if (termiosp->c_cc[VSTOP] != 0 && termiosp->c_cc[VSTART] != 0)
1219 termiosp->c_iflag |= IXON;
1221 termiosp->c_cflag |= CS8;
1224 termiosp->c_cflag |= CS8;
1230 termiosp->c_iflag |= ISTRIP;
1231 termiosp->c_cflag |= CS8;
1235 termiosp->c_iflag |= INPCK|ISTRIP;
1236 termiosp->c_cflag |= CS7|PARENB;
1240 termiosp->c_iflag |= INPCK|ISTRIP;
1241 termiosp->c_cflag |= CS7|PARENB|PARODD;
1245 termiosp->c_iflag |= ISTRIP;
1246 termiosp->c_cflag |= CS7|PARENB;
1251 termiosp->c_oflag |= OPOST;
1253 termiosp->c_lflag |= IEXTEN;
1255 termiosp->c_lflag |= ISIG;
1257 termiosp->c_lflag |= ICANON;
1259 termiosp->c_lflag |= ECHOCTL;
1264 termiosp->c_oflag |= TAB1;
1268 termiosp->c_oflag |= TAB2;
1272 termiosp->c_oflag |= TAB3;
1276 termiosp->c_oflag |= FFDLY;
1278 termiosp->c_oflag |= BSDLY;
1280 termiosp->c_lflag |= ECHOPRT;
1282 termiosp->c_lflag |= ECHOE;
1284 termiosp->c_lflag |= TOSTOP;
1286 termiosp->c_lflag |= FLUSHO;
1288 termiosp->c_cflag |= CLOCAL;
1290 termiosp->c_lflag |= ECHOKE;
1292 termiosp->c_lflag |= PENDIN;
1294 termiosp->c_iflag |= IXANY;
1296 termiosp->c_lflag |= NOFLSH;
1297 if (termiosp->c_lflag & ICANON) {
1298 FROM_COMPAT_CHAR(termiosp->c_cc[VEOF], csp->t_eofc);
1299 FROM_COMPAT_CHAR(termiosp->c_cc[VEOL], csp->t_brkc);
1301 termiosp->c_cc[VMIN] = 1;
1302 termiosp->c_cc[VTIME] = 0;
1309 to_compat(struct termios *termiosp, compat_state_t *csp)
1312 csp->t_ospeed = termiosp->c_cflag & CBAUD;
1313 csp->t_ispeed = (termiosp->c_cflag & CIBAUD) >> IBSHIFT;
1315 if (termiosp->c_cflag & CBAUDEXT)
1317 if (termiosp->c_cflag & CIBAUDEXT)
1322 if ((termiosp->c_cflag & CSTOPB) && csp->t_ispeed != B110)
1324 TO_COMPAT_CHAR(csp->t_erase, termiosp->c_cc[VERASE]);
1325 TO_COMPAT_CHAR(csp->t_kill, termiosp->c_cc[VKILL]);
1326 TO_COMPAT_CHAR(csp->t_intrc, termiosp->c_cc[VINTR]);
1327 TO_COMPAT_CHAR(csp->t_quitc, termiosp->c_cc[VQUIT]);
1328 TO_COMPAT_CHAR(csp->t_startc, termiosp->c_cc[VSTART]);
1329 TO_COMPAT_CHAR(csp->t_stopc, termiosp->c_cc[VSTOP]);
1330 TO_COMPAT_CHAR(csp->t_suspc, termiosp->c_cc[VSUSP]);
1331 TO_COMPAT_CHAR(csp->t_dsuspc, termiosp->c_cc[VDSUSP]);
1332 TO_COMPAT_CHAR(csp->t_rprntc, termiosp->c_cc[VREPRINT]);
1333 TO_COMPAT_CHAR(csp->t_flushc, termiosp->c_cc[VDISCARD]);
1334 TO_COMPAT_CHAR(csp->t_werasc, termiosp->c_cc[VWERASE]);
1335 TO_COMPAT_CHAR(csp->t_lnextc, termiosp->c_cc[VLNEXT]);
1337 if (termiosp->c_iflag & IXOFF)
1339 if (!(termiosp->c_iflag &
1342 !(termiosp->c_oflag & OPOST) &&
1343 (termiosp->c_cflag & (CSIZE|PARENB)) == CS8 &&
1344 !(termiosp->c_lflag & (ISIG|ICANON|XCASE|IEXTEN)))
1347 if (!(termiosp->c_iflag & IXON)) {
1351 if ((termiosp->c_cflag & (CSIZE|PARENB)) == CS8 &&
1352 !(termiosp->c_oflag & OPOST))
1356 if ((termiosp->c_cflag & (CSIZE|PARENB)) == CS8) {
1357 if (!(termiosp->c_iflag & ISTRIP))
1361 if (termiosp->c_cflag & PARODD)
1363 else if (termiosp->c_iflag & INPCK)
1368 if (!(termiosp->c_oflag & OPOST))
1373 if (!(termiosp->c_lflag & ISIG))
1377 if (!(termiosp->c_lflag & ICANON))
1379 if (termiosp->c_lflag & ECHOCTL)
1384 if (termiosp->c_oflag & OLCUC)
1386 if (termiosp->c_lflag&ECHO)
1388 if (termiosp->c_oflag & ONLCR) {
1390 switch (termiosp->c_oflag & CRDLY) {
1401 if ((termiosp->c_oflag & CR1) &&
1402 (termiosp->c_oflag & ONLRET))
1405 if ((termiosp->c_oflag & ONLRET) && (termiosp->c_oflag & NL1))
1407 switch (termiosp->c_oflag & TABDLY) {
1421 if (termiosp->c_oflag & FFDLY)
1423 if (termiosp->c_oflag & BSDLY)
1425 if (termiosp->c_lflag & ECHOPRT)
1427 if (termiosp->c_lflag & ECHOE)
1429 if (termiosp->c_lflag & TOSTOP)
1431 if (termiosp->c_lflag & FLUSHO)
1433 if (termiosp->c_cflag & CLOCAL)
1435 if (termiosp->c_lflag & ECHOKE)
1437 if (termiosp->c_lflag & PENDIN)
1439 if (!(termiosp->c_iflag & IXANY))
1441 if (termiosp->c_lflag & NOFLSH)
1443 if (termiosp->c_lflag & ICANON) {
1444 TO_COMPAT_CHAR(csp->t_eofc, termiosp->c_cc[VEOF]);
1445 TO_COMPAT_CHAR(csp->t_brkc, termiosp->c_cc[VEOL]);
1447 termiosp->c_cc[VMIN] = 1;
1448 termiosp->c_cc[VTIME] = 0;