emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101607: Fix int/EMACS_INT use in tex


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101607: Fix int/EMACS_INT use in textprop.c and window.c.
Date: Sat, 25 Sep 2010 09:21:20 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101607
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2010-09-25 09:21:20 -0400
message:
  Fix int/EMACS_INT use in textprop.c and window.c.
  
   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.
modified:
  src/ChangeLog
  src/textprop.c
  src/window.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-09-25 12:31:15 +0000
+++ b/src/ChangeLog     2010-09-25 13:21:20 +0000
@@ -1,5 +1,19 @@
 2010-09-25  Eli Zaretskii  <address@hidden>
 
+       * 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.
 

=== modified file 'src/textprop.c'
--- a/src/textprop.c    2010-07-08 21:25:08 +0000
+++ b/src/textprop.c    2010-09-25 13:21:20 +0000
@@ -125,7 +125,7 @@
 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);
@@ -161,7 +161,7 @@
     }
   else
     {
-      int len = SCHARS (object);
+      EMACS_INT len = SCHARS (object);
 
       if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end)
             && XINT (*end) <= len))
@@ -519,7 +519,7 @@
 interval_of (int position, Lisp_Object object)
 {
   register INTERVAL i;
-  int beg, end;
+  EMACS_INT beg, end;
 
   if (NILP (object))
     XSETBUFFER (object, current_buffer);
@@ -984,7 +984,7 @@
 /* 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;
@@ -1173,7 +1173,8 @@
   (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);
@@ -1202,7 +1203,7 @@
          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;
@@ -1377,7 +1378,7 @@
 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);
@@ -1466,7 +1467,8 @@
   (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);
@@ -1484,7 +1486,7 @@
          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;
@@ -1551,7 +1553,8 @@
   (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;
 
@@ -1571,7 +1574,7 @@
          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;
@@ -1658,7 +1661,7 @@
   (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);
@@ -1694,7 +1697,7 @@
   (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);
@@ -1806,7 +1809,8 @@
   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);
@@ -1902,12 +1906,12 @@
   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);
@@ -1985,7 +1989,7 @@
 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))
     {
@@ -2059,7 +2063,7 @@
 
   if (start > end)
     {
-      int temp = start;
+      EMACS_INT temp = start;
       start = end;
       end = temp;
     }

=== modified file 'src/window.c'
--- a/src/window.c      2010-08-06 11:04:29 +0000
+++ b/src/window.c      2010-09-25 13:21:20 +0000
@@ -311,7 +311,7 @@
   (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;
@@ -2500,7 +2500,7 @@
   (Lisp_Object window)
 {
   struct window *w;
-  int startpos;
+  EMACS_INT startpos;
   int top, new_top;
 
   if (NILP (window))
@@ -3629,7 +3629,7 @@
      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)
@@ -4848,7 +4848,7 @@
              /* 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,
@@ -4902,7 +4902,7 @@
   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),
@@ -4981,8 +4981,8 @@
 
   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.  */
@@ -5052,7 +5052,7 @@
     }
   else if (n < 0)
     {
-      int charpos, bytepos;
+      EMACS_INT charpos, bytepos;
       int partial_p;
 
       /* Save our position, for the
@@ -5122,13 +5122,13 @@
 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
@@ -5573,7 +5573,7 @@
   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;
 
@@ -5914,7 +5914,7 @@
   Lisp_Object new_current_buffer;
   Lisp_Object frame;
   FRAME_PTR f;
-  int old_point = -1;
+  EMACS_INT old_point = -1;
 
   CHECK_WINDOW_CONFIGURATION (configuration);
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]