lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV colors in lynx 2.6


From: T.E.Dickey
Subject: Re: LYNX-DEV colors in lynx 2.6
Date: Wed, 22 Jan 1997 06:12:51 -0500 (EST)

> What do you mean by a "color xterm"?  Is this software? terminfo?  I'm using
> ProcommPlus on my PC, which has a couple dozen terminal settings.  I've tried
> all of them with lynx, with varying results.  xterm and rxvt aren't on the 
> list.
> Are you saying I need to replace my terminal emulation software to get colors
> supported?
no. I've not used ProcommPlus, but I'm told that minicom (which I'm using
at the moment) is a much-reduced form.  If you're saying that ANSI is one
of the choices, then it probably supports the ANSI (ISO 6429) color sequences,
e.g., <esc>[40 is black background.
 
> > Since you're running on SunOS 4.1.3, you'll only get color using either
> > ncurses or slang.  You'll need an ANSI compiler (or gcc) to compile
> > ncurses...
> 
> "...either ncurses or slang..." seems to imply I don't need both.
> I got slang and built with it.  So I shouldn't have to get ncurses also.  
> Right?
Right. Though there's drawbacks to slang (probably only interesting in a
technical sense), it'll probably do what you want.  One of the drawbacks
is that it hardcodes some of the stuff that you need (and since there's no
documentation for slang, we have to read the code to figure out exactly
what we can do).
 
> Excuse the dumb questions.  I'm not a terminfo expert.
Well, as long as the people on lynx-dev don't get annoyed at the traffic,
fine - otherwise send me direct email.

However: There's two main data formats for storing terminal descriptions on
UNIX: termcap & terminfo.  The former (usually /etc/termcap) and the latter
(usually files under /usr/lib/terminfo) are pretty much equivalent.  Each
"describes" terminals by  listing, for a set of known parameters, what the
terminal does, or how it does it.

Check your slang library - see if it's looking at /etc/termcap or
/usr/lib/terminfo (I'd assume the former).  There's no _standard_ description
for color in termcap.  The whole issue came up late in the game.  However,
slang is using the backward-compatibility names listed in SVr4 curses.
You need to have a termcap that lists these (from src/sldsply.c around
line 1850):
        op      - original pair (resets colors)
        Sf      - set foreground
        Sb      - set background
        AF      - set ANSI foreground
        AB      - set ANSI background
        Co      - # of colors
        pa      - # of color-pairs (usually, but not always Co * Co)

since there's only a _termcap_ interface, this won't work with a real
SVr4 terminfo implementation (it's not in the spec).

For example, from my /etc/termcap, there's strings that describe color
for Linux console (which recognizes ANSI color):

        :Co#8:\
        :Sf=\E[%a+c\036%dm:\
        :Sb=\E[%a+c\050%dm:

You can override the system's /etc/termcap by setting the $TERMCAP variable.
This is all described (in insufficient detail) in your online man-pages.

To see if your terminal recognizes color (without tinkering with your
termcap), you can try vttest (to which I've added color tests):

        ftp.clark.net:/pub/dickey/vttest

(That's menu 11.4.2, for starters)

Don't worry _too_ much about the bce background stuff - it's an efficiency
consideration that didn't occur to the early color terminal designers.
However, slang won't work properly if your terminal doesn't support bce.
(ncurses will, as will SVr4 curses).

-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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