changeset 26849:a0ecda172035

(Faref): Delete codes for a composite character.. (Faset): Likewise. Adjusted for the change of CHAR_STRING.
author Kenichi Handa <handa@m17n.org>
date Wed, 15 Dec 1999 00:08:39 +0000
parents d502b027b817
children d00beb113ad5
files src/data.c
diffstat 1 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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");