commit 01e6d435feb885e7efe819b3f3c6089c6620de20
parent 2b21d53857c3f3f76a77c29cf5cf0c6a973731be
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 21 Mar 2019 17:42:34 +0100
tweaks: rename a function, to be simpler and more accurate
Diffstat:
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git 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
@@ -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
@@ -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