diff options
Diffstat (limited to 'src/character.h')
| -rw-r--r-- | src/character.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/character.h b/src/character.h index 34e696e5083..a766b767eb3 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -610,6 +610,26 @@ extern char unibyte_has_multibyte_table[256]; | |||
| 610 | ? ASCII_CHAR_WIDTH (c) \ | 610 | ? ASCII_CHAR_WIDTH (c) \ |
| 611 | : XINT (CHAR_TABLE_REF (Vchar_width_table, c))) | 611 | : XINT (CHAR_TABLE_REF (Vchar_width_table, c))) |
| 612 | 612 | ||
| 613 | /* If C is a variation selector, return the index numnber of the | ||
| 614 | variation selector (1..256). Otherwise, return 0. */ | ||
| 615 | |||
| 616 | #define CHAR_VARIATION_SELECTOR_P(c) \ | ||
| 617 | ((c) < 0xFE00 ? 0 \ | ||
| 618 | : (c) <= 0xFE0F ? (c) - 0xFE00 + 1 \ | ||
| 619 | : (c) < 0xE0100 ? 0 \ | ||
| 620 | : (c) <= 0xE01EF ? (c) - 0xE0100 + 17 \ | ||
| 621 | : 0) | ||
| 622 | |||
| 623 | /* If C is a high surrogate, return 1. If C is a low surrogate, | ||
| 624 | return 0. Otherwise, return 0. */ | ||
| 625 | |||
| 626 | #define CHAR_SURROGATE_PAIR_P(c) \ | ||
| 627 | ((c) < 0xD800 ? 0 \ | ||
| 628 | : (c) <= 0xDBFF ? 1 \ | ||
| 629 | : (c) <= 0xDFFF ? 2 \ | ||
| 630 | : 0) | ||
| 631 | |||
| 632 | |||
| 613 | extern int char_resolve_modifier_mask P_ ((int)); | 633 | extern int char_resolve_modifier_mask P_ ((int)); |
| 614 | extern int char_string P_ ((unsigned, unsigned char *)); | 634 | extern int char_string P_ ((unsigned, unsigned char *)); |
| 615 | extern int string_char P_ ((const unsigned char *, | 635 | extern int string_char P_ ((const unsigned char *, |