summaryrefslogtreecommitdiff
path: root/src/msdos.c
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2008-02-27 22:49:21 +0000
committerKim F. Storm <storm@cua.dk>2008-02-27 22:49:21 +0000
commita08b9f3d7106af8956c9474f9b74d3dace84e5d9 (patch)
treea3304b665e127581ccfcc9307dd6fe82c27f6f21 /src/msdos.c
parentec9ed378f4fb5adf306064fe8c3f5e512e45b6c4 (diff)
downloademacs-a08b9f3d7106af8956c9474f9b74d3dace84e5d9.tar.gz
(IT_write_glyphs): Adapt to new glyph type.
Diffstat (limited to 'src/msdos.c')
-rw-r--r--src/msdos.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/msdos.c b/src/msdos.c
index b5418bab639..0e75c62b4c3 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -987,8 +987,8 @@ IT_write_glyphs (struct glyph *str, int str_len)
/* Set up the unsupported character glyph */
if (!NILP (Vdos_unsupported_char_glyph))
{
- unsupported_char = FAST_GLYPH_CHAR (XINT (Vdos_unsupported_char_glyph));
- unsupported_face = FAST_GLYPH_FACE (XINT (Vdos_unsupported_char_glyph));
+ unsupported_char = GLYPH_CHAR (XINT (Vdos_unsupported_char_glyph));
+ unsupported_face = GLYPH_FACE (XINT (Vdos_unsupported_char_glyph));
}
screen_buf = screen_bp = alloca (str_len * 2);
@@ -1021,13 +1021,12 @@ IT_write_glyphs (struct glyph *str, int str_len)
}
else
{
- register GLYPH g = GLYPH_FROM_CHAR_GLYPH (*str);
+ GLYPH g;
int glyph_not_in_table = 0;
- /* If g is negative, it means we have a multibyte character
- in *str. That's what GLYPH_FROM_CHAR_GLYPH returns for
- multibyte characters. */
- if (g < 0 || g >= tlen)
+ SET_GLYPH_FROM_CHAR_GLYPH (g, *str);
+
+ if (GLYPH_INVALID_P (g) || GLYPH_SIMPLE_P (tbase, tlen, g))
{
/* This glyph doesn't have an entry in Vglyph_table. */
ch = str->u.ch;
@@ -1038,7 +1037,7 @@ IT_write_glyphs (struct glyph *str, int str_len)
/* This glyph has an entry in Vglyph_table, so process
any aliases before testing for simpleness. */
GLYPH_FOLLOW_ALIASES (tbase, tlen, g);
- ch = FAST_GLYPH_CHAR (g);
+ ch = GLYPH_CHAR (g);
}
/* Convert the character code to multibyte, if they
@@ -1054,10 +1053,10 @@ IT_write_glyphs (struct glyph *str, int str_len)
/* Invalid characters are displayed with a special glyph. */
if (! CHAR_VALID_P (ch, 0))
{
- g = !NILP (Vdos_unsupported_char_glyph)
+ ch = !NILP (Vdos_unsupported_char_glyph)
? XINT (Vdos_unsupported_char_glyph)
- : MAKE_GLYPH (sf, '\177', GLYPH_FACE (sf, g));
- ch = FAST_GLYPH_CHAR (g);
+ : '\177';
+ SET_GLYPH_CHAR (g, ch);
}
/* If the face of this glyph is different from the current