Lines Matching refs:ttyi

83  * we continue on as before using stdout as ttyi and ttyo. Doesn't work when we're
100 ttyi = fileno(stdout);
102 else if ( (ttyi = open(line, O_RDWR)) == -1 )
105 if ( (ttyo = dup(ttyi)) == -1 ) {
109 if ( fcntl(ttyi, F_SETFL, O_NDELAY) == -1 ) {
113 if ( ioctl(ttyi, TCGETS, &termios) < 0 ) {
114 if ( ioctl(ttyi, TCGETA, &termio) == -1 ) {
125 if ( ioctl(ttyi, TCSETA, &termio) == -1 ) {
137 if ( ioctl(ttyi, TCSETS, &termios) == -1 ) {
142 if ( ioctl(ttyi, TCFLSH, 2) == -1 ) {
145 fp_ttyi = fdopen(ttyi, "r");
177 if ( (flags = fcntl(ttyi, F_GETFL, 0)) == -1 )
182 if ( fcntl(ttyi, F_SETFL, flags) == -1 )
185 if ( ioctl(ttyi, TCGETA, &termio) == -1 )
193 if ( ioctl(ttyi, TCSETA, &termio) == -1 )
267 * Reads characters coming back from the printer on ttyi up to a newline (or EOF)
297 while ( (n = read(ttyi, ptr, 1)) != 0 ) {
364 ttyi = ttyo = 1;
369 if ((ttyi = ipcopen(line, "")) < 0) {
371 if ((ttyi = ipcopen(line, "")) < 0)
374 } else if ( (ttyi = open(line, O_RDWR)) == -1 )
377 if ( (ttyo = dup(ttyi)) == -1 )
380 if ( ioctl(ttyi, FIOPUSHLD, &tty_ld) == -1 )
383 if ( ioctl(ttyi, TIOCGDEV, &ttydev) == -1 )
386 if ( ioctl(ttyi, TIOCGETP, &sgtty) == -1 )
395 if ( ioctl(ttyi, TIOCSDEV, &ttydev) == -1 )
398 if ( ioctl(ttyi, TIOCSETP, &sgtty) == -1 )
401 if ( ioctl(ttyi, TIOCSETC, &tchar) == -1 )
404 fp_ttyi = fdopen(ttyi, "r");
432 if ( ioctl(ttyi, TIOCGETP, &sgtty) == -1 )
437 if ( ioctl(ttyi, TIOCSETP, &sgtty) == -1 )
513 * Reads characters coming back from the printer on ttyi up to a newline (or EOF)
514 * and transfers each line to the mesg[] array. Everything available on ttyi is
518 * If nothing is available on ttyi we return FALSE if a single process is being
521 * echoing everything that comes back on ttyi to stdout. The performance of a
545 if ( ioctl(ttyi, FIONREAD, &n) < 0 )
553 if ( (n = read(ttyi, tbuf, n)) < 0 )
565 if ( ioctl(ttyi, FIONREAD, &n) < 0 )
568 if ( (n = read(ttyi, tbuf, n)) < 0 )
607 * (ie. line == NULL) we continue on as before using stdout as ttyi and ttyo.
613 ttyi = fileno(stdout);
614 else if ( (ttyi = open(line, O_RDWR)) == -1 )
617 if ( (ttyo = dup(ttyi)) == -1 )
620 if (ioctl(ttyi, TIOCSETD, &disc) == -1 )
623 if ( ioctl(ttyi, TIOCGETP, &sgtty) == -1 )
626 if ( ioctl(ttyi, TIOCLGET, &lmodes) == -1 )
636 if ( ioctl(ttyi, TIOCSETP, &sgtty) == -1 )
639 if ( ioctl(ttyi, TIOCSETC, &tchar) == -1 )
642 if ( ioctl(ttyi, TIOCLSET, &lmodes) == -1 )
645 fp_ttyi = fdopen(ttyi, "r");
673 if ( ioctl(ttyi, TIOCGETP, &sgtty) == -1 )
678 if ( ioctl(ttyi, TIOCSETP, &sgtty) == -1 )
762 * everything available on ttyi into a temporary buffer and work from there rather
770 if ( ioctl(ttyi, FIONREAD, &n) < 0 )
779 /*if ( read(ttyi, ptr, 1) < 0 )*/
938 while ( (dfd = ttyi = dkdial(line)) < 0 ) {
952 if ( ioctl(ttyi, DIOCRMODE, dkrmode) == -1 )
955 line = dtnamer(dkminor(ttyi));
957 if ( (ttyi = open(line, O_RDWR)) == -1 )