svn commit: r214817 - head/sys/teken

Alexander Best arundel at freebsd.org
Fri Nov 5 01:21:03 UTC 2010


On Fri Nov  5 10, Ed Schouten wrote:
> Author: ed
> Date: Fri Nov  5 00:56:21 2010
> New Revision: 214817
> URL: http://svn.freebsd.org/changeset/base/214817
> 
> Log:
>   Partially implement the mysterious cons25 \e[x escape sequence.
>   
>   It seems the terminfo library on some systems (OS X, Linux) may emit the
>   sequence \e[x to reset to default attributes. Apart from using the
>   zero-command, this escape sequence allows many more operations, such as
>   setting ANSI colors. I don't see this used anywhere, so this should be
>   sufficient for now.
>   
>   This deficiency was spotted by the Debian GNU/kFreeBSD. They have their
>   own patch, which is slightly flawed in my opinion. I don't know why they
>   never reported this issue to us.

maybe, because nearly all PRs (most of them including patches) they have
submitted via GNATS in the past remain unnoticed and thus they've gotten tired
of reporting issues and submitting patches if nobody seems to care? ;)

cheers.
alex

>   
>   MFC after:	1 week
> 
> Modified:
>   head/sys/teken/sequences
>   head/sys/teken/teken_subr_compat.h
> 
> Modified: head/sys/teken/sequences
> ==============================================================================
> --- head/sys/teken/sequences	Fri Nov  5 00:31:09 2010	(r214816)
> +++ head/sys/teken/sequences	Fri Nov  5 00:56:21 2010	(r214817)
> @@ -106,6 +106,7 @@ C25ADFG	Cons25 set adapter foreground		^
>  C25BLPD	Cons25 set bell pitch duration		^[ [ = B	r r
>  C25CURS	Cons25 set cursor type			^[ [ = S	r
>  C25MODE	Cons25 set terminal mode		^[ [ = T	r
> +C25SGR	Cons25 set graphic rendition		^[ [ x		r r
>  C25VTSW	Cons25 switch virtual terminal		^[ [ z		r
>  
>  # VT52 compatibility
> 
> Modified: head/sys/teken/teken_subr_compat.h
> ==============================================================================
> --- head/sys/teken/teken_subr_compat.h	Fri Nov  5 00:31:09 2010	(r214816)
> +++ head/sys/teken/teken_subr_compat.h	Fri Nov  5 00:56:21 2010	(r214817)
> @@ -88,6 +88,20 @@ teken_subr_cons25_set_bell_pitch_duratio
>  }
>  
>  static void
> +teken_subr_cons25_set_graphic_rendition(teken_t *t, unsigned int cmd,
> +    unsigned int param __unused)
> +{
> +
> +	switch (cmd) {
> +	case 0: /* Reset. */
> +		t->t_curattr = t->t_defattr;
> +		break;
> +	default:
> +		teken_printf("unsupported attribute %u\n", cmd);
> +	}
> +}
> +
> +static void
>  teken_subr_cons25_set_terminal_mode(teken_t *t, unsigned int mode)
>  {
>  

-- 
a13x


More information about the svn-src-all mailing list