version 1.58, 2009/10/21 19:27:09 |
version 1.59, 2009/10/25 21:11:21 |
|
|
tty_reset(tty); |
tty_reset(tty); |
} |
} |
|
|
if (fg == 8 && |
if (fg == 8) { |
!(tty->term->flags & TERM_HASDEFAULTS) && |
if (tty_term_has(tty->term, TTYC_AX)) { |
!(tty->term_flags & TERM_HASDEFAULTS)) |
/* AX is an extension that means \033[39m works. */ |
fg = 7; |
tty_puts(tty, "\033[39m"); |
if (fg == 8) |
} else if (tty_term_has(tty->term, TTYC_OP)) { |
tty_puts(tty, "\033[39m"); |
/* |
else |
* op can be used to look for default colours but there |
|
* is no point in using it - with some terminals it |
|
* does SGR0 and others not, so SGR0 is needed anyway |
|
* to put the terminal into a known state. |
|
*/ |
|
tty_reset(tty); |
|
} else |
|
tty_putcode1(tty, TTYC_SETAF, 7); |
|
} else |
tty_putcode1(tty, TTYC_SETAF, fg); |
tty_putcode1(tty, TTYC_SETAF, fg); |
} |
} |
|
|
|
|
bg &= 7; |
bg &= 7; |
} |
} |
|
|
if (bg == 8 && |
if (bg == 8) { |
!(tty->term->flags & TERM_HASDEFAULTS) && |
if (tty_term_has(tty->term, TTYC_AX)) { |
!(tty->term_flags & TERM_HASDEFAULTS)) |
tty_puts(tty, "\033[49m"); |
bg = 0; |
} else if (tty_term_has(tty->term, TTYC_OP)) |
if (bg == 8) |
tty_reset(tty); |
tty_puts(tty, "\033[49m"); |
else |
else |
tty_putcode1(tty, TTYC_SETAB, 0); |
|
} else |
tty_putcode1(tty, TTYC_SETAB, bg); |
tty_putcode1(tty, TTYC_SETAB, bg); |
} |
} |