nano

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

commit ce0ecf67a66a8c4bdc13e37619600d73c37e66fa
parent b6f7ff5c6fb44957794a033f7d2e3fabe96c1c9b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 10 Jul 2018 12:31:04 +0200

tweaks: elide another function that is used just once

Diffstat:
Msrc/chars.c | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/chars.c b/src/chars.c @@ -117,13 +117,6 @@ bool is_ascii_cntrl_char(int c) return (0 <= c && c < 32); } -/* This function is equivalent to iscntrl(), except in that it also - * handles high-bit control characters. */ -bool is_cntrl_char(int c) -{ - return ((c & 0x60) == 0 || c == 127); -} - /* This function is equivalent to iscntrl() for multibyte characters, * except in that it also handles multibyte control characters with * their high bits set. */ @@ -135,7 +128,7 @@ bool is_cntrl_mbchar(const char *c) ((signed char)c[0] == -62 && (signed char)c[1] < -96)); } else #endif - return is_cntrl_char((unsigned char)*c); + return (((unsigned char)*c & 0x60) == 0 || (unsigned char)*c == 127); } /* This function is equivalent to ispunct() for multibyte characters. */