diff src/editfns.c @ 110480:5290c80fda43

Fix some uses of int instead of EMACS_INT. minibuf.c (Fminibuffer_contents) (Fminibuffer_contents_no_properties) (Fminibuffer_completion_contents): Use EMACS_INT for minibuffer positions. keyboard.c (command_loop_1): Use EMACS_INT to compare point with mark. alloc.c (make_uninit_string, make_uninit_multibyte_string) (allocate_string_data): Accept EMACS_INT for string length. editfns.c (Ffield_string, Ffield_string_no_properties) (make_buffer_string, make_buffer_string_both, Fbuffer_substring) (Fbuffer_substring_no_properties, find_field, Fdelete_field) (Ffield_string, Ffield_string_no_properties, Ffield_beginning) (Ffield_end): Use EMACS_INT for buffer positions. insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare point with mark. lisp.h (allocate_string_data, make_uninit_string) (make_uninit_multibyte_string, make_buffer_string) (make_buffer_string_both): Adjust prototypes.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 22 Sep 2010 12:03:34 -0400
parents 4d54e23aa31e
children 7ca55779eeef
line wrap: on
line diff
--- a/src/editfns.c	Wed Sep 22 13:34:37 2010 +0000
+++ b/src/editfns.c	Wed Sep 22 12:03:34 2010 -0400
@@ -94,7 +94,8 @@
 #endif
 
 static int tm_diff (struct tm *, struct tm *);
-static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *);
+static void find_field (Lisp_Object, Lisp_Object, Lisp_Object,
+			EMACS_INT *, Lisp_Object, EMACS_INT *);
 static void update_buffer_properties (int, int);
 static Lisp_Object region_limit (int);
 static size_t emacs_memftimeu (char *, size_t, const char *,
@@ -515,7 +516,9 @@
    is not stored.  */
 
 static void
-find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, Lisp_Object beg_limit, int *beg, Lisp_Object end_limit, int *end)
+find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
+	    Lisp_Object beg_limit,
+	    EMACS_INT *beg, Lisp_Object end_limit, EMACS_INT *end)
 {
   /* Fields right before and after the point.  */
   Lisp_Object before_field, after_field;
@@ -631,7 +634,7 @@
 If POS is nil, the value of point is used for POS.  */)
   (Lisp_Object pos)
 {
-  int beg, end;
+  EMACS_INT beg, end;
   find_field (pos, Qnil, Qnil, &beg, Qnil, &end);
   if (beg != end)
     del_range (beg, end);
@@ -644,7 +647,7 @@
 If POS is nil, the value of point is used for POS.  */)
   (Lisp_Object pos)
 {
-  int beg, end;
+  EMACS_INT beg, end;
   find_field (pos, Qnil, Qnil, &beg, Qnil, &end);
   return make_buffer_string (beg, end, 1);
 }
@@ -655,7 +658,7 @@
 If POS is nil, the value of point is used for POS.  */)
   (Lisp_Object pos)
 {
-  int beg, end;
+  EMACS_INT beg, end;
   find_field (pos, Qnil, Qnil, &beg, Qnil, &end);
   return make_buffer_string (beg, end, 0);
 }
@@ -670,7 +673,7 @@
 is before LIMIT, then LIMIT will be returned instead.  */)
   (Lisp_Object pos, Lisp_Object escape_from_edge, Lisp_Object limit)
 {
-  int beg;
+  EMACS_INT beg;
   find_field (pos, escape_from_edge, limit, &beg, Qnil, 0);
   return make_number (beg);
 }
@@ -685,7 +688,7 @@
 is after LIMIT, then LIMIT will be returned instead.  */)
   (Lisp_Object pos, Lisp_Object escape_from_edge, Lisp_Object limit)
 {
-  int end;
+  EMACS_INT end;
   find_field (pos, escape_from_edge, Qnil, 0, limit, &end);
   return make_number (end);
 }
@@ -2343,10 +2346,10 @@
    buffer substrings.  */
 
 Lisp_Object
-make_buffer_string (int start, int end, int props)
+make_buffer_string (EMACS_INT start, EMACS_INT end, int props)
 {
-  int start_byte = CHAR_TO_BYTE (start);
-  int end_byte = CHAR_TO_BYTE (end);
+  EMACS_INT start_byte = CHAR_TO_BYTE (start);
+  EMACS_INT end_byte = CHAR_TO_BYTE (end);
 
   return make_buffer_string_both (start, start_byte, end, end_byte, props);
 }
@@ -2367,7 +2370,8 @@
    buffer substrings.  */
 
 Lisp_Object
-make_buffer_string_both (int start, int start_byte, int end, int end_byte, int props)
+make_buffer_string_both (EMACS_INT start, EMACS_INT start_byte,
+			 EMACS_INT end, EMACS_INT end_byte, int props)
 {
   Lisp_Object result, tem, tem1;
 
@@ -2439,7 +2443,7 @@
 use `buffer-substring-no-properties' instead.  */)
   (Lisp_Object start, Lisp_Object end)
 {
-  register int b, e;
+  register EMACS_INT b, e;
 
   validate_region (&start, &end);
   b = XINT (start);
@@ -2455,7 +2459,7 @@
 they can be in either order.  */)
   (Lisp_Object start, Lisp_Object end)
 {
-  register int b, e;
+  register EMACS_INT b, e;
 
   validate_region (&start, &end);
   b = XINT (start);