- /* carriage return */
- case 6:
- ctype = (tp->t_flags >> 12) & 03;
- if(ctype == 1) { /* tn 300 */
- c = 5;
- } else if(ctype == 2) { /* ti 700 */
- c = 10;
- } else if(ctype == 3) { /* concept 100 */
- int i;
- for (i= *colp; i<9; i++)
- (void) putc(0177, &tp->t_outq);
- }
- *colp = 0;
- }
- if(c)
- (void) putc(c|0200, &tp->t_outq);
-}
-
-/*
- * Restart typewriter output following a delay
- * timeout.
- * The name of the routine is passed to the timeout
- * subroutine and it is called during a clock interrupt.
- */
-ttrstrt(tp)
-register struct tty *tp;
-{
-
- tp->t_state &= ~TIMEOUT;
- ttstart(tp);
-}
-
-/*
- * Start output on the typewriter. It is used from the top half
- * after some characters have been put on the output queue,
- * from the interrupt routine to transmit the next
- * character, and after a timeout has finished.
- */
-ttstart(tp)
-register struct tty *tp;
-{
- register s;
-
- s = spl5();
- if((tp->t_state&(TIMEOUT|TTSTOP|BUSY)) == 0)
- (*tp->t_oproc)(tp);
- splx(s);
-}
-
-/*
- * Called from device's read routine after it has
- * calculated the tty-structure given as argument.
- */
-ttread(tp)
-register struct tty *tp;
-{
-register s;
-
- if ((tp->t_state&CARR_ON)==0)
- return(-1);
- s = spl5();
- if (tp->t_canq.c_cc==0)
- while (canon(tp)<0)
- if (tp->t_chan==NULL) {
- sleep((caddr_t)&tp->t_rawq, TTIPRI);
- } else {
- splx(s);
- return(0);
- }
- splx(s);
- while (tp->t_canq.c_cc && passc(getc(&tp->t_canq))>=0)
- ;
- return(tp->t_rawq.c_cc+tp->t_canq.c_cc);
-}
-
-/*
- * Called from the device's write routine after it has
- * calculated the tty-structure given as argument.
- */
-caddr_t
-ttwrite(tp)
-register struct tty *tp;
-{