On Tue, Nov 01, 2005 at 03:50:07AM +0100, Ron wrote: ... > I was poking at the use of terminal default colours today and > ran into what looks like a bug in assume_default_colors. > > If it is called with neither of its arguments as -1, then > SP->_default_color is set to be false, and consequently > any attempt to use init_pair to define a color pair using > -1 to get the terminal default will fail.
Looking at the change history, I see that I did this intentionally,
so that
assume_default_colors(COLOR_WHITE, COLOR_BLACK);
would disable the feature. In retrospect, that's to compensate for
not providing a parameter to use_default_colors(). If I had added
both functions at the same time, that probably would have occurred
to me. But they were a few years apart.
I could add a new function to do that (though it wouldn't be as nice
since "use_XXX" is consistent with use_env(), etc). It's possible that
changing the function would cause some applications to give different
results.
--
Thomas E. Dickey <[EMAIL PROTECTED]>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature

