bug-ncurses
[Top][All Lists]
Advanced

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

Re: ought putty-256color use xterm-256color rather than 256setaf?


From: Thomas Dickey
Subject: Re: ought putty-256color use xterm-256color rather than 256setaf?
Date: Tue, 19 Jan 2021 04:09:44 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, Jan 16, 2021 at 09:16:20PM -0500, Nick Black wrote:
> in that case, i'm not sure how 256color2.pl is a valid litmus for
> initc/ccc, unless that's redefined as "the ability to change 256
> colors, using the \E]4;-style sequence." but in that case,
> linux-c shouldn't be exposing initc/ccc IMHO. put another way:
> it seems that putty's terminfo entry ought reproduce *not* the
> xterm `initc` as i originally suggested, but the `linux-c` initc.
> 
> have i misunderstood anything?

well, your original question was why the putty entry doesn't inherit
from xterm+256color, but that escape sequence is what's used:

#       Reconstructed via infocmp from file: 
/usr/local/ncurses/share/terminfo/x/xterm+256color
xterm+256color|original xterm 256-color feature,
        ccc,
        colors#0x100,
        pairs#0x10000,
        
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
        oc=\E]104\007,
        setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
        setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
        setb@,
        setf@,

Since putty doesn't support the feature, its terminal description doesn't
use this building-block.
 
> > which precludes the notion that it might support 256 colors.
> 
> just to make sure i understand correctly (and make things clear
> for future readers), you mean "support *changing* 256 colors",
> right? putty-256color definitely supports `256colors2.pl` run
> without the -r option.

sure - putty supports this subset, so its terminal description uses this
chunk:

#       Reconstructed via infocmp from file: 
/usr/local/ncurses/share/terminfo/x/xterm+256setaf
xterm+256setaf|xterm 256-color (set-only),
        colors#0x100,
        pairs#0x10000,
        initc@,
        op=\E[39;49m,
        setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
        setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
        setb@,
        setf@,

Or more clearly perhaps:

comparing xterm+256setaf to xterm+256color.
    comparing booleans.
        ccc: F:T.
    comparing numbers.
    comparing strings.
        initc: NULL, 
'\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\'.
        oc: NULL, '\E]104\007'.
        op: '\E[39;49m', NULL.

> > hmm - I could digress on terminal developers who won't document
> > or provide an accurate terminal description...
> 
> having read terminfo.src, it does seem bewildering that emulator
> authors don't take more interest in this.

agreed (some do, most don't)

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

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