diff options
| author | Lars Magne Ingebrigtsen | 2010-09-24 17:01:03 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2010-09-24 17:01:03 +0200 |
| commit | db063399123f02faeec4beaedf2ee375a9a50c49 (patch) | |
| tree | c616d1d2ca8091732f4ea8bd4a9cb3cd42d44c43 /src/print.c | |
| parent | 69481da786be74ed3f89eebafbd38b9de9a1355e (diff) | |
| download | emacs-db063399123f02faeec4beaedf2ee375a9a50c49.tar.gz emacs-db063399123f02faeec4beaedf2ee375a9a50c49.zip | |
Fix all EMACS_INT/int conversion errors in print.c (and related files).
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/print.c b/src/print.c index 1df11447d0d..560bca8178f 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -96,11 +96,11 @@ Lisp_Object being_printed[PRINT_CIRCLE]; | |||
| 96 | char *print_buffer; | 96 | char *print_buffer; |
| 97 | 97 | ||
| 98 | /* Size allocated in print_buffer. */ | 98 | /* Size allocated in print_buffer. */ |
| 99 | int print_buffer_size; | 99 | EMACS_INT print_buffer_size; |
| 100 | /* Chars stored in print_buffer. */ | 100 | /* Chars stored in print_buffer. */ |
| 101 | int print_buffer_pos; | 101 | EMACS_INT print_buffer_pos; |
| 102 | /* Bytes stored in print_buffer. */ | 102 | /* Bytes stored in print_buffer. */ |
| 103 | int print_buffer_pos_byte; | 103 | EMACS_INT print_buffer_pos_byte; |
| 104 | 104 | ||
| 105 | /* Maximum length of list to print in full; noninteger means | 105 | /* Maximum length of list to print in full; noninteger means |
| 106 | effectively infinity */ | 106 | effectively infinity */ |
| @@ -177,8 +177,8 @@ int print_output_debug_flag = 1; | |||
| 177 | 177 | ||
| 178 | #define PRINTDECLARE \ | 178 | #define PRINTDECLARE \ |
| 179 | struct buffer *old = current_buffer; \ | 179 | struct buffer *old = current_buffer; \ |
| 180 | int old_point = -1, start_point = -1; \ | 180 | EMACS_INT old_point = -1, start_point = -1; \ |
| 181 | int old_point_byte = -1, start_point_byte = -1; \ | 181 | EMACS_INT old_point_byte = -1, start_point_byte = -1; \ |
| 182 | int specpdl_count = SPECPDL_INDEX (); \ | 182 | int specpdl_count = SPECPDL_INDEX (); \ |
| 183 | int free_print_buffer = 0; \ | 183 | int free_print_buffer = 0; \ |
| 184 | int multibyte = !NILP (current_buffer->enable_multibyte_characters); \ | 184 | int multibyte = !NILP (current_buffer->enable_multibyte_characters); \ |
| @@ -342,8 +342,8 @@ printchar (unsigned int ch, Lisp_Object fun) | |||
| 342 | to data in a Lisp string. Otherwise that is not safe. */ | 342 | to data in a Lisp string. Otherwise that is not safe. */ |
| 343 | 343 | ||
| 344 | static void | 344 | static void |
| 345 | strout (const char *ptr, int size, int size_byte, Lisp_Object printcharfun, | 345 | strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, |
| 346 | int multibyte) | 346 | Lisp_Object printcharfun, int multibyte) |
| 347 | { | 347 | { |
| 348 | if (size < 0) | 348 | if (size < 0) |
| 349 | size_byte = size = strlen (ptr); | 349 | size_byte = size = strlen (ptr); |
| @@ -430,7 +430,7 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) | |||
| 430 | { | 430 | { |
| 431 | if (EQ (printcharfun, Qt) || NILP (printcharfun)) | 431 | if (EQ (printcharfun, Qt) || NILP (printcharfun)) |
| 432 | { | 432 | { |
| 433 | int chars; | 433 | EMACS_INT chars; |
| 434 | 434 | ||
| 435 | if (print_escape_nonascii) | 435 | if (print_escape_nonascii) |
| 436 | string = string_escape_byte8 (string); | 436 | string = string_escape_byte8 (string); |
| @@ -446,7 +446,7 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) | |||
| 446 | convert STRING to a multibyte string containing the same | 446 | convert STRING to a multibyte string containing the same |
| 447 | character codes. */ | 447 | character codes. */ |
| 448 | Lisp_Object newstr; | 448 | Lisp_Object newstr; |
| 449 | int bytes; | 449 | EMACS_INT bytes; |
| 450 | 450 | ||
| 451 | chars = SBYTES (string); | 451 | chars = SBYTES (string); |
| 452 | bytes = parse_str_to_multibyte (SDATA (string), chars); | 452 | bytes = parse_str_to_multibyte (SDATA (string), chars); |
| @@ -464,7 +464,7 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) | |||
| 464 | if (EQ (printcharfun, Qt)) | 464 | if (EQ (printcharfun, Qt)) |
| 465 | { | 465 | { |
| 466 | /* Output to echo area. */ | 466 | /* Output to echo area. */ |
| 467 | int nbytes = SBYTES (string); | 467 | EMACS_INT nbytes = SBYTES (string); |
| 468 | char *buffer; | 468 | char *buffer; |
| 469 | 469 | ||
| 470 | /* Copy the string contents so that relocation of STRING by | 470 | /* Copy the string contents so that relocation of STRING by |
| @@ -490,8 +490,8 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) | |||
| 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 | int i; |
| 493 | int size = SCHARS (string); | 493 | EMACS_INT size = SCHARS (string); |
| 494 | int size_byte = SBYTES (string); | 494 | EMACS_INT size_byte = SBYTES (string); |
| 495 | struct gcpro gcpro1; | 495 | struct gcpro gcpro1; |
| 496 | GCPRO1 (string); | 496 | GCPRO1 (string); |
| 497 | if (size == size_byte) | 497 | if (size == size_byte) |
| @@ -868,7 +868,7 @@ to make it write to the debugging output. */) | |||
| 868 | (Lisp_Object character) | 868 | (Lisp_Object character) |
| 869 | { | 869 | { |
| 870 | CHECK_NUMBER (character); | 870 | CHECK_NUMBER (character); |
| 871 | putc (XINT (character), stderr); | 871 | putc ((int) XINT (character), stderr); |
| 872 | 872 | ||
| 873 | #ifdef WINDOWSNT | 873 | #ifdef WINDOWSNT |
| 874 | /* Send the output to a debugger (nothing happens if there isn't one). */ | 874 | /* Send the output to a debugger (nothing happens if there isn't one). */ |
| @@ -1430,8 +1430,8 @@ print_check_string_charset_prop (INTERVAL interval, Lisp_Object string) | |||
| 1430 | || ! (print_check_string_result & PRINT_STRING_UNSAFE_CHARSET_FOUND)) | 1430 | || ! (print_check_string_result & PRINT_STRING_UNSAFE_CHARSET_FOUND)) |
| 1431 | { | 1431 | { |
| 1432 | int i, c; | 1432 | int i, c; |
| 1433 | int charpos = interval->position; | 1433 | EMACS_INT charpos = interval->position; |
| 1434 | int bytepos = string_char_to_byte (string, charpos); | 1434 | EMACS_INT bytepos = string_char_to_byte (string, charpos); |
| 1435 | Lisp_Object charset; | 1435 | Lisp_Object charset; |
| 1436 | 1436 | ||
| 1437 | charset = XCAR (XCDR (val)); | 1437 | charset = XCAR (XCDR (val)); |
| @@ -1566,7 +1566,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1566 | register int i, i_byte; | 1566 | register int i, i_byte; |
| 1567 | struct gcpro gcpro1; | 1567 | struct gcpro gcpro1; |
| 1568 | unsigned char *str; | 1568 | unsigned char *str; |
| 1569 | int size_byte; | 1569 | EMACS_INT size_byte; |
| 1570 | /* 1 means we must ensure that the next character we output | 1570 | /* 1 means we must ensure that the next character we output |
| 1571 | cannot be taken as part of a hex character escape. */ | 1571 | cannot be taken as part of a hex character escape. */ |
| 1572 | int need_nonhex = 0; | 1572 | int need_nonhex = 0; |
| @@ -1684,7 +1684,8 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1684 | register unsigned char *p = SDATA (SYMBOL_NAME (obj)); | 1684 | register unsigned char *p = SDATA (SYMBOL_NAME (obj)); |
| 1685 | register unsigned char *end = p + SBYTES (SYMBOL_NAME (obj)); | 1685 | register unsigned char *end = p + SBYTES (SYMBOL_NAME (obj)); |
| 1686 | register int c; | 1686 | register int c; |
| 1687 | int i, i_byte, size_byte; | 1687 | int i, i_byte; |
| 1688 | EMACS_INT size_byte; | ||
| 1688 | Lisp_Object name; | 1689 | Lisp_Object name; |
| 1689 | 1690 | ||
| 1690 | name = SYMBOL_NAME (obj); | 1691 | name = SYMBOL_NAME (obj); |
| @@ -1803,7 +1804,8 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1803 | } | 1804 | } |
| 1804 | 1805 | ||
| 1805 | { | 1806 | { |
| 1806 | int print_length, i; | 1807 | EMACS_INT print_length; |
| 1808 | int i; | ||
| 1807 | Lisp_Object halftail = obj; | 1809 | Lisp_Object halftail = obj; |
| 1808 | 1810 | ||
| 1809 | /* Negative values of print-length are invalid in CL. | 1811 | /* Negative values of print-length are invalid in CL. |
| @@ -1898,7 +1900,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1898 | register int i; | 1900 | register int i; |
| 1899 | register unsigned char c; | 1901 | register unsigned char c; |
| 1900 | struct gcpro gcpro1; | 1902 | struct gcpro gcpro1; |
| 1901 | int size_in_chars | 1903 | EMACS_INT size_in_chars |
| 1902 | = ((XBOOL_VECTOR (obj)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) | 1904 | = ((XBOOL_VECTOR (obj)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) |
| 1903 | / BOOL_VECTOR_BITS_PER_CHAR); | 1905 | / BOOL_VECTOR_BITS_PER_CHAR); |
| 1904 | 1906 | ||
| @@ -1984,7 +1986,8 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1984 | else if (HASH_TABLE_P (obj)) | 1986 | else if (HASH_TABLE_P (obj)) |
| 1985 | { | 1987 | { |
| 1986 | struct Lisp_Hash_Table *h = XHASH_TABLE (obj); | 1988 | struct Lisp_Hash_Table *h = XHASH_TABLE (obj); |
| 1987 | int i, real_size, size; | 1989 | int i; |
| 1990 | EMACS_INT real_size, size; | ||
| 1988 | #if 0 | 1991 | #if 0 |
| 1989 | strout ("#<hash-table", -1, -1, printcharfun, 0); | 1992 | strout ("#<hash-table", -1, -1, printcharfun, 0); |
| 1990 | if (SYMBOLP (h->test)) | 1993 | if (SYMBOLP (h->test)) |
| @@ -2150,7 +2153,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2150 | { | 2153 | { |
| 2151 | register int i; | 2154 | register int i; |
| 2152 | register Lisp_Object tem; | 2155 | register Lisp_Object tem; |
| 2153 | int real_size = size; | 2156 | EMACS_INT real_size = size; |
| 2154 | 2157 | ||
| 2155 | /* Don't print more elements than the specified maximum. */ | 2158 | /* Don't print more elements than the specified maximum. */ |
| 2156 | if (NATNUMP (Vprint_length) | 2159 | if (NATNUMP (Vprint_length) |