# HG changeset patch # User Kenichi Handa # Date 945216519 0 # Node ID a0ecda1720359a25ed3987401111a8d0913424fc # Parent d502b027b8174d87acdd347ac74e4dc4ff642ba1 (Faref): Delete codes for a composite character.. (Faset): Likewise. Adjusted for the change of CHAR_STRING. diff -r d502b027b817 -r a0ecda172035 src/data.c --- a/src/data.c Wed Dec 15 00:08:01 1999 +0000 +++ b/src/data.c Wed Dec 15 00:08:39 1999 +0000 @@ -1697,11 +1697,9 @@ Lisp_Object sub_table; SPLIT_NON_ASCII_CHAR (idxval, code[0], code[1], code[2]); - if (code[0] != CHARSET_COMPOSITION) - { - if (code[1] < 32) code[1] = -1; - else if (code[2] < 32) code[2] = -1; - } + if (code[1] < 32) code[1] = -1; + else if (code[2] < 32) code[2] = -1; + /* Here, the possible range of CODE[0] (== charset ID) is 128..MAX_CHARSET. Since the top level char table contains data for multibyte characters after 256th element, we must @@ -1807,11 +1805,9 @@ Lisp_Object val; SPLIT_NON_ASCII_CHAR (idxval, code[0], code[1], code[2]); - if (code[0] != CHARSET_COMPOSITION) - { - if (code[1] < 32) code[1] = -1; - else if (code[2] < 32) code[2] = -1; - } + if (code[1] < 32) code[1] = -1; + else if (code[2] < 32) code[2] = -1; + /* See the comment of the corresponding part in Faref. */ code[0] += 128; code[3] = -1; /* anchor */ @@ -1842,7 +1838,7 @@ { int idxval_byte, new_len, actual_len; int prev_byte; - unsigned char *p, workbuf[4], *str; + unsigned char *p, workbuf[MAX_MULTIBYTE_LENGTH], *str = workbuf; if (idxval < 0 || idxval >= XSTRING (array)->size) args_out_of_range (array, idx); @@ -1852,7 +1848,7 @@ actual_len = MULTIBYTE_FORM_LENGTH (p, STRING_BYTES (XSTRING (array))); CHECK_NUMBER (newelt, 2); - new_len = CHAR_STRING (XINT (newelt), workbuf, str); + new_len = CHAR_STRING (XINT (newelt), str); if (actual_len != new_len) error ("Attempt to change byte length of a string");