Lines Matching refs:mode

258 static tcflag_t *get_ptr_to_tcflag(unsigned type, const struct termios *mode)  in get_ptr_to_tcflag()  argument
267 return (tcflag_t*) (((char*)mode) + tcflag_offsets[type]); in get_ptr_to_tcflag()
807 struct termios *mode) in set_speed_or_die() argument
814 cfsetispeed(mode, baud); in set_speed_or_die()
817 cfsetospeed(mode, baud); in set_speed_or_die()
958 static int recover_mode(const char *arg, struct termios *mode) in recover_mode() argument
969 mode->c_iflag = iflag; in recover_mode()
970 mode->c_oflag = oflag; in recover_mode()
971 mode->c_cflag = cflag; in recover_mode()
972 mode->c_lflag = lflag; in recover_mode()
977 mode->c_cc[i] = chr; in recover_mode()
988 static void display_recoverable(const struct termios *mode, in display_recoverable() argument
993 (unsigned long) mode->c_iflag, (unsigned long) mode->c_oflag, in display_recoverable()
994 (unsigned long) mode->c_cflag, (unsigned long) mode->c_lflag); in display_recoverable()
996 printf(":%x", (unsigned int) mode->c_cc[i]); in display_recoverable()
1000 static void display_speed(const struct termios *mode, int fancy) in display_speed() argument
1006 ispeed = cfgetispeed(mode); in display_speed()
1007 ospeed = cfgetospeed(mode); in display_speed()
1017 static void do_display(const struct termios *mode, int all) in do_display() argument
1024 display_speed(mode, 1); in do_display()
1028 wrapf("line = %u;\n", mode->c_line); in do_display()
1044 if (!(mode->c_lflag & ICANON) in do_display()
1050 ch = mode->c_cc[control_info[i].offset]; in do_display()
1058 if ((mode->c_lflag & ICANON) == 0) in do_display()
1060 wrapf("min = %u; time = %u;", mode->c_cc[VMIN], mode->c_cc[VTIME]); in do_display()
1071 bitsp = get_ptr_to_tcflag(mode_info[i].type, mode); in do_display()
1087 static void sane_mode(struct termios *mode) in sane_mode() argument
1096 mode->c_cc[control_info[i].offset] = control_info[i].saneval; in sane_mode()
1101 tcflag_t *bitsp = get_ptr_to_tcflag(mode_info[i].type, mode); in sane_mode()
1116 struct termios *mode) in set_mode() argument
1120 bitsp = get_ptr_to_tcflag(info->type, mode); in set_mode()
1134 mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; in set_mode()
1136 mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7; in set_mode()
1139 mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; in set_mode()
1141 mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB; in set_mode()
1144 mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR; in set_mode()
1145 mode->c_oflag = (mode->c_oflag | ONLCR) & ~OCRNL & ~ONLRET; in set_mode()
1147 mode->c_iflag = mode->c_iflag & ~ICRNL; in set_mode()
1148 if (ONLCR) mode->c_oflag = mode->c_oflag & ~ONLCR; in set_mode()
1151 mode->c_cc[VERASE] = CERASE; in set_mode()
1152 mode->c_cc[VKILL] = CKILL; in set_mode()
1154 sane_mode(mode); in set_mode()
1157 mode->c_lflag |= ICANON; in set_mode()
1159 mode->c_lflag &= ~ICANON; in set_mode()
1162 mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARENB; in set_mode()
1163 mode->c_iflag |= ISTRIP; in set_mode()
1165 mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; in set_mode()
1166 mode->c_iflag &= ~ISTRIP; in set_mode()
1170 mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARENB; in set_mode()
1171 mode->c_iflag |= ISTRIP; in set_mode()
1172 mode->c_oflag |= OPOST; in set_mode()
1174 mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; in set_mode()
1175 mode->c_iflag &= ~ISTRIP; in set_mode()
1176 mode->c_oflag &= ~OPOST; in set_mode()
1183 mode->c_iflag |= BRKINT | IGNPAR | ISTRIP | ICRNL | IXON; in set_mode()
1184 mode->c_oflag |= OPOST; in set_mode()
1185 mode->c_lflag |= ISIG | ICANON; in set_mode()
1187 mode->c_cc[VEOF] = CEOF; in set_mode()
1190 mode->c_cc[VEOL] = CEOL; in set_mode()
1194 mode->c_iflag = 0; in set_mode()
1195 mode->c_oflag &= ~OPOST; in set_mode()
1196 mode->c_lflag &= ~(ISIG | ICANON | XCASE); in set_mode()
1197 mode->c_cc[VMIN] = 1; in set_mode()
1198 mode->c_cc[VTIME] = 0; in set_mode()
1204 mode->c_iflag |= IXANY; in set_mode()
1206 mode->c_iflag &= ~IXANY; in set_mode()
1212 mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB3; in set_mode()
1214 mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB0; in set_mode()
1220 mode->c_oflag |= OXTABS; in set_mode()
1222 mode->c_oflag &= ~OXTABS; in set_mode()
1228 mode->c_lflag &= ~XCASE; in set_mode()
1229 mode->c_iflag &= ~IUCLC; in set_mode()
1230 mode->c_oflag &= ~OLCUC; in set_mode()
1232 mode->c_lflag |= XCASE; in set_mode()
1233 mode->c_iflag |= IUCLC; in set_mode()
1234 mode->c_oflag |= OLCUC; in set_mode()
1239 mode->c_lflag |= ECHOE | ECHOCTL | ECHOKE; in set_mode()
1241 mode->c_cc[VINTR] = 3; /* ^C */ in set_mode()
1242 mode->c_cc[VERASE] = 127; /* DEL */ in set_mode()
1243 mode->c_cc[VKILL] = 21; /* ^U */ in set_mode()
1244 mode->c_lflag |= ECHOE | ECHOCTL | ECHOKE; in set_mode()
1245 if (IXANY) mode->c_iflag &= ~IXANY; in set_mode()
1250 const char *arg, struct termios *mode) in set_control_char_or_die() argument
1266 mode->c_cc[info->offset] = value; in set_control_char_or_die()
1278 struct termios mode; in stty_main() local
1356 set_control_char_or_die(cp, argnext, &mode); in stty_main()
1389 set_speed_or_die(input_speed, argnext, &mode); in stty_main()
1393 set_speed_or_die(output_speed, argnext, &mode); in stty_main()
1396 if (recover_mode(arg, &mode) == 1) break; in stty_main()
1426 memset(&mode, 0, sizeof(mode)); in stty_main()
1427 if (tcgetattr(STDIN_FILENO, &mode)) in stty_main()
1432 output_func(&mode, display_all); in stty_main()
1448 set_mode(mp, 1 /* reversed */, &mode); in stty_main()
1457 set_mode(mp, 0 /* non-reversed */, &mode); in stty_main()
1465 set_control_char_or_die(cp, argnext, &mode); in stty_main()
1478 mode.c_line = xatoul_sfx(argnext, stty_suffixes); in stty_main()
1495 display_speed(&mode, 0); in stty_main()
1498 set_speed_or_die(input_speed, argnext, &mode); in stty_main()
1502 set_speed_or_die(output_speed, argnext, &mode); in stty_main()
1506 if (recover_mode(arg, &mode) == 1) in stty_main()
1509 set_speed_or_die(both_speeds, arg, &mode); in stty_main()
1519 if (tcsetattr(STDIN_FILENO, TCSADRAIN, &mode)) in stty_main()
1535 if (memcmp(&mode, &new_mode, sizeof(mode)) != 0) { in stty_main()
1553 || memcmp(&mode, &new_mode, sizeof(mode)) != 0) in stty_main()