From owner-svn-src-all@FreeBSD.ORG Fri Nov 5 01:21:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 7C00F1065694; Fri, 5 Nov 2010 01:21:03 +0000 (UTC) Date: Fri, 5 Nov 2010 01:21:03 +0000 From: Alexander Best To: Ed Schouten Message-ID: <20101105012103.GA26789@freebsd.org> References: <201011050056.oA50uLk5078426@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011050056.oA50uLk5078426@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r214817 - head/sys/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: Fri, 05 Nov 2010 01:21:03 -0000 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