# HG changeset patch # User Juri Linkov # Date 1124743669 0 # Node ID 462eb3df5c58b84d0db8c189f9806ce293c585f3 # Parent 98f3b2a3270e1c676607026f7c8aeb0d161b1050 (turn_on_face): Check for TS_set_foreground and TS_set_background depending on standout_mode. Simplify. diff -r 98f3b2a3270e -r 462eb3df5c58 src/term.c --- a/src/term.c Mon Aug 22 19:55:57 2005 +0000 +++ b/src/term.c Mon Aug 22 20:47:49 2005 +0000 @@ -2011,24 +2011,20 @@ if (TN_max_colors > 0) { - char *p; - - if (fg >= 0 && TS_set_foreground) + char *ts, *p; + + ts = standout_mode ? TS_set_background : TS_set_foreground; + if (fg >= 0 && ts) { - if (standout_mode) - p = tparam (TS_set_background, NULL, 0, (int) fg); - else - p = tparam (TS_set_foreground, NULL, 0, (int) fg); + p = tparam (ts, NULL, 0, (int) fg); OUTPUT (p); xfree (p); } - if (bg >= 0 && TS_set_background) + ts = standout_mode ? TS_set_foreground : TS_set_background; + if (bg >= 0 && ts) { - if (standout_mode) - p = tparam (TS_set_foreground, NULL, 0, (int) bg); - else - p = tparam (TS_set_background, NULL, 0, (int) bg); + p = tparam (ts, NULL, 0, (int) bg); OUTPUT (p); xfree (p); }