unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Rami Ylimäki" <rami.ylimaki@vincit.fi>
To: emacs-devel@gnu.org
Subject: [PATCH v3 1/4] Remove unused terminal color pair count.
Date: Tue, 14 Feb 2017 17:58:19 +0200	[thread overview]
Message-ID: <1487087902-6661-2-git-send-email-rami.ylimaki@vincit.fi> (raw)
In-Reply-To: <1487087902-6661-1-git-send-email-rami.ylimaki@vincit.fi>

From: Rami Ylimäki <rjy@iki.fi>

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




  reply	other threads:[~2017-02-14 15:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 15:58 [PATCH v3 0/4] Support 24-bit terminal colors Rami Ylimäki
2017-02-14 15:58 ` Rami Ylimäki [this message]
2017-02-14 15:58 ` [PATCH v3 2/4] " Rami Ylimäki
2017-02-14 15:58 ` [PATCH v3 3/4] Let user turn 24-bit terminal colors on Rami Ylimäki
2017-02-14 15:58 ` [PATCH v3 4/4] Update documentation regarding 24-bit TTY colors Rami Ylimäki
2017-02-18 11:07 ` [PATCH v3 0/4] Support 24-bit terminal colors Eli Zaretskii
2017-02-19  2:22   ` Tino Calancha
2017-02-19  3:14     ` Black and white emacs -nw (WAS: Re: [PATCH v3 0/4] Support 24-bit terminal colors.) Kaushal Modi
2017-02-19  3:20       ` Kaushal Modi
2017-02-19  6:22         ` Tino Calancha
2017-02-19  7:33           ` Kaushal Modi
2017-02-19 12:43             ` Rami Ylimäki
2017-02-19 15:21               ` Kaushal Modi
2017-02-26  0:49     ` [PATCH v3 0/4] Support 24-bit terminal colors Charles Strahan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487087902-6661-2-git-send-email-rami.ylimaki@vincit.fi \
    --to=rami.ylimaki@vincit.fi \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).