]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove no-longer-used two_byte_p calculations
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Feb 2015 02:53:15 +0000 (18:53 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Feb 2015 02:54:01 +0000 (18:54 -0800)
* dispextern.h (struct glyph_string): Remove member two_byte_p.
All uses removed.
* xdisp.c (get_glyph_face_and_encoding): Remove arg two_byte_p.
All callers changed.

src/ChangeLog
src/dispextern.h
src/xdisp.c

index a1d4c7dbd080d001e7eec190e80257dd8b589a06..6b56abbafd1a707a5cd0ea82a239ba45baa35be8 100644 (file)
@@ -1,3 +1,11 @@
+2015-02-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Remove no-longer-used two_byte_p calculations
+       * dispextern.h (struct glyph_string): Remove member two_byte_p.
+       All uses removed.
+       * xdisp.c (get_glyph_face_and_encoding): Remove arg two_byte_p.
+       All callers changed.
+
 2015-02-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        Omit unnecessary var if GTK or NS
index 413947991ec689eb42c66024cea965d3bcc844bb..b0f2944da86e150b20acfa98c92b0f817842832c 100644 (file)
@@ -1306,9 +1306,6 @@ struct glyph_string
   /* True means the background of this string has been drawn.  */
   bool_bf background_filled_p : 1;
 
-  /* True means glyph string must be drawn with 16-bit functions.  */
-  bool_bf two_byte_p : 1;
-
   /* True means that the original font determined for drawing this glyph
      string could not be loaded.  The member `font' has been set to
      the frame's default font in this case.  */
index 8f6695ae2b0ed0cf208871e49c50dccbeaf1f888..3c928f7897ace09ed84c4c8b3ec591d99ae2978c 100644 (file)
@@ -24241,7 +24241,7 @@ get_char_face_and_encoding (struct frame *f, int c, int face_id,
 
 static struct face *
 get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
-                            XChar2b *char2b, int *two_byte_p)
+                            XChar2b *char2b)
 {
   struct face *face;
   unsigned code = 0;
@@ -24253,9 +24253,6 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
   eassert (face != NULL);
   prepare_face_for_display (f, face);
 
-  if (two_byte_p)
-    *two_byte_p = 0;
-
   if (face->font)
     {
       if (CHAR_BYTE8_P (glyph->u.ch))
@@ -24368,9 +24365,6 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face,
   /* Adjust base line for subscript/superscript text.  */
   s->ybase += s->first_glyph->voffset;
 
-  /* This glyph string must always be drawn with 16-bit functions.  */
-  s->two_byte_p = 1;
-
   return s->cmp_to;
 }
 
@@ -24481,12 +24475,8 @@ fill_glyph_string (struct glyph_string *s, int face_id,
         && glyph->face_id == face_id
         && glyph->glyph_not_available_p == glyph_not_available_p)
     {
-      int two_byte_p;
-
       s->face = get_glyph_face_and_encoding (s->f, glyph,
-                                              s->char2b + s->nchars,
-                                              &two_byte_p);
-      s->two_byte_p = two_byte_p;
+                                            s->char2b + s->nchars);
       ++s->nchars;
       eassert (s->nchars <= end - start);
       s->width += glyph->pixel_width;
@@ -24600,17 +24590,18 @@ x_get_glyph_overhangs (struct glyph *glyph, struct frame *f, int *left, int *rig
 
   if (glyph->type == CHAR_GLYPH)
     {
-      struct face *face;
       XChar2b char2b;
-      struct font_metrics *pcm;
-
-      face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL);
-      if (face->font && (pcm = get_per_char_metric (face->font, &char2b)))
+      struct face *face = get_glyph_face_and_encoding (f, glyph, &char2b);
+      if (face->font)
        {
-         if (pcm->rbearing > pcm->width)
-           *right = pcm->rbearing - pcm->width;
-         if (pcm->lbearing < 0)
-           *left = -pcm->lbearing;
+         struct font_metrics *pcm = get_per_char_metric (face->font, &char2b);
+         if (pcm)
+           {
+             if (pcm->rbearing > pcm->width)
+               *right = pcm->rbearing - pcm->width;
+             if (pcm->lbearing < 0)
+               *left = -pcm->lbearing;
+           }
        }
     }
   else if (glyph->type == COMPOSITE_GLYPH)