From owner-freebsd-bugs Thu Jun 13 16:20:19 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2EF6B37B409 for ; Thu, 13 Jun 2002 16:20:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5DNK2X13281; Thu, 13 Jun 2002 16:20:02 -0700 (PDT) (envelope-from gnats) Received: from alcanet.com.au (mail2.alcanet.com.au [203.62.196.17]) by hub.freebsd.org (Postfix) with ESMTP id AF64C37B40B for ; Thu, 13 Jun 2002 16:10:43 -0700 (PDT) Received: from mfg1.cim.alcatel.com.au (localhost.localdomain [127.0.0.1]) by alcanet.com.au (8.12.1/8.12.1/Alcanet1.2) with ESMTP id g5DNAd6C026225 for ; Fri, 14 Jun 2002 09:10:41 +1000 Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01KIWYXTX8FKAJKMUF@cim.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Fri, 14 Jun 2002 09:10:37 +1000 Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1]) by gsmx07.alcatel.com.au (8.12.3/8.12.3) with ESMTP id g5DNAaDp043860; Fri, 14 Jun 2002 09:10:36 +1000 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.12.3/8.12.3/Submit) id g5DNAahd043859; Fri, 14 Jun 2002 09:10:36 +1000 (EST) Message-Id: <200206132310.g5DNAahd043859@gsmx07.alcatel.com.au> Date: Fri, 14 Jun 2002 09:10:36 +1000 (EST) From: Peter Jeremy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/39252: Syscons doesn't support 8-bit control characters Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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