Re: Fwd: status of slrn

cga2000 <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
On Thu, Oct 25, 2007 at 09:01:53PM EDT, John E. Davis wrote:
> cga2000 <[email protected]> wrote:

[..]

> Does the following slsh script work for you?  It shows 256 foreground
> colors for each of 256 background colors.
> Thanks, --John

Did I mention I run everything under gnu/screen?

:-(

The slsmg script displays 256 colors alright .. when I run it directly
on top of an xterm.

But when I run it in a gnu/screen-managed terminal it only displays 8
colors (black, red, green, yellow, blue, magenta, cyan, white).

I haven't tested with slrn but my guess is that I can expect a similar
behavior.

Just in case this is the output of slrn --version:


_____________________________________________________________________
Slrn 0.9.8.1pl1 [2005-02-17]
        * Note: This version is a developer preview.
S-Lang Library Version: 2.0.6
Compiled at: Mar 21 2007 06:37:54
Operating System: Debian

 COMPILE TIME OPTIONS:
  Backends: +nntp +slrnpull +spool
  External programs / libs: +canlock +inews +ssl +uudeview
  Features: +charset_mapping +decoding +emphasized_text +end_of_thread
    +fake_refs +gen_msgid -grouplens +mime -msgid_cache +piping +rnlock
    +slang +spoilers -strict_from
 DEFAULTS:
  Default server object:     nntp
  Default posting mechanism: nntp
  Default character set:     isolatin
 SUPPORTED CHARACTER SETS:
  isolatin ibm850 ibm852 ibm857 ibm737 NeXT koi8
_____________________________________________________________________


I assume that slang uses terminfo to determine the underlying terminal's
capabilities, here's the entry I use under gnu/screen:


_____________________________________________________________________
[07:26:39][gavron@turki:~/bin]$ infocmp $TERM
#       Reconstructed via infocmp from file: /usr/share/terminfo/s/screen-256color-bce
screen-256color-bce|GNU Screen with 256 colors and BCE,
        am, bce, km, mir, msgr, xenl,
        colors#256, cols#80, it#8, lines#24, pairs#32767,
        acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
        cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
        dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
        flash=\Eg, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@,
        il=\E[%p1%dL, il1=\E[L, ind=^J, initc@, is2=\E)0, kbs=\177,
        kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE,
        op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
        rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m,
        rmul=\E[24m, rs2=\Ec, sc=\E7,
        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,
        sgr0=\E[m\017, smacs=^N, smcup=\E[?1049h, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g,
_____________________________________________________________________


And here's a perl script that displays 256 colors with or without the
intervening gnu/screen layer:

_____________________________________________________________________
#!/usr/bin/perl
# $XFree86: xc/programs/xterm/vttests/256colors.pl,v 1.1 1999/07/11 08:49:54 dawes Exp $

for ($bg = 0; $bg < 256; $bg++) {
    print "\x1b[9;1H\x1b[2J";
    for ($fg = 0; $fg < 256; $fg++) {
	print "\x1b[48;5;${bg}m\x1b[38;5;${fg}m";
	printf "%03.3d/%03.3d ", $fg, $bg;
    }
    sleep 1;
    print "\n";
}
_____________________________________________________________________


Since both the slsmg script and slrn appear to behave similarly ..
rounding the 256 colors to the closest that's available in an 8-color
palette, would this indicate that I am running into a limitation of
slang when under gnu/screen?

Is this something that could be corrected by modifying the terminfo
entry?

Thanks,
cga



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.