exit_standout don't turn most attributes off, fixed

This commit is contained in:
Andrey A. Chernov 1994-12-03 04:27:08 +00:00
parent 5e7d2146bb
commit 268e74f211
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4921

View File

@ -104,32 +104,25 @@ chtype turn_on = (newmode & ~previous_attr) & ~A_COLOR;
T(("turning %x off", _traceattr(turn_off)));
if ((turn_off & A_ALTCHARSET) && exit_alt_charset_mode)
if ((turn_off & A_ALTCHARSET) && exit_alt_charset_mode) {
tputs(exit_alt_charset_mode, 1, outc);
turn_off &= ~A_ALTCHARSET;
}
if ((turn_off & A_BOLD) && exit_standout_mode)
if ((turn_off & A_UNDERLINE) && exit_underline_mode) {
tputs(exit_underline_mode, 1, outc);
turn_off &= ~A_UNDERLINE;
}
if ((turn_off & A_STANDOUT) && exit_standout_mode) {
tputs(exit_standout_mode, 1, outc);
turn_off &= ~A_STANDOUT;
}
if ((turn_off & A_DIM) && exit_standout_mode)
tputs(exit_standout_mode, 1, outc);
if ((turn_off & A_BLINK) && exit_standout_mode)
tputs(exit_standout_mode, 1, outc);
if ((turn_off & A_INVIS) && exit_standout_mode)
tputs(exit_standout_mode, 1, outc);
if ((turn_off & A_PROTECT) && exit_standout_mode)
tputs(exit_standout_mode, 1, outc);
if ((turn_off & A_UNDERLINE) && exit_underline_mode)
tputs(exit_underline_mode, 1, outc);
if ((turn_off & A_REVERSE) && exit_standout_mode)
tputs(exit_standout_mode, 1, outc);
if ((turn_off & A_STANDOUT) && exit_standout_mode)
tputs(exit_standout_mode, 1, outc);
if (turn_off && exit_attribute_mode) {
tputs(exit_attribute_mode, 1, outc);
turn_on |= newmode & (A_UNDERLINE|A_REVERSE|A_BLINK|A_DIM|A_BOLD|A_INVIS|A_PROTECT);
}
T(("turning %x on", _traceattr(turn_on)));