bug-ncurses
[Top][All Lists]
Advanced

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

Re: problem with gnome terminal


From: Thomas Dickey
Subject: Re: problem with gnome terminal
Date: Sun, 27 Mar 2011 14:22:36 -0400 (EDT)

On Sun, 27 Mar 2011, Mark Manning wrote:

This is not a bug report, my problem is not related to ncurses or its
use but you might have information that could help me fix my issue. In
fact, Im not using libncurses in my application at all because my
application is a forth compiler.  I have basically created my own
curses library in forth that can pretty much do most of the things
that ncurses can do but which takes up only 4k of code space.

I am not however catering to all the quirks of every terminal type in
existence. E.G. if there is no format string for an SGR in some
terminal's terminfo I dont have any glue code that says "well i know
what its format string is".  I am also not doing sub windowing (though
that would be trivial to implement).

My problem is that i know that for SETAF and SETAB color 0 is black, 1
is red, 3 is green etc. and herein lies the problem!.  This is an
absolute truth in every terminal I have thus far used EXCEPT gnome
terminal.  For some obscure reason the gnome development team has
decided that color 0 shall be dark gray and color 15 shall be black.
This BOGGLES the mind!

Now, what I dont want to start doing is gordian knot code that says
"Well it seems were using gnome terminal here so lets fudge the colors
to accommodate".  What I would like to know is - without knowing im
specifically running within a gnome terminal how can i know the values
of each color.  For all I know there are other terminals that I have
not yet encountered that also have this problem.

Generally, you cannot know that.  xterm has control sequences that
let you know - but none of the the other terminals implement those
(I think...).

How does ncurses handle this? did you go for the duct tape solution
with special glue code to "fix" the gnome terminal bogosity?

no - each release of gnome terminal introduces a new set of bugs^H^H^H^Hfeatures.

I hadn't noticed this particular issue; I suppose it's possible
to make an SGR which interchanges 0/15, but then it's possible
that the next release of gnome terminal will change the color
scheme again.

Also, WHY oh why do the people who create the terminfo database always
neglect to include a format string for SGR?  This basically forces me
to output an SGR0 and then reinstate all the attributes I didnt want
to reset which is forcing me into taking the absolute slowest path!

Which terminal description needs an sgr definition?

(There are a lot which don't have one, but except where I can test it, I generally don't add one, since it's also true that a few "real" terminals don't support setting multiple parameters).

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



reply via email to

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