TODO: still not 100% equal

changed much code to get it more equal.
changed also code to make the diff to the plexis sources I have as small as
possible while getting the same object code
This commit is contained in:
Oliver Lehmann 2008-05-03 22:10:19 +00:00
parent 6c214e73e5
commit 84e28c465d
1 changed files with 504 additions and 487 deletions

View File

@ -1,487 +1,504 @@
#include <sys/param.h> /**************************************************************************
#include <sys/state.h> ***************************************************************************
#include <sys/conf.h>
#include <sys/dir.h> W E G A - Quelle
#include <sys/file.h> KERN 3.2 Modul : tt0.c
#include <sys/ioctl.h>
#include <sys/tty.h> Bearbeiter : O. Lehmann
#include <sys/ttold.h> Datum : 03.05.08
#include <sys/sysinfo.h> Version : 1.0
#include <sys/proc.h>
#include <sys/inode.h> ***************************************************************************
#include <sys/mmu.h> **************************************************************************/
#include <sys/s.out.h>
#include <sys/user.h> #include <sys/param.h>
#include <sys/state.h>
extern putcb(); #include <sys/conf.h>
#include <sys/dir.h>
ttin(tp, c, count) #include <sys/file.h>
register struct tty *tp; #include <sys/ioctl.h>
long c; #include <sys/tty.h>
int count; #include <sys/ttold.h>
{ #include <sys/sysinfo.h>
#include <sys/systm.h>
register ushort ch; #include <sys/proc.h>
register ushort mode; #include <sys/inode.h>
register char *cp; #include <sys/mmu.h>
char *csp; #include <sys/s.out.h>
#include <sys/user.h>
extern tttimeo();
/*
mode = tp->t_iflag; * Line discipline 0
if (count){ */
if (count == 1)
goto L214; char tt0wstr[] = "@[$]tt0.c Rev : 4.1 09/29/83 01:02:58";
putcb(c, tp);
sysinfo.rawch += count;
cp = &c->c_data[c->c_first]; extern putcb();
L5a: extern char partab[];
if (tp->t_rawq.c_cc <= TTXOHI) { /* 3 */
L62: #ifdef 0
mode = tp->t_lflag; ttin(tp, c, count)
if ((tp->t_state & IEXTPROC) || register struct tty *tp;
(mode == 0)){ /* 4,5 */ long c;
if (!(mode & ICANON)){/* 6 */ int count;
tp->t_state &= ~RTO; {
if (tp->t_cc[VMIN] <= tp->t_rawq.c_cc) /* 7 */ register ushort ch;
tp->t_delct = 1; register ushort mode;
else register char *cp;
if ((tp->t_cc[VTIME]) && char *csp;
((tp->t_state & TACT) == 0)) /* 72,73 */ char *foo;
ttimeout(tp);
if ((tp->t_delct) == 0) return; /* 74 */ extern tttimeo();
}
if (tp->t_state & IASLP) { /* 75 */ mode = tp->t_iflag;
tp->t_state &= ~IASLP; if( count) {
wakeup(tp); if(count == 1)
} goto L214;
return; putcb(c, tp);
} sysinfo.rawch += count;
if (count--){ /* 67 */ cp = &c->c_data[c->c_first];
ch = *cp++; L5a:
mode = tp->t_lflag; if (tp->t_rawq.c_cc <= TTXOHI) { /* 3 */
if (!(mode & ISIG)){ /* 68 */ L62:
L494: mode = tp->t_lflag;
if (mode & ICANON){ /* 69 */ if ((tp->t_state & IEXTPROC) ||
if (ch == '\n'){ /* 70 */ (mode == 0)){ /* 4,5 */
if (mode & ECHONL) if (!(mode & ICANON)){/* 6 */
mode |= ECHO; tp->t_state &= ~RTO;
tp->t_delct++; if (tp->t_cc[VMIN] <= tp->t_rawq.c_cc) /* 7 */
} tp->t_delct = 1;
else else
if (ch == tp->t_cc[VEOL]) if ((tp->t_cc[VTIME]) &&
tp->t_delct++; ((tp->t_state & TACT) == 0)) /* 72,73 */
if ((tp->t_state & ESC) == 0){ /* 50 */ ttimeout(tp);
if (ch == '\\') if ((tp->t_delct) == 0) return; /* 74 */
tp->t_state |= ESC; }
if ((ch == tp->t_cc[VERASE]) && if (tp->t_state & IASLP) { /* 75 */
(mode & INPCK)){ /* 52,53 */ tp->t_state &= ~IASLP;
if (mode & ECHO) /* 54 */ wakeup(tp);
ttxput(tp, (long) CERASE, 0); }
mode |= ECHO; return;
ttxput(tp, (long) ' ', 0); }
ch = CERASE; if (count--){ /* 67 */
} /* von 52,53 */ ch = *cp++;
else if ((ch == tp->t_cc[VKILL]) && mode = tp->t_lflag;
(mode & ISTRIP)){ /* 55,56 */ if (!(mode & ISIG)){ /* 68 */
if ((mode & ECHO) && L494:
(mode & ISPCI)){ /* 57,58 */ if (mode & ICANON){ /* 69 */
for ( csp = &"???"; (*csp);) if (ch == '\n'){ /* 70 */
ttxput(tp, (long) *csp++, 0); if (mode & ECHONL)
(*tp->t_proc)(tp, T_OUTPUT); mode |= ECHO;
} tp->t_delct++;
ttxput(tp, (long) ch, 0); }
mode |= ECHO; else
ch = '\n'; if (ch == tp->t_cc[VEOL])
} tp->t_delct++;
else if (ch != tp->t_cc[VEOF]) /* 60 */ if ((tp->t_state & ESC) == 0){ /* 50 */
if ((mode & ECHO) && if (ch == '\\')
(mode & ISPCI)){ /* 61,62 */ tp->t_state |= ESC;
for ( csp = &"(eof)"; (*csp);) if ((ch == tp->t_cc[VERASE]) &&
ttxput(tp, (long) *csp++, 0); (mode & INPCK)){ /* 52,53 */
(*tp->t_proc)(tp, T_OUTPUT); if (mode & ECHO) /* 54 */
} ttxput(tp, (long) CERASE, 0);
mode &= ~ECHO; mode |= ECHO;
tp->t_delct++; ttxput(tp, (long) ' ', 0);
} ch = CERASE;
else if ((ch == '\\') || } /* von 52,53 */
(mode & XCASE)) /* 64,65 */ else if ((ch == tp->t_cc[VKILL]) &&
tp->t_state &= ~RTO; (mode & ISTRIP)){ /* 55,56 */
} if ((mode & ECHO) &&
if (mode & ECHO) /* 66 */ (mode & ISPCI)){ /* 57,58 */
ttxput(tp, (long) ch, 0); for ( csp = &"???"; (*csp);)
(*tp->t_proc)(tp, T_OUTPUT); ttxput(tp, (long) *csp++, 0);
} /* von 68 */ (*tp->t_proc)(tp, T_OUTPUT);
else { }
if (ch != tp->t_cc[VINTR]){ /* 43 */ ttxput(tp, (long) ch, 0);
if (ch == tp->t_cc[VQUIT]) /* 44 */ mode |= ECHO;
goto L494; ch = '\n';
if (!(mode & NOFLSH)) }
ttyflush(tp, T_RESUME); else if (ch != tp->t_cc[VEOF]) /* 60 */
if ((mode & ECHO) || if ((mode & ECHO) &&
(mode & ISPCI)){ /* 46,47 */ (mode & ISPCI)){ /* 61,62 */
for ( csp = &"(quit)"; (*csp); csp++) for ( csp = &"(eof)"; (*csp);)
ttxput(tp,(long) *csp, 0); ttxput(tp, (long) *csp++, 0);
(*tp->t_proc)(tp, T_OUTPUT); (*tp->t_proc)(tp, T_OUTPUT);
} /* von 43 */ }
} mode &= ~ECHO;
else { tp->t_delct++;
if (!(mode & NOFLSH)) }
ttyflush(tp, T_RESUME); else if ((ch == '\\') ||
if ((mode & ECHO) && (mode & XCASE)) /* 64,65 */
(mode & ISPCI)) /* 40,41 */{ tp->t_state &= ~RTO;
for ( csp = &"(intr)"; (*csp); csp++) }
ttxput(tp, (long) *csp, 0); if (mode & ECHO) /* 66 */
(*tp->t_proc)(tp, T_OUTPUT); ttxput(tp, (long) ch, 0);
} /* von 40,41 */ (*tp->t_proc)(tp, T_OUTPUT);
} } /* von 68 */
} /* von 68 else */ else {
} /* von 67 */ if (ch != tp->t_cc[VINTR]){ /* 43 */
if (!(mode & ICANON)){ /* 6 */ if (ch == tp->t_cc[VQUIT]) /* 44 */
if (tp->t_cc[VMIN] <= tp->t_rawq.c_cc) goto L494;
tp->t_delct = 1; if (!(mode & NOFLSH))
if ((tp->t_cc[VTIME]) && ttyflush(tp, T_RESUME);
((tp->t_state & TACT) == 0)) if ((mode & ECHO) ||
meout(tp); (mode & ISPCI)){ /* 46,47 */
} /* von 6 */ for ( csp = &"(quit)"; (*csp); csp++)
if ((tp->t_delct) && ttxput(tp,(long) *csp, 0);
(tp->t_state & IASLP)){ /* 74,75 */ (*tp->t_proc)(tp, T_OUTPUT);
tp->t_state &= ~IASLP; } /* von 43 */
wakeup(tp); }
} else {
return; if (!(mode & NOFLSH))
} /* von 3 */ ttyflush(tp, T_RESUME);
else { if ((mode & ECHO) &&
if ((mode & IXOFF)&& (mode & ISPCI)) /* 40,41 */{
(tp->t_state & TBLOCK)) /* 8,9 */ for ( csp = &"(intr)"; (*csp); csp++)
(*tp->t_proc)(tp, T_BLOCK); ttxput(tp, (long) *csp, 0);
if (tp->t_rawq.c_cc <= TTYHOG) /* 10 */ (*tp->t_proc)(tp, T_OUTPUT);
goto L62; } /* von 40,41 */
else }
ttyflush(tp, T_TIME); } /* von 68 else */
return; } /* von 67 */
} /* 3 von else */ if (!(mode & ICANON)){ /* 6 */
} /* von 1 */ if (tp->t_cc[VMIN] <= tp->t_rawq.c_cc)
else { tp->t_delct = 1;
count++; if ((tp->t_cc[VTIME]) &&
ch = c.half.left; ((tp->t_state & TACT) == 0))
if ((ch & IXOFF) && meout(tp);
(!(mode & INPCK))) /* 13,14 */ } /* von 6 */
ch &= ~PERROR; if ((tp->t_delct) &&
if (ch & (OVERRUN | FRERROR | PERROR)){ /* 15 */ (tp->t_state & IASLP)){ /* 74,75 */
if (ch & 0xff){ /* 16 */ tp->t_state &= ~IASLP;
if (mode & IGNPAR) return; wakeup(tp);
if (mode & IGNBRK) return; }
if (mode & BRKINT){ /* 12 */ return;
signal(tp->t_pgrp, SIGINT); } /* von 3 */
ttyflush(tp, T_RESUME); else {
return; if ((mode & IXOFF)&&
} (tp->t_state & TBLOCK)) /* 8,9 */
} /* von 16 */ (*tp->t_proc)(tp, T_BLOCK);
if (mode & PARMRK){ /* 18 */ if (tp->t_rawq.c_cc <= TTYHOG) /* 10 */
ttin(tp, (long) 0xff, 1); goto L62;
ttin(tp, (long) 0, 1); else
} ttyflush(tp, T_TIME);
else return;
ch = 0; } /* 3 von else */
ch |= ICRNL; } /* von 1 */
} /* von 15 */ else {
else { count++;
if (mode & ISTRIP) /* 23 */ ch = c.half.left;
ch &= 0x7f; if ((ch & IXOFF) &&
else (!(mode & INPCK))) /* 13,14 */
if (((ch & 0xff)== 0xff) && ch &= ~PERROR;
(mode & PARMRK) && if (ch & (OVERRUN | FRERROR | PERROR)){ /* 15 */
(putc( 0xff, tp))) /* 24,25,26 */ return; if (ch & 0xff){ /* 16 */
} if (mode & IGNPAR) return;
if (mode & IXON){ /* 19 */ if (mode & IGNBRK) return;
if (tp->t_state & TTSTOP) if (mode & BRKINT){ /* 12 */
if ((ch == CSTART) || signal(tp->t_pgrp, SIGINT);
(mode & IXANY)) /* 21,22 */ ttyflush(tp, T_RESUME);
(*tp->t_proc)(tp, T_RESUME); return;
if (ch == CSTART) return; }
if (ch == CSTOP) return; } /* von 16 */
} if (mode & PARMRK){ /* 18 */
if ((ch == '\n')&& ttin(tp, (long) 0xff, 1);
(mode & INLCR)) /* 30,31 */ ttin(tp, (long) 0, 1);
c = '\r'; }
else { else
if (c == 0xd){ /* 32 */ ch = 0;
if (mode & IGNCR) return; ch |= ICRNL;
if (mode & ICRNL) } /* von 15 */
c = '\n'; else {
} if (mode & ISTRIP) /* 23 */
} ch &= 0x7f;
} else
if (mode & IUCLC) /* 35 */ if (((ch & 0xff)== 0xff) &&
c = toupper(c); (mode & PARMRK) &&
L214: (putc( 0xff, tp))) /* 24,25,26 */ return;
if (putc(c, tp)){/* 38 */ }
sysinfo.rawch++; if (mode & IXON){ /* 19 */
cp = &lobyte(c.half.right); if (tp->t_state & TTSTOP)
goto L5a; if ((ch == CSTART) ||
} (mode & IXANY)) /* 21,22 */
} (*tp->t_proc)(tp, T_RESUME);
if (ch == CSTART) return;
if (ch == CSTOP) return;
}
if ((ch == '\n')&&
extern char partab[]; (mode & INLCR)) /* 30,31 */
ttxput(tp, arg, count) c = '\r';
register struct tty *tp; else {
union { if (c == 0xd){ /* 32 */
long c; if (mode & IGNCR) return;
struct cblock *cb; if (mode & ICRNL)
struct c = '\n';
{ }
char l_l; }
char l_r; }
char r_l; if (mode & IUCLC) /* 35 */
char r_r; c = toupper(c);
} L214:
byte; if (putc(c, tp))
} return;
arg; sysinfo.rawch++;
int count; cp = &lobyte(c.half.right);
goto L5a;
{ }
#endif
register ch;
register ushort mode; /*
register char *cp; * Put character(s) on TTY output queue, adding delays,
char *colp; * expanding tabs, and handling the CR/NL bit.
int pch, vch; * It is called both from the top half for output, and from
struct cblock *cbp; * interrupt level for echoing.
*/
mode = tp->t_oflag; ttxput(tp, ucp, ncode)
if (tp->t_state & OEXTPROC) register struct tty *tp;
mode &= ~OPOST; union {
if (!(count)) { long ch;
if (tp->t_outq.c_cc >= TTYHOG) return; struct cblock *ptr;
count++; struct
if (!(mode & OPOST)){ {
sysinfo.outch++; char l_l;
putc(arg.r_r, &tp->t_outq); char l_r;
return; char r_l;
} char r_r;
else { }
cp = &arg.r_r; byte;
cbp = 0; } ucp;
} int ncode;
} {
else { register c;
if (!(mode & OPOST)){ register flg;
sysinfo.outch += count; register unsigned char *cp;
putcb(arg.c, &tp->t_outq); register char *colp;
return; int ctype;
} register int cs;
else { struct cblock *scf;
cp = &arg.cb->c_data[arg.cb->c_first];
cbp = arg.cb; flg = tp->t_oflag;
} if (tp->t_state&OEXTPROC)
} flg &= ~OPOST;
while(count--){ if (ncode == 0) {
ch = (unsigned char) (*cp++); if (tp->t_outq.c_cc >= TTYHOG)
if (ch >= DELAYDEL){ /* b7 */ return;
if (ch == DELAYDEL) ncode++;
putc(DELAYDEL, &tp->t_outq); if (!(flg&OPOST)) {
sysinfo.outch++; sysinfo.outch++;
putc(ch, &tp->t_outq); putc(ucp.r_r, &tp->t_outq);
continue; return;
} }
if (tp->t_lflag & XCASE){ cp = (unsigned char *)&ucp.r_r;
for ( colp = "({)}!|^~'`\\"; (*colp++); ) scf = NULL;
if (ch == *colp++){ } else {
tp->t_lflag &= ~XCASE; if (!(flg&OPOST)) {
ttxput(tp, (long)'\\', 0); sysinfo.outch += ncode;
tp->t_lflag |= XCASE; putcb(ucp.ch, &tp->t_outq);
ch = *(colp - 2); return;
break; }
} cp = (unsigned char *)&ucp.ptr->c_data[ucp.ptr->c_first];
if ((ch >= 'A') && (ch <= 'Z')){ scf = ucp.ptr;
tp->t_lflag &= ~XCASE; }
ttxput(tp, (long)'\\', 0); while (ncode--) {
tp->t_lflag |= XCASE; c = *cp++;
} if (c >= DELAYDEL){
} if (c == DELAYDEL)
if (mode & OLCUC) putc(DELAYDEL, &tp->t_outq);
if ((ch >= 'a') && sysinfo.outch++;
(ch <= 'z')) putc(c, &tp->t_outq);
ch += 'A'-'a'; continue;
vch = ch; }
pch = partab[ch]; /*
colp = &tp->t_col; * Generate escapes for upper-case-only terminals.
ch = 0; */
switch (pch & 077){ if (tp->t_lflag&XCASE) {
case 0: colp = "({)}!|^~'`\\";
(*colp)++; while(*colp++)
break; if (c == *colp++) {
case 2: tp->t_lflag &= ~XCASE;
if (mode & BS1) ttxput(tp, (long)'\\', 0);
ch = 2; tp->t_lflag |= XCASE;
if (*colp) c = colp[-2];
(*colp)--; break;
break; }
case 3: if ('A' <= c && c <= 'Z'){
if (!(mode & ONLRET)){ tp->t_lflag &= ~XCASE;
if (mode & ONLCR){ ttxput(tp, (long)'\\', 0);
if ((!(mode & ONOCR)) || tp->t_lflag |= XCASE;
(*colp)){ }
sysinfo.outch++; }
putc('\r', &tp->t_outq); if (flg&OLCUC && 'a' <= c && c <= 'z')
} c += 'A' - 'a';
} cs = c;
else /*
goto nldly; * Calculate delays.
} * The numbers here represent clock ticks
goto crdly; * and are not necessarily optimal for all terminals.
case 4: * The delays are indicated by characters above 0200.
ch = 8 - (*colp & 7); */
*colp += ch; ctype = partab[c];
pch = mode & TABDLY; colp = &tp->t_col;
if (pch == 0){ c = 0;
ch = 0; switch (ctype&077) {
break; case 0: /* ordinary */
} (*colp)++;
if (pch == TAB1){
if (ch < 5) case 1: /* non-printing */
ch = 0; break;
break;
} case 2: /* backspace */
if (pch == TAB2){ if (flg&BSDLY)
ch = 2; c = 2;
break; if (*colp)
} (*colp)--;
if (pch == TAB3){ break;
sysinfo.outch += ch; case 3: /* line feed */
do if (flg&ONLRET)
putc(' ', &tp->t_outq); goto cr;
while (--ch); if (flg&ONLCR) {
continue; if (!(flg&ONOCR && *colp==0)) {
} sysinfo.outch++;
break; putc('\r', &tp->t_outq);
case 5: }
if (mode & VTDLY) goto cr;
ch = 0x7f; }
break; nl:
case 6: if (flg&NLDLY)
if (mode & OCRNL){ c = 5;
vch = '\n'; break;
nldly: case 4: /* tab */
if (mode & NLDLY) c = 8 - ((*colp)&07);
ch = 5; *colp += c;
break; ctype = flg&TABDLY;
} if (ctype == TAB0) {
if ((mode & ONOCR) && c = 0;
(*colp == 0)) } else if (ctype == TAB1) {
continue; if (c < 5)
crdly: c = 0;
pch = mode & CRDLY; } else if (ctype == TAB2) {
if (pch == CR1){ c = 2;
if (*colp) } else if (ctype == TAB3) {
ch = max((*colp>>4)+3, 6); sysinfo.outch += c;
} do
else putc(' ', &tp->t_outq);
if (pch == CR2) while (--c);
ch = 5; continue;
else }
if (pch == CR3) break;
ch = 9;
*colp = 0; case 5: /* vertical tab */
case 1: if (flg&VTDLY)
default: c = 0177;
break; break;
case 7:
if (mode & FFDLY) case 6: /* carriage return */
ch = 0x7f; if (flg&OCRNL) {
} cs = '\n';
sysinfo.outch++; goto nl;
putc(vch, &tp->t_outq); }
if (ch){ if (flg&ONOCR && *colp == 0)
if ((ch < ' ') && continue;
(mode & OFILL)){ cr:
if (mode & OFDEL) ctype = flg&CRDLY;
vch = 0x7f; if (ctype == CR1) {
else if (*colp)
vch = 0; c = max((*colp>>4) + 3, 6);
putc(vch, &tp->t_outq); } else if (ctype == CR2) {
if (ch > 3) c = 5;
putc(vch, &tp->t_outq); } else if (ctype == CR3) {
c = 9;
} }
else { *colp = 0;
putc(DELAYDEL, &tp->t_outq); break;
putc(ch | DELAYDEL, &tp->t_outq); case 7: /* form feed */
} if (flg&FFDLY)
} c = 0177;
/* } break;
else { }
putc(DELAYDEL, &tp->t_outq); sysinfo.outch++;
sysinfo.outch++; putc(cs, &tp->t_outq);
putc(ch, &tp->t_outq); if (c) {
continue; if ((c < 32) && flg&OFILL) {
} */ if (flg&OFDEL)
} /* von while */ cs = 0177;
if (cbp) else
putcf(cbp); cs = 0;
} putc(cs, &tp->t_outq);
if (c > 3)
ttout(tp) putc(cs, &tp->t_outq);
register struct tty *tp; } else {
{ putc(DELAYDEL, &tp->t_outq);
return; putc(c|DELAYDEL, &tp->t_outq);
} }
}
}
extern timeout(); if (scf != NULL)
tttimeout(tp) putcf(scf);
register struct tty *tp; }
{
tp->t_state &= ~TACT; /* timeout waiting on rawq */ /*
if (tp->t_lflag & ICANON) return; /* enable canonicalization */ * Get next function from output queue.
if (tp->t_cc[VTIME] == 0) return; /* time out */ * Called from xmit interrupt complete.
if (( tp->t_rawq.c_cc == 0) && (tp->t_cc[VMIN])) return; */
if (tp->t_state & RTO){ /* timeout waiting on rawq */ ttout(tp)
tp->t_delct = 1; register struct tty *tp;
if (!(tp->t_state & IASLP)) return; /* wakeup when input done */ {
tp->t_state &= ~IASLP; return;
wakeup(tp); }
return;
} extern timeout();
tp->t_state |= (RTO | TACT); tttimeo(tp)
timeout(tttimeout, tp, tp->t_cc[VTIME] * 6); register struct tty *tp;
} {
extern putcb(); tp->t_state &= ~TACT; /* timeout waiting on rawq */
if (tp->t_lflag&ICANON)
ttioctl(tp, com, arg) return; /* enable canonicalization */
register struct tty *tp; if (tp->t_cc[VTIME] == 0)
int com; return; /* time out */
long arg; if (( tp->t_rawq.c_cc == 0) && (tp->t_cc[VMIN]))
{ return;
if (tp->t_state&RTO) { /* timeout waiting on rawq */
ushort ldmode; tp->t_delct = 1;
if (tp->t_state&IASLP) {/* wakeup when input done */
switch(com) { tp->t_state &= ~IASLP;
case LDCHG: wakeup(tp);
ldmode = tp->t_lflag ^ arg; }
if (!(ldmode & ICANON)) } else {
break; tp->t_state |= RTO|TACT;
dvi(); timeout(tttimeo, tp, tp->t_cc[VTIME]*(HZ/10));
if (tp->t_canq.c_cc){ }
if (tp->t_rawq.c_cc){ }
tp->t_canq.c_cc += tp->t_rawq.c_cc;
tp->t_canq.c_cl->c_next = tp->t_rawq.c_cf; ttioctl(tp, cmd, arg)
tp->t_outq.c_cf = tp->t_rawq.c_cl; register struct tty *tp;
} int cmd;
tp->t_rawq = tp->t_canq; long arg;
tp->t_canq = ttnulq; {
} ushort chg;
tp->t_delct = tp->t_rawq.c_cc;
evi(); switch(cmd) {
break; case LDCHG:
default: chg = tp->t_lflag^arg;
break; if (!(chg&ICANON))
} break;
} dvi();
if (tp->t_canq.c_cc) {
if (tp->t_rawq.c_cc) {
tp->t_canq.c_cc += tp->t_rawq.c_cc;
tp->t_canq.c_cl->c_next = tp->t_rawq.c_cf;
tp->t_canq.c_cl = tp->t_rawq.c_cl;
}
tp->t_rawq = tp->t_canq;
tp->t_canq = ttnulq;
}
tp->t_delct = tp->t_rawq.c_cc;
evi();
break;
default:
break;
}
}