[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/term.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/term.c,v |
Date: |
Wed, 27 Feb 2008 22:49:29 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 08/02/27 22:49:29
Index: term.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/term.c,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -b -r1.213 -r1.214
--- term.c 26 Feb 2008 18:18:04 -0000 1.213
+++ term.c 27 Feb 2008 22:49:29 -0000 1.214
@@ -569,7 +569,6 @@
struct coding_system *coding;
{
struct glyph *src_end = src + src_len;
- register GLYPH g;
unsigned char *buf;
int nchars, nbytes, required;
register int tlen = GLYPH_TABLE_LENGTH;
@@ -631,13 +630,14 @@
/* We must skip glyphs to be padded for a wide character. */
else if (! CHAR_GLYPH_PADDING_P (*src))
{
+ GLYPH g;
int c;
Lisp_Object string;
string = Qnil;
- g = GLYPH_FROM_CHAR_GLYPH (src[0]);
+ SET_GLYPH_FROM_CHAR_GLYPH (g, src[0]);
- if (g < 0 || g >= tlen)
+ if (GLYPH_INVALID_P (g) || GLYPH_SIMPLE_P (tbase, tlen, g))
{
/* This glyph doesn't has an entry in Vglyph_table. */
c = src->u.ch;
@@ -651,10 +651,10 @@
if (GLYPH_SIMPLE_P (tbase, tlen, g))
/* We set the multi-byte form of a character in G
(that should be an ASCII character) at WORKBUF. */
- c = FAST_GLYPH_CHAR (g);
+ c = GLYPH_CHAR (g);
else
/* We have a string in Vglyph_table. */
- string = tbase[g];
+ string = tbase[GLYPH_CHAR (g)];
}
if (NILP (string))
@@ -1792,6 +1792,7 @@
enum display_element_type what;
{
struct it temp_it;
+ Lisp_Object gc;
GLYPH glyph;
temp_it = *it;
@@ -1804,34 +1805,32 @@
if (what == IT_CONTINUATION)
{
/* Continuation glyph. */
+ SET_GLYPH_FROM_CHAR (glyph, '\\');
if (it->dp
- && INTEGERP (DISP_CONTINUE_GLYPH (it->dp))
- && GLYPH_CHAR_VALID_P (XINT (DISP_CONTINUE_GLYPH (it->dp))))
+ && (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc))
+ && GLYPH_CODE_CHAR_VALID_P (gc))
{
- glyph = XINT (DISP_CONTINUE_GLYPH (it->dp));
- glyph = spec_glyph_lookup_face (XWINDOW (it->window), glyph);
+ SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
+ spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
}
- else
- glyph = '\\';
}
else if (what == IT_TRUNCATION)
{
/* Truncation glyph. */
+ SET_GLYPH_FROM_CHAR (glyph, '$');
if (it->dp
- && INTEGERP (DISP_TRUNC_GLYPH (it->dp))
- && GLYPH_CHAR_VALID_P (XINT (DISP_TRUNC_GLYPH (it->dp))))
+ && (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc))
+ && GLYPH_CODE_CHAR_VALID_P (gc))
{
- glyph = XINT (DISP_TRUNC_GLYPH (it->dp));
- glyph = spec_glyph_lookup_face (XWINDOW (it->window), glyph);
+ SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
+ spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
}
- else
- glyph = '$';
}
else
abort ();
- temp_it.c = FAST_GLYPH_CHAR (glyph);
- temp_it.face_id = FAST_GLYPH_FACE (glyph);
+ temp_it.c = GLYPH_CHAR (glyph);
+ temp_it.face_id = GLYPH_FACE (glyph);
temp_it.len = CHAR_BYTES (temp_it.c);
produce_glyphs (&temp_it);