all repos — st @ 8342036f983288046e03a34055c10fc6b6b11017

st (suckless terminal) config

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 (\177), was not
ignored as it ought to be.
Roberto E. Vargas Caballero k0ga@shike2.com
commit

8342036f983288046e03a34055c10fc6b6b11017

parent

9d9e049eac3dacb2725f9d792f7cdd2230062313

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M st.cst.c

@@ -70,7 +70,7 @@ #define MAX(a, b) ((a) < (b) ? (b) : (a))

#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) == '\177') #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)