# HG changeset patch # User Lars Magne Ingebrigtsen # Date 1285432753 -7200 # Node ID 72166a5a538c432054dcbae11aff0f0c9c0facc3 # Parent a1facefdd4a2a2df0f68614c2e3788944f707756 Fix up some EMACS_INT/int conversion errors related to xdisp.c. diff -r a1facefdd4a2 -r 72166a5a538c src/ChangeLog --- a/src/ChangeLog Sat Sep 25 18:25:04 2010 +0200 +++ b/src/ChangeLog Sat Sep 25 18:39:13 2010 +0200 @@ -1,5 +1,12 @@ 2010-09-25 Lars Magne Ingebrigtsen + * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup. + + * dispextern.h: EMACS_INT/int fixup. + + * xdisp.c (string_pos_nchars_ahead, init_iterator): EMACS_INT/int + fixup. + * xrdb.c (magic_file_p): EMACS_INT/int fixup. 2010-09-25 Eli Zaretskii diff -r a1facefdd4a2 -r 72166a5a538c src/dispextern.h --- a/src/dispextern.h Sat Sep 25 18:25:04 2010 +0200 +++ b/src/dispextern.h Sat Sep 25 18:39:13 2010 +0200 @@ -2938,7 +2938,7 @@ int get_next_display_element (struct it *); void set_iterator_to_next (struct it *, int); void start_display (struct it *, struct window *, struct text_pos); -void move_it_to (struct it *, int, int, int, int, int); +void move_it_to (struct it *, EMACS_INT, int, int, int, int); void move_it_vertically (struct it *, int); void move_it_vertically_backward (struct it *, int); void move_it_by_lines (struct it *, int, int); diff -r a1facefdd4a2 -r 72166a5a538c src/xdisp.c --- a/src/xdisp.c Sat Sep 25 18:25:04 2010 +0200 +++ b/src/xdisp.c Sat Sep 25 18:39:13 2010 +0200 @@ -1052,8 +1052,8 @@ static void back_to_previous_line_start (struct it *); static int forward_to_next_line_start (struct it *, int *); static struct text_pos string_pos_nchars_ahead (struct text_pos, - Lisp_Object, int); -static struct text_pos string_pos (int, Lisp_Object); + Lisp_Object, EMACS_INT); +static struct text_pos string_pos (EMACS_INT, Lisp_Object); static struct text_pos c_string_pos (int, const unsigned char *, int); static int number_of_chars (const unsigned char *, int); static void compute_stop_pos (struct it *); @@ -1522,13 +1522,13 @@ in STRING, return the position NCHARS ahead (NCHARS >= 0). */ static struct text_pos -string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, int nchars) +string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, EMACS_INT nchars) { xassert (STRINGP (string) && nchars >= 0); if (STRING_MULTIBYTE (string)) { - int rest = SBYTES (string) - BYTEPOS (pos); + EMACS_INT rest = SBYTES (string) - BYTEPOS (pos); const unsigned char *p = SDATA (string) + BYTEPOS (pos); int len; @@ -1552,7 +1552,7 @@ for character position CHARPOS in STRING. */ static INLINE struct text_pos -string_pos (int charpos, Lisp_Object string) +string_pos (EMACS_INT charpos, Lisp_Object string) { struct text_pos pos; xassert (STRINGP (string)); @@ -2653,7 +2653,7 @@ && WINDOWP (minibuf_selected_window) && w == XWINDOW (minibuf_selected_window)))) { - int charpos = marker_position (current_buffer->mark); + EMACS_INT charpos = marker_position (current_buffer->mark); it->region_beg_charpos = min (PT, charpos); it->region_end_charpos = max (PT, charpos); } @@ -2899,7 +2899,7 @@ { Lisp_Object prop, window; int ellipses_p = 0; - int charpos = CHARPOS (pos->pos); + EMACS_INT charpos = CHARPOS (pos->pos); /* If POS specifies a position in a display vector, this might be for an ellipsis displayed for invisible text. We won't @@ -3455,7 +3455,8 @@ } else { - int base_face_id, bufpos; + int base_face_id; + EMACS_INT bufpos; int i; Lisp_Object from_overlay = (it->current.overlay_string_index >= 0 @@ -3579,7 +3580,8 @@ if (STRINGP (it->string)) { - int bufpos, base_face_id; + EMACS_INT bufpos; + int base_face_id; /* No face change past the end of the string (for the case we are padding with spaces). No face change before the @@ -3622,7 +3624,7 @@ if (STRING_MULTIBYTE (it->string)) { const unsigned char *p = SDATA (it->string) + BYTEPOS (pos); - int rest = SBYTES (it->string) - BYTEPOS (pos); + EMACS_INT rest = SBYTES (it->string) - BYTEPOS (pos); int c, len; struct face *face = FACE_FROM_ID (it->f, face_id); @@ -7411,7 +7413,7 @@ TO_CHARPOS. */ void -move_it_to (struct it *it, int to_charpos, int to_x, int to_y, int to_vpos, int op) +move_it_to (struct it *it, EMACS_INT to_charpos, int to_x, int to_y, int to_vpos, int op) { enum move_it_result skip, skip2 = MOVE_X_REACHED; int line_height, line_start_x = 0, reached = 0;