changeset 29023:af50e87cc257

(get_next_display_element): Handle 8-bit characters correctly. (next_element_from_display_vector): Use CHAR_BYTES instead of CHAR_LEN. (disp_char_vector): Use SPLIT_CHAR instead of SPLIT_NON_ASCII_CHAR.
author Kenichi Handa <handa@m17n.org>
date Sat, 20 May 2000 00:07:43 +0000
parents 3eec558de0ef
children 5c3828858be8
files src/xdisp.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat May 20 00:07:08 2000 +0000
+++ b/src/xdisp.c	Sat May 20 00:07:43 2000 +0000
@@ -3423,7 +3423,7 @@
 	      else
 		{
 		  unsigned char str[MAX_MULTIBYTE_LENGTH];
-		  int len = CHAR_STRING (it->c, str);
+		  int len;
 		  int i;
 		  GLYPH escape_glyph;
 
@@ -3435,6 +3435,11 @@
 		  else
 		    escape_glyph = FAST_MAKE_GLYPH ('\\', 0);
 
+		  if (SINGLE_BYTE_CHAR_P (it->c))
+		    str[0] = it->c, len = 1;
+		  else
+		    len = CHAR_STRING (it->c, str);
+
 		  for (i = 0; i < len; i++)
 		    {
 		      XSETINT (it->ctl_chars[i * 4], escape_glyph);
@@ -3664,7 +3669,7 @@
 
       g = XFASTINT (it->dpvec[it->current.dpvec_index]);
       it->c = FAST_GLYPH_CHAR (g);
-      it->len = CHAR_LEN (it->c);
+      it->len = CHAR_BYTES (it->c);
 
       /* The entry may contain a face id to use.  Such a face id is
 	 the id of a Lisp face, not a realized face.  A face id of
@@ -7990,7 +7995,7 @@
   if (SINGLE_BYTE_CHAR_P (c))
     return (dp->contents[c]);
   
-  SPLIT_NON_ASCII_CHAR (c, code[0], code[1], code[2]);
+  SPLIT_CHAR (c, code[0], code[1], code[2]);
   if (code[1] < 32)
     code[1] = -1;
   else if (code[2] < 32)