Back to index

tetex-bin  3.0
Functions
lib_colorset.c File Reference
#include <curses.priv.h>
#include <ctype.h>

Go to the source code of this file.

Functions

 wcolor_set (WINDOW *win, short color_pair_number, void *opts)

Function Documentation

wcolor_set ( WINDOW win,
short  color_pair_number,
void opts 
)

Definition at line 46 of file lib_colorset.c.

{
    T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
    if (win
       && !opts
       && (color_pair_number >= 0)
       && (color_pair_number < COLOR_PAIRS)) {
       TR(TRACE_ATTRS, ("... current %ld", (long) PAIR_NUMBER(win->_attrs)));
       win->_attrs &= ALL_BUT_COLOR;
       win->_attrs |= COLOR_PAIR(color_pair_number);
       returnCode(OK);
    } else
       returnCode(ERR);
}