From owner-svn-src-all@FreeBSD.ORG Fri Sep 25 13:51:02 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 4835A1065672; Fri, 25 Sep 2009 13:51:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3720D8FC17; Fri, 25 Sep 2009 13:51:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8PDp2Pd030235; Fri, 25 Sep 2009 13:51:02 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8PDp2xx030232; Fri, 25 Sep 2009 13:51:02 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200909251351.n8PDp2xx030232@svn.freebsd.org> From: Ed Schouten Date: Fri, 25 Sep 2009 13:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197481 - 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, 25 Sep 2009 13:51:02 -0000 Author: ed Date: Fri Sep 25 13:51:01 2009 New Revision: 197481 URL: http://svn.freebsd.org/changeset/base/197481 Log: Add a new escape sequence to switch between cons25 and xterm. Just run this to switch to xterm: printf '\e[=T' If you get bored and want to switch back to cons25, run this: printf '\e[=1T' I can now send an email to the lists, asking whether people are interested in trying the xterm emulator. Modified: head/sys/teken/sequences head/sys/teken/teken_subr_compat.h Modified: head/sys/teken/sequences ============================================================================== --- head/sys/teken/sequences Fri Sep 25 11:58:51 2009 (r197480) +++ head/sys/teken/sequences Fri Sep 25 13:51:01 2009 (r197481) @@ -104,6 +104,7 @@ C25ADBG Cons25 set adapter background ^ C25ADFG Cons25 set adapter foreground ^[ [ = F r C25BLPD Cons25 set bell pitch duration ^[ [ = B r r C25CURS Cons25 set cursor type ^[ [ = S r +C25MODE Cons25 set terminal mode ^[ [ = T 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 Sep 25 11:58:51 2009 (r197480) +++ head/sys/teken/teken_subr_compat.h Fri Sep 25 13:51:01 2009 (r197481) @@ -87,6 +87,20 @@ teken_subr_cons25_set_bell_pitch_duratio (duration & 0xffff)); } +static void +teken_subr_cons25_set_terminal_mode(teken_t *t, unsigned int mode) +{ + + switch (mode) { + case 0: /* Switch terminal to xterm. */ + t->t_stateflags &= ~TS_CONS25; + break; + case 1: /* Switch terminal to cons25. */ + t->t_stateflags |= TS_CONS25; + break; + } +} + #if 0 static void teken_subr_vt52_decid(teken_t *t)