[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
attroff and COLOR_PAIR
From: |
Dulek |
Subject: |
attroff and COLOR_PAIR |
Date: |
Tue, 26 Oct 2010 15:57:12 -0700 (PDT) |
Look at this piece of code:
attron(COLOR_PAIR(1));
addstr("a");
attron(COLOR_PAIR(2));
addstr("b");
attroff(COLOR_PAIR(2));
addstr("c");
attroff(COLOR_PAIR(1));
refresh();
According to http://www.mkssoftware.com/docs/man3/curs_attr.3.asp manual :
The routine attroff() turns off the named attributes without turning any
other attributes on or off.
This means, that this code should display 'a' in COLOR_PAIR(1) color, 'b' in
COLOR_PAIR(2) color, and 'c' in COLOR_PAIR(1) color. Unfortunately 'c' is
displayed in default terminal color. Why this is happening?
--
View this message in context:
http://old.nabble.com/attroff-and-COLOR_PAIR-tp30062568p30062568.html
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.
- attroff and COLOR_PAIR,
Dulek <=