]> git.eshelyaron.com Git - emacs.git/commitdiff
* print.c: conform to C89 pointer rules
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Feb 2011 02:26:14 +0000 (18:26 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Feb 2011 02:26:14 +0000 (18:26 -0800)
src/ChangeLog
src/print.c

index a3e68dd92b077e0f770d1825febcaed5dad0d4fd..72a7bb926f7d1d7b5e2dbf5fc4152e7e1b67facc 100644 (file)
@@ -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>
 
index fe2c8e159323a5256f0ac47cdd8649dd4e1e0169..f47b71087f4b17e29a4e1823d747268698a08f01 100644 (file)
@@ -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);
                }