From 9910e595e7142801eb2bbf13ca37d4d10f57f25b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Jun 2011 22:15:27 -0700 Subject: [PATCH] GLYPH_CODE_FACE returns EMACS_INT, not int. * dispextern.h (merge_faces): * xfaces.c (merge_faces): * xdisp.c (get_next_display_element): (next_element_from_display_vector): Don't assume EMACS_INT fits in int. --- src/ChangeLog | 6 ++++++ src/dispextern.h | 2 +- src/xdisp.c | 5 +++-- src/xfaces.c | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f26d50f6ce9..973f9c1b2a6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-06-13 Paul Eggert + GLYPH_CODE_FACE returns EMACS_INT, not int. + * dispextern.h (merge_faces): + * xfaces.c (merge_faces): + * xdisp.c (get_next_display_element): + (next_element_from_display_vector): Don't assume EMACS_INT fits in int. + * character.h (CHAR_VALID_P): Remove unused parameter. * fontset.c, lisp.h, xdisp.c: All uses changed. diff --git a/src/dispextern.h b/src/dispextern.h index 75ebc462ce4..0ededf33ac6 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3163,7 +3163,7 @@ int face_at_string_position (struct window *w, Lisp_Object string, EMACS_INT pos, EMACS_INT bufpos, EMACS_INT region_beg, EMACS_INT region_end, EMACS_INT *endptr, enum face_id, int mouse); -int merge_faces (struct frame *, Lisp_Object, int, int); +int merge_faces (struct frame *, Lisp_Object, EMACS_INT, int); int compute_char_face (struct frame *, int, Lisp_Object); void free_all_realized_faces (Lisp_Object); extern Lisp_Object Qforeground_color, Qbackground_color; diff --git a/src/xdisp.c b/src/xdisp.c index b70e0dc0d0b..ad99fd41ffb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5819,7 +5819,8 @@ get_next_display_element (struct it *it) display. Then, set IT->dpvec to these glyphs. */ Lisp_Object gc; int ctl_len; - int face_id, lface_id = 0 ; + int face_id; + EMACS_INT lface_id = 0; int escape_glyph; /* Handle control characters with ^. */ @@ -6374,7 +6375,7 @@ next_element_from_display_vector (struct it *it) it->face_id = it->dpvec_face_id; else { - int lface_id = GLYPH_CODE_FACE (gc); + EMACS_INT lface_id = GLYPH_CODE_FACE (gc); if (lface_id > 0) it->face_id = merge_faces (it->f, Qt, lface_id, it->saved_face_id); diff --git a/src/xfaces.c b/src/xfaces.c index b14710245b1..a56e54c90cd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6223,7 +6223,8 @@ face_at_string_position (struct window *w, Lisp_Object string, */ int -merge_faces (struct frame *f, Lisp_Object face_name, int face_id, int base_face_id) +merge_faces (struct frame *f, Lisp_Object face_name, EMACS_INT face_id, + int base_face_id) { Lisp_Object attrs[LFACE_VECTOR_SIZE]; struct face *base_face; -- 2.11.4.GIT