screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [bug #54989] incorrect use of tparm


From: Amadeusz Sławiński
Subject: [screen-devel] [bug #54989] incorrect use of tparm
Date: Sat, 10 Nov 2018 15:43:50 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Follow-up Comment #3, bug #54989 (project screen):

I guess this will simplify things a bit, but will probably require some more
work than just that:

-       if (f != of && (f & 0x04000000) && hastruecolor) {
-               uint8_t _r, _g, _b;
-
-               _r = (f & 0x00ff0000) >> 16;
-               _g = (f & 0x0000ff00) >> 8;
-               _b = (f & 0x000000ff);
-
-               /* TODO - properly get escape code */
-               tputs(tparm("\033[38;2;%d;%d;%dm", _r, _g, _b), 1,
DoAddChar);
+       if (f != of && (f & 0x04000000) && D_CCO == 32767) {
+               AddCStr2(D_CAF, f & 0x00ffffff);


Still 'infocmp xterm-direct|grep -i rgb' returns nothing, should I be checking
colors# (D_CCO == 32767 check in code above) and pairs#, or am I
misunderstaning something?
$ infocmp -V
ncurses 6.1.20180127
$ infocmp xterm-direct|grep -i rgb
$


Also are there any considerations I should take in regards to 256 color
escapes? They are absent in terminfo, but still work. Should I just keep
supporting them and assume that all direct color terminals support them?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54989>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]