]> code.delx.au - gnu-emacs/blobdiff - src/character.h
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-86
[gnu-emacs] / src / character.h
index ff9e8e0006279884cfb54f8b9f2dd2216e690a41..255afb2a0b13f9b1b9653166626f2441cae11d2f 100644 (file)
@@ -77,6 +77,12 @@ extern int unibyte_to_multibyte_table[256];
 #define unibyte_char_to_multibyte(c)   \
   ((c) < 256 ? unibyte_to_multibyte_table[(c)] : (c))
 
+/* Nth element is 1 iff unibyte char N can be mapped to a multibyte
+   char.  */
+extern char unibyte_has_multibyte_table[256];
+
+#define UNIBYTE_CHAR_HAS_MULTIBYTE_P(c) (unibyte_has_multibyte_table[(c)])
+
 /* If C is not ASCII, make it unibyte. */
 #define MAKE_CHAR_UNIBYTE(c)   \
   do {                         \
@@ -181,7 +187,7 @@ extern int unibyte_to_multibyte_table[256];
 
 #define BYTE8_STRING(b, p)                     \
   ((p)[0] = (0xC0 | (((b) >> 6) & 0x01)),      \
-   (p)[1] = (0x80 | ((c) & 0x3F)),             \
+   (p)[1] = (0x80 | ((b) & 0x3F)),             \
    2)