Re: [PATCH] curses: correctly pass color and attributes to setcchar()

2019-10-03 Thread Matthew Kilgore
Hi Philippe, On Thu, Oct 03, 2019 at 09:36:56AM +0200, Philippe Mathieu-Daudé wrote: Hi Matthew, On 10/3/19 2:18 AM, Matthew Kilgore wrote: The current code uses getcchar() and setcchar() to handle the cchar_t values, which is correct, however it incorrectly deconstructs the chtype value that

[PATCH v2 2/2] curses: correctly pass the color pair to setcchar()

2019-10-03 Thread Matthew Kilgore
that value as an argument to setcchar(). Signed-off-by: Matthew Kilgore --- ui/curses.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/curses.c b/ui/curses.c index 84003f56a323..3a1b71451c93 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -77,12 +77,14 @@ static void

[PATCH v2 0/2] curses: fix attribute passing

2019-10-03 Thread Matthew Kilgore
tches, one dealing with the attribute masks, and one dealing with correctly passing the color pair number. Thanks, Matthew Kilgore Matthew Kilgore (2): curses: use the bit mask constants provided by curses curses: correctly pass the color pair to setcchar() ui/curses.c | 8 +--- 1 file

[PATCH v2 1/2] curses: use the bit mask constants provided by curses

2019-10-03 Thread Matthew Kilgore
The curses API provides the A_ATTRIBUTES and A_CHARTEXT bit masks for getting the attributes and character parts of a chtype, respectively. We should use provided constants instead of using 0xff. Signed-off-by: Matthew Kilgore --- ui/curses.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] curses: correctly pass color and attributes to setcchar()

2019-10-02 Thread Matthew Kilgore
hardcoded 0xff masks are replaced with A_ATTRIBUTES and A_CHARTEXT. Signed-off-by: Matthew Kilgore --- ui/curses.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index ec281125acbd..3a1b71451c93 100644 --- a/ui/curses.c +++ b/ui/curse