Lines Matching refs:tp

363 	register const Tty_t*	tp;
365 for (tp = Ttable; tp < &Ttable[elementsof(Ttable)]; tp++)
366 if (tp->flags & (SS|US))
367 switch (tp->type)
371 switch (tp->field)
374 if (tp->flags & SS)
375 sp->c_cflag |= tp->mask;
377 sp->c_cflag &= ~tp->mask;
380 if (tp->flags & SS)
381 sp->c_iflag |= tp->mask;
383 sp->c_iflag &= ~tp->mask;
386 if (tp->flags & SS)
387 sp->c_oflag |= tp->mask;
389 sp->c_oflag &= ~tp->mask;
392 if (tp->flags & SS)
393 sp->c_lflag |= tp->mask;
395 sp->c_lflag &= ~tp->mask;
400 sp->c_cc[tp->mask] = cntl(tp->val);
468 const Tty_t *tp;
484 tp= &Ttable[i];
485 if(tp->flags&IG)
487 if(tp->flags&NL)
491 switch(tp->type)
496 switch(tp->field)
499 if(sp->c_cflag&tp->mask)
501 if(tty.c_cflag&tp->mask)
505 if(sp->c_iflag&tp->mask)
507 if(tty.c_iflag&tp->mask)
511 if((sp->c_oflag&tp->mask)==tp->val)
513 if(tty.c_oflag&tp->mask)
517 if(sp->c_lflag&tp->mask)
519 if(tty.c_lflag&tp->mask)
522 if(tp->flags&NL)
527 sfprintf(sfstdout,"%s%c",tp->name,delim);
528 else if(tp->type==BIT)
529 sfprintf(sfstdout,"-%s%c",tp->name,delim);
534 off = sp->c_cc[tp->mask];
535 if(tp->flags&NL)
537 if(!flags && off==(unsigned char)tty.c_cc[tp->mask])
540 sfprintf(sfstdout,"%s = <undef>;%c",tp->name,delim);
542 sfprintf(sfstdout,"%s = %c;%c",tp->name,off,delim);
545 sfprintf(sfstdout,"%s = ^%c;%c",tp->name,off==0177?'?':(off^0100),delim);
549 sfprintf(sfstdout,"%s = ^%c;%c",tp->name,off==0177?'?':ccmapc(off^0100,CC_ASCII,CC_NATIVE),delim);
555 if((sp->c_cflag&CSIZE)!=tp->mask)
558 sfprintf(sfstdout,"%s ",tp->name);
561 if(tp->mask==ispeed)
568 else if(tp->mask==ospeed)
578 sfprintf(sfstdout,"%sspeed %s baud; rows %d; columns %d;\n",schar,tp->name,win.ws_row,win.ws_col);
582 sfprintf(sfstdout,"%sspeed %s baud;\n",schar,tp->name);
635 const Tty_t *tp;
647 if(!(tp=lookup(cp)) || (off && (tp->type!=BIT) && (tp->type!=TABS)))
649 switch(tp->type)
658 sp->c_cc[tp->mask] = c;
660 sp->c_cc[tp->mask] = _POSIX_VDISABLE;
663 switch(tp->field)
667 sp->c_cflag &= ~tp->mask;
669 sp->c_cflag |= tp->mask;
673 sp->c_iflag &= ~tp->mask;
675 sp->c_iflag |= tp->mask;
678 sp->c_oflag &= ~tp->mask;
679 sp->c_oflag |= tp->val;
683 sp->c_lflag &= ~tp->mask;
685 sp->c_lflag |= tp->mask;
690 sp->c_oflag &= ~tp->mask;
692 sp->c_oflag |= tp->val;
700 error(ERROR_system(1),"cannot set %s",tp->name);
703 sfprintf(sfstdout,"%d\n",tp->mask?win.ws_col:win.ws_row);
709 error(ERROR_system(1),"%d: invalid number of %s",argv[-1],tp->name);
710 if(tp->mask)
715 error(ERROR_system(1),"cannot set %s",tp->name);
723 if (tp->field == C_SPEED)
725 if (tp = getspeed(*tp->name == 'i' ? cfgetispeed(sp) : cfgetospeed(sp)))
726 sfprintf(sfstdout, "%s\n", tp->name);
729 error(ERROR_exit(1), "%s: missing numeric argument", tp->name);
734 error(ERROR_exit(1), "%s: %s: numeric argument expected", tp->name, cp);
735 switch (tp->field)
745 if (*tp->name != 'o')
747 if (*tp->name != 'i')
751 error(ERROR_exit(1), "%s: %s: invalid speed", tp->name, cp);
754 sp->c_cc[tp->mask] = c;
759 cfsetospeed(sp, tp->mask);
760 cfsetispeed(sp, tp->mask);
764 sp->c_cflag |= tp->mask;
905 const Tty_t* tp;
943 else if (!(tp = lookup(argv[opt_info.index]+1)) || (tp->type != BIT && tp->type != TABS))