+ The X/Open window attribute routines which <EM>set</EM> or <EM>get</EM>, turn <EM>on</EM> or <EM>off</EM>
+ are extensions of older routines which assume that color pairs are OR'd
+ into the attribute parameter. These newer routines use similar names,
+ because X/Open simply added an underscore (<STRONG>_</STRONG>) for the newer names.
+
+ The <STRONG>int</STRONG> datatype used in the legacy routines is treated as if it is the
+ same size as <STRONG>chtype</STRONG> (used by <STRONG><A HREF="curs_addch.3x.html">addch(3x)</A></STRONG>). It holds the common video at-
+ tributes (such as bold, reverse), as well as a few bits for color.
+ Those bits correspond to the <STRONG>A_COLOR</STRONG> symbol. The <STRONG>COLOR_PAIR</STRONG> macro pro-
+ vides a value which can be OR'd into the attribute parameter. For ex-
+ ample, as long as that value fits into the <STRONG>A_COLOR</STRONG> mask, then these
+ calls produce similar results:
+
+ attrset(A_BOLD | COLOR_PAIR(<EM>pair</EM>));
+ attr_set(A_BOLD, <EM>pair</EM>, NULL);
+
+ However, if the value does not fit, then the <STRONG>COLOR_PAIR</STRONG> macro uses only
+ the bits that fit. For example, because in ncurses <STRONG>A_COLOR</STRONG> has eight
+ (8) bits, then <STRONG>COLOR_PAIR(</STRONG><EM>259</EM><STRONG>)</STRONG> is 4 (i.e., 259 is 4 more than the limit
+ 255).
+
+ The <STRONG>PAIR_NUMBER</STRONG> macro extracts a pair number from an <STRONG>int</STRONG> (or <STRONG>chtype</STRONG>).
+ For example, the <EM>input</EM> and <EM>output</EM> values in these statements would be
+ the same:
+
+ int value = A_BOLD | COLOR_PAIR(<EM>input</EM>);
+ int <EM>output</EM> = PAIR_NUMBER(value);