TODO: nearly done - I just need to find out why for one statement rr4 is used

instead of rr6
This commit is contained in:
Oliver Lehmann 2008-05-06 18:17:00 +00:00
parent 00bdf794ec
commit 338d90258f
1 changed files with 18 additions and 14 deletions

View File

@ -144,11 +144,10 @@ int ncode;
flg = tp->t_lflag; flg = tp->t_lflag;
if (!(tp->t_state&IEXTPROC)) if (!(tp->t_state&IEXTPROC) && tp->t_lflag)
if (tp->t_lflag)
while (ncode--) { while (ncode--) {
c = *cp++; c = *cp++;
flg = tp->t_lflag; /* FIXME - wird das hier gebraucht? */ flg = tp->t_lflag;
if (flg&ISIG) { if (flg&ISIG) {
if (c == tp->t_cc[VINTR]) { if (c == tp->t_cc[VINTR]) {
@ -156,9 +155,9 @@ int ncode;
if (!(flg&NOFLSH)) if (!(flg&NOFLSH))
ttyflush(tp, (FREAD|FWRITE)); ttyflush(tp, (FREAD|FWRITE));
if ((flg&ECHO) && if ((flg&ECHO) &&
(flg&ISPCI)) { /* muss bleiben */ (flg&ISPCI)) {
for ( csp = "(intr)"; (*csp); csp++) for ( csp = "(intr)"; (*csp); )
ttxput(tp, (long) *csp, 0); ttxput(tp, (long) *csp++, 0);
(*tp->t_proc)(tp, T_OUTPUT); (*tp->t_proc)(tp, T_OUTPUT);
} }
continue; continue;
@ -167,10 +166,10 @@ int ncode;
signal(tp->t_pgrp, SIGQUIT); signal(tp->t_pgrp, SIGQUIT);
if (!(flg&NOFLSH)) if (!(flg&NOFLSH))
ttyflush(tp, (FREAD|FWRITE)); ttyflush(tp, (FREAD|FWRITE));
if ((flg&ECHO) || if ((flg&ECHO) &&
(flg&ISPCI)) { /* muss bleiben */ (flg&ISPCI)) {
for ( csp = "(quit)"; (*csp); csp++) for ( csp = "(quit)\n"; (*csp); )
ttxput(tp,(long) *csp, 0); ttxput(tp,(long) *csp++, 0);
(*tp->t_proc)(tp, T_OUTPUT); (*tp->t_proc)(tp, T_OUTPUT);
} }
continue; continue;
@ -194,7 +193,7 @@ int ncode;
c = '\b'; c = '\b';
} else if (c == tp->t_cc[VKILL] && flg&ECHOK) { } else if (c == tp->t_cc[VKILL] && flg&ECHOK) {
if ((flg & ECHO) && if ((flg & ECHO) &&
(flg & ISPCI)) { /* FIXME - muss das hier weg? */ (flg & ISPCI)) {
for ( csp = "XXX"; (*csp);) for ( csp = "XXX"; (*csp);)
ttxput(tp, (long) *csp++, 0); ttxput(tp, (long) *csp++, 0);
(*tp->t_proc)(tp, T_OUTPUT); (*tp->t_proc)(tp, T_OUTPUT);
@ -204,7 +203,7 @@ int ncode;
c = '\n'; c = '\n';
} else if (c == tp->t_cc[VEOF]) { } else if (c == tp->t_cc[VEOF]) {
if ((flg & ECHO) && if ((flg & ECHO) &&
(flg & ISPCI)) { /* muss bleiben */ (flg & ISPCI)) {
for ( csp = "(eof)\n"; (*csp);) for ( csp = "(eof)\n"; (*csp);)
ttxput(tp, (long) *csp++, 0); ttxput(tp, (long) *csp++, 0);
(*tp->t_proc)(tp, T_OUTPUT); (*tp->t_proc)(tp, T_OUTPUT);
@ -259,6 +258,7 @@ union {
} ucp; } ucp;
int ncode; int ncode;
{ {
register c; register c;
register flg; register flg;
register unsigned char *cp; register unsigned char *cp;
@ -290,6 +290,7 @@ int ncode;
cp = (unsigned char *)&ucp.ptr->c_data[ucp.ptr->c_first]; cp = (unsigned char *)&ucp.ptr->c_data[ucp.ptr->c_first];
scf = ucp.ptr; scf = ucp.ptr;
} }
while (ncode--) { while (ncode--) {
c = *cp++; c = *cp++;
if (c >= DELAYDEL){ if (c >= DELAYDEL){
@ -303,7 +304,7 @@ int ncode;
* Generate escapes for upper-case-only terminals. * Generate escapes for upper-case-only terminals.
*/ */
if (tp->t_lflag&XCASE) { if (tp->t_lflag&XCASE) {
colp = "({)}!|^~'`\\"; colp = "({)}!|^~'`\\\\";
while(*colp++) while(*colp++)
if (c == *colp++) { if (c == *colp++) {
tp->t_lflag &= ~XCASE; tp->t_lflag &= ~XCASE;
@ -348,7 +349,10 @@ int ncode;
goto cr; goto cr;
if (flg&ONLCR) { if (flg&ONLCR) {
if (!(flg&ONOCR && *colp==0)) { if (!(flg&ONOCR && *colp==0)) {
sysinfo.outch++; sysinfo.outch++; /* FIXME: in the original object
* it is loaded int rr6,
* we now load it into rr4
*/
putc('\r', &tp->t_outq); putc('\r', &tp->t_outq);
} }
goto cr; goto cr;