From owner-svn-src-all@FreeBSD.ORG Sat Sep 26 15:03:43 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 EDA4F106566B; Sat, 26 Sep 2009 15:03:42 +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 DCA308FC15; Sat, 26 Sep 2009 15:03:42 +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 n8QF3gP7062949; Sat, 26 Sep 2009 15:03:42 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8QF3g2r062945; Sat, 26 Sep 2009 15:03:42 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200909261503.n8QF3g2r062945@svn.freebsd.org> From: Ed Schouten Date: Sat, 26 Sep 2009 15:03:42 +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: r197520 - 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: Sat, 26 Sep 2009 15:03:43 -0000 Author: ed Date: Sat Sep 26 15:03:42 2009 New Revision: 197520 URL: http://svn.freebsd.org/changeset/base/197520 Log: Get rid of now deprecated SCS wrappers. We always build SCS, even when processing 8-bit data. There is no reason why we should be able to disable it now. Modified: head/sys/teken/teken.c head/sys/teken/teken_scs.h head/sys/teken/teken_subr.h Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Sat Sep 26 15:00:42 2009 (r197519) +++ head/sys/teken/teken.c Sat Sep 26 15:03:42 2009 (r197520) @@ -196,13 +196,13 @@ teken_input_char(teken_t *t, teken_char_ if (t->t_stateflags & TS_CONS25) t->t_nextstate(t, c); else - teken_scs_switch(t, 1); + t->t_curscs = 1; break; case '\x0F': if (t->t_stateflags & TS_CONS25) t->t_nextstate(t, c); else - teken_scs_switch(t, 0); + t->t_curscs = 0; break; case '\r': teken_subr_carriage_return(t); Modified: head/sys/teken/teken_scs.h ============================================================================== --- head/sys/teken/teken_scs.h Sat Sep 26 15:00:42 2009 (r197519) +++ head/sys/teken/teken_scs.h Sat Sep 26 15:03:42 2009 (r197520) @@ -26,35 +26,7 @@ * $FreeBSD$ */ -static void -teken_scs_set(teken_t *t, unsigned int g, teken_scs_t *ts) -{ - - t->t_scs[g] = ts; -} - -static void -teken_scs_switch(teken_t *t, unsigned int g) -{ - - t->t_curscs = g; -} - -static void -teken_scs_restore(teken_t *t) -{ - - t->t_scs[t->t_curscs] = t->t_saved_curscs; -} - -static void -teken_scs_save(teken_t *t) -{ - - t->t_saved_curscs = t->t_scs[t->t_curscs]; -} - -static teken_char_t +static inline teken_char_t teken_scs_process(teken_t *t, teken_char_t c) { Modified: head/sys/teken/teken_subr.h ============================================================================== --- head/sys/teken/teken_subr.h Sat Sep 26 15:00:42 2009 (r197519) +++ head/sys/teken/teken_subr.h Sat Sep 26 15:03:42 2009 (r197520) @@ -540,42 +540,42 @@ static void teken_subr_g0_scs_special_graphics(teken_t *t __unused) { - teken_scs_set(t, 0, teken_scs_special_graphics); + t->t_scs[0] = teken_scs_special_graphics; } static void teken_subr_g0_scs_uk_national(teken_t *t __unused) { - teken_scs_set(t, 0, teken_scs_uk_national); + t->t_scs[0] = teken_scs_uk_national; } static void teken_subr_g0_scs_us_ascii(teken_t *t __unused) { - teken_scs_set(t, 0, teken_scs_us_ascii); + t->t_scs[0] = teken_scs_us_ascii; } static void teken_subr_g1_scs_special_graphics(teken_t *t __unused) { - teken_scs_set(t, 1, teken_scs_special_graphics); + t->t_scs[1] = teken_scs_special_graphics; } static void teken_subr_g1_scs_uk_national(teken_t *t __unused) { - teken_scs_set(t, 1, teken_scs_uk_national); + t->t_scs[1] = teken_scs_uk_national; } static void teken_subr_g1_scs_us_ascii(teken_t *t __unused) { - teken_scs_set(t, 1, teken_scs_us_ascii); + t->t_scs[1] = teken_scs_us_ascii; } static void @@ -962,9 +962,9 @@ teken_subr_do_reset(teken_t *t) t->t_stateflags &= TS_8BIT|TS_CONS25; t->t_stateflags |= TS_AUTOWRAP; - teken_scs_set(t, 0, teken_scs_us_ascii); - teken_scs_set(t, 1, teken_scs_us_ascii); - teken_scs_switch(t, 0); + t->t_scs[0] = teken_scs_us_ascii; + t->t_scs[1] = teken_scs_us_ascii; + t->t_curscs = 0; teken_subr_save_cursor(t); teken_tab_default(t); @@ -986,8 +986,8 @@ teken_subr_restore_cursor(teken_t *t) t->t_cursor = t->t_saved_cursor; t->t_curattr = t->t_saved_curattr; + t->t_scs[t->t_curscs] = t->t_saved_curscs; t->t_stateflags &= ~TS_WRAPPED; - teken_scs_restore(t); teken_funcs_cursor(t); } @@ -1010,7 +1010,7 @@ teken_subr_save_cursor(teken_t *t) t->t_saved_cursor = t->t_cursor; t->t_saved_curattr = t->t_curattr; - teken_scs_save(t); + t->t_saved_curscs = t->t_scs[t->t_curscs]; } static void