changeset 110573:72166a5a538c

Fix up some EMACS_INT/int conversion errors related to xdisp.c.
author Lars Magne Ingebrigtsen <larsi@gnus.org>
date Sat, 25 Sep 2010 18:39:13 +0200
parents a1facefdd4a2
children 6a4262ac6a5d bc67a5497dda
files src/ChangeLog src/dispextern.h src/xdisp.c
diffstat 3 files changed, 21 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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  <larsi@gnus.org>
 
+	* 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  <eliz@gnu.org>
--- 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);
--- 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;