Lines Matching refs:tty

75    to get the tty settings. */
77 set_winsize (tty)
78 int tty;
83 if (ioctl (tty, TIOCGWINSZ, &w) == 0)
84 (void) ioctl (tty, TIOCSWINSZ, &w);
101 struct sgttyb sgttyb; /* Basic BSD tty driver information. */
165 get_tty_settings (tty, tiop)
166 int tty;
169 set_winsize (tty);
174 if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
179 if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0)
184 if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0)
189 if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0)
197 set_tty_settings (tty, tiop)
198 int tty;
203 ioctl (tty, TIOCSETN, &(tiop->sgttyb));
211 ioctl (tty, TIOCLSET, &(tiop->lflag));
219 ioctl (tty, TIOCSETC, &(tiop->tchars));
227 ioctl (tty, TIOCSLTC, &(tiop->ltchars));
321 # define GETATTR(tty, tiop) (tcgetattr (tty, tiop))
323 # define SETATTR(tty, tiop) (tcsetattr (tty, TCSANOW, tiop))
325 # define SETATTR(tty, tiop) (tcsetattr (tty, TCSADRAIN, tiop))
330 # define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop))
331 # define SETATTR(tty, tiop) (ioctl (tty, TCSETAW, tiop))
421 _get_tty_settings (tty, tiop)
422 int tty;
429 ioctl_ret = GETATTR (tty, tiop);
454 get_tty_settings (tty, tiop)
455 int tty;
458 set_winsize (tty);
461 if (_get_tty_settings (tty, tiop) < 0)
472 _set_tty_settings (tty, tiop)
473 int tty;
476 while (SETATTR (tty, tiop) < 0)
486 set_tty_settings (tty, tiop)
487 int tty;
490 if (_set_tty_settings (tty, tiop) < 0)
500 tcflow (tty, TCOON);
503 tcflow (tty, TCOON); /* Simulate a ^Q. */
506 ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */
596 int tty;
605 tty = fileno (rl_instream);
607 if (get_tty_settings (tty, &tio) < 0)
651 if (set_tty_settings (tty, &tio) < 0)
671 int tty;
679 tty = fileno (rl_instream);
686 if (set_tty_settings (tty, &otio) < 0)
875 int tty;
877 tty = fileno (rl_instream);
879 if (get_tty_settings (tty, &ttybuff) == 0)
893 /* Rebind all of the tty special chars that readline worries about back
901 /* Don't bother before we've saved the tty special chars at least once. */