nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f528ced22b8876c748c25b0c885e4734f7b78d3a
parent 71628ad0b8624800fff8b4a57fab7312436560fd
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 22 Mar 2020 14:29:10 +0100

tweaks: use a symbol instead of a number, and drop two unneeded casts

Diffstat:
Msrc/chars.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chars.c b/src/chars.c @@ -99,11 +99,11 @@ bool is_cntrl_char(const char *c) { #ifdef ENABLE_UTF8 if (use_utf8) { - return ((c[0] & 0xE0) == 0 || c[0] == 127 || + return ((c[0] & 0xE0) == 0 || c[0] == DEL_CODE || ((signed char)c[0] == -62 && (signed char)c[1] < -96)); } else #endif - return (((unsigned char)*c & 0x60) == 0 || (unsigned char)*c == 127); + return ((*c & 0x60) == 0 || *c == DEL_CODE); } /* Return TRUE when the given character is a punctuation character. */