[Top][All Lists]

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

attrset & color problem

From: Thomas Beierlein
Subject: attrset & color problem
Date: Sat, 10 Dec 2016 19:45:28 +0100


after the switch from ncurses-5.9 to 6.0 I get some weird color

After some experimentation I could connect that to the
attrset() function.

To set the text color (for- and background) I use 

        attrset (COLOR_PAIR(7) | A_BOLD);

as shown in the How-To and man page. That worked without problems in

In ncurses-6 it looks as if the color setting is ignored. After the
instruction I still get the color which was set before. Using attron()
instead works.

If I add the following code before the attrset() line


all is well.

I link against the ncursesw library in both cases and the generated
code for attrset() is nearly the same - a direct write of the
combined attribute (BOLD and color pair) to some memory location. So I
think it resolves to the same macro definition in ncurses.h.

Any ideas? Help would be greatly appreciated.


"Do what is needful!"
Ursula LeGuin: Earthsea

reply via email to

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