lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] Color in an Emacs terminal emulator (eterm)


From: Thomas Dickey
Subject: Re: [Lynx-dev] Color in an Emacs terminal emulator (eterm)
Date: Tue, 11 Oct 2005 18:27:07 -0400
User-agent: Mutt/1.3.27i

On Tue, Oct 11, 2005 at 08:32:24PM +0000, Bryan Henderson wrote:
> >That reminds me to ask: Is lynx built with ncurses or slang?
> 
> Ncurses.
> 
> >For starters, look in lynx's trace for "color",
> >since that doesn't require any recompiling.
> 
> I did a Lynx trace with eterm and with linux, and both were identical
> except for some addresses, times, and line numbers (the eterm has
> fewer lines).  Neither contained the word "color".  But the linux
> terminal displayed normal colors and the eterm didn't.

ok - now that I have the terminfo installed and testing it, I see what
you're talking about.  Turning on ncurses' trace, this is what lynx is doing:

called {has_colors()
return }1
called {start_color()
+ called {tparm("\e[%p1%{30}%+%dm", 7)
+ return }"\e[37m"
+ called {tparm("\e[%p1%'('%+%dm", 0)
+ return }"\e[40m"
started color: COLORS = 8, COLOR_PAIRS = 64
return }0  
called {use_default_colors()
+ called {assume_default_colors(-1,-1)
+ return }-1
return }-1
called {init_pair(1,3,-1)
return }-1
called {init_pair(2,1,-1)
return }-1
called {init_pair(3,7,-1)
return }-1
called {init_pair(4,5,-1)
return }-1
called {init_pair(5,6,-1)   
return }-1
called {init_pair(6,7,2)
return }0 
called {init_pair(7,4,-1)
return }-1
called {init_pair(8,3,4) 
return }0 

It's trying to use default-colors, but that terminfo doesn't support it.
And lynx isn't checking the result.  The color pairs will end up being
0's (black/black).

Either way it's my bug, but it helps to know which (and since I'm trying
to work on lynx this week instead of ncurses, that's at least in the right
direction).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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