diff options
| author | Kenichi Handa | 1997-04-07 07:12:13 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-04-07 07:12:13 +0000 |
| commit | 6dc0722daf6e6fba9ff5d1db733f97f2378145f0 (patch) | |
| tree | 310a8011ece0242f38f061b62f709db430802350 /src | |
| parent | d6f92c04059b81f31497b1564b289e638c0ed621 (diff) | |
| download | emacs-6dc0722daf6e6fba9ff5d1db733f97f2378145f0.tar.gz emacs-6dc0722daf6e6fba9ff5d1db733f97f2378145f0.zip | |
(non_ascii_char_to_string, update_charset_table,
Fsplit_char): Adjusted for the above change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/charset.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/charset.c b/src/charset.c index 7a5e0ce269b..7cd6f551587 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -106,8 +106,7 @@ non_ascii_char_to_string (c, workbuf, str) | |||
| 106 | int c; | 106 | int c; |
| 107 | unsigned char *workbuf, **str; | 107 | unsigned char *workbuf, **str; |
| 108 | { | 108 | { |
| 109 | int charset; | 109 | int charset, c1, c2; |
| 110 | unsigned char c1, c2; | ||
| 111 | 110 | ||
| 112 | if (COMPOSITE_CHAR_P (c)) | 111 | if (COMPOSITE_CHAR_P (c)) |
| 113 | { | 112 | { |
| @@ -132,7 +131,7 @@ non_ascii_char_to_string (c, workbuf, str) | |||
| 132 | if (*workbuf = CHARSET_LEADING_CODE_EXT (charset)) | 131 | if (*workbuf = CHARSET_LEADING_CODE_EXT (charset)) |
| 133 | workbuf++; | 132 | workbuf++; |
| 134 | *workbuf++ = c1 | 0x80; | 133 | *workbuf++ = c1 | 0x80; |
| 135 | if (c2) | 134 | if (c2 >= 0) |
| 136 | *workbuf++ = c2 | 0x80; | 135 | *workbuf++ = c2 | 0x80; |
| 137 | 136 | ||
| 138 | return (workbuf - *str); | 137 | return (workbuf - *str); |
| @@ -244,9 +243,9 @@ update_charset_table (charset_id, dimension, chars, width, direction, | |||
| 244 | int bytes; | 243 | int bytes; |
| 245 | unsigned char leading_code_base, leading_code_ext; | 244 | unsigned char leading_code_base, leading_code_ext; |
| 246 | 245 | ||
| 247 | if (NILP (Faref (Vcharset_table, charset_id))) | 246 | if (NILP (CHARSET_TABLE_ENTRY (charset))) |
| 248 | Faset (Vcharset_table, charset_id, | 247 | CHARSET_TABLE_ENTRY (charset) |
| 249 | Fmake_vector (make_number (CHARSET_MAX_IDX), Qnil)); | 248 | = Fmake_vector (make_number (CHARSET_MAX_IDX), Qnil); |
| 250 | 249 | ||
| 251 | /* Get byte length of multibyte form, base leading-code, and | 250 | /* Get byte length of multibyte form, base leading-code, and |
| 252 | extended leading-code of the charset. See the comment under the | 251 | extended leading-code of the charset. See the comment under the |
| @@ -460,7 +459,7 @@ DESCRIPTION (string) is the description string of the charset.") | |||
| 460 | 459 | ||
| 461 | update_charset_table (charset_id, vec[0], vec[1], vec[2], vec[3], | 460 | update_charset_table (charset_id, vec[0], vec[1], vec[2], vec[3], |
| 462 | vec[4], vec[5], vec[6], vec[7], vec[8]); | 461 | vec[4], vec[5], vec[6], vec[7], vec[8]); |
| 463 | Fput (charset_symbol, Qcharset, Faref (Vcharset_table, charset_id)); | 462 | Fput (charset_symbol, Qcharset, CHARSET_TABLE_ENTRY (XINT (charset_id))); |
| 464 | CHARSET_SYMBOL (XINT (charset_id)) = charset_symbol; | 463 | CHARSET_SYMBOL (XINT (charset_id)) = charset_symbol; |
| 465 | Vcharset_list = Fcons (charset_symbol, Vcharset_list); | 464 | Vcharset_list = Fcons (charset_symbol, Vcharset_list); |
| 466 | return Qnil; | 465 | return Qnil; |
| @@ -600,12 +599,11 @@ DEFUN ("split-char", Fsplit_char, Ssplit_char, 1, 1, 0, | |||
| 600 | Lisp_Object ch; | 599 | Lisp_Object ch; |
| 601 | { | 600 | { |
| 602 | Lisp_Object val; | 601 | Lisp_Object val; |
| 603 | int charset; | 602 | int charset, c1, c2; |
| 604 | unsigned char c1, c2; | ||
| 605 | 603 | ||
| 606 | CHECK_NUMBER (ch, 0); | 604 | CHECK_NUMBER (ch, 0); |
| 607 | SPLIT_CHAR (XFASTINT (ch), charset, c1, c2); | 605 | SPLIT_CHAR (XFASTINT (ch), charset, c1, c2); |
| 608 | return ((charset == CHARSET_COMPOSITION || CHARSET_DIMENSION (charset) == 2) | 606 | return (c2 >= 0 |
| 609 | ? Fcons (CHARSET_SYMBOL (charset), | 607 | ? Fcons (CHARSET_SYMBOL (charset), |
| 610 | Fcons (make_number (c1), Fcons (make_number (c2), Qnil))) | 608 | Fcons (make_number (c1), Fcons (make_number (c2), Qnil))) |
| 611 | : Fcons (CHARSET_SYMBOL (charset), Fcons (make_number (c1), Qnil))); | 609 | : Fcons (CHARSET_SYMBOL (charset), Fcons (make_number (c1), Qnil))); |