Re: Fwd: status of slrn

"John E. Davis" <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
cga2000 <[email protected]> wrote:
>> slang-2 supports 256 colors, and as long as you have a version of slrn
>> linked to slang-2, this should not be a problem.  
>
> But how do you specify colors in your slrnrc file?
>
> I tried specifying "color whatever color122 color85" and the slr parser
> apparently accepts this syntax.

That should work.  What does `slrn --version` produce?

> But although the color of "whatever" was modified, it was to colors that
> appeared to be picked randomly from the usual 8/16 .. definitely not
> xterm's "color122" and "color85".
>
> Maybe this is an indication that either the slang lib is not 256-color
> capable or that something in my setup is not quite right for this
> feature?

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

#!/usr/bin/env slsh
require ("slsmg");

define define_256_colors (bg)
{
   _for (0, 255, 1)
     {
	variable fg = ();
	slsmg_define_color (fg, "color$fg"$, "color$bg"$);
     }
}

define sigint_handler (sig)
{
   slsmg_reset_smg ();
   exit (1);
}

define slsh_main ()
{
   signal (SIGINT, &sigint_handler);
   slsmg_init_smg ();
   variable fg, bg;
   _for bg (0, 255, 1)
     {
	define_256_colors (bg);
	_for fg (0, 255, 1)
	  {
	     slsmg_gotorc (fg/16, 4*(fg mod 16));
	     slsmg_set_color (fg);
	     slsmg_write_string (sprintf ("%02X%02X", fg,bg));
	  }
	slsmg_refresh ();
	sleep (1);
     }
   slsmg_reset_smg ();
}

-------------------------------------------------------------------------
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.