Date: Fri, 14 Jun 2002 09:10:36 +1000 (EST) From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/39252: Syscons doesn't support 8-bit control characters Message-ID: <200206132310.g5DNAahd043859@gsmx07.alcatel.com.au>
next in thread | raw e-mail | index | archive | help
>Number: 39252
>Category: kern
>Synopsis: Syscons doesn't support 8-bit control characters
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 13 16:20:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Peter Jeremy
>Release: FreeBSD 4.6-PRERELEASE, 5.0-CURRENT i386
>Organization:
Alcatel Australia Limited
>Environment:
System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Tue May 7 08:15:34 EST 2002 root@:/usr/obj/3.0/cvs/src/sys/gsmx i386
System: FreeBSD aalp03.alcatel.com.au 4.6-PRERELEASE FreeBSD 4.6-PRERELEASE #0: Wed May 8 03:17:26 EST 2002 root@aalp03.alcatel.com.au:/usr/obj/usr/src/sys/wansim i386
>Description:
syscons supports a subset of ANSI x3.64 (see screen(4)) control
sequences beginning with 'ESC [' but does not support the 8-bit
equivalent of 'ESC [' (0x9b). This causes problems when using
syscons as a terminal emulator in 8-bit mode.
>How-To-Repeat:
The following two sequences should be equivalent - displaying
"hello" in reverse video. The first works correctly with syscons
but the second displays " 7mhello m".
$ printf '\033[7mhello\033[m\n'
$ printf '\2337mhello\233m\n'
>Fix:
Index: scterm-sc.c
===================================================================
RCS file: /usr/ncvs/src/sys/dev/syscons/scterm-sc.c,v
retrieving revision 1.4.2.10
diff -u -r1.4.2.10 scterm-sc.c
--- scterm-sc.c 11 Jun 2001 09:05:39 -0000 1.4.2.10
+++ scterm-sc.c 7 Feb 2002 22:38:25 -0000
@@ -645,6 +645,7 @@
scterm_puts(scr_stat *scp, u_char *buf, int len)
{
term_stat *tcp;
+ int i;
tcp = scp->ts;
outloop:
@@ -661,6 +662,13 @@
tcp->num_param = 0;
buf++;
len--;
+ break;
+ case 0x9b:
+ tcp->esc = 2;
+ tcp->last_param = -1;
+ for (i = tcp->num_param; i < MAX_ESC_PAR; i++)
+ tcp->param[i] = 1;
+ tcp->num_param = 0;
break;
default:
sc_term_gen_print(scp, &buf, &len, tcp->cur_attr);
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206132310.g5DNAahd043859>
