diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/charset.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/charset.h b/src/charset.h index c0b7e4d9eb4..6b2e25b89dd 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -489,8 +489,9 @@ extern int iso_charset_table[2][2][128]; | |||
| 489 | #define BASE_LEADING_CODE_P(c) (BYTES_BY_CHAR_HEAD ((unsigned char) (c)) > 1) | 489 | #define BASE_LEADING_CODE_P(c) (BYTES_BY_CHAR_HEAD ((unsigned char) (c)) > 1) |
| 490 | 490 | ||
| 491 | /* Return how many bytes C will occupy in a multibyte buffer. */ | 491 | /* Return how many bytes C will occupy in a multibyte buffer. */ |
| 492 | #define CHAR_BYTES(c) \ | 492 | #define CHAR_BYTES(c) \ |
| 493 | ((SINGLE_BYTE_CHAR_P ((c)) || ((c) & ~GLYPH_MASK_CHAR)) ? 1 : char_bytes (c)) | 493 | ((SINGLE_BYTE_CHAR_P ((c)) || ((c) & ~((1 << CHARACTERBITS) - 1))) \ |
| 494 | ? 1 : char_bytes (c)) | ||
| 494 | 495 | ||
| 495 | /* The following two macros CHAR_STRING and STRING_CHAR are the main | 496 | /* The following two macros CHAR_STRING and STRING_CHAR are the main |
| 496 | entry points to convert between Emacs two types of character | 497 | entry points to convert between Emacs two types of character |