summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2005-08-22 20:47:49 +0000
committerJuri Linkov <juri@jurta.org>2005-08-22 20:47:49 +0000
commit753d161b0fa178327493c373de9d8777240c28cd (patch)
tree700fcbab40a39fb608c76bde0f9dd0487075dd65 /src/term.c
parentbac3a1c9b7f52b509ab6fc13570c68deb3efb01d (diff)
downloademacs-753d161b0fa178327493c373de9d8777240c28cd.tar.gz
(turn_on_face): Check for TS_set_foreground and
TS_set_background depending on standout_mode. Simplify.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/term.c b/src/term.c
index 76cf2e2c6f0..2b4ea7e23a4 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2011,24 +2011,20 @@ turn_on_face (f, face_id)
if (TN_max_colors > 0)
{
- char *p;
+ char *ts, *p;
- if (fg >= 0 && TS_set_foreground)
+ 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);
}