Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2009 14:04:34 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Ed Schouten <ed@freebsd.org>
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
Message-ID:  <20090104120434.GF93900@deviant.kiev.zoral.com.ua>
In-Reply-To: <200901040020.n040KIcc041121@svn.freebsd.org>
References:  <200901040020.n040KIcc041121@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090104120434.GF93900>