]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - include/shmbutil.h
minor readline fixes for isearch, insert-char,quoted-insert, and do-lowercase-version...
[thirdparty/bash.git] / include / shmbutil.h
index b1054301d59a739ba0a2f7a0e588168dbd48230e..86e77ad977e93bd8c0ded927d2de2d353c47f980 100644 (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