Changeset 4156
- Timestamp:
- 2006年09月02日 13時44分49秒 (2 years ago)
- Files:
-
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/dispextern.h (modified) (1 diff)
- trunk/src/mw32term.c (modified) (3 diffs)
- trunk/src/xdisp.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ChangeLog.Meadow
r4155 r4156 1 2006-09-02 MIYOSHI Masanori <miyoshi@meadowy.org> 2 3 * mw32term.c (mw32_draw_glyph_string_foreground): Don't use `pstr' 4 and `nbytes' of of the glyph string. 5 6 * xdisp.c (init_glyph_string): Removed arguments `pstr' and 7 `nbytes'. 8 (fill_glyph_string): Don't call SERIALIZE_FONTCP(). 9 (INIT_GLYPH_STRING): Removed argument `pstr'. 10 (BUILD_STRETCH_GLYPH_STRING): Ditto. 11 (BUILD_IMAGE_GLYPH_STRING): Ditto. 12 (BUILD_CHAR_GLYPH_STRINGS): Ditto. 13 (BUILD_COMPOSITE_GLYPH_STRING): Ditto. 14 15 * dispextern.h (struct glyph_string): Removed members `pstr' and 16 `nbytes'. 17 1 18 2006-09-02 MIYOSHI Masanori <miyoshi@meadowy.org> 2 19 trunk/src/dispextern.h
r4155 r4156 1152 1152 XChar2b *char2b; 1153 1153 int nchars; 1154 #ifdef MEADOW1155 unsigned char *pstr;1156 int nbytes;1157 #endif1158 1154 1159 1155 /* A face-override for drawing cursors, mouse face and similar. */ trunk/src/mw32term.c
r4155 r4156 1651 1651 RECT r; 1652 1652 int boff = s->font_info->baseline_offset; 1653 char *char1b = (char *) s->char2b; 1654 int charset_dim = s->two_byte_p ? 2 : 1; 1653 1655 1654 1656 if (s->font_info->vertical_centering) … … 1659 1661 r.right = s->x + s->width; 1660 1662 r.bottom = s->y + s->height; 1663 1664 /* If we can use 8-bit functions, condense S->char2b. */ 1665 if (!s->two_byte_p) 1666 for (i = 0; i < s->nchars; ++i) 1667 *char1b++ = XCHAR2B_BYTE2 (&s->char2b[i]); 1668 else 1669 for (i = 0; i < s->nchars; ++i) 1670 { 1671 int c = s->char2b[i]; 1672 *char1b++ = XCHAR2B_BYTE1 (&c); 1673 *char1b++ = XCHAR2B_BYTE2 (&c); 1674 } 1661 1675 1662 1676 /* Draw text. If background has already been filled, don't fill … … 1667 1681 || (s->background_filled_p && s->hl != DRAW_CURSOR)) 1668 1682 { 1669 MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s-> pstr,1683 MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b, 1670 1684 x, s->ybase - boff, 1671 s->n bytes, 0, &r, 0);1685 s->nchars * charset_dim, 0, &r, 0); 1672 1686 } 1673 1687 else 1674 1688 { 1675 MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s-> pstr,1689 MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b, 1676 1690 x, s->ybase - boff, 1677 s->n bytes, 0, &r, ETO_OPAQUE);1691 s->nchars * charset_dim, 0, &r, ETO_OPAQUE); 1678 1692 } 1679 1693 } trunk/src/xdisp.c
r4155 r4156 18654 18654 18655 18655 static void 18656 init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, 18657 #ifdef MEADOW 18658 pstr, 18659 #endif 18660 w, row, area, start, hl) 18656 init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl) 18661 18657 struct glyph_string *s; 18662 18658 DECLARE_HDC (hdc) 18663 18659 XChar2b *char2b; 18664 #ifdef MEADOW18665 unsigned char *pstr;18666 #endif18667 18660 struct window *w; 18668 18661 struct glyph_row *row; … … 18680 18673 s->window = FRAME_X_WINDOW (s->f); 18681 18674 s->char2b = char2b; 18682 #ifdef MEADOW18683 s->pstr = pstr;18684 #endif18685 18675 s->hl = hl; 18686 18676 s->row = row; … … 18895 18885 int voffset; 18896 18886 int glyph_not_available_p; 18897 #ifdef MEADOW18898 /* Note for MW32 implementation.18899 This function also sets metrics of each character, which will18900 be used by textout method(ExtTextOut()) and glyph overhang18901 operations. */18902 unsigned char *pstr = s->pstr;18903 #endif18904 18887 18905 18888 xassert (s->f == XFRAME (s->w->frame)); … … 18926 18909 s->char2b + s->nchars, 18927 18910 &two_byte_p); 18928 #ifdef MEADOW18929 SERIALIZE_FONTCP (pstr, s->char2b[s->nchars]);18930 #endif18931 18911 s->two_byte_p = two_byte_p; 18932 18912 ++s->nchars; … … 18935 18915 ++glyph; 18936 18916 } 18937 #ifdef MEADOW18938 s->nbytes = pstr - s->pstr;18939 #endif18940 18917 18941 18918 s->font = s->face->font; … … 19318 19295 /* On W32, silently add local `hdc' variable to argument list of 19319 19296 init_glyph_string. */ 19320 #define INIT_GLYPH_STRING(s, char2b, pstr,w, row, area, start, hl) \19321 init_glyph_string (s, hdc, char2b, pstr,w, row, area, start, hl)19297 #define INIT_GLYPH_STRING(s, char2b, w, row, area, start, hl) \ 19298 init_glyph_string (s, hdc, char2b, w, row, area, start, hl) 19322 19299 #else 19323 19300 #define INIT_GLYPH_STRING(s, char2b, w, row, area, start, hl) \ … … 19339 19316 { \ 19340 19317 s = (struct glyph_string *) alloca (sizeof *s); \ 19341 INIT_GLYPH_STRING (s, NULL, NULL, w, row, area, START, HL);\19318 INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \ 19342 19319 START = fill_stretch_glyph_string (s, row, area, START, END); \ 19343 19320 append_glyph_string (&HEAD, &TAIL, s); \ … … 19359 19336 { \ 19360 19337 s = (struct glyph_string *) alloca (sizeof *s); \ 19361 INIT_GLYPH_STRING (s, NULL, NULL, w, row, area, START, HL);\19338 INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \ 19362 19339 fill_image_glyph_string (s); \ 19363 19340 append_glyph_string (&HEAD, &TAIL, s); \ … … 19382 19359 int c, face_id; \ 19383 19360 XChar2b *char2b; \ 19384 unsigned char *pstr; \19385 19361 \ 19386 19362 c = (row)->glyphs[area][START].u.ch; \ … … 19388 19364 \ 19389 19365 s = (struct glyph_string *) alloca (sizeof *s); \ 19390 char2b = (XChar2b *) alloca ((END - START) * (sizeof *char2b)); \ 19391 pstr = (unsigned char*) alloca ((END - START) * MAXBYTES1FCP); \ 19392 INIT_GLYPH_STRING (s, char2b, pstr, w, row, area, START, HL); \ 19366 char2b = (XChar2b *) alloca ((END - START) * sizeof *char2b); \ 19367 INIT_GLYPH_STRING (s, char2b, w, row, area, START, HL); \ 19393 19368 append_glyph_string (&HEAD, &TAIL, s); \ 19394 19369 s->x = (X); \ 19395 START = fill_glyph_string (s, face_id, START, END, overlaps); \19370 START = fill_glyph_string (s, face_id, START, END, overlaps); \ 19396 19371 } \ 19397 19372 while (0) … … 19437 19412 { \ 19438 19413 s = (struct glyph_string *) alloca (sizeof *s); \ 19439 INIT_GLYPH_STRING (s, char2b + n, NULL, w, row, area, START, HL);\19414 INIT_GLYPH_STRING (s, char2b + n, w, row, area, START, HL); \ 19440 19415 append_glyph_string (&(HEAD), &(TAIL), s); \ 19441 19416 s->cmp = cmp; \
