diff options
| author | Eli Zaretskii | 2010-09-25 07:55:30 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2010-09-25 07:55:30 -0400 |
| commit | da43f02119eb86ff8a4ee8ce7454b10d261ef714 (patch) | |
| tree | 8b42c4a38e55c29603b7bab7421d75ede479040f /src/lread.c | |
| parent | 41118bd30dd303cf60a70990c5347a6cfdfca1ef (diff) | |
| download | emacs-da43f02119eb86ff8a4ee8ce7454b10d261ef714.tar.gz emacs-da43f02119eb86ff8a4ee8ce7454b10d261ef714.zip | |
Fix int/EMACS_INT use in lread.c, marker.c, minibuf.c, print.c
print.c (print_object, print_string, strout): Use EMACS_INT for
string indices.
minibuf.c (string_to_object): Use EMACS_INT for string position
and size.
marker.c (verify_bytepos): Use EMACS_INT for buffer positions.
lread.c <read_from_string_index, read_from_string_index_byte>
<read_from_string_limit, readchar_count>: Define EMACS_INT.
(readchar, unreadchar, read_internal_start): Use EMACS_INT for
buffer positions and string length.
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 18 |
1 files changed, 9 insertions, 9 deletions
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; | |||
| 163 | static int read_pure; | 163 | static 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!!) */ |
| 166 | static int read_from_string_index; | 166 | static EMACS_INT read_from_string_index; |
| 167 | static int read_from_string_index_byte; | 167 | static EMACS_INT read_from_string_index_byte; |
| 168 | static int read_from_string_limit; | 168 | static 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. */ |
| 172 | static int readchar_count; | 172 | static EMACS_INT readchar_count; |
| 173 | 173 | ||
| 174 | /* This contains the last string skipped with #@. */ | 174 | /* This contains the last string skipped with #@. */ |
| 175 | static char *saved_doc_string; | 175 | static 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)) |