X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4b2ed4a6151dac2d11e414e2f923da5e7160ba4f..c4e8cde8c6cea5ab85abbac10626bd5c1fe5a6af:/src/character.h diff --git a/src/character.h b/src/character.h index ff9e8e0006..255afb2a0b 100644 --- a/src/character.h +++ b/src/character.h @@ -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)