aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/lread.c18
-rw-r--r--src/marker.c8
-rw-r--r--src/minibuf.c4
-rw-r--r--src/print.c6
5 files changed, 31 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index df066ac9a4d..31ecc62ed37 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,18 @@
12010-09-25 Eli Zaretskii <eliz@gnu.org> 12010-09-25 Eli Zaretskii <eliz@gnu.org>
2 2
3 * print.c (print_object, print_string, strout): Use EMACS_INT for
4 string indices.
5
6 * minibuf.c (string_to_object): Use EMACS_INT for string position
7 and size.
8
9 * marker.c (verify_bytepos): Use EMACS_INT for buffer positions.
10
11 * lread.c <read_from_string_index, read_from_string_index_byte>
12 <read_from_string_limit, readchar_count>: Define EMACS_INT.
13 (readchar, unreadchar, read_internal_start): Use EMACS_INT for
14 buffer positions and string length.
15
3 * keyboard.c <last_point_position, last_non_minibuf_size>: Declare 16 * keyboard.c <last_point_position, last_non_minibuf_size>: Declare
4 EMACS_INT. 17 EMACS_INT.
5 (echo_truncate, adjust_point_for_property, read_char) 18 (echo_truncate, adjust_point_for_property, read_char)
diff --git a/src/lread.c b/src/lread.c
index a79ae180263..81b7082204c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -163,13 +163,13 @@ static FILE *instream;
163static int read_pure; 163static int read_pure;
164 164
165/* For use within read-from-string (this reader is non-reentrant!!) */ 165/* For use within read-from-string (this reader is non-reentrant!!) */
166static int read_from_string_index; 166static EMACS_INT read_from_string_index;
167static int read_from_string_index_byte; 167static EMACS_INT read_from_string_index_byte;
168static int read_from_string_limit; 168static EMACS_INT read_from_string_limit;
169 169
170/* Number of characters read in the current call to Fread or 170/* Number of characters read in the current call to Fread or
171 Fread_from_string. */ 171 Fread_from_string. */
172static int readchar_count; 172static EMACS_INT readchar_count;
173 173
174/* This contains the last string skipped with #@. */ 174/* This contains the last string skipped with #@. */
175static char *saved_doc_string; 175static char *saved_doc_string;
@@ -276,7 +276,7 @@ readchar (Lisp_Object readcharfun, int *multibyte)
276 { 276 {
277 register struct buffer *inbuffer = XBUFFER (readcharfun); 277 register struct buffer *inbuffer = XBUFFER (readcharfun);
278 278
279 int pt_byte = BUF_PT_BYTE (inbuffer); 279 EMACS_INT pt_byte = BUF_PT_BYTE (inbuffer);
280 280
281 if (pt_byte >= BUF_ZV_BYTE (inbuffer)) 281 if (pt_byte >= BUF_ZV_BYTE (inbuffer))
282 return -1; 282 return -1;
@@ -305,7 +305,7 @@ readchar (Lisp_Object readcharfun, int *multibyte)
305 { 305 {
306 register struct buffer *inbuffer = XMARKER (readcharfun)->buffer; 306 register struct buffer *inbuffer = XMARKER (readcharfun)->buffer;
307 307
308 int bytepos = marker_byte_position (readcharfun); 308 EMACS_INT bytepos = marker_byte_position (readcharfun);
309 309
310 if (bytepos >= BUF_ZV_BYTE (inbuffer)) 310 if (bytepos >= BUF_ZV_BYTE (inbuffer))
311 return -1; 311 return -1;
@@ -439,7 +439,7 @@ unreadchar (Lisp_Object readcharfun, int c)
439 else if (BUFFERP (readcharfun)) 439 else if (BUFFERP (readcharfun))
440 { 440 {
441 struct buffer *b = XBUFFER (readcharfun); 441 struct buffer *b = XBUFFER (readcharfun);
442 int bytepos = BUF_PT_BYTE (b); 442 EMACS_INT bytepos = BUF_PT_BYTE (b);
443 443
444 BUF_PT (b)--; 444 BUF_PT (b)--;
445 if (! NILP (b->enable_multibyte_characters)) 445 if (! NILP (b->enable_multibyte_characters))
@@ -452,7 +452,7 @@ unreadchar (Lisp_Object readcharfun, int c)
452 else if (MARKERP (readcharfun)) 452 else if (MARKERP (readcharfun))
453 { 453 {
454 struct buffer *b = XMARKER (readcharfun)->buffer; 454 struct buffer *b = XMARKER (readcharfun)->buffer;
455 int bytepos = XMARKER (readcharfun)->bytepos; 455 EMACS_INT bytepos = XMARKER (readcharfun)->bytepos;
456 456
457 XMARKER (readcharfun)->charpos--; 457 XMARKER (readcharfun)->charpos--;
458 if (! NILP (b->enable_multibyte_characters)) 458 if (! NILP (b->enable_multibyte_characters))
@@ -1893,7 +1893,7 @@ read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end)
1893 if (STRINGP (stream) 1893 if (STRINGP (stream)
1894 || ((CONSP (stream) && STRINGP (XCAR (stream))))) 1894 || ((CONSP (stream) && STRINGP (XCAR (stream)))))
1895 { 1895 {
1896 int startval, endval; 1896 EMACS_INT startval, endval;
1897 Lisp_Object string; 1897 Lisp_Object string;
1898 1898
1899 if (STRINGP (stream)) 1899 if (STRINGP (stream))
diff --git a/src/marker.c b/src/marker.c
index 34d8bc4e65b..3f8b78e81a8 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -247,11 +247,11 @@ buf_charpos_to_bytepos (struct buffer *b, EMACS_INT charpos)
247/* Used for debugging: recompute the bytepos corresponding to CHARPOS 247/* Used for debugging: recompute the bytepos corresponding to CHARPOS
248 in the simplest, most reliable way. */ 248 in the simplest, most reliable way. */
249 249
250int 250EMACS_INT
251verify_bytepos (int charpos) 251verify_bytepos (EMACS_INT charpos)
252{ 252{
253 int below = 1; 253 EMACS_INT below = 1;
254 int below_byte = 1; 254 EMACS_INT below_byte = 1;
255 255
256 while (below != charpos) 256 while (below != charpos)
257 { 257 {
diff --git a/src/minibuf.c b/src/minibuf.c
index 2b21fa6a06f..f3a24afc199 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -236,7 +236,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
236{ 236{
237 struct gcpro gcpro1, gcpro2; 237 struct gcpro gcpro1, gcpro2;
238 Lisp_Object expr_and_pos; 238 Lisp_Object expr_and_pos;
239 int pos; 239 EMACS_INT pos;
240 240
241 GCPRO2 (val, defalt); 241 GCPRO2 (val, defalt);
242 242
@@ -254,7 +254,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
254 { 254 {
255 /* Ignore trailing whitespace; any other trailing junk 255 /* Ignore trailing whitespace; any other trailing junk
256 is an error. */ 256 is an error. */
257 int i; 257 EMACS_INT i;
258 pos = string_char_to_byte (val, pos); 258 pos = string_char_to_byte (val, pos);
259 for (i = pos; i < SBYTES (val); i++) 259 for (i = pos; i < SBYTES (val); i++)
260 { 260 {
diff --git a/src/print.c b/src/print.c
index 560bca8178f..46132ff1e47 100644
--- a/src/print.c
+++ b/src/print.c
@@ -395,7 +395,7 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
395 else 395 else
396 { 396 {
397 /* PRINTCHARFUN is a Lisp function. */ 397 /* PRINTCHARFUN is a Lisp function. */
398 int i = 0; 398 EMACS_INT i = 0;
399 399
400 if (size == size_byte) 400 if (size == size_byte)
401 { 401 {
@@ -489,7 +489,7 @@ print_string (Lisp_Object string, Lisp_Object printcharfun)
489 { 489 {
490 /* Otherwise, string may be relocated by printing one char. 490 /* Otherwise, string may be relocated by printing one char.
491 So re-fetch the string address for each character. */ 491 So re-fetch the string address for each character. */
492 int i; 492 EMACS_INT i;
493 EMACS_INT size = SCHARS (string); 493 EMACS_INT size = SCHARS (string);
494 EMACS_INT size_byte = SBYTES (string); 494 EMACS_INT size_byte = SBYTES (string);
495 struct gcpro gcpro1; 495 struct gcpro gcpro1;
@@ -1563,7 +1563,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1563 print_string (obj, printcharfun); 1563 print_string (obj, printcharfun);
1564 else 1564 else
1565 { 1565 {
1566 register int i, i_byte; 1566 register EMACS_INT i, i_byte;
1567 struct gcpro gcpro1; 1567 struct gcpro gcpro1;
1568 unsigned char *str; 1568 unsigned char *str;
1569 EMACS_INT size_byte; 1569 EMACS_INT size_byte;