New functions mbstrpbrk() and mbrevstrpbrk(); changes to
find_statusbar_bracket_match(), do_statusbar_find_bracket(),
find_bracket_match(), do_find_bracket(), main(),
- nanorc.5, and nanorc.sample. (DLR)
+ parse_rcfile(), nanorc.5, and nanorc.sample. (DLR)
- chars.c:
mbstrchr()
- Make parameter c const. (DLR)
}
#endif /* !NANO_TINY */
-#if !defined(DISABLE_JUSTIFY) && defined(ENABLE_NANORC)
+#if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || !defined(DISABLE_JUSTIFY))
/* Return TRUE if the string s contains one or more blank characters,
* and FALSE otherwise. */
bool has_blank_chars(const char *s)
#endif
return has_blank_chars(s);
}
-#endif /* !DISABLE_JUSTIFY && ENABLE_NANORC */
+#endif /* ENABLE_NANORC && (!NANO_TINY || !DISABLE_JUSTIFY) */
#ifdef ENABLE_UTF8
/* Return TRUE if wc is valid Unicode, and FALSE otherwise. */
char *mbrevstrpbrk(const char *s, const char *accept, const char
*rev_start);
#endif
-#if !defined(DISABLE_JUSTIFY) && defined(ENABLE_NANORC)
+#if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || !defined(DISABLE_JUSTIFY))
bool has_blank_chars(const char *s);
bool has_blank_mbchars(const char *s);
#endif
} else
#endif
#ifndef NANO_TINY
- if (strcasecmp(rcopts[i].name, "whitespace") == 0) {
+ if (strcasecmp(rcopts[i].name,
+ "matchbrackets") == 0) {
+ matchbrackets = option;
+ if (has_blank_mbchars(matchbrackets)) {
+ rcfile_error(
+ N_("Non-blank characters required"));
+ free(matchbrackets);
+ matchbrackets = NULL;
+ }
+ } else if (strcasecmp(rcopts[i].name,
+ "whitespace") == 0) {
whitespace = option;
if (mbstrlen(whitespace) != 2 ||
strlenpt(whitespace) != 2) {