aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-02-06 18:26:14 -0800
committerPaul Eggert2011-02-06 18:26:14 -0800
commit09125ef8472d8b3d3b1ba762abc7feeb64b32911 (patch)
treee8ff6c875bdf53e559f34e6e4c3431378cd51b61 /src
parent57ace6d0d302ccfb83e5b5ff20a39e57bab86dd1 (diff)
downloademacs-09125ef8472d8b3d3b1ba762abc7feeb64b32911.tar.gz
emacs-09125ef8472d8b3d3b1ba762abc7feeb64b32911.zip
* print.c: conform to C89 pointer rules
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/print.c16
2 files changed, 11 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a3e68dd92b0..72a7bb926f7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -10,7 +10,8 @@
10 * alloc.c (make_string, make_specified_string, make_pure_string): 10 * alloc.c (make_string, make_specified_string, make_pure_string):
11 Likewise. 11 Likewise.
12 * data.c (Fstring_to_number): Likewise. 12 * data.c (Fstring_to_number): Likewise.
13 * print.c (float_to_string): Likewise. 13 * print.c (float_to_string, PRINTFINISH, printchar, strout):
14 (print_object): Likewise.
14 15
152011-02-06 Paul Eggert <eggert@cs.ucla.edu> 162011-02-06 Paul Eggert <eggert@cs.ucla.edu>
16 17
diff --git a/src/print.c b/src/print.c
index fe2c8e15932..f47b71087f4 100644
--- a/src/print.c
+++ b/src/print.c
@@ -177,8 +177,8 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
177 { \ 177 { \
178 unsigned char *temp \ 178 unsigned char *temp \
179 = (unsigned char *) alloca (print_buffer_pos + 1); \ 179 = (unsigned char *) alloca (print_buffer_pos + 1); \
180 copy_text (print_buffer, temp, print_buffer_pos_byte, \ 180 copy_text ((unsigned char *) print_buffer, temp, \
181 1, 0); \ 181 print_buffer_pos_byte, 1, 0); \
182 insert_1_both ((char *) temp, print_buffer_pos, \ 182 insert_1_both ((char *) temp, print_buffer_pos, \
183 print_buffer_pos, 0, 1, 0); \ 183 print_buffer_pos, 0, 1, 0); \
184 } \ 184 } \
@@ -254,7 +254,7 @@ printchar (unsigned int ch, Lisp_Object fun)
254 254
255 setup_echo_area_for_printing (multibyte_p); 255 setup_echo_area_for_printing (multibyte_p);
256 insert_char (ch); 256 insert_char (ch);
257 message_dolog (str, len, 0, multibyte_p); 257 message_dolog ((char *) str, len, 0, multibyte_p);
258 } 258 }
259 } 259 }
260} 260}
@@ -317,7 +317,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
317 int len; 317 int len;
318 for (i = 0; i < size_byte; i += len) 318 for (i = 0; i < size_byte; i += len)
319 { 319 {
320 int ch = STRING_CHAR_AND_LENGTH (ptr + i, len); 320 int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i,
321 len);
321 insert_char (ch); 322 insert_char (ch);
322 } 323 }
323 } 324 }
@@ -343,7 +344,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
343 corresponding character code before handing it to 344 corresponding character code before handing it to
344 PRINTCHAR. */ 345 PRINTCHAR. */
345 int len; 346 int len;
346 int ch = STRING_CHAR_AND_LENGTH (ptr + i, len); 347 int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i,
348 len);
347 PRINTCHAR (ch); 349 PRINTCHAR (ch);
348 i += len; 350 i += len;
349 } 351 }
@@ -1519,7 +1521,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1519 For a char code that could be in a unibyte string, 1521 For a char code that could be in a unibyte string,
1520 when found in a multibyte string, always use a hex escape 1522 when found in a multibyte string, always use a hex escape
1521 so it reads back as multibyte. */ 1523 so it reads back as multibyte. */
1522 unsigned char outbuf[50]; 1524 char outbuf[50];
1523 1525
1524 if (CHAR_BYTE8_P (c)) 1526 if (CHAR_BYTE8_P (c))
1525 sprintf (outbuf, "\\%03o", CHAR_TO_BYTE8 (c)); 1527 sprintf (outbuf, "\\%03o", CHAR_TO_BYTE8 (c));
@@ -1538,7 +1540,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1538 or when explicitly requested, 1540 or when explicitly requested,
1539 print single-byte non-ASCII string chars 1541 print single-byte non-ASCII string chars
1540 using octal escapes. */ 1542 using octal escapes. */
1541 unsigned char outbuf[5]; 1543 char outbuf[5];
1542 sprintf (outbuf, "\\%03o", c); 1544 sprintf (outbuf, "\\%03o", c);
1543 strout (outbuf, -1, -1, printcharfun, 0); 1545 strout (outbuf, -1, -1, printcharfun, 0);
1544 } 1546 }