sync to 99.9% of the WEGA kernel
This commit is contained in:
parent
338d90258f
commit
4c0135e7e2
|
|
@ -11,6 +11,12 @@
|
|||
***************************************************************************
|
||||
**************************************************************************/
|
||||
|
||||
/*
|
||||
* Line discipline 0
|
||||
*/
|
||||
|
||||
char tt0wstr[] = "@[$]tt0.c Rev : 4.1 09/29/83 01:02:58";
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/state.h>
|
||||
#include <sys/conf.h>
|
||||
|
|
@ -27,14 +33,6 @@
|
|||
#include <sys/s.out.h>
|
||||
#include <sys/user.h>
|
||||
|
||||
/*
|
||||
* Line discipline 0
|
||||
*/
|
||||
|
||||
char tt0wstr[] = "@[$]tt0.c Rev : 4.1 09/29/83 01:02:58";
|
||||
|
||||
|
||||
extern putcb();
|
||||
extern char partab[];
|
||||
|
||||
/*
|
||||
|
|
@ -62,7 +60,6 @@ int ncode;
|
|||
register flg;
|
||||
register unsigned char *cp;
|
||||
char *csp;
|
||||
extern tttimeo();
|
||||
|
||||
flg = tp->t_iflag;
|
||||
switch (ncode) {
|
||||
|
|
@ -144,11 +141,10 @@ int ncode;
|
|||
|
||||
|
||||
flg = tp->t_lflag;
|
||||
if (!(tp->t_state&IEXTPROC) && tp->t_lflag)
|
||||
if (!(tp->t_state&IEXTPROC) && tp->t_lflag) {
|
||||
while (ncode--) {
|
||||
c = *cp++;
|
||||
flg = tp->t_lflag;
|
||||
|
||||
if (flg&ISIG) {
|
||||
if (c == tp->t_cc[VINTR]) {
|
||||
signal(tp->t_pgrp, SIGINT);
|
||||
|
|
@ -221,6 +217,7 @@ int ncode;
|
|||
(*tp->t_proc)(tp, T_OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(flg&ICANON)) {
|
||||
tp->t_state &= ~RTO;
|
||||
if (tp->t_rawq.c_cc >= tp->t_cc[VMIN])
|
||||
|
|
@ -258,13 +255,12 @@ union {
|
|||
} ucp;
|
||||
int ncode;
|
||||
{
|
||||
|
||||
register c;
|
||||
register flg;
|
||||
register unsigned char *cp;
|
||||
register char *colp;
|
||||
int ctype;
|
||||
register int cs;
|
||||
int cs;
|
||||
struct cblock *scf;
|
||||
|
||||
flg = tp->t_oflag;
|
||||
|
|
@ -290,7 +286,6 @@ int ncode;
|
|||
cp = (unsigned char *)&ucp.ptr->c_data[ucp.ptr->c_first];
|
||||
scf = ucp.ptr;
|
||||
}
|
||||
|
||||
while (ncode--) {
|
||||
c = *cp++;
|
||||
if (c >= DELAYDEL){
|
||||
|
|
@ -332,6 +327,7 @@ int ncode;
|
|||
colp = &tp->t_col;
|
||||
c = 0;
|
||||
switch (ctype&077) {
|
||||
|
||||
case 0: /* ordinary */
|
||||
(*colp)++;
|
||||
|
||||
|
|
@ -344,6 +340,7 @@ int ncode;
|
|||
if (*colp)
|
||||
(*colp)--;
|
||||
break;
|
||||
|
||||
case 3: /* line feed */
|
||||
if (flg&ONLRET)
|
||||
goto cr;
|
||||
|
|
@ -361,6 +358,7 @@ int ncode;
|
|||
if (flg&NLDLY)
|
||||
c = 5;
|
||||
break;
|
||||
|
||||
case 4: /* tab */
|
||||
c = 8 - ((*colp)&07);
|
||||
*colp += c;
|
||||
|
|
@ -405,6 +403,7 @@ int ncode;
|
|||
}
|
||||
*colp = 0;
|
||||
break;
|
||||
|
||||
case 7: /* form feed */
|
||||
if (flg&FFDLY)
|
||||
c = 0177;
|
||||
|
|
@ -431,7 +430,6 @@ int ncode;
|
|||
putcf(scf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get next function from output queue.
|
||||
* Called from xmit interrupt complete.
|
||||
|
|
@ -442,11 +440,9 @@ register struct tty *tp;
|
|||
return;
|
||||
}
|
||||
|
||||
extern timeout();
|
||||
tttimeo(tp)
|
||||
register struct tty *tp;
|
||||
{
|
||||
|
||||
tp->t_state &= ~TACT; /* timeout waiting on rawq */
|
||||
if (tp->t_lflag&ICANON)
|
||||
return; /* enable canonicalization */
|
||||
|
|
|
|||
Loading…
Reference in New Issue