From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?q?Rami=20Ylim=C3=A4ki?= Newsgroups: gmane.emacs.devel Subject: [PATCH v3 1/4] Remove unused terminal color pair count. Date: Tue, 14 Feb 2017 17:58:19 +0200 Message-ID: <1487087902-6661-2-git-send-email-rami.ylimaki@vincit.fi> References: <1487087902-6661-1-git-send-email-rami.ylimaki@vincit.fi> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1487087952 32380 195.159.176.226 (14 Feb 2017 15:59:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2017 15:59:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 14 16:59:05 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdfVO-0007gc-Hb for ged-emacs-devel@m.gmane.org; Tue, 14 Feb 2017 16:59:02 +0100 Original-Received: from localhost ([::1]:35616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdfVS-0000Sy-4A for ged-emacs-devel@m.gmane.org; Tue, 14 Feb 2017 10:59:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdfVG-0000SY-OX for emacs-devel@gnu.org; Tue, 14 Feb 2017 10:58:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdfVB-0000nm-RW for emacs-devel@gnu.org; Tue, 14 Feb 2017 10:58:54 -0500 Original-Received: from mx1.kapsi.fi ([2001:1bc8:1004::1:25]:46362 helo=mail.kapsi.fi) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdfVB-0000mt-JO for emacs-devel@gnu.org; Tue, 14 Feb 2017 10:58:49 -0500 Original-Received: from 91-158-222-159.elisa-laajakaista.fi ([91.158.222.159] helo=nopsakone.home) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cdfV7-0005Tc-NM for emacs-devel@gnu.org; Tue, 14 Feb 2017 17:58:45 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487087902-6661-1-git-send-email-rami.ylimaki@vincit.fi> X-SA-Exim-Connect-IP: 91.158.222.159 X-SA-Exim-Mail-From: rami.ylimaki@vincit.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:1bc8:1004::1:25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212375 Archived-At: From: Rami Ylimäki The TN_max_pairs field is unused and would be inconvenient with direct color modes. * src/termchar.h (tty_display_info): Remove TN_max_pairs field describing maximum number of terminal background/foreground color pairs. * src/term.c (tty_default_color_capabilities, tty_setup_colors, init_tty): Remove references to TN_max_pairs. --- src/term.c | 6 ------ src/termchar.h | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/term.c b/src/term.c index c067a86..b0ff9cb 100644 --- a/src/term.c +++ b/src/term.c @@ -2048,7 +2048,6 @@ TERMINAL does not refer to a text terminal. */) to work around an HPUX compiler bug (?). See http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00410.html */ static int default_max_colors; -static int default_max_pairs; static int default_no_color_video; static char *default_orig_pair; static char *default_set_foreground; @@ -2066,7 +2065,6 @@ tty_default_color_capabilities (struct tty_display_info *tty, bool save) dupstring (&default_set_foreground, tty->TS_set_foreground); dupstring (&default_set_background, tty->TS_set_background); default_max_colors = tty->TN_max_colors; - default_max_pairs = tty->TN_max_pairs; default_no_color_video = tty->TN_no_color_video; } else @@ -2075,7 +2073,6 @@ tty_default_color_capabilities (struct tty_display_info *tty, bool save) tty->TS_set_foreground = default_set_foreground; tty->TS_set_background = default_set_background; tty->TN_max_colors = default_max_colors; - tty->TN_max_pairs = default_max_pairs; tty->TN_no_color_video = default_no_color_video; } } @@ -2095,7 +2092,6 @@ tty_setup_colors (struct tty_display_info *tty, int mode) { case -1: /* no colors at all */ tty->TN_max_colors = 0; - tty->TN_max_pairs = 0; tty->TN_no_color_video = 0; tty->TS_set_foreground = tty->TS_set_background = tty->TS_orig_pair = NULL; break; @@ -2113,7 +2109,6 @@ tty_setup_colors (struct tty_display_info *tty, int mode) tty->TS_set_background = "\033[4%dm"; #endif tty->TN_max_colors = 8; - tty->TN_max_pairs = 64; tty->TN_no_color_video = 0; break; } @@ -4135,7 +4130,6 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ } tty->TN_max_colors = tgetnum ("Co"); - tty->TN_max_pairs = tgetnum ("pa"); tty->TN_no_color_video = tgetnum ("NC"); if (tty->TN_no_color_video == -1) diff --git a/src/termchar.h b/src/termchar.h index e6e483e..cf061a9 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -149,10 +149,6 @@ struct tty_display_info int TN_max_colors; /* "Co" -- number of colors. */ - /* "pa" -- max. number of color pairs on screen. Not handled yet. - Could be a problem if not equal to TN_max_colors * TN_max_colors. */ - int TN_max_pairs; - /* "op" -- SVr4 set default pair to its original value. */ const char *TS_orig_pair; -- 2.7.4