* *
* 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 *
-#define TurnOn(mask,mode) \
- if ((turn_on & mask) && mode) { doPut(mode); }
+#define TurnOn(mask, mode) \
+ if ((turn_on & mask) && mode) { \
+ TPUTS_TRACE(#mode); \
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc); \
+ }
-#define TurnOff(mask,mode) \
- if ((turn_off & mask) && mode) { doPut(mode); turn_off &= ~mask; }
+#define TurnOff(mask, mode) \
+ if ((turn_off & mask) && mode) { \
+ TPUTS_TRACE(#mode); \
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc); \
+ turn_off &= ~mask; \
+ }
if (can_color && (why)) { \
int old_pair = PairNumber(old_attr); \
TR(TRACE_ATTRS, ("old pair = %d -- new pair = %d", old_pair, pair)); \
if ((pair != old_pair) \
|| (fix_pair0 && (pair == 0)) \
|| (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
if (can_color && (why)) { \
int old_pair = PairNumber(old_attr); \
TR(TRACE_ATTRS, ("old pair = %d -- new pair = %d", old_pair, pair)); \
if ((pair != old_pair) \
|| (fix_pair0 && (pair == 0)) \
|| (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
- NCURSES_SP_NAME(_nc_do_color)(NCURSES_SP_ARGx \
- old_pair, pair, reverse, outc); \
+ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx \
+ (short) old_pair, \
+ (short) pair, \
+ reverse, outc); \
T((T_CALLED("vidputs(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
T((T_CALLED("vidputs(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
* 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((value & 63)
| ((value & 192) << 1)
| ((value & 256) >> 2), 8);
attr_t mask = NCURSES_BITS((value & 63)
| ((value & 192) << 1)
| ((value & 256) >> 2), 8);
if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
+#if USE_ITALIC
+ if (!SP_PARM || SP_PARM->_use_ritm) {
+ if (turn_on & A_ITALIC) {
+ TurnOn(A_ITALIC, enter_italics_mode);
+ } else if (turn_off & A_ITALIC) {
+ TurnOff(A_ITALIC, exit_italics_mode);
+ }
+ }
+#endif
if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
if (turn_off && exit_attribute_mode) {
doPut(exit_attribute_mode);
turn_on |= (newmode & ALL_BUT_COLOR);
if (turn_off && exit_attribute_mode) {
doPut(exit_attribute_mode);
turn_on |= (newmode & ALL_BUT_COLOR);
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);
#if USE_WIDEC_SUPPORT
TurnOn(A_HORIZONTAL, enter_horizontal_hl_mode);
TurnOn(A_LEFT, enter_left_hl_mode);
#if USE_WIDEC_SUPPORT
TurnOn(A_HORIZONTAL, enter_horizontal_hl_mode);
TurnOn(A_LEFT, enter_left_hl_mode);
T((T_CALLED("vidattr(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx
newmode,
T((T_CALLED("vidattr(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx
newmode,
- if (HasTerminal(SP_PARM))
- attrs = CallDriver(SP_PARM, conattr);
-#else
+ attrs = CallDriver(SP_PARM, td_conattr);
+#else /* ! USE_TERM_DRIVER */