aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/charset.h b/src/charset.h
index 1b33b972811..b5385a36d8e 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -508,16 +508,16 @@ extern int width_by_char_head[256];
508 Do not use this macro for an ASCII character. */ 508 Do not use this macro for an ASCII character. */
509 509
510#define SPLIT_NON_ASCII_CHAR(c, charset, c1, c2) \ 510#define SPLIT_NON_ASCII_CHAR(c, charset, c1, c2) \
511 ((c) < MIN_CHAR_OFFICIAL_DIMENSION2 \ 511 ((c) & CHAR_FIELD1_MASK \
512 ? (charset = CHAR_FIELD2 (c) + 0x70, \ 512 ? (charset = ((c) < MIN_CHAR_COMPOSITION \
513 c1 = CHAR_FIELD3 (c), \
514 c2 = -1) \
515 : (charset = ((c) < MIN_CHAR_COMPOSITION \
516 ? (CHAR_FIELD1 (c) \ 513 ? (CHAR_FIELD1 (c) \
517 + ((c) < MIN_CHAR_PRIVATE_DIMENSION2 ? 0x8F : 0xE0)) \ 514 + ((c) < MIN_CHAR_PRIVATE_DIMENSION2 ? 0x8F : 0xE0)) \
518 : CHARSET_COMPOSITION), \ 515 : CHARSET_COMPOSITION), \
519 c1 = CHAR_FIELD2 (c), \ 516 c1 = CHAR_FIELD2 (c), \
520 c2 = CHAR_FIELD3 (c))) 517 c2 = CHAR_FIELD3 (c)) \
518 : (charset = CHAR_FIELD2 (c) + 0x70, \
519 c1 = CHAR_FIELD3 (c), \
520 c2 = -1))
521 521
522/* The charset of character C is stored in CHARSET, and the 522/* The charset of character C is stored in CHARSET, and the
523 position-codes of C are stored in C1 and C2. 523 position-codes of C are stored in C1 and C2.
@@ -576,10 +576,9 @@ extern int iso_charset_table[2][2][128];
576 is at STR and the length is LEN. If STR doesn't contain valid 576 is at STR and the length is LEN. If STR doesn't contain valid
577 multi-byte form, only the first byte in STR is returned. */ 577 multi-byte form, only the first byte in STR is returned. */
578 578
579#define STRING_CHAR(str, len) \ 579#define STRING_CHAR(str, len) \
580 ((BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) == 1 \ 580 (BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) == 1 \
581 || BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) > (len)) \ 581 ? (unsigned char) *(str) \
582 ? (unsigned char) *(str) \
583 : string_to_non_ascii_char (str, len, 0, 0)) 582 : string_to_non_ascii_char (str, len, 0, 0))
584 583
585/* This is like STRING_CHAR but the third arg ACTUAL_LEN is set to 584/* This is like STRING_CHAR but the third arg ACTUAL_LEN is set to