int last_code = -1;
int last_merged = 0;
- while (n--)
- {
- int glyph = XFASTINT (*fp);
- int facecode;
-
- if (GLYPH_FACE (glyph) == 0)
- /* If GLYPH has no face code, use FACE. */
- facecode = face;
- else if (GLYPH_FACE (glyph) == last_code)
- /* If it's same as previous glyph, use same result. */
- facecode = last_merged;
- else
- {
- /* Merge this glyph's face and remember the result. */
- last_code = GLYPH_FACE (glyph);
- last_merged = facecode = compute_glyph_face (f, last_code, face);
- }
+#ifdef HAVE_X_WINDOWS
+ if (! FRAME_TERMCAP_P (f))
+ while (n--)
+ {
+ int glyph = XFASTINT (*fp);
+ int facecode;
+
+ if (FAST_GLYPH_FACE (glyph) == 0)
+ /* If GLYPH has no face code, use FACE. */
+ facecode = face;
+ else if (FAST_GLYPH_FACE (glyph) == last_code)
+ /* If it's same as previous glyph, use same result. */
+ facecode = last_merged;
+ else
+ {
+ /* Merge this glyph's face and remember the result. */
+ last_code = FAST_GLYPH_FACE (glyph);
+ last_merged = facecode = compute_glyph_face (f, last_code, face);
+ }
- if (to >= s) *to = MAKE_GLYPH (GLYPH_CHAR (glyph), facecode);
- ++to;
- ++fp;
- }
+ if (to >= s)
+ *to = FAST_MAKE_GLYPH (FAST_GLYPH_CHAR (glyph), facecode);
+ ++to;
+ ++fp;
+ }
+ else
+#endif
+ while (n--)
+ {
+ if (to >= s) *to = XFASTINT (*fp);
+ ++to;
+ ++fp;
+ }
return to;
}
GLYPH glyph;
int current_face;
{
- if (GLYPH_FACE (glyph) == 0)
- return glyph;
- return MAKE_GLYPH (GLYPH_CHAR (glyph),
- compute_glyph_face (f, GLYPH_FACE (glyph), current_face));
+#ifdef HAVE_X_WINDOWS
+ if (! FRAME_TERMCAP_P (f) && FAST_GLYPH_FACE (glyph) != 0)
+ return FAST_MAKE_GLYPH (FAST_GLYPH_CHAR (glyph),
+ compute_glyph_face (f, FAST_GLYPH_FACE (glyph),
+ current_face));
+#endif
+ return glyph;
}
\f
/* Display one line of window w, starting at position START in W's buffer.
&& (dp == 0 || XTYPE (DISP_CHAR_VECTOR (dp, c)) != Lisp_Vector))
{
if (p1 >= startp)
- *p1 = MAKE_GLYPH (c, current_face);
+ *p1 = MAKE_GLYPH (f, c, current_face);
p1++;
}
else if (c == '\n')
copy_part_of_rope (f, p1prev, p1prev, invis_vector_contents,
(p1 - p1prev), current_face);
}
-#if 1
+#ifdef HAVE_X_WINDOWS
/* Draw the face of the newline character as extending all the
way to the end of the frame line. */
if (current_face)
while (p1 < endp)
- *p1++ = MAKE_GLYPH (' ', current_face);
+ *p1++ = FAST_MAKE_GLYPH (' ', current_face);
#endif
break;
}
do
{
if (p1 >= startp && p1 < endp)
- *p1 = MAKE_GLYPH (' ', current_face);
+ *p1 = MAKE_GLYPH (f, ' ', current_face);
p1++;
}
while ((p1 - startp + taboffset + hscroll - (hscroll > 0))
copy_part_of_rope (f, p1prev, p1prev, invis_vector_contents,
(p1 - p1prev), current_face);
}
-#if 1
+#ifdef HAVE_X_WINDOWS
/* Draw the face of the newline character as extending all the
way to the end of the frame line. */
if (current_face)
while (p1 < endp)
- *p1++ = MAKE_GLYPH (' ', current_face);
+ *p1++ = FAST_MAKE_GLYPH (' ', current_face);
#endif
break;
}
current_face);
p1++;
if (p1 >= startp && p1 < endp)
- *p1 = MAKE_GLYPH (c ^ 0100, current_face);
+ *p1 = MAKE_GLYPH (f, c ^ 0100, current_face);
p1++;
}
else
current_face);
p1++;
if (p1 >= startp && p1 < endp)
- *p1 = MAKE_GLYPH ((c >> 6) + '0', current_face);
+ *p1 = MAKE_GLYPH (f, (c >> 6) + '0', current_face);
p1++;
if (p1 >= startp && p1 < endp)
- *p1 = MAKE_GLYPH ((7 & (c >> 3)) + '0', current_face);
+ *p1 = MAKE_GLYPH (f, (7 & (c >> 3)) + '0', current_face);
p1++;
if (p1 >= startp && p1 < endp)
- *p1 = MAKE_GLYPH ((7 & c) + '0', current_face);
+ *p1 = MAKE_GLYPH (f, (7 & c) + '0', current_face);
p1++;
}
if (XFASTINT (w->width) == FRAME_WIDTH (f)
|| XFASTINT (XWINDOW (w->parent)->width) == FRAME_WIDTH (f))
FRAME_DESIRED_GLYPHS (f)->highlight[vpos] = mode_line_inverse_video;
+#ifdef HAVE_X_WINDOWS
else if (! FRAME_TERMCAP_P (f))
{
/* For a partial width window, explicitly set face of each glyph. */
int i;
GLYPH *ptr = FRAME_DESIRED_GLYPHS (f)->glyphs[vpos];
for (i = left; i < right; ++i)
- ptr[i] = MAKE_GLYPH (GLYPH_CHAR (ptr[i]), 1);
+ ptr[i] = FAST_MAKE_GLYPH (FAST_GLYPH_CHAR (ptr[i]), 1);
}
+#endif
#ifdef HAVE_X_WINDOWS
if (w == XWINDOW (f->selected_window))