---
 st.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/st.c b/st.c
index 46cf2da..9c34a5b 100644
--- a/st.c
+++ b/st.c
@@ -38,9 +38,8 @@
 
 /* macros */
 #define IS_SET(flag)           ((term.mode & (flag)) != 0)
-#define ISCONTROLC0(c)         (BETWEEN(c, 0, 0x1f) || (c) == '\177')
 #define ISCONTROLC1(c)         (BETWEEN(c, 0x80, 0x9f))
-#define ISCONTROL(c)           (ISCONTROLC0(c) || ISCONTROLC1(c))
+#define ISCONTROL(c)           ((c) < 0x1f || (c) == '\177' || ISCONTROLC1(c))
 #define ISDELIM(u)             (utf8strchr(worddelimiters, u) != NULL)
 
 enum term_mode {
@@ -1326,7 +1325,7 @@ tdefcolor(int *attr, int *npar, int l)
                g = attr[*npar + 3];
                b = attr[*npar + 4];
                *npar += 4;
-               if (!BETWEEN(r, 0, 255) || !BETWEEN(g, 0, 255) || !BETWEEN(b, 
0, 255))
+               if (r > 255 || g > 255 || b > 255)
                        fprintf(stderr, "erresc: bad rgb color (%u,%u,%u)\n",
                                r, g, b);
                else
-- 
2.20.1


Reply via email to