Mercurial > emacs
comparison src/xdisp.c @ 27000:d7f15cd9c4ad
All codes adjusted for the change of struct glyph.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 27 Dec 1999 05:09:13 +0000 |
parents | c5079639cac1 |
children | fed3d128eeed |
comparison
equal
deleted
inserted
replaced
26999:5d0057e6170e | 27000:d7f15cd9c4ad |
---|---|
10590 " %5d %4c %6d %3d 0x%05x %c %4d %1.1d%1.1d\n", | 10590 " %5d %4c %6d %3d 0x%05x %c %4d %1.1d%1.1d\n", |
10591 glyph - row->glyphs[TEXT_AREA], | 10591 glyph - row->glyphs[TEXT_AREA], |
10592 'C', | 10592 'C', |
10593 glyph->charpos, | 10593 glyph->charpos, |
10594 glyph->pixel_width, | 10594 glyph->pixel_width, |
10595 glyph->u.ch.code, | 10595 glyph->u.ch, |
10596 (glyph->u.ch.code < 0x80 && glyph->u.ch.code >= ' ' | 10596 (glyph->u.ch < 0x80 && glyph->u.ch >= ' ' |
10597 ? glyph->u.ch.code | 10597 ? glyph->u.ch |
10598 : '.'), | 10598 : '.'), |
10599 glyph->u.ch.face_id, | 10599 glyph->face_id, |
10600 glyph->left_box_line_p, | 10600 glyph->left_box_line_p, |
10601 glyph->right_box_line_p); | 10601 glyph->right_box_line_p); |
10602 } | 10602 } |
10603 else if (glyph->type == STRETCH_GLYPH) | 10603 else if (glyph->type == STRETCH_GLYPH) |
10604 { | 10604 { |
10608 'S', | 10608 'S', |
10609 glyph->charpos, | 10609 glyph->charpos, |
10610 glyph->pixel_width, | 10610 glyph->pixel_width, |
10611 0, | 10611 0, |
10612 '.', | 10612 '.', |
10613 glyph->u.stretch.face_id, | 10613 glyph->u.face_id, |
10614 glyph->left_box_line_p, | 10614 glyph->left_box_line_p, |
10615 glyph->right_box_line_p); | 10615 glyph->right_box_line_p); |
10616 } | 10616 } |
10617 else if (glyph->type == IMAGE_GLYPH) | 10617 else if (glyph->type == IMAGE_GLYPH) |
10618 { | 10618 { |
10620 " %5d %4c %6d %3d 0x%05x %c %4d %1.1d%1.1d\n", | 10620 " %5d %4c %6d %3d 0x%05x %c %4d %1.1d%1.1d\n", |
10621 glyph - row->glyphs[TEXT_AREA], | 10621 glyph - row->glyphs[TEXT_AREA], |
10622 'I', | 10622 'I', |
10623 glyph->charpos, | 10623 glyph->charpos, |
10624 glyph->pixel_width, | 10624 glyph->pixel_width, |
10625 glyph->u.img.id, | 10625 glyph->u.img_id, |
10626 '.', | 10626 '.', |
10627 glyph->u.img.face_id, | 10627 glyph->u.face_id, |
10628 glyph->left_box_line_p, | 10628 glyph->left_box_line_p, |
10629 glyph->right_box_line_p); | 10629 glyph->right_box_line_p); |
10630 } | 10630 } |
10631 ++glyph; | 10631 ++glyph; |
10632 } | 10632 } |
10887 row->hash = 0; | 10887 row->hash = 0; |
10888 for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) | 10888 for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) |
10889 for (i = 0; i < row->used[area]; ++i) | 10889 for (i = 0; i < row->used[area]; ++i) |
10890 row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff) | 10890 row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff) |
10891 + row->glyphs[area][i].u.val | 10891 + row->glyphs[area][i].u.val |
10892 + row->glyphs[area][i].face_id | |
10893 + row->glyphs[area][i].padding_p | |
10892 + (row->glyphs[area][i].type << 2)); | 10894 + (row->glyphs[area][i].type << 2)); |
10893 | 10895 |
10894 it->max_ascent = it->max_descent = 0; | 10896 it->max_ascent = it->max_descent = 0; |
10895 it->max_phys_ascent = it->max_phys_descent = 0; | 10897 it->max_phys_ascent = it->max_phys_descent = 0; |
10896 } | 10898 } |
11008 /* If the row is empty, add a space with the current face of IT, | 11010 /* If the row is empty, add a space with the current face of IT, |
11009 so that we know which face to draw. */ | 11011 so that we know which face to draw. */ |
11010 if (it->glyph_row->used[TEXT_AREA] == 0) | 11012 if (it->glyph_row->used[TEXT_AREA] == 0) |
11011 { | 11013 { |
11012 it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph; | 11014 it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph; |
11013 it->glyph_row->glyphs[TEXT_AREA][0].u.ch.face_id = it->face_id; | 11015 it->glyph_row->glyphs[TEXT_AREA][0].face_id = it->face_id; |
11014 it->glyph_row->used[TEXT_AREA] = 1; | 11016 it->glyph_row->used[TEXT_AREA] = 1; |
11015 } | 11017 } |
11016 } | 11018 } |
11017 else | 11019 else |
11018 { | 11020 { |
11085 struct glyph *glyph = start + used - 1; | 11087 struct glyph *glyph = start + used - 1; |
11086 | 11088 |
11087 /* Skip over the space glyph inserted to display the | 11089 /* Skip over the space glyph inserted to display the |
11088 cursor at the end of a line. */ | 11090 cursor at the end of a line. */ |
11089 if (glyph->type == CHAR_GLYPH | 11091 if (glyph->type == CHAR_GLYPH |
11090 && glyph->u.ch.code == ' ' | 11092 && glyph->u.ch == ' ' |
11091 && glyph->object == 0) | 11093 && glyph->object == 0) |
11092 --glyph; | 11094 --glyph; |
11093 | 11095 |
11094 /* If last glyph is a space or stretch, and it's trailing | 11096 /* If last glyph is a space or stretch, and it's trailing |
11095 whitespace, set the face of all trailing whitespace glyphs in | 11097 whitespace, set the face of all trailing whitespace glyphs in |
11096 IT->glyph_row to `trailing-whitespace'. */ | 11098 IT->glyph_row to `trailing-whitespace'. */ |
11097 if (glyph >= start | 11099 if (glyph >= start |
11098 && BUFFERP (glyph->object) | 11100 && BUFFERP (glyph->object) |
11099 && (glyph->type == STRETCH_GLYPH | 11101 && (glyph->type == STRETCH_GLYPH |
11100 || (glyph->type == CHAR_GLYPH | 11102 || (glyph->type == CHAR_GLYPH |
11101 && glyph->u.ch.code == ' ')) | 11103 && glyph->u.ch == ' ')) |
11102 && trailing_whitespace_p (glyph->charpos)) | 11104 && trailing_whitespace_p (glyph->charpos)) |
11103 { | 11105 { |
11104 int face_id = lookup_named_face (f, Qtrailing_whitespace, | 11106 int face_id = lookup_named_face (f, Qtrailing_whitespace, |
11105 CHARSET_ASCII); | 11107 CHARSET_ASCII); |
11106 | 11108 |
11107 while (glyph >= start | 11109 while (glyph >= start |
11108 && BUFFERP (glyph->object) | 11110 && BUFFERP (glyph->object) |
11109 && (glyph->type == STRETCH_GLYPH | 11111 && (glyph->type == STRETCH_GLYPH |
11110 || (glyph->type == CHAR_GLYPH | 11112 || (glyph->type == CHAR_GLYPH |
11111 && glyph->u.ch.code == ' '))) | 11113 && glyph->u.ch == ' '))) |
11112 { | 11114 (glyph--)->face_id = face_id; |
11113 if (glyph->type == STRETCH_GLYPH) | |
11114 glyph->u.stretch.face_id = face_id; | |
11115 else | |
11116 glyph->u.ch.face_id = face_id; | |
11117 --glyph; | |
11118 } | |
11119 } | 11115 } |
11120 } | 11116 } |
11121 } | 11117 } |
11122 | 11118 |
11123 | 11119 |