From 01e6d435feb885e7efe819b3f3c6089c6620de20 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 21 Mar 2019 17:42:34 +0100 Subject: [PATCH] tweaks: rename a function, to be simpler and more accurate --- src/chars.c | 2 +- src/proto.h | 2 +- src/rcfile.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chars.c b/src/chars.c index 555f804c..3269155b 100644 --- a/src/chars.c +++ b/src/chars.c @@ -638,7 +638,7 @@ char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer) #if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || defined(ENABLE_JUSTIFY)) /* Return TRUE if the given string contains at least one blank character, * and FALSE otherwise. */ -bool has_blank_mbchars(const char *s) +bool has_blank_char(const char *s) { #ifdef ENABLE_UTF8 if (use_utf8) { diff --git a/src/proto.h b/src/proto.h index f53b64b6..84636258 100644 --- a/src/proto.h +++ b/src/proto.h @@ -228,7 +228,7 @@ char *revstrpbrk(const char *head, const char *accept, const char *index); char *mbrevstrpbrk(const char *head, const char *accept, const char *index); #endif #if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || defined(ENABLE_JUSTIFY)) -bool has_blank_mbchars(const char *s); +bool has_blank_char(const char *s); #endif #ifdef ENABLE_UTF8 bool is_valid_unicode(wchar_t wc); diff --git a/src/rcfile.c b/src/rcfile.c index 4302b1ff..486cff41 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1129,7 +1129,7 @@ void parse_rcfile(FILE *rcstream, bool syntax_only) } if (strcasecmp(rcopts[i].name, "matchbrackets") == 0) { matchbrackets = option; - if (has_blank_mbchars(matchbrackets)) { + if (has_blank_char(matchbrackets)) { rcfile_error(N_("Non-blank characters required")); free(matchbrackets); matchbrackets = NULL; @@ -1149,13 +1149,13 @@ void parse_rcfile(FILE *rcstream, bool syntax_only) #endif #ifdef ENABLE_JUSTIFY if (strcasecmp(rcopts[i].name, "punct") == 0) { - if (has_blank_mbchars(option)) { + if (has_blank_char(option)) { rcfile_error(N_("Non-blank characters required")); free(option); } else punct = option; } else if (strcasecmp(rcopts[i].name, "brackets") == 0) { - if (has_blank_mbchars(option)) { + if (has_blank_char(option)) { rcfile_error(N_("Non-blank characters required")); free(option); } else