diff src/term.c @ 65072:462eb3df5c58

(turn_on_face): Check for TS_set_foreground and TS_set_background depending on standout_mode. Simplify.
author Juri Linkov <juri@jurta.org>
date Mon, 22 Aug 2005 20:47:49 +0000
parents aebbf7125281
children 375ab086d366 532e0a9335a9 2d92f5c9d6ae
line wrap: on
line diff
--- 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);
 	}