From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 7 Feb 2011 02:26:14 +0000 (-0800)
Subject: * print.c: conform to C89 pointer rules
X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~989
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=09125ef8472d8b3d3b1ba762abc7feeb64b32911;p=emacs.git

* print.c: conform to C89 pointer rules
---

diff --git a/src/ChangeLog b/src/ChangeLog
index a3e68dd92b0..72a7bb926f7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -10,7 +10,8 @@
 	* alloc.c (make_string, make_specified_string, make_pure_string):
 	Likewise.
 	* data.c (Fstring_to_number): Likewise.
-	* print.c (float_to_string): Likewise.
+	* print.c (float_to_string, PRINTFINISH, printchar, strout):
+	(print_object): Likewise.
 
 2011-02-06  Paul Eggert  <eggert@cs.ucla.edu>
 
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;
 	 {								\
 	   unsigned char *temp						\
 	     = (unsigned char *) alloca (print_buffer_pos + 1);		\
-	   copy_text (print_buffer, temp, print_buffer_pos_byte,	\
-		      1, 0);						\
+	   copy_text ((unsigned char *) print_buffer, temp,		\
+		      print_buffer_pos_byte, 1, 0);			\
 	   insert_1_both ((char *) temp, print_buffer_pos,		\
 			  print_buffer_pos, 0, 1, 0);			\
 	 }								\
@@ -254,7 +254,7 @@ printchar (unsigned int ch, Lisp_Object fun)
 
 	  setup_echo_area_for_printing (multibyte_p);
 	  insert_char (ch);
-	  message_dolog (str, len, 0, multibyte_p);
+	  message_dolog ((char *) str, len, 0, multibyte_p);
 	}
     }
 }
@@ -317,7 +317,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
 	  int len;
 	  for (i = 0; i < size_byte; i += len)
 	    {
-	      int ch = STRING_CHAR_AND_LENGTH (ptr + i, len);
+	      int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i,
+					       len);
 	      insert_char (ch);
 	    }
 	}
@@ -343,7 +344,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
 		 corresponding character code before handing it to
 		 PRINTCHAR.  */
 	      int len;
-	      int ch = STRING_CHAR_AND_LENGTH (ptr + i, len);
+	      int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i,
+					       len);
 	      PRINTCHAR (ch);
 	      i += len;
 	    }
@@ -1519,7 +1521,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
 		     For a char code that could be in a unibyte string,
 		     when found in a multibyte string, always use a hex escape
 		     so it reads back as multibyte.  */
-		  unsigned char outbuf[50];
+		  char outbuf[50];
 
 		  if (CHAR_BYTE8_P (c))
 		    sprintf (outbuf, "\\%03o", CHAR_TO_BYTE8 (c));
@@ -1538,7 +1540,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
 		     or when explicitly requested,
 		     print single-byte non-ASCII string chars
 		     using octal escapes.  */
-		  unsigned char outbuf[5];
+		  char outbuf[5];
 		  sprintf (outbuf, "\\%03o", c);
 		  strout (outbuf, -1, -1, printcharfun, 0);
 		}