Mercurial > emacs
changeset 29538:c0c34d18e8a0
(update_charset_table): Update the table
bytes_by_char_head.
(init_charset_once): Initialize elements of bytes_by_char_head to
1 except for leading codes for private charases.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 10 Jun 2000 00:12:46 +0000 |
parents | 964ceab37635 |
children | a6f1d75744d8 |
files | src/charset.c |
diffstat | 1 files changed, 5 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/charset.c Sat Jun 10 00:12:17 2000 +0000 +++ b/src/charset.c Sat Jun 10 00:12:46 2000 +0000 @@ -497,11 +497,9 @@ ? LEADING_CODE_PRIVATE_21 : LEADING_CODE_PRIVATE_22))); leading_code_ext = charset; - } - - if (charset != CHARSET_ASCII && charset != CHARSET_8_BIT_GRAPHIC - &&BYTES_BY_CHAR_HEAD (leading_code_base) != bytes) - error ("Invalid dimension for the charset-ID %d", charset); + if (BYTES_BY_CHAR_HEAD (leading_code_base) != bytes) + error ("Invalid dimension for the charset-ID %d", charset); + } CHARSET_TABLE_INFO (charset, CHARSET_ID_IDX) = charset_id; CHARSET_TABLE_INFO (charset, CHARSET_BYTES_IDX) = make_number (bytes); @@ -549,9 +547,10 @@ = make_number (-1); } - if (charset != CHARSET_ASCII + if (charset != CHARSET_ASCII && charset != CHARSET_8_BIT_GRAPHIC && charset < MIN_CHARSET_PRIVATE_DIMENSION1) { + bytes_by_char_head[leading_code_base] = bytes; width_by_char_head[leading_code_base] = XINT (width); /* Update table emacs_code_class. */ @@ -1570,12 +1569,6 @@ for (i = 0; i < 256; i++) bytes_by_char_head[i] = 1; - for (i = 128; i < MIN_CHARSET_OFFICIAL_DIMENSION2; i++) - bytes_by_char_head[i] = 2; - for (; i <= MAX_CHARSET_OFFICIAL_DIMENSION2; i++) - bytes_by_char_head[i] = 3; - for (; i < 160; i++) - bytes_by_char_head[i] = 2; bytes_by_char_head[LEADING_CODE_PRIVATE_11] = 3; bytes_by_char_head[LEADING_CODE_PRIVATE_12] = 3; bytes_by_char_head[LEADING_CODE_PRIVATE_21] = 4;