bug-ncurses
[Top][All Lists]
Advanced

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

Pad chars issue


From: Ricardo Cantu
Subject: Pad chars issue
Date: Wed, 25 Jan 2006 16:03:18 -0600
User-agent: KMail/1.9.1

It seems that 
> AttrOf(*p) == ChAttrOf(pad)
will never evaluate true . AttrOf is a macro that simply points to the attr 
member of a wide_char structure. ChAttrOf is the actual character &'ed to a 
A_ATTRIB bit. Either this can never evaluate true or the attr is not being 
set for the padded char during the initial buffer population.

The pad chars are being returned in the buffer when 
they should be filtered out by the following code.

form/form_driver.c

>  /* replace visual padding character by blanks in buffer */
> if (pad != C_BLANK)
>  {
>   int i;
>
>      for (i = 0; i < len; i++, p++)
>       {
>         if ((unsigned long)CharOf(*p) == ChCharOf(pad)
>#if USE_WIDEC_SUPPORT
>             && p->chars[1] == 0
>#endif
>     )           /* This is borken: && AttrOf(*p) == ChAttrOf(pad)) */ .
>           *p = myBLANK;
>       }
>    }





reply via email to

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