comparison src/charset.c @ 89365:110a171821db

(encode_char): Fix handling of methods SUBSET and SUPERSET.
author Kenichi Handa <handa@m17n.org>
date Sat, 11 Jan 2003 03:38:05 +0000
parents 1991025c6bc2
children 4b653615bbe4
comparison
equal deleted inserted replaced
89364:e1226ac81142 89365:110a171821db
1605 deunified = CHAR_TABLE_REF (deunifier, c); 1605 deunified = CHAR_TABLE_REF (deunifier, c);
1606 if (! NILP (deunified)) 1606 if (! NILP (deunified))
1607 c = XINT (deunified); 1607 c = XINT (deunified);
1608 } 1608 }
1609 1609
1610 if (! CHARSET_FAST_MAP_REF ((c), charset->fast_map)
1611 || c < CHARSET_MIN_CHAR (charset) || c > CHARSET_MAX_CHAR (charset))
1612 return CHARSET_INVALID_CODE (charset);
1613
1614 if (method == CHARSET_METHOD_SUBSET) 1610 if (method == CHARSET_METHOD_SUBSET)
1615 { 1611 {
1616 Lisp_Object subset_info; 1612 Lisp_Object subset_info;
1617 struct charset *this_charset; 1613 struct charset *this_charset;
1618 1614
1642 if (code != CHARSET_INVALID_CODE (this_charset)) 1638 if (code != CHARSET_INVALID_CODE (this_charset))
1643 return code + code_offset; 1639 return code + code_offset;
1644 } 1640 }
1645 return CHARSET_INVALID_CODE (charset); 1641 return CHARSET_INVALID_CODE (charset);
1646 } 1642 }
1643
1644 if (! CHARSET_FAST_MAP_REF ((c), charset->fast_map)
1645 || c < CHARSET_MIN_CHAR (charset) || c > CHARSET_MAX_CHAR (charset))
1646 return CHARSET_INVALID_CODE (charset);
1647 1647
1648 if (method == CHARSET_METHOD_MAP_DEFERRED) 1648 if (method == CHARSET_METHOD_MAP_DEFERRED)
1649 { 1649 {
1650 load_charset (charset); 1650 load_charset (charset);
1651 method = CHARSET_METHOD (charset); 1651 method = CHARSET_METHOD (charset);