changeset 26998:02e902f732d1

(line_hash_code) (direct_output_for_insert): Adjusted for the change of struct glyph. (line_draw_cost): Adjusted for the change of GLYPH_FROM_CHAR_GLYPH. (count_match): Use macro GLYPH_CHAR_AND_FACE_EQUAL_P.
author Kenichi Handa <handa@m17n.org>
date Mon, 27 Dec 1999 05:06:03 +0000
parents de70d8b0de3b
children 5d0057e6170e
files src/dispnew.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Mon Dec 27 05:05:19 1999 +0000
+++ b/src/dispnew.c	Mon Dec 27 05:06:03 1999 +0000
@@ -1251,10 +1251,12 @@
 
           while (glyph < end)
             {
-	      GLYPH g = GLYPH_FROM_CHAR_GLYPH (*glyph);
+	      int c = glyph->u.ch;
+	      int face_id = glyph->face_id;
 	      if (must_write_spaces)
-	        g -= SPACEGLYPH;
-	      hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + g;
+	        c -= SPACEGLYPH;
+	      hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + c;
+	      hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + face_id;
 	      ++glyph;
 	    }
 
@@ -1312,7 +1314,8 @@
 	{
 	  GLYPH g = GLYPH_FROM_CHAR_GLYPH (*beg);
 	  
-	  if (GLYPH_SIMPLE_P (glyph_table_base, glyph_table_len, g))
+	  if (g < 0
+	      || GLYPH_SIMPLE_P (glyph_table_base, glyph_table_len, g))
 	    len += 1;
 	  else
 	    len += GLYPH_LENGTH (glyph_table_base, g);
@@ -3074,7 +3077,7 @@
       last = glyph_row->glyphs[TEXT_AREA] + glyph_row->used[TEXT_AREA] - 1;
       if (last->type == STRETCH_GLYPH
 	  || (last->type == CHAR_GLYPH
-	      && last->u.ch.code == ' '))
+	      && last->u.ch == ' '))
 	return 0;
     }
 
@@ -4765,7 +4768,7 @@
   
   while (p1 < end1
 	 && p2 < end2
-	 && GLYPH_FROM_CHAR_GLYPH (*p1) == GLYPH_FROM_CHAR_GLYPH (*p2))
+	 && GLYPH_CHAR_AND_FACE_EQUAL_P (p1, p2))
     ++p1, ++p2;
   
   return p1 - str1;