emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103875: Replace some uses of `int' w


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103875: Replace some uses of `int' with EMACS_INT.
Date: Sat, 09 Apr 2011 19:35:19 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 103875
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2011-04-09 19:35:19 +0300
message:
  Replace some uses of `int' with EMACS_INT.
  
   src/search.c (string_match_1, fast_string_match)
   (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
   (scan_buffer, find_next_newline_no_quit)
   (find_before_next_newline, search_command, Freplace_match)
   (Fmatch_data): Make some `int' variables be EMACS_INT.
   src/xdisp.c (display_count_lines): 3rd argument and return value now
   EMACS_INT.  All callers changed.
   (pint2hrstr): Last argument is now EMACS_INT.
   src/coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
   (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
   (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
   (decode_coding_utf_16, decode_coding_emacs_mule)
   (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
   (decode_coding_ccl, decode_coding_charset)
   <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
   (decode_coding_iso_2022, decode_coding_emacs_mule)
   (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
   <char_offset, last_offset>: Declare EMACS_INT.
   (encode_coding_utf_8, encode_coding_utf_16)
   (encode_coding_emacs_mule, encode_invocation_designation)
   (encode_designation_at_bol, encode_coding_iso_2022)
   (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
   (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
   Declare EMACS_INT.
   (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
   (encode_invocation_designation): Last argument P_NCHARS is now
   EMACS_INT.
   (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
   (produce_chars): from_nchars and to_nchars are now EMACS_INT.
   src/coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
   All users changed.
   src/ccl.c (Fccl_execute_on_string): Declare some variables
   EMACS_INT.
modified:
  src/ChangeLog
  src/ccl.c
  src/coding.c
  src/coding.h
  src/editfns.c
  src/fileio.c
  src/lisp.h
  src/search.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-04-08 18:53:26 +0000
+++ b/src/ChangeLog     2011-04-09 16:35:19 +0000
@@ -1,3 +1,44 @@
+2011-04-09  Eli Zaretskii  <address@hidden>
+
+       Fix some uses of `int' instead of EMACS_INT.
+       * search.c (string_match_1, fast_string_match)
+       (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
+       (scan_buffer, find_next_newline_no_quit)
+       (find_before_next_newline, search_command, Freplace_match)
+       (Fmatch_data): Make some `int' variables be EMACS_INT.
+
+       * xdisp.c (display_count_lines): 3rd argument and return value now
+       EMACS_INT.  All callers changed.
+       (pint2hrstr): Last argument is now EMACS_INT.
+
+       * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
+       (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
+       (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
+       (decode_coding_utf_16, decode_coding_emacs_mule)
+       (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
+       (decode_coding_ccl, decode_coding_charset)
+       <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
+       (decode_coding_iso_2022, decode_coding_emacs_mule)
+       (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
+       <char_offset, last_offset>: Declare EMACS_INT.
+       (encode_coding_utf_8, encode_coding_utf_16)
+       (encode_coding_emacs_mule, encode_invocation_designation)
+       (encode_designation_at_bol, encode_coding_iso_2022)
+       (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
+       (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
+       Declare EMACS_INT.
+       (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
+       (encode_invocation_designation): Last argument P_NCHARS is now
+       EMACS_INT.
+       (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
+       (produce_chars): from_nchars and to_nchars are now EMACS_INT.
+
+       * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
+       All users changed.
+
+       * ccl.c (Fccl_execute_on_string): Declare some variables
+       EMACS_INT.
+
 2011-04-08  Svante Signell  <address@hidden>  (tiny change)
 
        * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).

=== modified file 'src/ccl.c'
--- a/src/ccl.c 2011-03-08 07:48:20 +0000
+++ b/src/ccl.c 2011-04-09 16:35:19 +0000
@@ -2049,7 +2049,7 @@
   Lisp_Object val;
   struct ccl_program ccl;
   int i;
-  int outbufsize;
+  EMACS_INT outbufsize;
   unsigned char *outbuf, *outp;
   EMACS_INT str_chars, str_bytes;
 #define CCL_EXECUTE_BUF_SIZE 1024

=== modified file 'src/coding.c'
--- a/src/coding.c      2011-04-05 06:41:53 +0000
+++ b/src/coding.c      2011-04-09 16:35:19 +0000
@@ -159,7 +159,7 @@
   const unsigned char *src = coding->source;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int found = 0;
   ...;
 
@@ -266,7 +266,7 @@
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
   unsigned char *adjusted_dst_end = dst_end - _MAX_BYTES_PRODUCED_IN_LOOP_;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
 
   for (; charbuf < charbuf_end && dst < adjusted_dst_end; charbuf++)
     {
@@ -943,7 +943,7 @@
   do {                                                         \
     if (dst + (bytes) >= dst_end)                              \
       {                                                                \
-       int more_bytes = charbuf_end - charbuf + (bytes);       \
+       EMACS_INT more_bytes = charbuf_end - charbuf + (bytes); \
                                                                \
        dst = alloc_destination (coding, more_bytes, dst);      \
        dst_end = coding->destination + coding->dst_bytes;      \
@@ -1208,7 +1208,7 @@
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int bom_found = 0;
   int found = 0;
 
@@ -1293,7 +1293,7 @@
   const unsigned char *src_base;
   int *charbuf = coding->charbuf + coding->charbuf_used;
   int *charbuf_end = coding->charbuf + coding->charbuf_size;
-  int consumed_chars = 0, consumed_chars_base = 0;
+  EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
   int multibytep = coding->src_multibyte;
   enum utf_bom_type bom = CODING_UTF_8_BOM (coding);
   int eol_dos =
@@ -1444,7 +1444,7 @@
   int *charbuf_end = charbuf + coding->charbuf_used;
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   int c;
 
   if (CODING_UTF_8_BOM (coding) == utf_with_bom)
@@ -1602,7 +1602,7 @@
   int *charbuf = coding->charbuf + coding->charbuf_used;
   /* We may produces at most 3 chars in one loop.  */
   int *charbuf_end = coding->charbuf + coding->charbuf_size - 2;
-  int consumed_chars = 0, consumed_chars_base = 0;
+  EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
   int multibytep = coding->src_multibyte;
   enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
   enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding);
@@ -1729,7 +1729,7 @@
   int safe_room = 8;
   enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
   int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   int c;
 
   if (bom != utf_without_bom)
@@ -1863,7 +1863,7 @@
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int c;
   int found = 0;
 
@@ -2331,10 +2331,10 @@
      loop and one more charset annotation at the end.  */
   int *charbuf_end
     = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
-  int consumed_chars = 0, consumed_chars_base;
+  EMACS_INT consumed_chars = 0, consumed_chars_base;
   int multibytep = coding->src_multibyte;
-  int char_offset = coding->produced_char;
-  int last_offset = char_offset;
+  EMACS_INT char_offset = coding->produced_char;
+  EMACS_INT last_offset = char_offset;
   int last_id = charset_ascii;
   int eol_dos =
     !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -2585,7 +2585,7 @@
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
   int safe_room = 8;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   Lisp_Object attrs, charset_list;
   int c;
   int preferred_charset_id = -1;
@@ -2943,7 +2943,7 @@
   int single_shifting = 0;
   int id;
   int c, c1;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int i;
   int rejected = 0;
   int found = 0;
@@ -3453,7 +3453,7 @@
      loop and one more charset annotation at the end.  */
   int *charbuf_end
     = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
-  int consumed_chars = 0, consumed_chars_base;
+  EMACS_INT consumed_chars = 0, consumed_chars_base;
   int multibytep = coding->src_multibyte;
   /* Charsets invoked to graphic plane 0 and 1 respectively.  */
   int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0);
@@ -3463,8 +3463,8 @@
   int c;
   struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding);
   Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
-  int char_offset = coding->produced_char;
-  int last_offset = char_offset;
+  EMACS_INT char_offset = coding->produced_char;
+  EMACS_INT last_offset = char_offset;
   int last_id = charset_ascii;
   int eol_dos =
     !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4190,10 +4190,10 @@
 static unsigned char *
 encode_invocation_designation (struct charset *charset,
                               struct coding_system *coding,
-                              unsigned char *dst, int *p_nchars)
+                              unsigned char *dst, EMACS_INT *p_nchars)
 {
   int multibytep = coding->dst_multibyte;
-  int produced_chars = *p_nchars;
+  EMACS_INT produced_chars = *p_nchars;
   int reg;                     /* graphic register number */
   int id = CHARSET_ID (charset);
 
@@ -4285,7 +4285,7 @@
   /* Table of charsets to be designated to each graphic register.  */
   int r[4];
   int c, found = 0, reg;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   int multibytep = coding->dst_multibyte;
   Lisp_Object attrs;
   Lisp_Object charset_list;
@@ -4340,7 +4340,7 @@
   int bol_designation
     = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL
        && CODING_ISO_BOL (coding));
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   Lisp_Object attrs, eol_type, charset_list;
   int ascii_compatible;
   int c;
@@ -4528,7 +4528,7 @@
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int found = 0;
   int c;
   Lisp_Object attrs, charset_list;
@@ -4585,7 +4585,7 @@
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int found = 0;
   int c;
 
@@ -4636,13 +4636,13 @@
      the end.  */
   int *charbuf_end
     = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
-  int consumed_chars = 0, consumed_chars_base;
+  EMACS_INT consumed_chars = 0, consumed_chars_base;
   int multibytep = coding->src_multibyte;
   struct charset *charset_roman, *charset_kanji, *charset_kana;
   struct charset *charset_kanji2;
   Lisp_Object attrs, charset_list, val;
-  int char_offset = coding->produced_char;
-  int last_offset = char_offset;
+  EMACS_INT char_offset = coding->produced_char;
+  EMACS_INT last_offset = char_offset;
   int last_id = charset_ascii;
   int eol_dos =
     !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4754,12 +4754,12 @@
      the end.  */
   int *charbuf_end
     = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
-  int consumed_chars = 0, consumed_chars_base;
+  EMACS_INT consumed_chars = 0, consumed_chars_base;
   int multibytep = coding->src_multibyte;
   struct charset *charset_roman, *charset_big5;
   Lisp_Object attrs, charset_list, val;
-  int char_offset = coding->produced_char;
-  int last_offset = char_offset;
+  EMACS_INT char_offset = coding->produced_char;
+  EMACS_INT last_offset = char_offset;
   int last_id = charset_ascii;
   int eol_dos =
     !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4856,7 +4856,7 @@
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
   int safe_room = 4;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   Lisp_Object attrs, charset_list, val;
   int ascii_compatible;
   struct charset *charset_kanji, *charset_kana;
@@ -4947,7 +4947,7 @@
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
   int safe_room = 4;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   Lisp_Object attrs, charset_list, val;
   int ascii_compatible;
   struct charset *charset_big5;
@@ -5022,10 +5022,10 @@
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int found = 0;
   unsigned char *valids;
-  int head_ascii = coding->head_ascii;
+  EMACS_INT head_ascii = coding->head_ascii;
   Lisp_Object attrs;
 
   detect_info->checked |= CATEGORY_MASK_CCL;
@@ -5062,7 +5062,7 @@
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int *charbuf = coding->charbuf + coding->charbuf_used;
   int *charbuf_end = coding->charbuf + coding->charbuf_size;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   int multibytep = coding->src_multibyte;
   struct ccl_program *ccl = &coding->spec.ccl->ccl;
   int source_charbuf[1024];
@@ -5134,7 +5134,8 @@
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
   int destination_charbuf[1024];
-  int i, produced_chars = 0;
+  EMACS_INT produced_chars = 0;
+  int i;
   Lisp_Object attrs, charset_list;
 
   CODING_GET_INFO (coding, attrs, charset_list);
@@ -5220,7 +5221,7 @@
   int *charbuf_end = coding->charbuf + coding->charbuf_used;
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   int c;
 
   if (multibytep)
@@ -5303,10 +5304,10 @@
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
-  int consumed_chars = 0;
+  EMACS_INT consumed_chars = 0;
   Lisp_Object attrs, valids, name;
   int found = 0;
-  int head_ascii = coding->head_ascii;
+  EMACS_INT head_ascii = coding->head_ascii;
   int check_latin_extra = 0;
 
   detect_info->checked |= CATEGORY_MASK_CHARSET;
@@ -5410,12 +5411,12 @@
      the end.  */
   int *charbuf_end
     = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
-  int consumed_chars = 0, consumed_chars_base;
+  EMACS_INT consumed_chars = 0, consumed_chars_base;
   int multibytep = coding->src_multibyte;
   Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
   Lisp_Object valids;
-  int char_offset = coding->produced_char;
-  int last_offset = char_offset;
+  EMACS_INT char_offset = coding->produced_char;
+  EMACS_INT last_offset = char_offset;
   int last_id = charset_ascii;
   int eol_dos =
     !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -5536,7 +5537,7 @@
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
   int safe_room = MAX_MULTIBYTE_LENGTH;
-  int produced_chars = 0;
+  EMACS_INT produced_chars = 0;
   Lisp_Object attrs, charset_list;
   int ascii_compatible;
   int c;
@@ -6444,7 +6445,7 @@
     }
   else if (EQ (eol_type, Qdos))
     {
-      int n = 0;
+      EMACS_INT n = 0;
 
       if (NILP (coding->dst_object))
        {
@@ -6459,9 +6460,9 @@
        }
       else
        {
-         int pos_byte = coding->dst_pos_byte;
-         int pos = coding->dst_pos;
-         int pos_end = pos + coding->produced_char - 1;
+         EMACS_INT pos_byte = coding->dst_pos_byte;
+         EMACS_INT pos = coding->dst_pos;
+         EMACS_INT pos_end = pos + coding->produced_char - 1;
 
          while (pos < pos_end)
            {
@@ -6646,7 +6647,7 @@
 
          if (c >= 0)
            {
-             int from_nchars = 1, to_nchars = 1;
+             EMACS_INT from_nchars = 1, to_nchars = 1;
              Lisp_Object trans = Qnil;
 
              LOOKUP_TRANSLATION_TABLE (translation_table, c, trans);

=== modified file 'src/coding.h'
--- a/src/coding.h      2011-01-25 04:08:28 +0000
+++ b/src/coding.h      2011-04-09 16:35:19 +0000
@@ -449,7 +449,7 @@
      -1 in setup_coding_system, and updated by detect_coding.  So,
      when this is equal to the byte length of the text being
      converted, we can skip the actual conversion process.  */
-  int head_ascii;
+  EMACS_INT head_ascii;
 
   /* The following members are set by encoding/decoding routine.  */
   EMACS_INT produced, produced_char, consumed, consumed_char;

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2011-03-30 00:17:26 +0000
+++ b/src/editfns.c     2011-04-09 16:35:19 +0000
@@ -750,7 +750,7 @@
     /* It is possible that NEW_POS is not within the same field as
        OLD_POS; try to move NEW_POS so that it is.  */
     {
-      int shortage;
+      EMACS_INT shortage;
       Lisp_Object field_bound;
 
       if (fwd)

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2011-04-03 00:32:10 +0000
+++ b/src/fileio.c      2011-04-09 16:35:19 +0000
@@ -271,7 +271,7 @@
       if (CONSP (elt))
        {
          Lisp_Object string = XCAR (elt);
-         int match_pos;
+         EMACS_INT match_pos;
          Lisp_Object handler = XCDR (elt);
          Lisp_Object operations = Qnil;
 

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2011-04-08 15:37:15 +0000
+++ b/src/lisp.h        2011-04-09 16:35:19 +0000
@@ -2775,6 +2775,8 @@
 extern void write_string (const char *, int);
 extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
                                 Lisp_Object);
+extern Lisp_Object internal_with_output_to_temp_buffer
+        (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
 #define FLOAT_TO_STRING_BUFSIZE 350
 extern void float_to_string (char *, double);
 extern void syms_of_print (void);
@@ -3044,13 +3046,13 @@
 extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
                                                  struct re_registers *,
                                                  Lisp_Object, int, int);
-extern int fast_string_match (Lisp_Object, Lisp_Object);
-extern int fast_c_string_match_ignore_case (Lisp_Object, const char *);
-extern int fast_string_match_ignore_case (Lisp_Object, Lisp_Object);
+extern EMACS_INT fast_string_match (Lisp_Object, Lisp_Object);
+extern EMACS_INT fast_c_string_match_ignore_case (Lisp_Object, const char *);
+extern EMACS_INT fast_string_match_ignore_case (Lisp_Object, Lisp_Object);
 extern EMACS_INT fast_looking_at (Lisp_Object, EMACS_INT, EMACS_INT,
                                   EMACS_INT, EMACS_INT, Lisp_Object);
 extern EMACS_INT scan_buffer (int, EMACS_INT, EMACS_INT, EMACS_INT,
-                             int *, int);
+                             EMACS_INT *, int);
 extern EMACS_INT scan_newline (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
                               EMACS_INT, int);
 extern EMACS_INT find_next_newline (EMACS_INT, int);

=== modified file 'src/search.c'
--- a/src/search.c      2011-04-03 04:21:50 +0000
+++ b/src/search.c      2011-04-09 16:35:19 +0000
@@ -368,7 +368,7 @@
 static Lisp_Object
 string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int 
posix)
 {
-  int val;
+  EMACS_INT val;
   struct re_pattern_buffer *bufp;
   EMACS_INT pos, pos_byte;
   int i;
@@ -468,10 +468,10 @@
    and return the index of the match, or negative on failure.
    This does not clobber the match data.  */
 
-int
+EMACS_INT
 fast_string_match (Lisp_Object regexp, Lisp_Object string)
 {
-  int val;
+  EMACS_INT val;
   struct re_pattern_buffer *bufp;
 
   bufp = compile_pattern (regexp, 0, Qnil,
@@ -491,10 +491,10 @@
    This does not clobber the match data.
    We assume that STRING contains single-byte characters.  */
 
-int
+EMACS_INT
 fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string)
 {
-  int val;
+  EMACS_INT val;
   struct re_pattern_buffer *bufp;
   size_t len = strlen (string);
 
@@ -511,10 +511,10 @@
 
 /* Like fast_string_match but ignore case.  */
 
-int
+EMACS_INT
 fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
 {
-  int val;
+  EMACS_INT val;
   struct re_pattern_buffer *bufp;
 
   bufp = compile_pattern (regexp, 0, Vascii_canon_table,
@@ -643,7 +643,7 @@
 
 EMACS_INT
 scan_buffer (register int target, EMACS_INT start, EMACS_INT end,
-            EMACS_INT count, int *shortage, int allow_quit)
+            EMACS_INT count, EMACS_INT *shortage, int allow_quit)
 {
   struct region_cache *newline_cache;
   int direction;
@@ -933,7 +933,7 @@
 EMACS_INT
 find_next_newline_no_quit (EMACS_INT from, EMACS_INT cnt)
 {
-  return scan_buffer ('\n', from, 0, cnt, (int *) 0, 0);
+  return scan_buffer ('\n', from, 0, cnt, (EMACS_INT *) 0, 0);
 }
 
 /* Like find_next_newline, but returns position before the newline,
@@ -943,7 +943,7 @@
 EMACS_INT
 find_before_next_newline (EMACS_INT from, EMACS_INT to, EMACS_INT cnt)
 {
-  int shortage;
+  EMACS_INT shortage;
   EMACS_INT pos = scan_buffer ('\n', from, to, cnt, &shortage, 1);
 
   if (shortage == 0)
@@ -958,9 +958,9 @@
 search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
                Lisp_Object count, int direction, int RE, int posix)
 {
-  register int np;
+  register EMACS_INT np;
   EMACS_INT lim, lim_byte;
-  int n = direction;
+  EMACS_INT n = direction;
 
   if (!NILP (count))
     {
@@ -2524,7 +2524,7 @@
          /* We build up the substituted string in ACCUM.  */
          Lisp_Object accum;
          Lisp_Object middle;
-         int length = SBYTES (newtext);
+         EMACS_INT length = SBYTES (newtext);
 
          accum = Qnil;
 
@@ -2880,7 +2880,7 @@
   len = 0;
   for (i = 0; i < search_regs.num_regs; i++)
     {
-      int start = search_regs.start[i];
+      EMACS_INT start = search_regs.start[i];
       if (start >= 0)
        {
          if (EQ (last_thing_searched, Qt)

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-04-05 20:11:37 +0000
+++ b/src/xdisp.c       2011-04-09 16:35:19 +0000
@@ -763,7 +763,7 @@
 static void handle_line_prefix (struct it *);
 
 static void pint2str (char *, int, EMACS_INT);
-static void pint2hrstr (char *, int, int);
+static void pint2hrstr (char *, int, EMACS_INT);
 static struct text_pos run_window_scroll_functions (Lisp_Object,
                                                     struct text_pos);
 static void reconsider_clip_changes (struct window *, struct buffer *);
@@ -825,7 +825,8 @@
 static int store_mode_line_string (const char *, Lisp_Object, int, int, int, 
Lisp_Object);
 static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
 static void display_menu_bar (struct window *);
-static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *);
+static EMACS_INT display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT,
+                                     EMACS_INT *);
 static int display_string (const char *, Lisp_Object, Lisp_Object,
                            EMACS_INT, EMACS_INT, struct it *, int, int, int, 
int);
 static void compute_line_metrics (struct it *);
@@ -19107,11 +19108,11 @@
   };
 
 static void
-pint2hrstr (char *buf, int width, int d)
+pint2hrstr (char *buf, int width, EMACS_INT d)
 {
   /* We aim to represent the nonnegative integer D as
      QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
-  int quotient = d;
+  EMACS_INT quotient = d;
   int remainder = 0;
   /* -1 means: do not use TENTHS. */
   int tenths = -1;
@@ -19437,7 +19438,7 @@
     case 'l':
       {
        EMACS_INT startpos, startpos_byte, line, linepos, linepos_byte;
-       int topline, nlines, height;
+       EMACS_INT topline, nlines, height;
        EMACS_INT junk;
 
        /* %c and %l are ignored in `frame-title-format'.  */
@@ -19502,7 +19503,8 @@
            EMACS_INT limit = BUF_BEGV (b);
            EMACS_INT limit_byte = BUF_BEGV_BYTE (b);
            EMACS_INT position;
-           int distance = (height * 2 + 30) * line_number_display_limit_width;
+           EMACS_INT distance = 
+             (height * 2 + 30) * line_number_display_limit_width;
 
            if (startpos - distance > limit)
              {
@@ -19705,17 +19707,17 @@
 
    Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT.  */
 
-static int
+static EMACS_INT
 display_count_lines (EMACS_INT start_byte,
-                    EMACS_INT limit_byte, int count,
+                    EMACS_INT limit_byte, EMACS_INT count,
                     EMACS_INT *byte_pos_ptr)
 {
   register unsigned char *cursor;
   unsigned char *base;
 
-  register int ceiling;
+  register EMACS_INT ceiling;
   register unsigned char *ceiling_addr;
-  int orig_count = count;
+  EMACS_INT orig_count = count;
 
   /* If we are not in selective display mode,
      check only for newlines.  */


reply via email to

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