# HG changeset patch # User Gerd Moellmann # Date 942417292 0 # Node ID 08c26156186acd54e940ae6c04e3bd5c6316ac7f # Parent db29d7e692727843a930823801e6c24ceb77c49f (term_init): If "op" isn't available, don't support color because we can't switch back to the default foreground and background. diff -r db29d7e69272 -r 08c26156186a src/term.c --- a/src/term.c Fri Nov 12 13:10:20 1999 +0000 +++ b/src/term.c Fri Nov 12 14:34:52 1999 +0000 @@ -2213,18 +2213,23 @@ MultiLeft = tgetstr ("LE", address); MultiRight = tgetstr ("RI", address); - /* SVr4/ANSI color suppert. */ + /* SVr4/ANSI color suppert. If "op" isn't available, don't support + color because we can't switch back to the default foreground and + background. */ TS_orig_pair = tgetstr ("op", address); - TS_set_foreground = tgetstr ("AF", address); - TS_set_background = tgetstr ("AB", address); - if (!TS_set_foreground) + if (TS_orig_pair) { - /* SVr4. */ - TS_set_foreground = tgetstr ("Sf", address); - TS_set_background = tgetstr ("Sb", address); + TS_set_foreground = tgetstr ("AF", address); + TS_set_background = tgetstr ("AB", address); + if (!TS_set_foreground) + { + /* SVr4. */ + TS_set_foreground = tgetstr ("Sf", address); + TS_set_background = tgetstr ("Sb", address); + } + TN_max_colors = tgetnum ("Co"); + TN_max_pairs = tgetnum ("pa"); } - TN_max_colors = tgetnum ("Co"); - TN_max_pairs = tgetnum ("pa"); MagicWrap = tgetflag ("xn"); /* Since we make MagicWrap terminals look like AutoWrap, we need to have