From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 12:04:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132C41065706; Sun, 4 Jan 2009 12:04:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id A91BD8FC20; Sun, 4 Jan 2009 12:04:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LJRig-000IFi-I3; Sun, 04 Jan 2009 14:04:38 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n04C4Zft080184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Jan 2009 14:04:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n04C4ZsG039444; Sun, 4 Jan 2009 14:04:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n04C4Y7i039443; Sun, 4 Jan 2009 14:04:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Jan 2009 14:04:34 +0200 From: Kostik Belousov To: Ed Schouten Message-ID: <20090104120434.GF93900@deviant.kiev.zoral.com.ua> References: <200901040020.n040KIcc041121@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kbCYTQG2MZjuOjyn" Content-Disposition: inline In-Reply-To: <200901040020.n040KIcc041121@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LJRig-000IFi-I3 c44239d637e79628a127cc02fa932537 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:04:42 -0000 --kbCYTQG2MZjuOjyn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 12:20:18AM +0000, Ed Schouten wrote: > Author: ed > Date: Sun Jan 4 00:20:18 2009 > New Revision: 186731 > URL: http://svn.freebsd.org/changeset/base/186731 >=20 > Log: > Print control characters, even though they are normally not visible. > =20 > With cons25, there are printable characters below 0x1B. This is not the > case with ASCII, UTF-8, etc. but in this case we just have to. > =20 > Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8 > in the demo-application. >=20 > Modified: > head/sys/dev/syscons/teken/teken.c > head/sys/dev/syscons/teken/teken_demo.c >=20 > Modified: head/sys/dev/syscons/teken/teken.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:12:01 2009 (r186730) > +++ head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:20:18 2009 (r186731) > @@ -53,10 +53,14 @@ static FILE *df; > #include "teken_wcwidth.h" > #else /* !TEKEN_UTF8 */ > static inline int > -teken_wcwidth(teken_char_t c) > +teken_wcwidth(teken_char_t c __unused) > { > =20 > +#ifdef TEKEN_CONS25 > + return (1); > +#else /* !TEKEN_CONS25 */ > return (c <=3D 0x1B) ? -1 : 1; > +#endif /* TEKEN_CONS25 */ > } > #endif /* TEKEN_UTF8 */ > =20 >=20 > Modified: head/sys/dev/syscons/teken/teken_demo.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:12:01 2009 (r18= 6730) > +++ head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:20:18 2009 (r18= 6731) > @@ -280,7 +280,9 @@ main(int argc __unused, char *argv[] __u > exit(1); > case 0: > setenv("TERM", "cons25", 1); > +#ifdef TEKEN_UTF8 > setenv("LC_CTYPE", "UTF-8", 0); > +#endif /* TEKEN_UTF8 */ > execlp("zsh", "-zsh", NULL); > execlp("bash", "-bash", NULL); > execlp("sh", "-sh", NULL); IMHO, it would be much easier to try and use the new code if the TEKEN_XXX defines would be implemented as both sysctl and kernel tunables. --kbCYTQG2MZjuOjyn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklgpdIACgkQC3+MBN1Mb4gbEQCfcMmuvBgtYpoGn4GlCssGPo6d 4bwAoN4fhbI4zaysxvCW26yC2wT2x65X =se5N -----END PGP SIGNATURE----- --kbCYTQG2MZjuOjyn--