Changeset 4156

Show
Ignore:
Timestamp:
2006年09月02日 13時44分49秒 (2 years ago)
Author:
miyoshi
Message:

* mw32term.c (mw32_draw_glyph_string_foreground): Don't use `pstr'
and `nbytes' of of the glyph string.

* xdisp.c (init_glyph_string): Removed arguments `pstr' and
`nbytes'.
(fill_glyph_string): Don't call SERIALIZE_FONTCP().
(INIT_GLYPH_STRING): Removed argument `pstr'.
(BUILD_STRETCH_GLYPH_STRING): Ditto.
(BUILD_IMAGE_GLYPH_STRING): Ditto.
(BUILD_CHAR_GLYPH_STRINGS): Ditto.
(BUILD_COMPOSITE_GLYPH_STRING): Ditto.

* dispextern.h (struct glyph_string): Removed members `pstr' and
`nbytes'.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r4155 r4156  
     12006-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 
    1182006-09-02  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    219 
  • trunk/src/dispextern.h

    r4155 r4156  
    11521152  XChar2b *char2b; 
    11531153  int nchars; 
    1154 #ifdef MEADOW 
    1155   unsigned char *pstr; 
    1156   int nbytes; 
    1157 #endif 
    11581154 
    11591155  /* A face-override for drawing cursors, mouse face and similar.  */ 
  • trunk/src/mw32term.c

    r4155 r4156  
    16511651      RECT r; 
    16521652      int boff = s->font_info->baseline_offset; 
     1653      char *char1b = (char *) s->char2b; 
     1654      int charset_dim = s->two_byte_p ? 2 : 1; 
    16531655 
    16541656      if (s->font_info->vertical_centering) 
     
    16591661      r.right = s->x + s->width; 
    16601662      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          } 
    16611675 
    16621676      /* Draw text.  If background has already been filled, don't fill 
     
    16671681          || (s->background_filled_p && s->hl != DRAW_CURSOR)) 
    16681682        { 
    1669           MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->pstr
     1683          MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b
    16701684                                  x, s->ybase - boff, 
    1671                                   s->nbytes, 0, &r, 0); 
     1685                                  s->nchars * charset_dim, 0, &r, 0); 
    16721686        } 
    16731687      else 
    16741688        { 
    1675           MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->pstr
     1689          MW32_INVOKE_OUTPUTPROC (s->font, s->hdc, s->char2b
    16761690                                  x, s->ybase - boff, 
    1677                                   s->nbytes, 0, &r, ETO_OPAQUE); 
     1691                                  s->nchars * charset_dim, 0, &r, ETO_OPAQUE); 
    16781692        } 
    16791693    } 
  • trunk/src/xdisp.c

    r4155 r4156  
    1865418654 
    1865518655static void 
    18656 init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, 
    18657 #ifdef MEADOW 
    18658                    pstr, 
    18659 #endif 
    18660                    w, row, area, start, hl) 
     18656init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl) 
    1866118657     struct glyph_string *s; 
    1866218658     DECLARE_HDC (hdc) 
    1866318659     XChar2b *char2b; 
    18664 #ifdef MEADOW 
    18665      unsigned char *pstr; 
    18666 #endif 
    1866718660     struct window *w; 
    1866818661     struct glyph_row *row; 
     
    1868018673  s->window = FRAME_X_WINDOW (s->f); 
    1868118674  s->char2b = char2b; 
    18682 #ifdef MEADOW 
    18683   s->pstr = pstr; 
    18684 #endif 
    1868518675  s->hl = hl; 
    1868618676  s->row = row; 
     
    1889518885  int voffset; 
    1889618886  int glyph_not_available_p; 
    18897 #ifdef MEADOW 
    18898 /* Note for MW32 implementation. 
    18899    This function also sets metrics of each character, which will 
    18900    be used by textout method(ExtTextOut()) and glyph overhang 
    18901    operations.  */ 
    18902   unsigned char *pstr = s->pstr; 
    18903 #endif 
    1890418887 
    1890518888  xassert (s->f == XFRAME (s->w->frame)); 
     
    1892618909                                             s->char2b + s->nchars, 
    1892718910                                             &two_byte_p); 
    18928 #ifdef MEADOW 
    18929       SERIALIZE_FONTCP (pstr, s->char2b[s->nchars]); 
    18930 #endif 
    1893118911      s->two_byte_p = two_byte_p; 
    1893218912      ++s->nchars; 
     
    1893518915      ++glyph; 
    1893618916    } 
    18937 #ifdef MEADOW 
    18938   s->nbytes = pstr - s->pstr; 
    18939 #endif 
    1894018917 
    1894118918  s->font = s->face->font; 
     
    1931819295/* On W32, silently add local `hdc' variable to argument list of 
    1931919296   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) 
    1932219299#else 
    1932319300#define INIT_GLYPH_STRING(s, char2b, w, row, area, start, hl) \ 
     
    1933919316       {                                                                    \ 
    1934019317         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);            \ 
    1934219319         START = fill_stretch_glyph_string (s, row, area, START, END);      \ 
    1934319320         append_glyph_string (&HEAD, &TAIL, s);                             \ 
     
    1935919336       {                                                                \ 
    1936019337         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);        \ 
    1936219339         fill_image_glyph_string (s);                                   \ 
    1936319340         append_glyph_string (&HEAD, &TAIL, s);                         \ 
     
    1938219359         int c, face_id;                                                   \ 
    1938319360         XChar2b *char2b;                                                  \ 
    19384          unsigned char *pstr;                                              \ 
    1938519361                                                                           \ 
    1938619362         c = (row)->glyphs[area][START].u.ch;                              \ 
     
    1938819364                                                                           \ 
    1938919365         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);           \ 
    1939319368         append_glyph_string (&HEAD, &TAIL, s);                            \ 
    1939419369         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);   
    1939619371       }                                                                   \ 
    1939719372     while (0) 
     
    1943719412      {                                                                   \ 
    1943819413        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);     
    1944019415        append_glyph_string (&(HEAD), &(TAIL), s);                        \ 
    1944119416        s->cmp = cmp;                                                     \