On Thu, Oct 24, 2002 at 10:18:47PM -0700, Doug Kaufman wrote:
> On Thu, 24 Oct 2002, Thomas Dickey wrote:
> 
> > I see the problem.  Basically in LYReadCFG.c, I'm using default_fg as
> > COLOR_WHITE, which PDCurses (of course) defines to 7, while actually
> > using 15 for the color we're calling "white".  COLORS in that case is
> > 16.  What I'll do is add some logic to cover the case where COLORS is 16,
> > and set default_fg to 15.
> 
> Thanks for the insight. The following patch fixed it for me for now. I
> presume that you will come up with a more general fix.

right - this is where it's used.  The intent of the code is to filter the
result so that things that look like color pair 0 are treated just as it
is.

> --- lynx2.8.5dev.9/lynx2-8-5/src/LYCurses.c.orig      2002-10-06 16:43:28.000000000 
>-0800
> +++ lynx2.8.5dev.9/lynx2-8-5/src/LYCurses.c   2002-10-24 22:07:36.000000000 -0800
> @@ -615,9 +615,11 @@
>   */
>  PRIVATE int get_color_pair ARGS1(int, n)
>  {
> +#if !defined(PDCURSES)
>      if (lynx_color_pairs[n].fg == default_fg
>       && lynx_color_pairs[n].bg == default_bg)
>       return 0;
> +#endif /* !PDCURSES */
>      return COLOR_PAIR(n);
>  }

-- 
Thomas E. Dickey <[EMAIL PROTECTED]>
http://invisible-island.net
ftp://invisible-island.net

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]

Reply via email to