comparison src/charset.h @ 89804:109e674576b8

(CHAR_CHARSET_P): Fix for the case that the method is subset or superset.
author Kenichi Handa <handa@m17n.org>
date Fri, 06 Feb 2004 11:05:20 +0000
parents 0747ef3c747c
children e2262814a871
comparison
equal deleted inserted replaced
89803:58e8a09655ce 89804:109e674576b8
108 unified with Unicode. The value of the member 108 unified with Unicode. The value of the member
109 `charset_deunifier' is created from this information. */ 109 `charset_deunifier' is created from this information. */
110 charset_unify_map, 110 charset_unify_map,
111 111
112 /* If characters in the charset must be unified Unicode, the value 112 /* If characters in the charset must be unified Unicode, the value
113 is a char table that maps a character code in the charset to 113 is a char table that maps a unified Unicode character code to
114 the corresponding Unicode character. */ 114 the non-unified character code in the charset. */
115 charset_deunifier, 115 charset_deunifier,
116 116
117 /* The length of the charset attribute vector. */ 117 /* The length of the charset attribute vector. */
118 charset_attr_max 118 charset_attr_max
119 }; 119 };
482 482
483 483
484 /* 1 iff CHARSET may contain the character C. */ 484 /* 1 iff CHARSET may contain the character C. */
485 #define CHAR_CHARSET_P(c, charset) \ 485 #define CHAR_CHARSET_P(c, charset) \
486 ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \ 486 ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \
487 || (CHARSET_UNIFIED_P (charset) \ 487 || ((CHARSET_UNIFIED_P (charset) \
488 || (charset)->method == CHARSET_METHOD_SUBSET \
489 || (charset)->method == CHARSET_METHOD_SUPERSET) \
488 ? encode_char ((charset), (c)) != (charset)->invalid_code \ 490 ? encode_char ((charset), (c)) != (charset)->invalid_code \
489 : (CHARSET_FAST_MAP_REF ((c), (charset)->fast_map) \ 491 : (CHARSET_FAST_MAP_REF ((c), (charset)->fast_map) \
490 && ((charset)->method == CHARSET_METHOD_OFFSET \ 492 && ((charset)->method == CHARSET_METHOD_OFFSET \
491 ? (c) >= (charset)->min_char && (c) <= (charset)->max_char \ 493 ? (c) >= (charset)->min_char && (c) <= (charset)->max_char \
492 : ((charset)->method == CHARSET_METHOD_MAP \ 494 : ((charset)->method == CHARSET_METHOD_MAP \