minor readline fixes for isearch, insert-char,quoted-insert, and do-lowercase-version; fix buffer overflow with printf %b; work around issues with isblank in UTF-8 locales on macOS; fixes for the enable builtin

This commit is contained in:
Chet Ramey
2023-05-31 10:40:39 -04:00
parent e252024788
commit 353e3749e9
12 changed files with 123 additions and 18 deletions
+5
View File
@@ -55,6 +55,9 @@ extern int locale_utf8locale; /* XXX */
#define UTF8_MBFIRSTCHAR(c) (((c) & 0xc0) == 0xc0)
#define UTF8_MBCHAR(c) (((c) & 0xc0) == 0x80)
/* Is an eight-bit quantity a valid character in the current locale? */
#define VALID_SINGLEBYTE_CHAR(c) (locale_utf8locale == 0 || ((c) & 0x80) == 0)
#else /* !HANDLE_MULTIBYTE */
#undef MB_LEN_MAX
@@ -83,6 +86,8 @@ extern int locale_utf8locale; /* XXX */
#define UTF8_SINGLEBYTE(c) (1)
#define UTF8_MBFIRSTCHAR(c) (0)
#defined VALID_SINGLEBYTE_CHAR(c) (1)
#endif /* !HANDLE_MULTIBYTE */
/* Declare and initialize a multibyte state. Call must be terminated