Subject: ite.c changes for NetBSD/Mac -current
To: current-users <current-users@NetBSD.ORG>
From: Paul R. Goyette <paul@pgoyette.bdt.com>
List: current-users
Date: 07/09/1995 08:21:30
It seems that something happened recently where some of the termcap
routines now do some I/O optimization. Like, rather than send the le
(move cursor left) sequence n times, it will use the LE sequence to move
n characters in a single command. The VT100 emulation in the Mac ite.c
doesn't handle the parameters being passed in the escape sequences,
instead moving just one character regardless of the parameter. The
following patch to sys/arch/mac68k/dev/ite.c takes care of this.
NB: There may be other sequences that are also broken, so this may _not_
be a complete fix. But at least it takes care of some wierd terminal
behaviour experienced using tcsh and command recall/editting!
*** ite.c.orig Sun Jul 9 07:42:32 1995
--- ite.c Sun Jul 9 07:53:48 1995
***************
*** 513,528 ****
vt100state = ESnormal;
switch (ch) {
case 'A': /* Up */
! y--;
break;
case 'B': /* Down */
! y++;
break;
case 'C': /* Right */
! x++;
break;
case 'D': /* Left */
! x--;
break;
case 'H': /* Set cursor position */
x = par[1] - 1;
--- 513,528 ----
vt100state = ESnormal;
switch (ch) {
case 'A': /* Up */
! y-= par[0] ? par[0] : 1;
break;
case 'B': /* Down */
! y+= par[0] ? par[0] : 1;
break;
case 'C': /* Right */
! x+= par[0] ? par[0] : 1;
break;
case 'D': /* Left */
! x-= par[0] ? par[0] : 1;
break;
case 'H': /* Set cursor position */
x = par[1] - 1;
--------------------------------------------------------------------
| Paul Goyette | Key available via finger or key server |
| Paul@pgoyette.bdt.com | Fingerprint: 0E 40 D2 FC 2A 13 74 A0 |
| | E4 69 D5 BE 65 E4 56 C6 |
--------------------------------------------------------------------