[PATCH] Remove difference between fast and slow blinking

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 31 Jul 2014 19:37:59 +0200

One blinking mode is good enough, and two is too much. The best aproach
is emulate the fast blinking with the slow blinking, that it is more
used.
It is removed the flag ATTR_FASTBLINK because it has not a different
meaning of ATTR_BLINK, so it is not needed.

Signed-off-by: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
---
 st.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/st.c b/st.c
index 0c917fd..a2703f4 100644
--- a/st.c
+++ b/st.c
_AT_@ -95,13 +95,12 @@ enum glyph_attribute {
 	ATTR_ITALIC    = 4,
 	ATTR_UNDERLINE = 8,
 	ATTR_BLINK     = 16,
-	ATTR_FASTBLINK = 32,
-	ATTR_REVERSE   = 64,
-	ATTR_INVISIBLE = 128,
-	ATTR_STRUCK    = 256,
-	ATTR_WRAP      = 512,
-	ATTR_WIDE      = 1024,
-	ATTR_WDUMMY    = 2048,
+	ATTR_REVERSE   = 32,
+	ATTR_INVISIBLE = 64,
+	ATTR_STRUCK    = 128,
+	ATTR_WRAP      = 256,
+	ATTR_WIDE      = 512,
+	ATTR_WDUMMY    = 1024,
 };
 
 enum cursor_movement {
_AT_@ -1684,7 +1683,6 @@ tsetattr(int *attr, int l) {
 				ATTR_ITALIC     |
 				ATTR_UNDERLINE  |
 				ATTR_BLINK      |
-				ATTR_FASTBLINK  |
 				ATTR_REVERSE    |
 				ATTR_INVISIBLE  |
 				ATTR_STRUCK     );
_AT_@ -1704,10 +1702,9 @@ tsetattr(int *attr, int l) {
 			term.c.attr.mode |= ATTR_UNDERLINE;
 			break;
 		case 5: /* slow blink */
-			term.c.attr.mode |= ATTR_BLINK;
-			break;
+			/* FALLTHROUGH */
 		case 6: /* rapid blink */
-			term.c.attr.mode |= ATTR_FASTBLINK;
+			term.c.attr.mode |= ATTR_BLINK;
 			break;
 		case 7:
 			term.c.attr.mode |= ATTR_REVERSE;
_AT_@ -1728,7 +1725,7 @@ tsetattr(int *attr, int l) {
 			term.c.attr.mode &= ~ATTR_UNDERLINE;
 			break;
 		case 25:
-			term.c.attr.mode &= ~(ATTR_BLINK | ATTR_FASTBLINK);
+			term.c.attr.mode &= ~ATTR_BLINK;
 			break;
 		case 27:
 			term.c.attr.mode &= ~ATTR_REVERSE;
-- 
1.8.5.3
--J/dobhs11T7y2rNN--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 31 2014 - 19:48:14 CEST