From jdc@parodius.com  Sun Feb 24 22:19:22 2008
Return-Path: <jdc@parodius.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24BDB16A403
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Feb 2008 22:19:22 +0000 (UTC)
	(envelope-from jdc@parodius.com)
Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3])
	by mx1.freebsd.org (Postfix) with ESMTP id 0846B13C45A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Feb 2008 22:19:21 +0000 (UTC)
	(envelope-from jdc@parodius.com)
Received: by mx01.sc1.parodius.com (Postfix, from userid 1000)
	id CE6FF1CC033; Sun, 24 Feb 2008 14:19:21 -0800 (PST)
Message-Id: <20080224221921.CE6FF1CC033@mx01.sc1.parodius.com>
Date: Sun, 24 Feb 2008 14:19:21 -0800 (PST)
From: Jeremy Chadwick <koitsu@freebsd.org>
Reply-To: Jeremy Chadwick <koitsu@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Use ASCII characters for box/line characters in frames.4th
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         121064
>Category:       conf
>Synopsis:       [patch] Use ASCII characters for box/line characters in frames.4th
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dteske
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 24 22:20:01 UTC 2008
>Closed-Date:    Tue Apr 01 00:33:13 UTC 2014
>Last-Modified:  Tue Apr 01 00:33:13 UTC 2014
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 6.3-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD eos.sc1.parodius.com 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Mon Jan 14 17:48:12 PST 2008 root@eos.sc1.parodius.com:/usr/obj/usr/src/sys/EOS i386
>Description:
	The existing /boot/frames.4th framework assumes users are on a CP437
	(PC ANSI)-capable or PC98-capable console  The character set used will
	be generally incompatible on systems using serial console, where the user
	attached is using a VT100 terminal, xterm, xterm via PuTTY, or anything
	else that doesn't use a CP437 or PC98 charset.  The result is that the
	box/line characters appear incorrect, as shown here:
	http://lists.freebsd.org/pipermail/freebsd-hackers/2007-June/020851.html

	I've come up with a patch which addresses this, using ASCII characters
	to do the line drawing -- but only when the serial port is chosen as an
	output device for loader (via -h in /boot.config or console="comconsole"
	in loader.conf).

	Patch tested successfully on RELENG_7, but should work on RELENG_6 too.

	Full discussion of said issue:
	http://lists.freebsd.org/pipermail/freebsd-hackers/2008-February/023534.html

	Much thanks to Oliver Fromme for all the help!  :-)
>How-To-Repeat:
	See description.
>Fix:
	Apply below patch, then enable serial console.



--- frames.4th.orig	2008-02-12 00:20:18.000000000 -0800
+++ frames.4th	2008-02-24 14:11:38.000000000 -0800
@@ -56,6 +56,11 @@
 	178 constant fill_bright
 [then]
 
+\ Used when serial console is detected (-|+ characters)
+45 constant ascii_dash
+124 constant ascii_pipe
+43 constant ascii_plus
+
 : hline	( len x y -- )	\ Draw horizontal single line
 	at-xy		\ move cursor
 	0 do
@@ -108,5 +113,35 @@
 	2drop
 ;
 
+: set_serial_charset	( -- )
+	s" console" getenv
+	dup -1 = if
+		drop exit
+	then
+	s" comconsole" compare-insensitive 0= if
+		drop
+		ascii_dash h_el !
+		ascii_pipe v_el !
+		ascii_plus lt_el !
+		ascii_plus lb_el !
+		ascii_plus rt_el !
+		ascii_plus rb_el !
+	then
+	s" boot_serial" getenv
+	dup -1 = if
+		drop exit
+	then
+	s" YES" compare-insensitive 0= if
+		drop
+		ascii_dash h_el !
+		ascii_pipe v_el !
+		ascii_plus lt_el !
+		ascii_plus lb_el !
+		ascii_plus rt_el !
+		ascii_plus rb_el !
+	then
+;
+
 f_single
+set_serial_charset
 fill_none fill !
>Release-Note:
>Audit-Trail:

From: John Baldwin <jhb@freebsd.org>
To: bug-followup@freebsd.org, koitsu@freebsd.org
Cc:  
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Thu, 27 Mar 2008 13:59:02 -0400

 This doesn't appear to handle the multiple console case (e.g. 
 console="vidconsole comconsole").  Perhaps you could change the i386 
 comconsole driver to use an internal re-mapping table to map the line chars 
 to the ASCII chars instead?
 
 -- 
 John Baldwin

From: Jeremy Chadwick <koitsu@freebsd.org>
To: John Baldwin <jhb@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line
	characters in frames.4th
Date: Sat, 29 Mar 2008 11:10:12 -0700

 On Thu, Mar 27, 2008 at 01:59:02PM -0400, John Baldwin wrote:
 > This doesn't appear to handle the multiple console case (e.g. 
 > console="vidconsole comconsole").  Perhaps you could change the i386 
 > comconsole driver to use an internal re-mapping table to map the line chars 
 > to the ASCII chars instead?
 
 Yeah, multiple consoles won't work correctly with the patch.  I don't
 know of an easy way to fix that in Forth, since (I think) there's no
 support for wildcard or regex matching in strings.
 
 Re: changing the i386 comconsole driver: wouldn't this affect all data
 output across comconsole?  I'm not sure if blindly filtering data in
 that driver is the best idea.  If I'm misunderstanding, my apologies.
 But it seems like since the loader menus are being output in Forth, the
 problem should fixed there.
 
 Or we could scrap the whole Forth thing and rewrite the necessary loader
 pieces in C... ;)
 
 -- 
 | Jeremy Chadwick                                    jdc at parodius.com |
 | Parodius Networking                           http://www.parodius.com/ |
 | UNIX Systems Administrator                      Mountain View, CA, USA |
 | Making life hard for others since 1977.                  PGP: 4BD6C0CB |
 

From: John Baldwin <jhb@freebsd.org>
To: Jeremy Chadwick <koitsu@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Mon, 31 Mar 2008 16:57:29 -0400

 On Saturday 29 March 2008 02:10:12 pm Jeremy Chadwick wrote:
 > On Thu, Mar 27, 2008 at 01:59:02PM -0400, John Baldwin wrote:
 > > This doesn't appear to handle the multiple console case (e.g. 
 > > console="vidconsole comconsole").  Perhaps you could change the i386 
 > > comconsole driver to use an internal re-mapping table to map the line 
 chars 
 > > to the ASCII chars instead?
 > 
 > Yeah, multiple consoles won't work correctly with the patch.  I don't
 > know of an easy way to fix that in Forth, since (I think) there's no
 > support for wildcard or regex matching in strings.
 > 
 > Re: changing the i386 comconsole driver: wouldn't this affect all data
 > output across comconsole?  I'm not sure if blindly filtering data in
 > that driver is the best idea.  If I'm misunderstanding, my apologies.
 > But it seems like since the loader menus are being output in Forth, the
 > problem should fixed there.
 
 Depends.  Is there any time when you don't want the box chars to be converted 
 on the serial console?
 
 -- 
 John Baldwin
Responsible-Changed-From-To: freebsd-bugs->dteske 
Responsible-Changed-By: dteske 
Responsible-Changed-When: Fri Dec 7 08:49:06 UTC 2012 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=121064 

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc: Devin Teske <dteske@freebsd.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Fri, 7 Dec 2012 00:54:30 -0800

 --Apple-Mail=_95D0B866-BC5E-4E2F-8317-656D438C896F
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain; charset="us-ascii"
 
 I've re-worked the originally submitted patch.txt in the following ways:
 
 + Added a new support function "contains?" for determining if a word exists=
  within a string (case-insensitive). This allows satisfaction of the requir=
 ement to support the case of console=3D"vidconsole comconsole".
 
 + Optimized "set_serial_charset" to minimize code duplication.
 
 I tested this with 9.0-R.
 
 Plan to commit to HEAD after review.
 --=20
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidentia=
 l. If you are not the intended recipient, please: (i) delete the message an=
 d all copies; (ii) do not disclose, distribute or use the message in any ma=
 nner; and (iii) notify the sender immediately. In addition, please be aware=
  that any message addressed to our domain is subject to archiving and revie=
 w by persons other than the intended recipient. Thank you.
 
 --Apple-Mail=_95D0B866-BC5E-4E2F-8317-656D438C896F
 Content-Disposition: attachment; filename="patch.txt"
 Content-Type: text/plain; name="patch.txt"
 Content-Transfer-Encoding: 7bit
 
 Index: support.4th
 ===================================================================
 --- support.4th	(revision 242835)
 +++ support.4th	(working copy)
 @@ -201,6 +201,32 @@ create last_module_option sizeof module.next allot
  
  : getenv?  getenv -1 = if false else drop true then ;
  
 +\ determine if a word appears in a string, case-insensitive
 +: contains? ( addr1 len1 addr2 len2 -- 0 | -1 )
 +	2 pick 0= if 2drop 2drop true exit then
 +	dup 0= if 2drop 2drop false exit then
 +	begin
 +		begin
 +			swap dup c@ dup 32 = over 9 = or
 +			over 10 = or over 13 = or swap drop
 +		while 1+ swap 1- repeat
 +		swap 2 pick 1- over <
 +	while
 +		2over 2over drop over compare-insensitive 0= if
 +			2 pick over = if 2drop 2drop true exit then
 +			2 pick tuck - -rot + swap over c@ dup 32 =
 +			over 9 = or over 10 = or over 13 = or
 +			swap drop if 2drop 2drop true exit then
 +		then begin
 +			swap dup c@
 +			dup 32 = over 9 = or over 10 = or over 13 = or
 +			swap drop if false else true then 2 pick 0> and
 +		while 1+ swap 1- repeat
 +		swap
 +	repeat
 +	2drop 2drop false
 +;
 +
  \ Private definitions
  
  vocabulary support-functions
 Index: frames.4th
 ===================================================================
 --- frames.4th	(revision 242835)
 +++ frames.4th	(working copy)
 @@ -56,6 +56,11 @@ s" arch-pc98" environment? [if]
  	178 constant fill_bright
  [then]
  
 +\ Used when serial console is detected (-|+ characters)
 + 45 constant ascii_dash
 +124 constant ascii_pipe
 + 43 constant ascii_plus
 +
  : hline	( len x y -- )	\ Draw horizontal single line
  	at-xy		\ move cursor
  	0 do
 @@ -108,5 +113,27 @@ s" arch-pc98" environment? [if]
  	2drop
  ;
  
 +: set_serial_charset ( -- )
 +	s" console" getenv dup -1 <> if
 +		s" comconsole" 2swap contains?
 +	else
 +		drop false
 +	then
 +	s" boot_serial" getenv dup -1 <> if
 +		s" YES" compare-insensitive 0=
 +	else
 +		drop false
 +	then
 +	or if ( accept either comconsole or boot_serial )
 +		ascii_dash h_el !
 +		ascii_pipe v_el !
 +		ascii_plus lt_el !
 +		ascii_plus lb_el !
 +		ascii_plus rt_el !
 +		ascii_plus rb_el !
 +	then
 +;
 +
  f_single
 +set_serial_charset 
  fill_none fill !
 
 --Apple-Mail=_95D0B866-BC5E-4E2F-8317-656D438C896F--

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc:  
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Fri, 7 Dec 2012 07:39:30 -0800

 --Apple-Mail=_0183A9DD-E647-4316-93EF-1182D8319E94
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain; charset="us-ascii"
 
 jh@ tested and found that the later-call to f_double in menu.4th is overrid=
 ing the previously-set ASCII charset.
 
 The newly attached patch changes to applying the ASCII charset if serial mo=
 de is detected each time f_single or f_double is called. In addition, thing=
 s are cleaned up a bit.
 --=20
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidentia=
 l. If you are not the intended recipient, please: (i) delete the message an=
 d all copies; (ii) do not disclose, distribute or use the message in any ma=
 nner; and (iii) notify the sender immediately. In addition, please be aware=
  that any message addressed to our domain is subject to archiving and revie=
 w by persons other than the intended recipient. Thank you.
 
 --Apple-Mail=_0183A9DD-E647-4316-93EF-1182D8319E94
 Content-Disposition: attachment; filename="patch.txt"
 Content-Type: text/plain; name="patch.txt"
 Content-Transfer-Encoding: 7bit
 
 Index: support.4th
 ===================================================================
 --- support.4th	(revision 242835)
 +++ support.4th	(working copy)
 @@ -201,6 +201,42 @@ create last_module_option sizeof module.next allot
  
  : getenv?  getenv -1 = if false else drop true then ;
  
 +\ determine if a word appears in a string, case-insensitive
 +: contains? ( addr1 len1 addr2 len2 -- 0 | -1 )
 +	2 pick 0= if 2drop 2drop true exit then
 +	dup 0= if 2drop 2drop false exit then
 +	begin
 +		begin
 +			swap dup c@ dup 32 = over 9 = or
 +			over 10 = or over 13 = or swap drop
 +		while 1+ swap 1- repeat
 +		swap 2 pick 1- over <
 +	while
 +		2over 2over drop over compare-insensitive 0= if
 +			2 pick over = if 2drop 2drop true exit then
 +			2 pick tuck - -rot + swap over c@ dup 32 =
 +			over 9 = or over 10 = or over 13 = or
 +			swap drop if 2drop 2drop true exit then
 +		then begin
 +			swap dup c@
 +			dup 32 = over 9 = or over 10 = or over 13 = or
 +			swap drop if false else true then 2 pick 0> and
 +		while 1+ swap 1- repeat
 +		swap
 +	repeat
 +	2drop 2drop false
 +;
 +
 +: boot_serial? ( -- 0 | -1 )
 +	s" console" getenv dup -1 <> if
 +		s" comconsole" 2swap contains?
 +	else drop false then
 +	s" boot_serial" getenv dup -1 <> if
 +		s" YES" compare-insensitive 0=
 +	else drop false then
 +	or ( true if either console contains comconsole or boot_serial=YES )
 +;
 +
  \ Private definitions
  
  vocabulary support-functions
 Index: frames.4th
 ===================================================================
 --- frames.4th	(revision 242835)
 +++ frames.4th	(working copy)
 @@ -12,6 +12,11 @@ variable rt_el
  variable rb_el
  variable fill
  
 +\ ASCII frames (used when serial console is detected)
 + 45 constant ascii_dash
 +124 constant ascii_pipe
 + 43 constant ascii_plus
 +
  s" arch-pc98" environment? [if]
  	\ Single frames
  	149 constant sh_el
 @@ -63,7 +68,17 @@ s" arch-pc98" environment? [if]
  	loop
  ;
  
 +: f_ascii ( -- )	( -- )	\ set frames to ascii
 +	ascii_dash h_el !
 +	ascii_pipe v_el !
 +	ascii_plus lt_el !
 +	ascii_plus lb_el !
 +	ascii_plus rt_el !
 +	ascii_plus rb_el !
 +;
 +
  : f_single	( -- )	\ set frames to single
 +	boot_serial? if f_ascii exit then
  	sh_el h_el !
  	sv_el v_el !
  	slt_el lt_el !
 @@ -73,6 +88,7 @@ s" arch-pc98" environment? [if]
  ;
  
  : f_double	( -- )	\ set frames to double
 +	boot_serial? if f_ascii exit then
  	dh_el h_el !
  	dv_el v_el !
  	dlt_el lt_el !
 
 --Apple-Mail=_0183A9DD-E647-4316-93EF-1182D8319E94--

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc: Jaakko Heinonen <jh@FreeBSD.org>, Devin Teske <dteske@freebsd.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Fri, 7 Dec 2012 12:00:48 -0800

 On Dec 7, 2012, at 11:26 AM, Jaakko Heinonen wrote:
 
 > On 2012-12-07, Devin Teske wrote:
 >> Can you re-test with the attached patch?
 > 
 > Works for me. Thanks!
 > 
 > http://people.freebsd.org/~jh/misc/menu-patched.png
 > 
 
 
 Moving forward with commit.
 -- 
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc: Devin Teske <dteske@freebsd.org>, Garrett Cooper <gcooper@FreeBSD.org>,
        Jaakko Heinonen <jh@FreeBSD.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Fri, 7 Dec 2012 12:16:22 -0800

 On Dec 7, 2012, at 11:50 AM, Garrett Cooper wrote:
 
 > On Fri, Dec 7, 2012 at 1:07 AM, Devin Teske <devin.teske@fisglobal.com> w=
 rote:
 >=20
 > ...
 >=20
 >> I've made some improvements to the supplied patch. Said improvements sho=
 uld address the previous issues that were preventing this from going in.
 >>=20
 >> Can someone test the newly-attached patch.txt and get back to me?
 >=20
 >    The patch seems to be missing a few checks (boot_multicons, boot
 > -D, etc). I really wish this stuff was properly consolidated/cleaned
 > up -- loader.conf's console stuff is a hodgepodge mess of
 > duplicated/obfuscated user knobs.
 > Thanks,
 > -Garrett
 
 
 Re-working patch to support boot_multicons
 
 NOTE: will also change patch to accept any non-zero-length value for boot_s=
 erial so that notes in /boot/defaults/loader.conf remain accurate
 --=20
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidentia=
 l. If you are not the intended recipient, please: (i) delete the message an=
 d all copies; (ii) do not disclose, distribute or use the message in any ma=
 nner; and (iii) notify the sender immediately. In addition, please be aware=
  that any message addressed to our domain is subject to archiving and revie=
 w by persons other than the intended recipient. Thank you.

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc: Jaakko Heinonen <jh@FreeBSD.org>, John Baldwin <jhb@freebsd.org>,
        Devin
 Teske <dteske@freebsd.org>,
        Garrett Cooper <gcooper@FreeBSD.org>,
        Eitan Adler
	<eadler@FreeBSD.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Fri, 7 Dec 2012 13:39:08 -0800

 --Apple-Mail=_E27D1F82-D906-43DD-88EF-EF0D54365052
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain; charset="us-ascii"
 
 Thanks to Eitan for pointing me at this PR so I could take a stab at it.
 Thanks to original PR folk (koitsu, jh, jhb) for getting it as far as it did.
 Thanks to Garrett for the notes about supporting boot_multicons.
 
 Attached is the final working patch.txt submitted for review.
 -- 
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
 
 --Apple-Mail=_E27D1F82-D906-43DD-88EF-EF0D54365052
 Content-Disposition: attachment; filename="patch.txt"
 Content-Type: text/plain; x-unix-mode=0644; name="patch.txt"
 Content-Transfer-Encoding: 7bit
 
 Index: support.4th
 ===================================================================
 --- support.4th	(revision 242835)
 +++ support.4th	(working copy)
 @@ -201,6 +201,46 @@ create last_module_option sizeof module.next allot
  
  : getenv?  getenv -1 = if false else drop true then ;
  
 +\ determine if a word appears in a string, case-insensitive
 +: contains? ( addr1 len1 addr2 len2 -- 0 | -1 )
 +	2 pick 0= if 2drop 2drop true exit then
 +	dup 0= if 2drop 2drop false exit then
 +	begin
 +		begin
 +			swap dup c@ dup 32 = over 9 = or
 +			over 10 = or over 13 = or swap drop
 +		while 1+ swap 1- repeat
 +		swap 2 pick 1- over <
 +	while
 +		2over 2over drop over compare-insensitive 0= if
 +			2 pick over = if 2drop 2drop true exit then
 +			2 pick tuck - -rot + swap over c@ dup 32 =
 +			over 9 = or over 10 = or over 13 = or
 +			swap drop if 2drop 2drop true exit then
 +		then begin
 +			swap dup c@
 +			dup 32 = over 9 = or over 10 = or over 13 = or
 +			swap drop if false else true then 2 pick 0> and
 +		while 1+ swap 1- repeat
 +		swap
 +	repeat
 +	2drop 2drop false
 +;
 +
 +: boot_serial? ( -- 0 | -1 )
 +	s" console" getenv dup -1 <> if
 +		s" comconsole" 2swap contains?
 +	else drop false then
 +	s" boot_serial" getenv dup -1 <> if
 +		swap drop 0>
 +	else drop false then
 +	or \ console contains comconsole ( or ) boot_serial
 +	s" boot_multicons" getenv dup -1 <> if
 +		swap drop 0>
 +	else drop false then
 +	or \ previous boolean ( or ) boot_multicons
 +;
 +
  \ Private definitions
  
  vocabulary support-functions
 Index: frames.4th
 ===================================================================
 --- frames.4th	(revision 242835)
 +++ frames.4th	(working copy)
 @@ -12,6 +12,11 @@ variable rt_el
  variable rb_el
  variable fill
  
 +\ ASCII frames (used when serial console is detected)
 + 45 constant ascii_dash
 +124 constant ascii_pipe
 + 43 constant ascii_plus
 +
  s" arch-pc98" environment? [if]
  	\ Single frames
  	149 constant sh_el
 @@ -63,7 +68,17 @@ s" arch-pc98" environment? [if]
  	loop
  ;
  
 +: f_ascii ( -- )	( -- )	\ set frames to ascii
 +	ascii_dash h_el !
 +	ascii_pipe v_el !
 +	ascii_plus lt_el !
 +	ascii_plus lb_el !
 +	ascii_plus rt_el !
 +	ascii_plus rb_el !
 +;
 +
  : f_single	( -- )	\ set frames to single
 +	boot_serial? if f_ascii exit then
  	sh_el h_el !
  	sv_el v_el !
  	slt_el lt_el !
 @@ -73,6 +88,7 @@ s" arch-pc98" environment? [if]
  ;
  
  : f_double	( -- )	\ set frames to double
 +	boot_serial? if f_ascii exit then
  	dh_el h_el !
  	dv_el v_el !
  	dlt_el lt_el !
 
 --Apple-Mail=_E27D1F82-D906-43DD-88EF-EF0D54365052--

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc: Jaakko Heinonen <jh@FreeBSD.org>, John Baldwin <jhb@freebsd.org>,
        Garrett
 Cooper <gcooper@FreeBSD.org>,
        Devin Teske <dteske@freebsd.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Sun, 9 Dec 2012 07:14:52 -0800

 Appears to be no objections.
 
 As I move forward with reviewed/tested commit, would like to document what =
 I tested (for posterity):
 
 1. boot_serial=3D" "
 2. boot_serial=3D"abc"
 3. boot_serial=3D"YES"
 
 All produce the new serial-compatible frames.
 
 4. console=3D"comconsole"
 5. console=3D"vidconsole comconsole"
 6. console=3D"   vidconsole   comconsole2   comconsole   "
 
 Also produce the new serial-compatible frames.
 
 7. console=3D"vidconsole comconsole2"
 8. console=3D"spinconsole"
 9. console=3D"vidconsole"
 10. boot_serial=3D""
 11. boot_multicons=3D""
 
 Produce the old serial UN-friendly frames (as expected)
 
 12. boot_multicons=3D"1"
 13. boot_multicons=3D"YES"
 
 Both of which produce serial friendly frames.
 
 In-addition, I also unit-tested the "contains?" function for several hours,=
  making sure it works as-expected.
 --=20
 Devin
 
 _____________
 The information contained in this message is proprietary and/or confidentia=
 l. If you are not the intended recipient, please: (i) delete the message an=
 d all copies; (ii) do not disclose, distribute or use the message in any ma=
 nner; and (iii) notify the sender immediately. In addition, please be aware=
  that any message addressed to our domain is subject to archiving and revie=
 w by persons other than the intended recipient. Thank you.
State-Changed-From-To: open->patched 
State-Changed-By: dteske 
State-Changed-When: Sun Dec 9 15:25:55 UTC 2012 
State-Changed-Why:  
Committed to HEAD as r244048 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121064 

From: Jaakko Heinonen <jh@FreeBSD.org>
To: Devin Teske <dteske@freebsd.org>
Cc: bug-followup@FreeBSD.org, koitsu@freebsd.org,
	John Baldwin <jhb@freebsd.org>,
	Garrett Cooper <gcooper@FreeBSD.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line
 characters in frames.4th
Date: Sun, 9 Dec 2012 20:04:30 +0200

 On 2012-12-09, Devin Teske wrote:
 > 4. console="comconsole"
 > 5. console="vidconsole comconsole"
 > 6. console="   vidconsole   comconsole2   comconsole   "
 
 I think that
 
 console="vidconsole,comconsole"
 
 is a valid configuration. I haven't tested this.
 
 Thanks.
 -- 
 Jaakko

From: Garrett Cooper <yanegomi@gmail.com>
To: Jaakko Heinonen <jh@FreeBSD.org>
Cc: Devin Teske <dteske@freebsd.org>,
 "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.org>,
 "koitsu@freebsd.org" <koitsu@freebsd.org>, John Baldwin <jhb@freebsd.org>,
 Garrett Cooper <gcooper@FreeBSD.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Sun, 9 Dec 2012 10:24:58 -0800

 On Dec 9, 2012, at 10:04 AM, Jaakko Heinonen <jh@FreeBSD.org> wrote:
 
 > On 2012-12-09, Devin Teske wrote:
 >> 4. console=3D"comconsole"
 >> 5. console=3D"vidconsole comconsole"
 >> 6. console=3D"   vidconsole   comconsole2   comconsole   "
 >=20
 > I think that
 >=20
 > console=3D"vidconsole,comconsole"
 >=20
 > is a valid configuration. I haven't tested this.
 
 Yes. Iirc the last time I tried to use it it didn't work (the version with s=
 paces worked), but I could be wrong.
 
 I'll look at the comma based construct and if it doesn't work I'll file anot=
 her pr.
 
 Thanks,
 -Garrett=

From: Devin Teske <devin.teske@fisglobal.com>
To: Jaakko Heinonen <jh@FreeBSD.org>
Cc: Devin Teske <dteske@freebsd.org>, <bug-followup@FreeBSD.org>,
        <koitsu@freebsd.org>, John Baldwin <jhb@freebsd.org>,
        Garrett Cooper
	<gcooper@FreeBSD.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Sun, 9 Dec 2012 10:42:18 -0800

 --Apple-Mail=_002B6CE4-5519-49FD-A9A5-2B03BD02033A
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain; charset="us-ascii"
 
 
 On Dec 9, 2012, at 10:04 AM, Jaakko Heinonen wrote:
 
 > On 2012-12-09, Devin Teske wrote:
 >> 4. console=3D"comconsole"
 >> 5. console=3D"vidconsole comconsole"
 >> 6. console=3D"   vidconsole   comconsole2   comconsole   "
 >=20
 > I think that
 >=20
 > console=3D"vidconsole,comconsole"
 >=20
 > is a valid configuration. I haven't tested this.
 
 
 It appears as though commas and spaces are interchangeable.
 
 I tested:
 
 1. console=3D"vidconsole spinconsole"
 2. console=3D"vidconsole,spinconsole"
 3. console=3D"vidconsole   ,  ,,    spinconsole   ,,,"
 
 All produce the same results (which, if you've never tried, is indeed rathe=
 r odd).
 
 Based on these results, I'm proposing the following follow-up (see attached=
  patch.txt):
 
 _____________
 The information contained in this message is proprietary and/or confidentia=
 l. If you are not the intended recipient, please: (i) delete the message an=
 d all copies; (ii) do not disclose, distribute or use the message in any ma=
 nner; and (iii) notify the sender immediately. In addition, please be aware=
  that any message addressed to our domain is subject to archiving and revie=
 w by persons other than the intended recipient. Thank you.
 
 --Apple-Mail=_002B6CE4-5519-49FD-A9A5-2B03BD02033A
 Content-Disposition: attachment; filename="patch.txt"
 Content-Type: text/plain; name="patch.txt"
 Content-Transfer-Encoding: 7bit
 
 Index: support.4th
 ===================================================================
 --- support.4th	(revision 244048)
 +++ support.4th	(working copy)
 @@ -207,20 +207,20 @@ create last_module_option sizeof module.next allot
  	dup 0= if 2drop 2drop false exit then
  	begin
  		begin
 -			swap dup c@ dup 32 = over 9 = or
 -			over 10 = or over 13 = or swap drop
 +			swap dup c@ dup 32 = over 9 = or over 10 = or
 +			over 13 = or over 44 = or swap drop
  		while 1+ swap 1- repeat
  		swap 2 pick 1- over <
  	while
  		2over 2over drop over compare-insensitive 0= if
  			2 pick over = if 2drop 2drop true exit then
  			2 pick tuck - -rot + swap over c@ dup 32 =
 -			over 9 = or over 10 = or over 13 = or
 +			over 9 = or over 10 = or over 13 = or over 44 = or
  			swap drop if 2drop 2drop true exit then
  		then begin
 -			swap dup c@
 -			dup 32 = over 9 = or over 10 = or over 13 = or
 -			swap drop if false else true then 2 pick 0> and
 +			swap dup c@ dup 32 = over 9 = or over 10 = or
 +			over 13 = or over 44 = or swap drop
 +			if false else true then 2 pick 0> and
  		while 1+ swap 1- repeat
  		swap
  	repeat
 
 --Apple-Mail=_002B6CE4-5519-49FD-A9A5-2B03BD02033A
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain; charset="us-ascii"
 
 
 
 -- 
 Devin
 
 P.S. I tested the following successfully:
 
 console="vidconsole   ,  ,comconsole,    spinconsole   ,,,"
 
 Worked as-expected (got the new serial-friendly frames).
 --Apple-Mail=_002B6CE4-5519-49FD-A9A5-2B03BD02033A--

From: Devin Teske <devin.teske@fisglobal.com>
To: <bug-followup@FreeBSD.org>, <koitsu@freebsd.org>
Cc: Devin Teske <dteske@freebsd.org>
Subject: Re: conf/121064: [patch] Use ASCII characters for box/line characters in frames.4th
Date: Mon, 10 Dec 2012 07:33:10 -0800

 Comma-separated values supported now -- committed to HEAD as SVN r244089.
 
 _____________
 The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
State-Changed-From-To: patched->closed 
State-Changed-By: dteske 
State-Changed-When: Tue Apr 1 00:32:41 UTC 2014 
State-Changed-Why:  
MFC'd to stable/9 with r254109 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121064 
>Unformatted:
