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)
* 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
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
......
......@@ -159,7 +159,7 @@ detect_coding_XXX (struct coding_system *coding,
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 @@ encode_coding_XXX (struct coding_system *coding)
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 @@ record_conversion_result (struct coding_system *coding,
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 @@ detect_coding_utf_8 (struct coding_system *coding,
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 @@ decode_coding_utf_8 (struct coding_system *coding)
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 @@ encode_coding_utf_8 (struct coding_system *coding)
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 @@ decode_coding_utf_16 (struct coding_system *coding)
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 @@ encode_coding_utf_16 (struct coding_system *coding)
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 @@ detect_coding_emacs_mule (struct coding_system *coding,
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 @@ decode_coding_emacs_mule (struct coding_system *coding)
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 @@ encode_coding_emacs_mule (struct coding_system *coding)
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 @@ detect_coding_iso_2022 (struct coding_system *coding,
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 @@ decode_coding_iso_2022 (struct coding_system *coding)
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 @@ decode_coding_iso_2022 (struct coding_system *coding)
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 @@ decode_coding_iso_2022 (struct coding_system *coding)
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 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
/* 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 @@ encode_coding_iso_2022 (struct coding_system *coding)
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 @@ detect_coding_sjis (struct coding_system *coding,
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 @@ detect_coding_big5 (struct coding_system *coding,
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 @@ decode_coding_sjis (struct coding_system *coding)
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 @@ decode_coding_big5 (struct coding_system *coding)
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 @@ encode_coding_sjis (struct coding_system *coding)
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 @@ encode_coding_big5 (struct coding_system *coding)
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 @@ detect_coding_ccl (struct coding_system *coding,
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 @@ decode_coding_ccl (struct coding_system *coding)
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 @@ encode_coding_ccl (struct coding_system *coding)
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 @@ encode_coding_raw_text (struct coding_system *coding)
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 @@ detect_coding_charset (struct coding_system *coding,
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 @@ decode_coding_charset (struct coding_system *coding)
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 @@ encode_coding_charset (struct coding_system *coding)
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 @@ decode_eol (struct coding_system *coding)
}
else if (EQ (eol_type, Qdos))
{
int n = 0;
EMACS_INT n = 0;
if (NILP (coding->dst_object))
{
......@@ -6459,9 +6460,9 @@ decode_eol (struct coding_system *coding)
}
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 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
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);
......
......@@ -449,7 +449,7 @@ struct coding_system
-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;
......
......@@ -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
OLD_POS; try to move NEW_POS so that it is. */
{
int shortage;
EMACS_INT shortage;
Lisp_Object field_bound;
if (fwd)
......
......@@ -271,7 +271,7 @@ use the standard functions without calling themselves recursively. */)
if (CONSP (elt))
{
Lisp_Object string = XCAR (elt);
int match_pos;
EMACS_INT match_pos;
Lisp_Object handler = XCDR (elt);
Lisp_Object operations = Qnil;
......
......@@ -2775,6 +2775,8 @@ extern Lisp_Object Qprint_escape_newlines;
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 @@ struct re_registers;
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);
......
......@@ -368,7 +368,7 @@ data if you want to preserve them. */)
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 @@ matched by parenthesis constructs in the pattern. */)
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 @@ fast_string_match (Lisp_Object regexp, Lisp_Object string)
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 @@ fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string)
/* 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 @@ newline_cache_on_off (struct buffer *buf)
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 @@ scan_newline (EMACS_INT start, EMACS_INT start_byte,
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 @@ find_next_newline_no_quit (EMACS_INT from, EMACS_INT cnt)
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 @@ static Lisp_Object
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 @@ since only regular expressions have distinguished subexpressions. */)
/* 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 @@ Return value is undefined if the last search failed. */)
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)
......
......@@ -763,7 +763,7 @@ static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
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 display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_O
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 const char power_letter[] =
};
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 @@ decode_mode_spec (struct window *w, register int c, int field_width,
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 @@ decode_mode_spec (struct window *w, register int c, int field_width,
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 @@ decode_mode_spec (struct window *w, register int c, int field_width,
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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment