Lines Matching defs:tty
183 static int tty;
215 (void) ioctl(tty, TCSETAW, &tioorig);
217 (void) tcsetattr(tty, TCSADRAIN, &tioorig);
219 (void) ioctl(tty, TIOCSETP, &sgorig);
443 name_of_tty = x_strdup("/dev/tty");
450 tty = fileno(ttyfp);
476 rc = ioctl(tty, TCGETA, &tioorig);
484 rc = tcgetattr(tty, &tioorig);
492 rc = ioctl(tty, TIOCGETP, &sgorig);
498 failed("get tty settings");
505 rc = ioctl(tty, TCSETAW, &tio);
507 rc = tcsetattr(tty, TCSADRAIN, &tio);
509 rc = ioctl(tty, TIOCSETP, &sg);
512 failed("set tty settings");
525 IGNORE_RC(write(tty, tmpbuf, strlen(tmpbuf)));
531 IGNORE_RC(write(tty, getattr[emu], strlen(getattr[emu])));
535 IGNORE_RC(write(tty, getsize[emu], strlen(getsize[emu])));
542 IGNORE_RC(write(tty, restore[emu], strlen(restore[emu])));
544 /* finally, set the tty's window size */
547 IGNORE_RC(write(tty, getwsize[emu], strlen(getwsize[emu])));
554 SET_TTYSIZE(tty, ts);
555 } else if (ioctl(tty, TIOCGWINSZ, &ts) != -1) {
564 SET_TTYSIZE(tty, ts);
569 rc = ioctl(tty, TCSETAW, &tioorig);
571 rc = tcsetattr(tty, TCSADRAIN, &tioorig);
573 rc = ioctl(tty, TIOCSETP, &sgorig);
576 failed("set tty settings");