[8439] in Athena Bugs
8-bit fix for tty.c
daemon@ATHENA.MIT.EDU (Calvin Clark)
Sun Oct 20 22:48:39 1991
Date: Sun, 20 Oct 91 22:49:35 -0400
From: Calvin Clark <ckclark@Athena.MIT.EDU>
To: bugs@Athena.MIT.EDU
Reply-To: ckclark@mit.edu
The following patch fixes a problem I've been annoyed with for
years---stty pass8 will pass all 8 bits on input, but not on output.
This means that if you want to display 8-bit characters in an xterm, you
have to run in raw or litout mode. There is no reason why this should
be the case. The following fix will allow 8-bit characters to be
displayed if `stty pass8' is called:
-Calvin
*** /source/bsd-4.3/common/sys/sys/tty.c Wed Feb 6 14:09:34 1991
--- tty.c Sun Oct 20 22:16:11 1991
***************
*** 1044,1050 ****
* Ignore EOT in normal mode to avoid
* hanging up certain terminals.
*/
! c &= 0177;
if (c == CEOT && (tp->t_flags&CBREAK) == 0)
return (-1);
/*
--- 1044,1051 ----
* Ignore EOT in normal mode to avoid
* hanging up certain terminals.
*/
! if ((tp->t_flags&PASS8) == 0)
! c &= 0177;
if (c == CEOT && (tp->t_flags&CBREAK) == 0)
return (-1);
/*
***************
*** 1684,1690 ****
if (tp->t_flags&CTLECH) {
if ((c&0177) <= 037 && c!='\t' && c!='\n' || (c&0177)==0177) {
(void) ttyoutput('^', tp);
! c &= 0177;
if (c == 0177)
c = '?';
else if (tp->t_flags&LCASE)
--- 1685,1692 ----
if (tp->t_flags&CTLECH) {
if ((c&0177) <= 037 && c!='\t' && c!='\n' || (c&0177)==0177) {
(void) ttyoutput('^', tp);
! if ((tp->t_flags&PASS8) == 0)
! c &= 0177;
if (c == 0177)
c = '?';
else if (tp->t_flags&LCASE)
***************
*** 1693,1699 ****
c += 'A' - 1;
}
}
! (void) ttyoutput(c&0177, tp);
}
/*
--- 1695,1701 ----
c += 'A' - 1;
}
}
! (void) ttyoutput(c, tp);
}
/*