[hackers] [st] Fix definition of CONTROLC0 || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 19 Aug 2014 13:02:48 +0200

commit 8342036f983288046e03a34055c10fc6b6b11017
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Mon Aug 18 23:23:51 2014 +0200

    Fix definition of CONTROLC0
    
    DEL character is not thecnically talking a C0 control character,
    although it has some common properties with them, so it is useful
    for us consider it as C0. Before this patch DEL (), was not
    ignored as it ought to be.

diff --git a/st.c b/st.c
index 0e228a7..1c998ec 100644
--- a/st.c
+++ b/st.c
_AT_@ -70,7 +70,7 @@ char *argv0;
 #define LEN(a) (sizeof(a) / sizeof(a)[0])
 #define DEFAULT(a, b) (a) = (a) ? (a) : (b)
 #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b))
-#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f))
+#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '')
 #define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
 #define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
 #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
Received on Tue Aug 19 2014 - 13:02:48 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 19 2014 - 13:12:10 CEST