2010-09-25 Eli Zaretskii <eliz@gnu.org>
+ * window.c (Fpos_visible_in_window_p, Fdelete_other_windows)
+ (Fselect_window, window_scroll_pixel_based)
+ (window_scroll_line_based, Frecenter, Fset_window_configuration):
+ Use EMACS_INT for buffer positions.
+
+ * textprop.c (validate_interval_range, interval_of)
+ (property_change_between_p, Fadd_text_properties)
+ (set_text_properties_1, Fremove_text_properties)
+ (Fremove_list_of_text_properties, Ftext_property_any)
+ (Ftext_property_not_all, copy_text_properties)
+ (text_property_list, extend_property_ranges)
+ (verify_interval_modification): Use EMACS_INT for buffer
+ positions.
+
* term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT
for buffer positions.
validate_interval_range (Lisp_Object object, Lisp_Object *begin, Lisp_Object *end, int force)
{
register INTERVAL i;
- int searchpos;
+ EMACS_INT searchpos;
CHECK_STRING_OR_BUFFER (object);
CHECK_NUMBER_COERCE_MARKER (*begin);
}
else
{
- int len = SCHARS (object);
+ EMACS_INT len = SCHARS (object);
if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end)
&& XINT (*end) <= len))
interval_of (int position, Lisp_Object object)
{
register INTERVAL i;
- int beg, end;
+ EMACS_INT beg, end;
if (NILP (object))
XSETBUFFER (object, current_buffer);
/* Return 1 if there's a change in some property between BEG and END. */
int
-property_change_between_p (int beg, int end)
+property_change_between_p (EMACS_INT beg, EMACS_INT end)
{
register INTERVAL i, next;
Lisp_Object object, pos;
(Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object)
{
register INTERVAL i, unchanged;
- register int s, len, modified = 0;
+ register EMACS_INT s, len;
+ register int modified = 0;
struct gcpro gcpro1;
properties = validate_plist (properties);
skip it. */
if (interval_has_all_properties (properties, i))
{
- int got = (LENGTH (i) - (s - i->position));
+ EMACS_INT got = (LENGTH (i) - (s - i->position));
if (got >= len)
RETURN_UNGCPRO (Qnil);
len -= got;
set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object buffer, INTERVAL i)
{
register INTERVAL prev_changed = NULL_INTERVAL;
- register int s, len;
+ register EMACS_INT s, len;
INTERVAL unchanged;
s = XINT (start);
(Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object)
{
register INTERVAL i, unchanged;
- register int s, len, modified = 0;
+ register EMACS_INT s, len;
+ register int modified = 0;
if (NILP (object))
XSETBUFFER (object, current_buffer);
it covers the entire region. */
if (! interval_has_some_properties (properties, i))
{
- int got = (LENGTH (i) - (s - i->position));
+ EMACS_INT got = (LENGTH (i) - (s - i->position));
if (got >= len)
return Qnil;
len -= got;
(Lisp_Object start, Lisp_Object end, Lisp_Object list_of_properties, Lisp_Object object)
{
register INTERVAL i, unchanged;
- register int s, len, modified = 0;
+ register EMACS_INT s, len;
+ register int modified = 0;
Lisp_Object properties;
properties = list_of_properties;
it covers the entire region. */
if (! interval_has_some_properties_list (properties, i))
{
- int got = (LENGTH (i) - (s - i->position));
+ EMACS_INT got = (LENGTH (i) - (s - i->position));
if (got >= len)
return Qnil;
len -= got;
(Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object)
{
register INTERVAL i;
- register int e, pos;
+ register EMACS_INT e, pos;
if (NILP (object))
XSETBUFFER (object, current_buffer);
(Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object)
{
register INTERVAL i;
- register int s, e;
+ register EMACS_INT s, e;
if (NILP (object))
XSETBUFFER (object, current_buffer);
Lisp_Object res;
Lisp_Object stuff;
Lisp_Object plist;
- int s, e, e2, p, len, modified = 0;
+ EMACS_INT s, e, e2, p, len;
+ int modified = 0;
struct gcpro gcpro1, gcpro2;
i = validate_interval_range (src, &start, &end, soft);
i = validate_interval_range (object, &start, &end, soft);
if (!NULL_INTERVAL_P (i))
{
- int s = XINT (start);
- int e = XINT (end);
+ EMACS_INT s = XINT (start);
+ EMACS_INT e = XINT (end);
while (s < e)
{
- int interval_end, len;
+ EMACS_INT interval_end, len;
Lisp_Object plist;
interval_end = i->position + LENGTH (i);
extend_property_ranges (Lisp_Object list, Lisp_Object new_end)
{
Lisp_Object prev = Qnil, head = list;
- int max = XINT (new_end);
+ EMACS_INT max = XINT (new_end);
for (; CONSP (list); prev = list, list = XCDR (list))
{
if (start > end)
{
- int temp = start;
+ EMACS_INT temp = start;
start = end;
end = temp;
}
(Lisp_Object pos, Lisp_Object window, Lisp_Object partially)
{
register struct window *w;
- register int posint;
+ register EMACS_INT posint;
register struct buffer *buf;
struct text_pos top;
Lisp_Object in_window = Qnil;
(Lisp_Object window)
{
struct window *w;
- int startpos;
+ EMACS_INT startpos;
int top, new_top;
if (NILP (window))
redisplay_window has altered point after scrolling,
because it makes the change only in the window. */
{
- register int new_point = marker_position (w->pointm);
+ register EMACS_INT new_point = marker_position (w->pointm);
if (new_point < BEGV)
SET_PT (BEGV);
else if (new_point > ZV)
/* Maybe modify window start instead of scrolling. */
if (rbot > 0 || w->vscroll < 0)
{
- int spos;
+ EMACS_INT spos;
Fset_window_vscroll (window, make_number (0), Qt);
/* If there are other text lines above the current row,
start_display (&it, w, start);
if (whole)
{
- int start_pos = IT_CHARPOS (it);
+ EMACS_INT start_pos = IT_CHARPOS (it);
int dy = WINDOW_FRAME_LINE_HEIGHT (w);
dy = max ((window_box_height (w)
- next_screen_context_lines * dy),
if (! vscrolled)
{
- int pos = IT_CHARPOS (it);
- int bytepos;
+ EMACS_INT pos = IT_CHARPOS (it);
+ EMACS_INT bytepos;
/* If in the middle of a multi-glyph character move forward to
the next character. */
}
else if (n < 0)
{
- int charpos, bytepos;
+ EMACS_INT charpos, bytepos;
int partial_p;
/* Save our position, for the
window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror)
{
register struct window *w = XWINDOW (window);
- register int opoint = PT, opoint_byte = PT_BYTE;
- register int pos, pos_byte;
+ register EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
+ register EMACS_INT pos, pos_byte;
register int ht = window_internal_height (w);
register Lisp_Object tem;
int lose;
Lisp_Object bolp;
- int startpos;
+ EMACS_INT startpos;
Lisp_Object original_pos = Qnil;
/* If scrolling screen-fulls, compute the number of lines to
struct buffer *buf = XBUFFER (w->buffer);
struct buffer *obuf = current_buffer;
int center_p = 0;
- int charpos, bytepos;
+ EMACS_INT charpos, bytepos;
int iarg;
int this_scroll_margin;
Lisp_Object new_current_buffer;
Lisp_Object frame;
FRAME_PTR f;
- int old_point = -1;
+ EMACS_INT old_point = -1;
CHECK_WINDOW_CONFIGURATION (configuration);