From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 7 15:39:30 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5ADDA98F; Fri, 7 Dec 2012 15:39:30 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id B316C8FC13; Fri, 7 Dec 2012 15:39:29 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa03.fnfis.com (8.14.5/8.14.5) with ESMTP id qB7FdMUo019745 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 7 Dec 2012 09:39:22 -0600 Received: from [10.0.0.102] (10.14.152.61) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.2.309.2; Fri, 7 Dec 2012 09:39:21 -0600 Subject: Re: loader and ficl/Forth help MIME-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/mixed; boundary="Apple-Mail=_0A50479D-638A-44CA-B3F7-F7F7D3339F14" From: Devin Teske In-Reply-To: <20121207102836.GA1808@a91-153-116-96.elisa-laajakaista.fi> Date: Fri, 7 Dec 2012 07:39:20 -0800 Message-ID: References: <3386ABA0-B05E-4E52-B9F7-35555A8AAFDA@fisglobal.com> <20121207102836.GA1808@a91-153-116-96.elisa-laajakaista.fi> To: Jaakko Heinonen X-Mailer: Apple Mail (2.1283) X-Originating-IP: [10.14.152.61] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8185, 1.0.431, 0.0.0000 definitions=2012-12-06_08:2012-12-06,2012-12-06,1970-01-01 signatures=0 Cc: FreeBSD Hackers , Devin Teske X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2012 15:39:30 -0000 --Apple-Mail=_0A50479D-638A-44CA-B3F7-F7F7D3339F14 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Thanks for testing Jaakko. Can you re-test with the attached patch? I cleaned things up a bit while addressing the problem that a later call to= f_double was un-doing the previous installation of the ASCII charset. This new patch should work (and I re-tested, having had ample sleep this ti= me). --=20 Thanks in advance, 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=_0A50479D-638A-44CA-B3F7-F7F7D3339F14 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=_0A50479D-638A-44CA-B3F7-F7F7D3339F14 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Dec 7, 2012, at 2:28 AM, Jaakko Heinonen wrote: > On 2012-12-07, Devin Teske wrote: >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D121064 >>>=20 >>=20 >> I've made some improvements to the supplied patch. Said improvements = should 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 > I tried the latest patch in the PR and it didn't work for me. I have = the > following line in my /boot/loader.conf: >=20 > console=3D"comconsole" >=20 > Attached is a screenshot from the menu. It's still using non-ASCII > characters. >=20 > --=20 > Jaakko > --Apple-Mail=_0A50479D-638A-44CA-B3F7-F7F7D3339F14--