403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/editors/emacs/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/editors/emacs/files/patch-tty-rgb
Add RGB fallback if environment has COLORTERM=truecolor
https://github.com/emacs-mirror/emacs/commit/50f489b5dc59

--- doc/misc/efaq.texi.orig	2019-01-07 14:26:06 UTC
+++ doc/misc/efaq.texi
@@ -1603,6 +1603,10 @@ Currently there's no standard way to determine whether
 supports direct color mode.  If such standard arises later on, support
 for @samp{setb24} and @samp{setf24} may be removed.
 
+If Terminfo database is not available, but 24-bit direct color mode is
+supported, it can still be enabled by defining the environment
+variable @env{COLORTERM} to @samp{truecolor}.
+
 @node Debugging a customization file
 @section How do I debug a @file{.emacs} file?
 @cindex Debugging @file{.emacs} file
--- src/term.c.orig	2019-01-07 14:26:07 UTC
+++ src/term.c
@@ -4157,6 +4157,15 @@ use the Bourne shell command 'TERM=...; export TERM' (
 	    tty->TS_set_background = bg;
 	    tty->TN_max_colors = 16777216;
 	  }
+	/* Fall back to xterm+direct (semicolon version) if requested
+	   by the COLORTERM environment variable.  */
+	else if ((bg = getenv("COLORTERM")) != NULL
+		 && strcasecmp(bg, "truecolor") == 0)
+	  {
+	    tty->TS_set_foreground = "\033[%?%p1%{8}%<%t3%p1%d%e38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
+	    tty->TS_set_background = "\033[%?%p1%{8}%<%t4%p1%d%e48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
+	    tty->TN_max_colors = 16777216;
+	  }
       }
 #endif
 

Youez - 2016 - github.com/yon3zu
LinuXploit