- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
{
static attr_t previous_attr = A_NORMAL;
attr_t turn_on, turn_off;
int pair;
bool reverse = FALSE;
{
static attr_t previous_attr = A_NORMAL;
attr_t turn_on, turn_off;
int pair;
bool reverse = FALSE;
bool can_color = (SP == 0 || SP->_coloron);
#if NCURSES_EXT_FUNCS
bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
bool can_color = (SP == 0 || SP->_coloron);
#if NCURSES_EXT_FUNCS
bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
* A_ALTCHARSET (256) down 2 to line up. We use the NCURSES_BITS
* macro so this will work properly for the wide-character layout.
*/
* A_ALTCHARSET (256) down 2 to line up. We use the NCURSES_BITS
* macro so this will work properly for the wide-character layout.
*/
- attr_t mask = NCURSES_BITS((no_color_video & 63)
- | ((no_color_video & 192) << 1)
- | ((no_color_video & 256) >> 2), 8);
+ unsigned value = no_color_video;
+ attr_t mask = NCURSES_BITS((value & 63)
+ | ((value & 192) << 1)
+ | ((value & 256) >> 2), 8);
if (turn_on || turn_off) {
TPUTS_TRACE("set_attributes");
tputs(tparm(set_attributes,
if (turn_on || turn_off) {
TPUTS_TRACE("set_attributes");
tputs(tparm(set_attributes,
TurnOn(A_PROTECT, enter_protected_mode);
TurnOn(A_INVIS, enter_secure_mode);
TurnOn(A_UNDERLINE, enter_underline_mode);
TurnOn(A_PROTECT, enter_protected_mode);
TurnOn(A_INVIS, enter_secure_mode);
TurnOn(A_UNDERLINE, enter_underline_mode);
{
T((T_CALLED("vidattr(%s)"), _traceattr(newmode)));
returnCode(vidputs(newmode, _nc_outch));
}
{
T((T_CALLED("vidattr(%s)"), _traceattr(newmode)));
returnCode(vidputs(newmode, _nc_outch));
}