]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/lib_vidattr.c
ncurses 6.1 - patch 20190504
[ncurses.git] / ncurses / tty / lib_vidattr.c
index 18420e1b4372c42f6028119d8c33b0a99dcff90a..49e75478259795965f4b3f94b16e369bfefbedb4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2014,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_vidattr.c,v 1.72 2017/06/24 12:13:42 tom Exp $")
+MODULE_ID("$Id: lib_vidattr.c,v 1.74 2019/04/13 22:40:54 tom Exp $")
 
 #define doPut(mode) \
        TPUTS_TRACE(#mode); \
        NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc)
 
 #define TurnOn(mask, mode) \
-       if ((turn_on & mask) && mode) { doPut(mode); }
+       if ((turn_on & mask) && mode) { \
+           TPUTS_TRACE(#mode); \
+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc); \
+       }
 
 #define TurnOff(mask, mode) \
-       if ((turn_off & mask) && mode) { doPut(mode); turn_off &= ~mask; }
+       if ((turn_off & mask) && mode) { \
+           TPUTS_TRACE(#mode); \
+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc); \
+           turn_off &= ~mask; \
+       }
 
        /* if there is no current screen, assume we *can* do color */
 #define SetColorsIf(why, old_attr) \
@@ -308,7 +315,7 @@ NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx
 #if USE_ITALIC
        TurnOn(A_ITALIC,        enter_italics_mode);
 #endif
-#if USE_WIDEC_SUPPORT
+#if USE_WIDEC_SUPPORT && defined(enter_horizontal_hl_mode)
        TurnOn(A_HORIZONTAL,    enter_horizontal_hl_mode);
        TurnOn(A_LEFT,          enter_left_hl_mode);
        TurnOn(A_LOW,           enter_low_hl_mode);