Commit a53e2e89 authored by Eli Zaretskii's avatar Eli Zaretskii

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.
parent 04f33f1e
2011-04-09 Eli Zaretskii <eliz@emacstest.gnu.org>
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 <svante.signell@telia.com> (tiny change) 2011-04-08 Svante Signell <svante.signell@telia.com> (tiny change)
* term.c (init_tty): Fix incorrect ifdef placement (Bug#8450). * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
......
...@@ -2049,7 +2049,7 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY ...@@ -2049,7 +2049,7 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY
Lisp_Object val; Lisp_Object val;
struct ccl_program ccl; struct ccl_program ccl;
int i; int i;
int outbufsize; EMACS_INT outbufsize;
unsigned char *outbuf, *outp; unsigned char *outbuf, *outp;
EMACS_INT str_chars, str_bytes; EMACS_INT str_chars, str_bytes;
#define CCL_EXECUTE_BUF_SIZE 1024 #define CCL_EXECUTE_BUF_SIZE 1024
......
...@@ -159,7 +159,7 @@ detect_coding_XXX (struct coding_system *coding, ...@@ -159,7 +159,7 @@ detect_coding_XXX (struct coding_system *coding,
const unsigned char *src = coding->source; const unsigned char *src = coding->source;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int found = 0; int found = 0;
...; ...;
...@@ -266,7 +266,7 @@ encode_coding_XXX (struct coding_system *coding) ...@@ -266,7 +266,7 @@ encode_coding_XXX (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
unsigned char *adjusted_dst_end = dst_end - _MAX_BYTES_PRODUCED_IN_LOOP_; 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++) for (; charbuf < charbuf_end && dst < adjusted_dst_end; charbuf++)
{ {
...@@ -943,7 +943,7 @@ record_conversion_result (struct coding_system *coding, ...@@ -943,7 +943,7 @@ record_conversion_result (struct coding_system *coding,
do { \ do { \
if (dst + (bytes) >= dst_end) \ 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 = alloc_destination (coding, more_bytes, dst); \
dst_end = coding->destination + coding->dst_bytes; \ dst_end = coding->destination + coding->dst_bytes; \
...@@ -1208,7 +1208,7 @@ detect_coding_utf_8 (struct coding_system *coding, ...@@ -1208,7 +1208,7 @@ detect_coding_utf_8 (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base; const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int bom_found = 0; int bom_found = 0;
int found = 0; int found = 0;
...@@ -1293,7 +1293,7 @@ decode_coding_utf_8 (struct coding_system *coding) ...@@ -1293,7 +1293,7 @@ decode_coding_utf_8 (struct coding_system *coding)
const unsigned char *src_base; const unsigned char *src_base;
int *charbuf = coding->charbuf + coding->charbuf_used; int *charbuf = coding->charbuf + coding->charbuf_used;
int *charbuf_end = coding->charbuf + coding->charbuf_size; 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; int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_8_BOM (coding); enum utf_bom_type bom = CODING_UTF_8_BOM (coding);
int eol_dos = int eol_dos =
...@@ -1444,7 +1444,7 @@ encode_coding_utf_8 (struct coding_system *coding) ...@@ -1444,7 +1444,7 @@ encode_coding_utf_8 (struct coding_system *coding)
int *charbuf_end = charbuf + coding->charbuf_used; int *charbuf_end = charbuf + coding->charbuf_used;
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int produced_chars = 0; EMACS_INT produced_chars = 0;
int c; int c;
if (CODING_UTF_8_BOM (coding) == utf_with_bom) if (CODING_UTF_8_BOM (coding) == utf_with_bom)
...@@ -1602,7 +1602,7 @@ decode_coding_utf_16 (struct coding_system *coding) ...@@ -1602,7 +1602,7 @@ decode_coding_utf_16 (struct coding_system *coding)
int *charbuf = coding->charbuf + coding->charbuf_used; int *charbuf = coding->charbuf + coding->charbuf_used;
/* We may produces at most 3 chars in one loop. */ /* We may produces at most 3 chars in one loop. */
int *charbuf_end = coding->charbuf + coding->charbuf_size - 2; 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; int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_16_BOM (coding); enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding);
...@@ -1729,7 +1729,7 @@ encode_coding_utf_16 (struct coding_system *coding) ...@@ -1729,7 +1729,7 @@ encode_coding_utf_16 (struct coding_system *coding)
int safe_room = 8; int safe_room = 8;
enum utf_bom_type bom = CODING_UTF_16_BOM (coding); enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian; int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian;
int produced_chars = 0; EMACS_INT produced_chars = 0;
int c; int c;
if (bom != utf_without_bom) if (bom != utf_without_bom)
...@@ -1863,7 +1863,7 @@ detect_coding_emacs_mule (struct coding_system *coding, ...@@ -1863,7 +1863,7 @@ detect_coding_emacs_mule (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base; const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int c; int c;
int found = 0; int found = 0;
...@@ -2331,10 +2331,10 @@ decode_coding_emacs_mule (struct coding_system *coding) ...@@ -2331,10 +2331,10 @@ decode_coding_emacs_mule (struct coding_system *coding)
loop and one more charset annotation at the end. */ loop and one more charset annotation at the end. */
int *charbuf_end int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); = 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 multibytep = coding->src_multibyte;
int char_offset = coding->produced_char; EMACS_INT char_offset = coding->produced_char;
int last_offset = char_offset; EMACS_INT last_offset = char_offset;
int last_id = charset_ascii; int last_id = charset_ascii;
int eol_dos = int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
...@@ -2585,7 +2585,7 @@ encode_coding_emacs_mule (struct coding_system *coding) ...@@ -2585,7 +2585,7 @@ encode_coding_emacs_mule (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 8; int safe_room = 8;
int produced_chars = 0; EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list; Lisp_Object attrs, charset_list;
int c; int c;
int preferred_charset_id = -1; int preferred_charset_id = -1;
...@@ -2943,7 +2943,7 @@ detect_coding_iso_2022 (struct coding_system *coding, ...@@ -2943,7 +2943,7 @@ detect_coding_iso_2022 (struct coding_system *coding,
int single_shifting = 0; int single_shifting = 0;
int id; int id;
int c, c1; int c, c1;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int i; int i;
int rejected = 0; int rejected = 0;
int found = 0; int found = 0;
...@@ -3453,7 +3453,7 @@ decode_coding_iso_2022 (struct coding_system *coding) ...@@ -3453,7 +3453,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
loop and one more charset annotation at the end. */ loop and one more charset annotation at the end. */
int *charbuf_end int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); = 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 multibytep = coding->src_multibyte;
/* Charsets invoked to graphic plane 0 and 1 respectively. */ /* Charsets invoked to graphic plane 0 and 1 respectively. */
int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0); int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0);
...@@ -3463,8 +3463,8 @@ decode_coding_iso_2022 (struct coding_system *coding) ...@@ -3463,8 +3463,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
int c; int c;
struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding); struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding);
Lisp_Object attrs = CODING_ID_ATTRS (coding->id); Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
int char_offset = coding->produced_char; EMACS_INT char_offset = coding->produced_char;
int last_offset = char_offset; EMACS_INT last_offset = char_offset;
int last_id = charset_ascii; int last_id = charset_ascii;
int eol_dos = int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
...@@ -4190,10 +4190,10 @@ decode_coding_iso_2022 (struct coding_system *coding) ...@@ -4190,10 +4190,10 @@ decode_coding_iso_2022 (struct coding_system *coding)
static unsigned char * static unsigned char *
encode_invocation_designation (struct charset *charset, encode_invocation_designation (struct charset *charset,
struct coding_system *coding, struct coding_system *coding,
unsigned char *dst, int *p_nchars) unsigned char *dst, EMACS_INT *p_nchars)
{ {
int multibytep = coding->dst_multibyte; int multibytep = coding->dst_multibyte;
int produced_chars = *p_nchars; EMACS_INT produced_chars = *p_nchars;
int reg; /* graphic register number */ int reg; /* graphic register number */
int id = CHARSET_ID (charset); int id = CHARSET_ID (charset);
...@@ -4285,7 +4285,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf, ...@@ -4285,7 +4285,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
/* Table of charsets to be designated to each graphic register. */ /* Table of charsets to be designated to each graphic register. */
int r[4]; int r[4];
int c, found = 0, reg; int c, found = 0, reg;
int produced_chars = 0; EMACS_INT produced_chars = 0;
int multibytep = coding->dst_multibyte; int multibytep = coding->dst_multibyte;
Lisp_Object attrs; Lisp_Object attrs;
Lisp_Object charset_list; Lisp_Object charset_list;
...@@ -4340,7 +4340,7 @@ encode_coding_iso_2022 (struct coding_system *coding) ...@@ -4340,7 +4340,7 @@ encode_coding_iso_2022 (struct coding_system *coding)
int bol_designation int bol_designation
= (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL
&& CODING_ISO_BOL (coding)); && CODING_ISO_BOL (coding));
int produced_chars = 0; EMACS_INT produced_chars = 0;
Lisp_Object attrs, eol_type, charset_list; Lisp_Object attrs, eol_type, charset_list;
int ascii_compatible; int ascii_compatible;
int c; int c;
...@@ -4528,7 +4528,7 @@ detect_coding_sjis (struct coding_system *coding, ...@@ -4528,7 +4528,7 @@ detect_coding_sjis (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base; const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int found = 0; int found = 0;
int c; int c;
Lisp_Object attrs, charset_list; Lisp_Object attrs, charset_list;
...@@ -4585,7 +4585,7 @@ detect_coding_big5 (struct coding_system *coding, ...@@ -4585,7 +4585,7 @@ detect_coding_big5 (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base; const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int found = 0; int found = 0;
int c; int c;
...@@ -4636,13 +4636,13 @@ decode_coding_sjis (struct coding_system *coding) ...@@ -4636,13 +4636,13 @@ decode_coding_sjis (struct coding_system *coding)
the end. */ the end. */
int *charbuf_end int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); = 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; int multibytep = coding->src_multibyte;
struct charset *charset_roman, *charset_kanji, *charset_kana; struct charset *charset_roman, *charset_kanji, *charset_kana;
struct charset *charset_kanji2; struct charset *charset_kanji2;
Lisp_Object attrs, charset_list, val; Lisp_Object attrs, charset_list, val;
int char_offset = coding->produced_char; EMACS_INT char_offset = coding->produced_char;
int last_offset = char_offset; EMACS_INT last_offset = char_offset;
int last_id = charset_ascii; int last_id = charset_ascii;
int eol_dos = int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
...@@ -4754,12 +4754,12 @@ decode_coding_big5 (struct coding_system *coding) ...@@ -4754,12 +4754,12 @@ decode_coding_big5 (struct coding_system *coding)
the end. */ the end. */
int *charbuf_end int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); = 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; int multibytep = coding->src_multibyte;
struct charset *charset_roman, *charset_big5; struct charset *charset_roman, *charset_big5;
Lisp_Object attrs, charset_list, val; Lisp_Object attrs, charset_list, val;
int char_offset = coding->produced_char; EMACS_INT char_offset = coding->produced_char;
int last_offset = char_offset; EMACS_INT last_offset = char_offset;
int last_id = charset_ascii; int last_id = charset_ascii;
int eol_dos = int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
...@@ -4856,7 +4856,7 @@ encode_coding_sjis (struct coding_system *coding) ...@@ -4856,7 +4856,7 @@ encode_coding_sjis (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 4; int safe_room = 4;
int produced_chars = 0; EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list, val; Lisp_Object attrs, charset_list, val;
int ascii_compatible; int ascii_compatible;
struct charset *charset_kanji, *charset_kana; struct charset *charset_kanji, *charset_kana;
...@@ -4947,7 +4947,7 @@ encode_coding_big5 (struct coding_system *coding) ...@@ -4947,7 +4947,7 @@ encode_coding_big5 (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 4; int safe_room = 4;
int produced_chars = 0; EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list, val; Lisp_Object attrs, charset_list, val;
int ascii_compatible; int ascii_compatible;
struct charset *charset_big5; struct charset *charset_big5;
...@@ -5022,10 +5022,10 @@ detect_coding_ccl (struct coding_system *coding, ...@@ -5022,10 +5022,10 @@ detect_coding_ccl (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base; const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int found = 0; int found = 0;
unsigned char *valids; unsigned char *valids;
int head_ascii = coding->head_ascii; EMACS_INT head_ascii = coding->head_ascii;
Lisp_Object attrs; Lisp_Object attrs;
detect_info->checked |= CATEGORY_MASK_CCL; detect_info->checked |= CATEGORY_MASK_CCL;
...@@ -5062,7 +5062,7 @@ decode_coding_ccl (struct coding_system *coding) ...@@ -5062,7 +5062,7 @@ decode_coding_ccl (struct coding_system *coding)
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int *charbuf = coding->charbuf + coding->charbuf_used; int *charbuf = coding->charbuf + coding->charbuf_used;
int *charbuf_end = coding->charbuf + coding->charbuf_size; int *charbuf_end = coding->charbuf + coding->charbuf_size;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
struct ccl_program *ccl = &coding->spec.ccl->ccl; struct ccl_program *ccl = &coding->spec.ccl->ccl;
int source_charbuf[1024]; int source_charbuf[1024];
...@@ -5134,7 +5134,8 @@ encode_coding_ccl (struct coding_system *coding) ...@@ -5134,7 +5134,8 @@ encode_coding_ccl (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int destination_charbuf[1024]; int destination_charbuf[1024];
int i, produced_chars = 0; EMACS_INT produced_chars = 0;
int i;
Lisp_Object attrs, charset_list; Lisp_Object attrs, charset_list;
CODING_GET_INFO (coding, attrs, charset_list); CODING_GET_INFO (coding, attrs, charset_list);
...@@ -5220,7 +5221,7 @@ encode_coding_raw_text (struct coding_system *coding) ...@@ -5220,7 +5221,7 @@ encode_coding_raw_text (struct coding_system *coding)
int *charbuf_end = coding->charbuf + coding->charbuf_used; int *charbuf_end = coding->charbuf + coding->charbuf_used;
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int produced_chars = 0; EMACS_INT produced_chars = 0;
int c; int c;
if (multibytep) if (multibytep)
...@@ -5303,10 +5304,10 @@ detect_coding_charset (struct coding_system *coding, ...@@ -5303,10 +5304,10 @@ detect_coding_charset (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base; const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte; int multibytep = coding->src_multibyte;
int consumed_chars = 0; EMACS_INT consumed_chars = 0;
Lisp_Object attrs, valids, name; Lisp_Object attrs, valids, name;
int found = 0; int found = 0;
int head_ascii = coding->head_ascii; EMACS_INT head_ascii = coding->head_ascii;
int check_latin_extra = 0; int check_latin_extra = 0;
detect_info->checked |= CATEGORY_MASK_CHARSET; detect_info->checked |= CATEGORY_MASK_CHARSET;
...@@ -5410,12 +5411,12 @@ decode_coding_charset (struct coding_system *coding) ...@@ -5410,12 +5411,12 @@ decode_coding_charset (struct coding_system *coding)
the end. */ the end. */
int *charbuf_end int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); = 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; int multibytep = coding->src_multibyte;
Lisp_Object attrs = CODING_ID_ATTRS (coding->id); Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
Lisp_Object valids; Lisp_Object valids;
int char_offset = coding->produced_char; EMACS_INT char_offset = coding->produced_char;
int last_offset = char_offset; EMACS_INT last_offset = char_offset;
int last_id = charset_ascii; int last_id = charset_ascii;
int eol_dos = int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
...@@ -5536,7 +5537,7 @@ encode_coding_charset (struct coding_system *coding) ...@@ -5536,7 +5537,7 @@ encode_coding_charset (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced; unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes; unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = MAX_MULTIBYTE_LENGTH; int safe_room = MAX_MULTIBYTE_LENGTH;
int produced_chars = 0; EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list; Lisp_Object attrs, charset_list;
int ascii_compatible; int ascii_compatible;
int c; int c;
...@@ -6444,7 +6445,7 @@ decode_eol (struct coding_system *coding) ...@@ -6444,7 +6445,7 @@ decode_eol (struct coding_system *coding)
} }
else if (EQ (eol_type, Qdos)) else if (EQ (eol_type, Qdos))
{ {
int n = 0; EMACS_INT n = 0;
if (NILP (coding->dst_object)) if (NILP (coding->dst_object))
{ {
...@@ -6459,9 +6460,9 @@ decode_eol (struct coding_system *coding) ...@@ -6459,9 +6460,9 @@ decode_eol (struct coding_system *coding)
} }
else else
{ {
int pos_byte = coding->dst_pos_byte; EMACS_INT pos_byte = coding->dst_pos_byte;
int pos = coding->dst_pos; EMACS_INT pos = coding->dst_pos;
int pos_end = pos + coding->produced_char - 1; EMACS_INT pos_end = pos + coding->produced_char - 1;
while (pos < pos_end) while (pos < pos_end)
{ {
...@@ -6646,7 +6647,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, ...@@ -6646,7 +6647,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
if (c >= 0) if (c >= 0)
{ {
int from_nchars = 1, to_nchars = 1; EMACS_INT from_nchars = 1, to_nchars = 1;
Lisp_Object trans = Qnil; Lisp_Object trans = Qnil;
LOOKUP_TRANSLATION_TABLE (translation_table, c, trans); LOOKUP_TRANSLATION_TABLE (translation_table, c, trans);
......
...@@ -449,7 +449,7 @@ struct coding_system ...@@ -449,7 +449,7 @@ struct coding_system
-1 in setup_coding_system, and updated by detect_coding. So, -1 in setup_coding_system, and updated by detect_coding. So,
when this is equal to the byte length of the text being when this is equal to the byte length of the text being
converted, we can skip the actual conversion process. */ converted, we can skip the actual conversion process. */
int head_ascii; EMACS_INT head_ascii;
/* The following members are set by encoding/decoding routine. */ /* The following members are set by encoding/decoding routine. */
EMACS_INT produced, produced_char, consumed, consumed_char; EMACS_INT produced, produced_char, consumed, consumed_char;
......
...@@ -750,7 +750,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) ...@@ -750,7 +750,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
/* It is possible that NEW_POS is not within the same field as /* It is possible that NEW_POS is not within the same field as
OLD_POS; try to move NEW_POS so that it is. */ OLD_POS; try to move NEW_POS so that it is. */
{ {
int shortage; EMACS_INT shortage;
Lisp_Object field_bound; Lisp_Object field_bound;
if (fwd) if (fwd)
......
...@@ -271,7 +271,7 @@ use the standard functions without calling themselves recursively. */) ...@@ -271,7 +271,7 @@ use the standard functions without calling themselves recursively. */)
if (CONSP (elt)) if (CONSP (elt))
{ {
Lisp_Object string = XCAR (elt); Lisp_Object string = XCAR (elt);
int match_pos; EMACS_INT match_pos;
Lisp_Object handler = XCDR (elt); Lisp_Object handler = XCDR (elt);
Lisp_Object operations = Qnil; Lisp_Object operations = Qnil;
......
...@@ -2775,6 +2775,8 @@ extern Lisp_Object Qprint_escape_newlines; ...@@ -2775,6 +2775,8 @@ extern Lisp_Object Qprint_escape_newlines;
extern void write_string (const char *, int); extern void write_string (const char *, int);
extern void print_error_message (Lisp_Object, Lisp_Object, const char *, extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
Lisp_Object); 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 #define FLOAT_TO_STRING_BUFSIZE 350
extern void float_to_string (char *, double); extern void float_to_string (char *, double);
extern void syms_of_print (void); extern void syms_of_print (void);
...@@ -3044,13 +3046,13 @@ struct re_registers; ...@@ -3044,13 +3046,13 @@ struct re_registers;
extern struct re_pattern_buffer *compile_pattern (Lisp_Object, extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
struct re_registers *, struct re_registers *,
Lisp_Object, int, int); Lisp_Object, int, int);
extern int fast_string_match (Lisp_Object, Lisp_Object); extern EMACS_INT fast_string_match (Lisp_Object, Lisp_Object);
extern int fast_c_string_match_ignore_case (Lisp_Object, const char *); extern EMACS_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_ignore_case (Lisp_Object, Lisp_Object);
extern EMACS_INT fast_looking_at (Lisp_Object, EMACS_INT, EMACS_INT, extern EMACS_INT fast_looking_at (Lisp_Object, EMACS_INT, EMACS_INT,
EMACS_INT, EMACS_INT, Lisp_Object); EMACS_INT, EMACS_INT, Lisp_Object);
extern EMACS_INT scan_buffer (int, EMACS_INT, EMACS_INT, EMACS_INT, 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, extern EMACS_INT scan_newline (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
EMACS_INT, int); EMACS_INT, int);
extern EMACS_INT find_next_newline (EMACS_INT, int); extern EMACS_INT find_next_newline (EMACS_INT, int);
......
...@@ -368,7 +368,7 @@ data if you want to preserve them. */) ...@@ -368,7 +368,7 @@ data if you want to preserve them. */)
static Lisp_Object static Lisp_Object
string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int posix) string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int posix)
{ {
int val; EMACS_INT val;
struct re_pattern_buffer *bufp; struct re_pattern_buffer *bufp;
EMACS_INT pos, pos_byte; EMACS_INT pos, pos_byte;
int i; int i;
...@@ -468,10 +468,10 @@ matched by parenthesis constructs in the pattern. */) ...@@ -468,10 +468,10 @@ matched by parenthesis constructs in the pattern. */)
and return the index of the match, or negative on failure. and return the index of the match, or negative on failure.
This does not clobber the match data. */ This does not clobber the match data. */
int