From ce0ecf67a66a8c4bdc13e37619600d73c37e66fa Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 10 Jul 2018 12:31:04 +0200 Subject: [PATCH] tweaks: elide another function that is used just once --- src/chars.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/chars.c b/src/chars.c index 094c44f3..5cf5f4f1 100644 --- 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. */