diff options
| author | Paul Eggert | 2015-02-03 18:53:15 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-02-03 18:54:01 -0800 |
| commit | ac27180cca90fa1919ba0331e01794602901e7bc (patch) | |
| tree | 2e7ce429a847bbc42f7a946a9dee8e6ef105edc8 /src | |
| parent | 0f5e0449960621d58f2b751078235f593530ebc5 (diff) | |
| download | emacs-ac27180cca90fa1919ba0331e01794602901e7bc.tar.gz emacs-ac27180cca90fa1919ba0331e01794602901e7bc.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/dispextern.h | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 33 |
3 files changed, 20 insertions, 24 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a1d4c7dbd08..6b56abbafd1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2015-02-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Remove no-longer-used two_byte_p calculations | ||
| 4 | * dispextern.h (struct glyph_string): Remove member two_byte_p. | ||
| 5 | All uses removed. | ||
| 6 | * xdisp.c (get_glyph_face_and_encoding): Remove arg two_byte_p. | ||
| 7 | All callers changed. | ||
| 8 | |||
| 1 | 2015-02-03 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2015-02-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 10 | ||
| 3 | Omit unnecessary var if GTK or NS | 11 | Omit unnecessary var if GTK or NS |
diff --git a/src/dispextern.h b/src/dispextern.h index 413947991ec..b0f2944da86 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1306,9 +1306,6 @@ struct glyph_string | |||
| 1306 | /* True means the background of this string has been drawn. */ | 1306 | /* True means the background of this string has been drawn. */ |
| 1307 | bool_bf background_filled_p : 1; | 1307 | bool_bf background_filled_p : 1; |
| 1308 | 1308 | ||
| 1309 | /* True means glyph string must be drawn with 16-bit functions. */ | ||
| 1310 | bool_bf two_byte_p : 1; | ||
| 1311 | |||
| 1312 | /* True means that the original font determined for drawing this glyph | 1309 | /* True means that the original font determined for drawing this glyph |
| 1313 | string could not be loaded. The member `font' has been set to | 1310 | string could not be loaded. The member `font' has been set to |
| 1314 | the frame's default font in this case. */ | 1311 | the frame's default font in this case. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 8f6695ae2b0..3c928f7897a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -24241,7 +24241,7 @@ get_char_face_and_encoding (struct frame *f, int c, int face_id, | |||
| 24241 | 24241 | ||
| 24242 | static struct face * | 24242 | static struct face * |
| 24243 | get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, | 24243 | get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, |
| 24244 | XChar2b *char2b, int *two_byte_p) | 24244 | XChar2b *char2b) |
| 24245 | { | 24245 | { |
| 24246 | struct face *face; | 24246 | struct face *face; |
| 24247 | unsigned code = 0; | 24247 | unsigned code = 0; |
| @@ -24253,9 +24253,6 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, | |||
| 24253 | eassert (face != NULL); | 24253 | eassert (face != NULL); |
| 24254 | prepare_face_for_display (f, face); | 24254 | prepare_face_for_display (f, face); |
| 24255 | 24255 | ||
| 24256 | if (two_byte_p) | ||
| 24257 | *two_byte_p = 0; | ||
| 24258 | |||
| 24259 | if (face->font) | 24256 | if (face->font) |
| 24260 | { | 24257 | { |
| 24261 | if (CHAR_BYTE8_P (glyph->u.ch)) | 24258 | if (CHAR_BYTE8_P (glyph->u.ch)) |
| @@ -24368,9 +24365,6 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face, | |||
| 24368 | /* Adjust base line for subscript/superscript text. */ | 24365 | /* Adjust base line for subscript/superscript text. */ |
| 24369 | s->ybase += s->first_glyph->voffset; | 24366 | s->ybase += s->first_glyph->voffset; |
| 24370 | 24367 | ||
| 24371 | /* This glyph string must always be drawn with 16-bit functions. */ | ||
| 24372 | s->two_byte_p = 1; | ||
| 24373 | |||
| 24374 | return s->cmp_to; | 24368 | return s->cmp_to; |
| 24375 | } | 24369 | } |
| 24376 | 24370 | ||
| @@ -24481,12 +24475,8 @@ fill_glyph_string (struct glyph_string *s, int face_id, | |||
| 24481 | && glyph->face_id == face_id | 24475 | && glyph->face_id == face_id |
| 24482 | && glyph->glyph_not_available_p == glyph_not_available_p) | 24476 | && glyph->glyph_not_available_p == glyph_not_available_p) |
| 24483 | { | 24477 | { |
| 24484 | int two_byte_p; | ||
| 24485 | |||
| 24486 | s->face = get_glyph_face_and_encoding (s->f, glyph, | 24478 | s->face = get_glyph_face_and_encoding (s->f, glyph, |
| 24487 | s->char2b + s->nchars, | 24479 | s->char2b + s->nchars); |
| 24488 | &two_byte_p); | ||
| 24489 | s->two_byte_p = two_byte_p; | ||
| 24490 | ++s->nchars; | 24480 | ++s->nchars; |
| 24491 | eassert (s->nchars <= end - start); | 24481 | eassert (s->nchars <= end - start); |
| 24492 | s->width += glyph->pixel_width; | 24482 | s->width += glyph->pixel_width; |
| @@ -24600,17 +24590,18 @@ x_get_glyph_overhangs (struct glyph *glyph, struct frame *f, int *left, int *rig | |||
| 24600 | 24590 | ||
| 24601 | if (glyph->type == CHAR_GLYPH) | 24591 | if (glyph->type == CHAR_GLYPH) |
| 24602 | { | 24592 | { |
| 24603 | struct face *face; | ||
| 24604 | XChar2b char2b; | 24593 | XChar2b char2b; |
| 24605 | struct font_metrics *pcm; | 24594 | struct face *face = get_glyph_face_and_encoding (f, glyph, &char2b); |
| 24606 | 24595 | if (face->font) | |
| 24607 | face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL); | ||
| 24608 | if (face->font && (pcm = get_per_char_metric (face->font, &char2b))) | ||
| 24609 | { | 24596 | { |
| 24610 | if (pcm->rbearing > pcm->width) | 24597 | struct font_metrics *pcm = get_per_char_metric (face->font, &char2b); |
| 24611 | *right = pcm->rbearing - pcm->width; | 24598 | if (pcm) |
| 24612 | if (pcm->lbearing < 0) | 24599 | { |
| 24613 | *left = -pcm->lbearing; | 24600 | if (pcm->rbearing > pcm->width) |
| 24601 | *right = pcm->rbearing - pcm->width; | ||
| 24602 | if (pcm->lbearing < 0) | ||
| 24603 | *left = -pcm->lbearing; | ||
| 24604 | } | ||
| 24614 | } | 24605 | } |
| 24615 | } | 24606 | } |
| 24616 | else if (glyph->type == COMPOSITE_GLYPH) | 24607 | else if (glyph->type == COMPOSITE_GLYPH) |