Subject: port-amiga/822: 8bit Amiga console
To: None <gnats-admin@NetBSD.ORG>
From: Michael van Elst <mlelstv@serpens.rhein.de>
List: netbsd-bugs
Date: 02/23/1995 02:20:09
>Number:         822
>Category:       port-amiga
>Synopsis:       Amiga console is limited to 7bit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 23 02:20:08 1995
>Originator:
>Organization:
>Release:        1.0
>Environment:
System: NetBSD serpens 1.0 NetBSD 1.0 (SERPENS) #30: Wed Feb 22 22:53:46 MET 1995 root@serpens:/usr2/src/sys/arch/amiga/compile/SERPENS amiga

>Description:
Amiga console is limited to 7bit characters because of 2 bugs in
sys/arch/amiga/dev/ite.c and sys/arch/amiga/dev/ite_cc.c.

In ite.c the VT-parser throws away all chars less than ' ' which
also catches chars above (char)128.

In ite_cc.c (and upper calling routines) and int is used for the
character code to be printed which is derived from a signed char.
This code is then compared against the code limits of the font
which are u_char. Casting to u_char makes the check and the use
as an index into the font table work.
Additionally I made it emit the last character in the font for
characters not in the font (usually a DEL symbol).

This still exists in the -current sources.

>How-To-Repeat:
Simply type an umlaut on a german keyboard. No char is output
although the character exists in the font.

>Fix:
*** ite.c.release	Thu Feb 23 11:09:22 1995
--- ite.c	Thu Feb 23 11:11:45 1995
***************
*** 2150,2156 ****
  		break;
  
  	default:
! 		if (c < ' ' || c == DEL)
  			break;
  		if (ip->imode)
  			ite_inchar(ip, 1);
--- 2150,2156 ----
  		break;
  
  	default:
! 		if ((c & 0x7f) < ' ' || c == DEL)
  			break;
  		if (ip->imode)
  			ite_inchar(ip, 1);
*** ite_cc.c.release	Thu Feb 23 11:11:09 1995
--- ite_cc.c	Thu Feb 23 11:11:51 1995
***************
*** 729,736 ****
  putc8(struct ite_softc *ip, int c, int dy, int dx, int mode)
  {
      register ipriv_t *cci = (ipriv_t *) ip->priv;
      if (c < ip->font_lo || c > ip->font_hi)
! 	return;
  
      put_func[mode](cci,
  		   cci->row_ptr[dy],
--- 729,738 ----
  putc8(struct ite_softc *ip, int c, int dy, int dx, int mode)
  {
      register ipriv_t *cci = (ipriv_t *) ip->priv;
+ 
+     c = (u_char)c;
      if (c < ip->font_lo || c > ip->font_hi)
! 	c = ip->font_hi;
  
      put_func[mode](cci,
  		   cci->row_ptr[dy],

>Audit-Trail:
>Unformatted: