slang-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] SLtt_initialize() Is_Fg_BGR vs. Is_Bg_BGR


Hi John,

On Wed, 2006-02-15 at 10:31 -0500, John E. Davis wrote:
> Leonard den Ottolander <s-lang@xxxxxxxxxxxxx> wrote:
>   The first variable (Is_Fg_BGR) was set but has never been used for
>   anything.
> 
> >Pavel Shirshov recently fixed the internal slang version for mc to set
> >Is_Bg_BGR (instead of Is_Fg_BGR) after the assignment of Color_Bg_Str on
> >line 2562 in sldisply.c. Could this typo have been the cause of why
> >you've dropped that variable Is_Fg_BGR altogether?
> 
>   Looking at the code, I can see how a typo could have caused
>   Is_Fg_BGR to never be used.  Does this patch address the issue?

I'm not seeing any issues (not saying they're not there though), just
reporting an apparent inconsistency.

>  	Color_Bg_Str = SLtt_tgetstr ("Sb");   /* setb */
> -	/* Is_Fg_BGR = (Color_Bg_Str != NULL); */
> +	Is_Bg_BGR = (Color_Bg_Str != NULL);

This is indeed the assignment Pavel Shirshov changed. It seems obvious
(on the surface) that if you're still using Is_Bg_BGR it should be
assigned here, or at least that this was the original intention of the
author. But you are probably a better judge of that ;) .

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research



_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]