Mercurial > emacs
comparison src/charset.c @ 23649:9e74943ac418
(string_to_non_ascii_char): Fix previous change.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 06 Nov 1998 00:44:16 +0000 |
parents | 4a0a107fac9e |
children | e70afb86651a |
comparison
equal
deleted
inserted
replaced
23648:06e645781762 | 23649:9e74943ac418 |
---|---|
215 { | 215 { |
216 int charset = c, c1, c2 = 0; | 216 int charset = c, c1, c2 = 0; |
217 int char_bytes = BYTES_BY_CHAR_HEAD (c); | 217 int char_bytes = BYTES_BY_CHAR_HEAD (c); |
218 | 218 |
219 str++; | 219 str++; |
220 if (c >= LEADING_CODE_PRIVATE_11) | 220 if (c >= LEADING_CODE_PRIVATE_11 && c <= LEADING_CODE_PRIVATE_22) |
221 charset = *str++; | 221 charset = *str++; |
222 if (CHARSET_DEFINED_P (charset) && char_bytes <= bytes) | 222 if (char_bytes <= bytes) |
223 { | 223 { |
224 c1 = *str++ & 0x7f; | 224 c1 = *str++ & 0x7f; |
225 if (CHARSET_DIMENSION (charset) == 2) | 225 if (CHARSET_DEFINED_P (charset) |
226 && CHARSET_DIMENSION (charset) == 2) | |
226 c2 = *str & 0x7F; | 227 c2 = *str & 0x7F; |
227 c = MAKE_NON_ASCII_CHAR (charset, c1, c2); | 228 c = MAKE_NON_ASCII_CHAR (charset, c1, c2); |
228 if (exclude_tail_garbage) | 229 if (exclude_tail_garbage) |
229 bytes = char_bytes; | 230 bytes = char_bytes; |
230 } | 231 } |