emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101597: Fix int/EMACS_INT in eval.c


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101597: Fix int/EMACS_INT in eval.c and indent.c, correct previous changes.
Date: Fri, 24 Sep 2010 15:30:13 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101597
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2010-09-24 15:30:13 -0400
message:
  Fix int/EMACS_INT in eval.c and indent.c, correct previous changes.
  
   indent.c (Fcurrent_indentation, indented_beyond_p)
   (compute_motion): Use EMACS_INT for buffer position variables.
   lisp.h (indented_beyond_p): Adjust prototype.
   buffer.c (overlay_strings): Return EMACS_INT.
   buffer.h (overlay_strings): Adjust prototype.
   region-cache.c (pp_cache): Adjust format to arguments.
   eval.c <specpdl_size, lisp_eval_depth>: Declare EMACS_INT.
   (call_debugger): Use EMACS_INT for specpdl_size related variables.
   (verror): Use EMACS_INT for size of allocated buffer.
modified:
  src/ChangeLog
  src/buffer.c
  src/buffer.h
  src/eval.c
  src/indent.c
  src/lisp.h
  src/region-cache.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-09-24 18:04:26 +0000
+++ b/src/ChangeLog     2010-09-24 19:30:13 +0000
@@ -1,5 +1,20 @@
 2010-09-24  Eli Zaretskii  <address@hidden>
 
+       * indent.c (Fcurrent_indentation, indented_beyond_p)
+       (compute_motion): Use EMACS_INT for buffer position variables.
+
+       * lisp.h (indented_beyond_p): Adjust prototype.
+
+       * buffer.c (overlay_strings): Return EMACS_INT.
+
+       * buffer.h (overlay_strings): Adjust prototype.
+
+       * region-cache.c (pp_cache): Adjust format to arguments.
+
+       * eval.c <specpdl_size, lisp_eval_depth>: Declare EMACS_INT.
+       (call_debugger): Use EMACS_INT for specpdl_size related variables.
+       (verror): Use EMACS_INT for size of allocated buffer.
+
        * keyboard.c (make_lispy_position): Use EMACS_INT for buffer
        positions.
 

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2010-09-24 12:45:09 +0000
+++ b/src/buffer.c      2010-09-24 19:30:13 +0000
@@ -3134,7 +3134,7 @@
    PSTR, if that variable is non-null.  The string may be overwritten by
    subsequent calls.  */
 
-int
+EMACS_INT
 overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
 {
   Lisp_Object overlay, window, str;

=== modified file 'src/buffer.h'
--- a/src/buffer.h      2010-07-11 18:34:43 +0000
+++ b/src/buffer.h      2010-09-24 19:30:13 +0000
@@ -865,7 +865,7 @@
                         EMACS_INT *prev_ptr, int change_req);
 extern int sort_overlays (Lisp_Object *, int, struct window *);
 extern void recenter_overlay_lists (struct buffer *, EMACS_INT);
-extern int overlay_strings (EMACS_INT, struct window *, unsigned char **);
+extern EMACS_INT overlay_strings (EMACS_INT, struct window *, unsigned char 
**);
 extern void validate_region (Lisp_Object *, Lisp_Object *);
 extern void set_buffer_internal (struct buffer *);
 extern void set_buffer_internal_1 (struct buffer *);

=== modified file 'src/eval.c'
--- a/src/eval.c        2010-09-24 15:01:03 +0000
+++ b/src/eval.c        2010-09-24 19:30:13 +0000
@@ -79,7 +79,7 @@
 
 /* Current number of specbindings allocated in specpdl.  */
 
-int specpdl_size;
+EMACS_INT specpdl_size;
 
 /* Pointer to beginning of specpdl.  */
 
@@ -95,7 +95,7 @@
 
 /* Depth in Lisp evaluations and function calls.  */
 
-int lisp_eval_depth;
+EMACS_INT lisp_eval_depth;
 
 /* Maximum allowed depth in Lisp evaluations and function calls.  */
 
@@ -216,7 +216,7 @@
   int debug_while_redisplaying;
   int count = SPECPDL_INDEX ();
   Lisp_Object val;
-  int old_max = max_specpdl_size;
+  EMACS_INT old_max = max_specpdl_size;
 
   /* Temporarily bump up the stack limits,
      so the debugger won't run out of stack.  */
@@ -1992,7 +1992,7 @@
 verror (const char *m, va_list ap)
 {
   char buf[200];
-  int size = 200;
+  EMACS_INT size = 200;
   int mlen;
   char *buffer = buf;
   char *args[3];

=== modified file 'src/indent.c'
--- a/src/indent.c      2010-09-23 18:35:11 +0000
+++ b/src/indent.c      2010-09-24 19:30:13 +0000
@@ -865,7 +865,7 @@
   (void)
 {
   Lisp_Object val;
-  int opoint = PT, opoint_byte = PT_BYTE;
+  EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
 
   scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
 
@@ -964,10 +964,10 @@
    preceding line.  */
 
 int
-indented_beyond_p (int pos, int pos_byte, double column)
+indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column)
 {
   double val;
-  int opoint = PT, opoint_byte = PT_BYTE;
+  EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
 
   SET_PT_BOTH (pos, pos_byte);
   while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n')
@@ -1254,7 +1254,7 @@
               to be changed here.  */
            {
              unsigned char *ovstr;
-             int ovlen = overlay_strings (pos, win, &ovstr);
+             EMACS_INT ovlen = overlay_strings (pos, win, &ovstr);
              hpos += ((multibyte && ovlen > 0)
                       ? strwidth (ovstr, ovlen) : ovlen);
            }
@@ -1459,7 +1459,7 @@
              want to skip over it for some other reason.  */
           if (common_width != 0)
             {
-              int run_end_hpos;
+              EMACS_INT run_end_hpos;
 
               /* Don't go past the final buffer posn the user
                  requested.  */

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2010-09-24 15:01:03 +0000
+++ b/src/lisp.h        2010-09-24 19:30:13 +0000
@@ -1877,7 +1877,7 @@
 
 extern struct specbinding *specpdl;
 extern struct specbinding *specpdl_ptr;
-extern int specpdl_size;
+extern EMACS_INT specpdl_size;
 
 extern EMACS_INT max_specpdl_size;
 
@@ -3241,7 +3241,7 @@
 EXFUN (Fmove_to_column, 2);
 extern double current_column (void);
 extern void invalidate_current_column (void);
-extern int indented_beyond_p (int, int, double);
+extern int indented_beyond_p (EMACS_INT, EMACS_INT, double);
 extern void syms_of_indent (void);
 
 /* Defined in frame.c */

=== modified file 'src/region-cache.c'
--- a/src/region-cache.c        2010-09-24 15:13:43 +0000
+++ b/src/region-cache.c        2010-09-24 19:30:13 +0000
@@ -788,9 +788,9 @@
   EMACS_INT end_u = c->buffer_end - c->end_unchanged;
 
   fprintf (stderr,
-           "basis: %d..%d    modified: %d..%d\n",
-           c->buffer_beg, c->buffer_end,
-           beg_u, end_u);
+           "basis: %ld..%ld    modified: %ld..%ld\n",
+           (long)c->buffer_beg, (long)c->buffer_end,
+           (long)beg_u, (long)end_u);
 
   for (i = 0; i < c->cache_len; i++)
     {
@@ -804,7 +804,7 @@
              : (pos == end_u) ? '-'
              : ' '),
             stderr);
-      fprintf (stderr, "%d : %d\n", pos, BOUNDARY_VALUE (c, i));
+      fprintf (stderr, "%ld : %d\n", (long)pos, BOUNDARY_VALUE (c, i));
     }
 }
 


reply via email to

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