Fix up some EMACS_INT/int conversion errors related to xdisp.c.

parent b7bdc47c
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>
......
......@@ -2938,7 +2938,7 @@ void init_iterator_to_row_start (struct it *, struct window *,
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);
......
......@@ -1052,8 +1052,8 @@ static int init_to_row_end (struct it *, struct window *,
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 @@ string_char_and_length (const unsigned char *str, int *len)
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 @@ string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, int nchars)
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 @@ init_iterator (struct it *it, struct window *w,
&& 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 @@ in_ellipses_for_invisible_text_p (struct display_pos *pos, struct window *w)
{
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 @@ handle_face_prop (struct it *it)
}
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 @@ face_before_or_after_it_pos (struct it *it, int before_p)
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 @@ face_before_or_after_it_pos (struct it *it, int before_p)
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 @@ move_it_in_display_line (struct it *it,
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment