nano

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

commit 003ddc763e6b0b5c8478cb7dc52cfc2fb726ef73
parent 1c3953705c376e1eedeb07008fe238b54e7354db
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 24 Mar 2019 09:36:15 +0100

tweaks: don't bother special-casing non-UTF8 when checking for a blank

This code is almost never used; conciseness is the only consideration.

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

diff --git a/src/chars.c b/src/chars.c @@ -640,8 +640,6 @@ char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer) * and FALSE otherwise. */ bool has_blank_char(const char *s) { -#ifdef ENABLE_UTF8 - if (use_utf8) { char symbol[MAXCHARLEN]; while (*s != '\0') { @@ -650,15 +648,6 @@ bool has_blank_char(const char *s) if (is_blank_mbchar(symbol)) return TRUE; } - } else -#endif - { - while (*s != '\0') { - if (isblank((unsigned char)*s)) - return TRUE; - s++; - } - } return FALSE; }