Weinehall)
- Don't refer to the built-in file browser as crappy anymore.
(DLR)
- - Check for iswpunct(). (DLR)
+ - Check for iswpunct() and mbstowcs(). (DLR)
- doc/faq.html:
- Update the question about the FAQ to mention the current
maintainer. (DLR)
AC_CHECK_FUNCS(snprintf vsnprintf isblank strcasecmp strncasecmp strcasestr strnlen getline getdelim)
if test x$enable_utf8 != xno; then
- AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace mblen mbtowc wctomb wcwidth)
+ AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace mblen mbstowcs mbtowc wctomb wcwidth)
fi
if test x$ac_cv_func_snprintf = xno || test x$ac_cv_func_vsnprintf = xno; then
test x$ac_cv_func_iswpunct = xyes && \
(test x$ac_cv_func_iswblank = xyes || test x$ac_cv_func_iswspace = xyes) && \
test x$ac_cv_func_mblen = xyes && \
+ test x$ac_cv_func_mbstowcs = xyes && \
test x$ac_cv_func_mbtowc = xyes && \
test x$ac_cv_func_wctomb = xyes && \
test x$ac_cv_func_wcwidth = xyes; then
- AC_DEFINE(NANO_WIDE, 1, [Define this if your system has sufficient wide character support (a wide curses library, iswalnum(), iswpunct(), iswblank() or iswspace(), mblen(), mbtowc(), wctomb(), and wcwidth()).])
+ AC_DEFINE(NANO_WIDE, 1, [Define this if your system has sufficient wide character support (a wide curses library, iswalnum(), iswpunct(), iswblank() or iswspace(), mblen(), mbstowcs(), mbtowc(), wctomb(), and wcwidth()).])
else
if test x$enable_utf8 = xyes; then
AC_MSG_ERROR([
{
assert(str != NULL);
+ return
#ifdef NANO_WIDE
- if (!ISSET(NO_UTF8)) {
- while (*str != '\0') {
- int chr_mb_len;
- bool bad_chr;
-
- chr_mb_len = parse_mbchar(str, NULL, &bad_chr, NULL);
-
- if (bad_chr)
- return FALSE;
-
- str += chr_mb_len;
- }
- }
+ (!ISSET(NO_UTF8)) ?
+ (mbstowcs(NULL, str, (size_t)-1) != (size_t)-1) :
#endif
- return TRUE;
+ TRUE;
}
#endif /* ENABLE_NANORC */