Commits

ZyX_I committed a878ac6

Renaming: xterm_rgb to termtruecolor

xterm actually does not support 24-bit color

Comments (0)

Files changed (17)

runtime/doc/options.txt

 'guicolors' 'gcol'	boolean (default off)
 			global
 			{not in Vi}
-			{not available when compiled without the |+xterm_rgb|
-			feature}
+			{not available when compiled without the 
+			|+termtruecolor| feature}
 	When on, uses |highlight-guifg| and |highlight-guibg| attributes in 
-	terminal (thus using 24-bit color). Requires xterm-compatible 
+	terminal (thus using 24-bit color). Requires ISO-8613-3 compatible 
 	terminal.
 
 			*'guicursor'* *'gcr'* *E545* *E546* *E548* *E549*

runtime/doc/various.txt

 m  *+tcl/dyn*		Tcl interface |tcl-dynamic| |/dyn|
    *+terminfo*		uses |terminfo| instead of termcap
 N  *+termresponse*	support for |t_RV| and |v:termresponse|
+m  *+termtruecolor*	24-bit color in xterm-compatible terminals support
 N  *+textobjects*	|text-objects| selection
    *+tgetent*		non-Unix only: able to use external termcap
 N  *+title*		Setting the window 'title' and 'icon'
    *+xsmp*		XSMP (X session management) support
    *+xsmp_interact*	interactive XSMP (X session management) support
 N  *+xterm_clipboard*	Unix only: xterm clipboard handling
-m  *+xterm_rgb*		24-bit color in xterm-compatible terminals support
 m  *+xterm_save*	save and restore xterm screen |xterm-screens|
 N  *+X11*		Unix only: can restore window title |X11|
 

src/auto/configure

 enable_rubyinterp
 with_ruby_command
 enable_cscope
-enable_xterm_rgb
+enable_termtruecolor
 enable_workshop
 enable_netbeans
 enable_sniff
   --enable-tclinterp      Include Tcl interpreter.
   --enable-rubyinterp=OPTS     Include Ruby interpreter.  default=no OPTS=no/yes/dynamic
   --enable-cscope         Include cscope interface.
-  --enable-xterm-rgb      Include support for 24-bit colors in xterm
+  --enable-termtruecolor      Include support for 24-bit colors in ISO-8613-3 compatible terminals
   --enable-workshop       Include Sun Visual Workshop support.
   --disable-netbeans      Disable NetBeans integration support.
   --enable-sniff          Include Sniff interface.
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xterm-rgb argument" >&5
-$as_echo_n "checking --enable-xterm-rgb argument... " >&6; }
-# Check whether --enable-xterm_rgb was given.
-if test "${enable_xterm_rgb+set}" = set; then :
-  enableval=$enable_xterm_rgb;
-else
-  enable_xterm_rgb="no"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xterm_rgb" >&5
-$as_echo "$enable_xterm_rgb" >&6; }
-if test "$enable_xterm_rgb" = "yes"; then
-  $as_echo "#define FEAT_XTERM_RGB 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-termtruecolor argument" >&5
+$as_echo_n "checking --enable-termtruecolor argument... " >&6; }
+# Check whether --enable-termtruecolor was given.
+if test "${enable_termtruecolor+set}" = set; then :
+  enableval=$enable_termtruecolor;
+else
+  enable_termtruecolor="no"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_termtruecolor" >&5
+$as_echo "$enable_termtruecolor" >&6; }
+if test "$enable_termtruecolor" = "yes"; then
+  $as_echo "#define FEAT_TERMTRUECOLOR 1" >>confdefs.h
 
 fi
 
 /* Define if you want to include the Tcl interpreter. */
 #undef FEAT_TCL
 
-/* Define if you want 24-bit colors in xterm. */
-#undef FEAT_XTERM_RGB
+/* Define if you want 24-bit colors in ISO-8613-3 compatible terminals. */
+#undef FEAT_TERMTRUECOLOR
 
 /* Define if you want to include the Sniff interface. */
 #undef FEAT_SNIFF
   AC_DEFINE(FEAT_CSCOPE)
 fi
 
-AC_MSG_CHECKING(--enable-xterm-rgb argument)
-AC_ARG_ENABLE(xterm_rgb,
-	[  --enable-xterm-rgb      Include support for 24-bit colors in xterm], ,
-	[enable_xterm_rgb="no"])
-AC_MSG_RESULT($enable_xterm_rgb)
-if test "$enable_xterm_rgb" = "yes"; then
-  AC_DEFINE(FEAT_XTERM_RGB)
+AC_MSG_CHECKING(--enable-termtruecolor argument)
+AC_ARG_ENABLE(termtruecolor,
+	[  --enable-termtruecolor      Include support for 24-bit colors in ISO-8613-3 compatible terminals], ,
+	[enable_termtruecolor="no"])
+AC_MSG_RESULT($enable_termtruecolor)
+if test "$enable_termtruecolor" = "yes"; then
+  AC_DEFINE(FEAT_TERMTRUECOLOR)
 fi
 
 AC_MSG_CHECKING(--enable-workshop argument)
 #ifdef FEAT_TERMRESPONSE
 	"termresponse",
 #endif
+#ifdef FEAT_TERMTRUECOLOR
+	"termtruecolor",
+#endif
 #ifdef FEAT_TEXTOBJ
 	"textobjects",
 #endif
 #ifdef FEAT_XCLIPBOARD
 	"xterm_clipboard",
 #endif
-#ifdef FEAT_XTERM_RGB
-	"xterm_rgb",
-#endif
 #ifdef FEAT_XTERM_SAVE
 	"xterm_save",
 #endif
 EXTERN int	cterm_normal_fg_color INIT(= 0);
 EXTERN int	cterm_normal_fg_bold INIT(= 0);
 EXTERN int	cterm_normal_bg_color INIT(= 0);
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 EXTERN long_u	cterm_normal_fg_gui_color INIT(= INVALCOLOR);
 EXTERN long_u	cterm_normal_bg_gui_color INIT(= INVALCOLOR);
 #endif
     pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);
     pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);
 
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
     if (USE_24BIT)
     {
 	bg_color = highlight_gui_color_rgb(hl_id, FALSE);
 #endif
 			    SCRIPTID_INIT},
     {"guicolors",   "gcol",  P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 			    (char_u *)&p_guicolors, PV_NONE,
 			    {(char_u *)FALSE, (char_u *)FALSE}
 #else
 EXTERN char_u	*p_header;	/* 'printheader' */
 #endif
 EXTERN int	p_prompt;	/* 'prompt' */
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 EXTERN int	p_guicolors;	/* 'guicolors' */
 #endif
 #ifdef FEAT_GUI

src/proto/term.pro

 int show_one_termcode __ARGS((char_u *name, char_u *code, int printit));
 char_u *translate_mapping __ARGS((char_u *str, int expmap));
 void update_tcap __ARGS((int attr));
-guicolor_T xterm_rgb_mch_get_color __ARGS((char_u *name));
-guicolor_T xterm_rgb_get_color __ARGS((char_u *name));
-long_u xterm_rgb_mch_get_rgb __ARGS((guicolor_T color));
+guicolor_T termtrue_mch_get_color __ARGS((char_u *name));
+guicolor_T termtrue_get_color __ARGS((char_u *name));
+long_u termtrue_mch_get_rgb __ARGS((guicolor_T color));
 void term_fg_rgb_color __ARGS((long_u rgb));
 void term_bg_rgb_color __ARGS((long_u rgb));
 /* vim: set ft=c : */
 	    if ((attr & HL_BOLD) && T_MD != NULL)	/* bold */
 		out_str(T_MD);
 	    else if (aep != NULL && cterm_normal_fg_bold &&
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 			(p_guicolors ?
 			    (aep->ae_u.cterm.fg_rgb != INVALCOLOR):
 #endif
 			    (t_colors > 1 && aep->ae_u.cterm.fg_color)
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 			)
 #endif
 		    )
 	     */
 	    if (aep != NULL)
 	    {
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 		if (p_guicolors)
 		{
 		    if (aep->ae_u.cterm.fg_rgb != INVALCOLOR)
 		     */
 		    aep = syn_cterm_attr2entry(screen_attr);
 		    if (aep != NULL &&
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 			    (p_guicolors ?
 				(aep->ae_u.cterm.fg_rgb != INVALCOLOR ||
 				 aep->ae_u.cterm.bg_rgb != INVALCOLOR):
 #endif
 				(aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color)
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 			    )
 #endif
 			)
 	    if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE)))
 		out_str(T_ME);
 
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 	    if (p_guicolors)
 	    {
 		if (cterm_normal_fg_gui_color != INVALCOLOR)
     if (IS_CTERM)
     {
 	/* set Normal cterm colors */
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 	if (p_guicolors ?
 		(cterm_normal_fg_gui_color != INVALCOLOR
 		 || cterm_normal_bg_gui_color != INVALCOLOR):
 #ifdef FEAT_GUI
 		|| gui.in_use
 #endif
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 		|| (p_guicolors && cterm_normal_bg_gui_color != INVALCOLOR)
 #endif
 		|| cterm_normal_bg_color == 0 || *T_UT != NUL));
 #ifdef FEAT_GUI
 					    && !gui.in_use
 #endif
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 					    && !p_guicolors
 #endif
 					    );
 #  include <X11/Intrinsic.h>
 # endif
 # define guicolor_T long_u		/* avoid error in prototypes and 
-					 * make FEAT_XTERM_RGB work */
+					 * make FEAT_TERMTRUECOLOR work */
 # define INVALCOLOR ((guicolor_T)0x1ffffff)
 #endif
 
 	    /* These colors need to be > 8 bits to hold 256. */
 	    short_u	    fg_color;	/* foreground color number */
 	    short_u	    bg_color;	/* background color number */
-# ifdef FEAT_XTERM_RGB
+# ifdef FEAT_TERMTRUECOLOR
 	    long_u	    fg_rgb;	/* foreground color RGB */
 	    long_u	    bg_rgb;	/* background color RGB */
 # endif
     int		sg_cterm_bg;	/* terminal bg color number + 1 */
     int		sg_cterm_attr;	/* Screen attr for color term mode */
 /* for when using the GUI */
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
     guicolor_T	sg_gui_fg;	/* GUI foreground color handle */
     guicolor_T	sg_gui_bg;	/* GUI background color handle */
 #endif
 static int hl_has_settings __ARGS((int idx, int check_link));
 static void highlight_clear __ARGS((int idx));
 
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 static void gui_do_one_color __ARGS((int idx, int do_menu, int do_tooltip));
 static guicolor_T color_name2handle __ARGS((char_u *name));
 #endif
 	    for (idx = 0; idx < highlight_ga.ga_len; ++idx)
 		highlight_clear(idx);
 	    init_highlight(TRUE, TRUE);
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 	    if (USE_24BIT)
 		highlight_gui_started();
 #endif
 		if (!init)
 		    HL_TABLE()[idx].sg_set |= SG_GUI;
 
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 		/* In GUI guifg colors are only used when recognized */
 		i = color_name2handle(arg);
 		if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0
 			HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
 		    else
 			HL_TABLE()[idx].sg_gui_fg_name = NULL;
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 #  ifdef FEAT_GUI_X11
 		    if (is_menu_group)
 			gui.menu_fg_pixel = i;
 		if (!init)
 		    HL_TABLE()[idx].sg_set |= SG_GUI;
 
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 		/* In GUI guifg colors are only used when recognized */
 		i = color_name2handle(arg);
 		if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !USE_24BIT)
 			HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
 		    else
 			HL_TABLE()[idx].sg_gui_bg_name = NULL;
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 #  ifdef FEAT_GUI_X11
 		    if (is_menu_group)
 			gui.menu_bg_pixel = i;
 	     * and/or "fg", which have been changed now.
 	     */
 #endif
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 	    if (USE_24BIT)
 		highlight_gui_started();
 #endif
     cterm_normal_fg_color = 0;
     cterm_normal_fg_bold = 0;
     cterm_normal_bg_color = 0;
-# ifdef FEAT_XTERM_RGB
+# ifdef FEAT_TERMTRUECOLOR
     cterm_normal_fg_gui_color = INVALCOLOR;
     cterm_normal_bg_gui_color = INVALCOLOR;
 # endif
     vim_free(HL_TABLE()[idx].sg_gui_sp_name);
     HL_TABLE()[idx].sg_gui_sp_name = NULL;
 #endif
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
     HL_TABLE()[idx].sg_gui_fg = INVALCOLOR;
     HL_TABLE()[idx].sg_gui_bg = INVALCOLOR;
 #endif
 #endif
 }
 
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
 /*
  * Set the normal foreground and background colors according to the "Normal"
  * highlighting group.  For X11 also set "Menu", "Scrollbar", and
 set_normal_colors()
 {
 #ifdef FEAT_GUI
-# ifdef FEAT_XTERM_RGB
+# ifdef FEAT_TERMTRUECOLOR
     if (gui.in_use)
 # endif
     {
 # endif
     }
 #endif
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 # ifdef FEAT_GUI
     else
 # endif
 
 #endif /* FEAT_GUI */
 
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
 /*
  * Return the handle for a color name.
  * Returns INVALCOLOR when failed.
 
     if (STRICMP(name, "fg") == 0 || STRICMP(name, "foreground") == 0)
     {
-#if defined(FEAT_XTERM_RGB) && defined(FEAT_GUI)
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
 	if (gui.in_use)
 #endif
 #ifdef FEAT_GUI
 	    return gui.norm_pixel;
 #endif
-#if defined(FEAT_XTERM_RGB) && defined(FEAT_GUI)
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
 	else
 #endif
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 	    return cterm_normal_fg_gui_color;
 #endif
     }
     if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
     {
-#if defined(FEAT_XTERM_RGB) && defined(FEAT_GUI)
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
 	if (gui.in_use)
 #endif
 #ifdef FEAT_GUI
 	    return gui.back_pixel;
 #endif
-#if defined(FEAT_XTERM_RGB) && defined(FEAT_GUI)
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
 	else
 #endif
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 	    return cterm_normal_bg_gui_color;
 #endif
     }
 						  == taep->ae_u.cterm.fg_color
 			    && aep->ae_u.cterm.bg_color
 						  == taep->ae_u.cterm.bg_color
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 			    && aep->ae_u.cterm.fg_rgb
 						    == taep->ae_u.cterm.fg_rgb
 			    && aep->ae_u.cterm.bg_rgb
     {
 	taep->ae_u.cterm.fg_color = aep->ae_u.cterm.fg_color;
 	taep->ae_u.cterm.bg_color = aep->ae_u.cterm.bg_color;
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 	taep->ae_u.cterm.fg_rgb = aep->ae_u.cterm.fg_rgb;
 	taep->ae_u.cterm.bg_rgb = aep->ae_u.cterm.bg_rgb;
 #endif
 		    new_en.ae_u.cterm.fg_color = spell_aep->ae_u.cterm.fg_color;
 		if (spell_aep->ae_u.cterm.bg_color > 0)
 		    new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.bg_color;
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 		if (spell_aep->ae_u.cterm.fg_rgb != INVALCOLOR)
 		    new_en.ae_u.cterm.fg_rgb = spell_aep->ae_u.cterm.fg_rgb;
 		if (spell_aep->ae_u.cterm.bg_rgb != INVALCOLOR)
 	return NULL;
     if (modec == 'g')
     {
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 #  ifdef FEAT_GUI
 	/* return font name */
 	if (font)
 }
 #endif
 
-#if (defined(FEAT_SYN_HL) && (defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)) \
+#if (defined(FEAT_SYN_HL) \
+	    && (defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)) \
 	&& defined(FEAT_PRINTER)) || defined(PROTO)
 /*
  * Return color name of highlight group "id" as RGB value.
      * highlighting attributes, need to allocate an attr number.
      */
     if (sgp->sg_cterm_fg == 0 && sgp->sg_cterm_bg == 0
-# ifdef FEAT_XTERM_RGB
+# ifdef FEAT_TERMTRUECOLOR
 	    && sgp->sg_gui_fg == INVALCOLOR
 	    && sgp->sg_gui_bg == INVALCOLOR
 # endif
 	at_en.ae_attr = sgp->sg_cterm;
 	at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
 	at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
-# ifdef FEAT_XTERM_RGB
+# ifdef FEAT_TERMTRUECOLOR
 	at_en.ae_u.cterm.fg_rgb = GUI_MCH_GET_RGB(sgp->sg_gui_fg);
 	at_en.ae_u.cterm.bg_rgb = GUI_MCH_GET_RGB(sgp->sg_gui_bg);
 # endif
     return hl_id;
 }
 
-#if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
 /*
  * Call this function just after the GUI has started.
  * It finds the font and color handles for the highlighting groups.
     int	    idx;
 
     /* First get the colors from the "Normal" and "Menu" group, if set */
-# if defined(FEAT_GUI) || defined(FEAT_XTERM_RGB)
-#  ifdef FEAT_XTERM_RGB
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#  ifdef FEAT_TERMTRUECOLOR
     if (USE_24BIT)
 #  endif
 	set_normal_colors();
     int		didit = FALSE;
 
 # ifdef FEAT_GUI
-#  ifdef FEAT_XTERM_RGB
+#  ifdef FEAT_TERMTRUECOLOR
     if (gui.in_use)
 #  endif
 	if (HL_TABLE()[idx].sg_font_name != NULL)
 static struct builtin_term *find_builtin_term __ARGS((char_u *name));
 static void parse_builtin_tcap __ARGS((char_u *s));
 static void term_color __ARGS((char_u *s, int n));
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 static void term_rgb_color __ARGS((char *s, long_u rgb));
 #endif
 static void gather_termleader __ARGS((void));
 
 };	/* end of builtin_termcaps */
 
-#if defined(FEAT_XTERM_RGB) || defined(PROTO)
+#if defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
 # define RGB(r, g, b) ((r<<16) | (g<<8) | (b))
 struct rgbcolor_table_S {
     char_u	*color_name;
 }
 
     guicolor_T
-xterm_rgb_mch_get_color(char_u *name)
+termtrue_mch_get_color(char_u *name)
 {
     guicolor_T	color;
     int		i;
 }
 
     guicolor_T
-xterm_rgb_get_color(name)
+termtrue_get_color(name)
     char_u	*name;
 {
     guicolor_T	t;
 
     if (*name == NUL)
 	return INVALCOLOR;
-    t = xterm_rgb_mch_get_color(name);
+    t = termtrue_mch_get_color(name);
 
     if (t == INVALCOLOR)
 	EMSG2(_("E254: Cannot allocate color %s"), name);
 
 #if defined(FEAT_GUI) || defined(PROTO)
     long_u
-xterm_rgb_mch_get_rgb(color)
+termtrue_mch_get_rgb(color)
     guicolor_T	color;
 {
     return (long_u) color;
 	OUT_STR(tgoto((char *)s, 0, n));
 }
 
-#if defined(FEAT_XTERM_RGB) || defined(PROTO)
+#if defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
     void
 term_fg_rgb_color(rgb)
     long_u	rgb;
 #else
 	"-termresponse",
 #endif
+#ifdef FEAT_TERMTRUECOLOR
+	"+termtruecolor",
+#else
+	"-termtruecolor",
+#endif
 #ifdef FEAT_TEXTOBJ
 	"+textobjects",
 #else
 	"-xterm_clipboard",
 # endif
 #endif
-#ifdef FEAT_XTERM_RGB
-	"+xterm_rgb",
-#else
-	"-xterm_rgb",
-#endif
 #ifdef FEAT_XTERM_SAVE
 	"+xterm_save",
 #else
 #define MSG_PUTS_LONG_ATTR(s, a)    msg_puts_long_attr((char_u *)(s), (a))
 
 #ifdef FEAT_GUI
-# ifdef FEAT_XTERM_RGB
-#  define GUI_FUNCTION(f)	    (gui.in_use ? gui_##f : xterm_rgb_##f)
+# ifdef FEAT_TERMTRUECOLOR
+#  define GUI_FUNCTION(f)	    (gui.in_use ? gui_##f : termtrue_##f)
 #  define USE_24BIT		    (gui.in_use || p_guicolors)
 # else
 #  define GUI_FUNCTION(f)	    gui_##f
 #  define USE_24BIT		    gui.in_use
 # endif
 #else
-# ifdef FEAT_XTERM_RGB
-#  define GUI_FUNCTION(f)	    xterm_rgb_##f
+# ifdef FEAT_TERMTRUECOLOR
+#  define GUI_FUNCTION(f)	    termtrue_##f
 #  define USE_24BIT		    p_guicolors
 # endif
 #endif
-#ifdef FEAT_XTERM_RGB
+#ifdef FEAT_TERMTRUECOLOR
 # define IS_CTERM		    (t_colors > 1 || p_guicolors)
 #else
 # define IS_CTERM		    (t_colors > 1)