emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103165: Merge: * print.c: conform to


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103165: Merge: * print.c: conform to C89 pointer rules
Date: Sun, 06 Feb 2011 18:27:27 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103165 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2011-02-06 18:27:27 -0800
message:
  Merge: * print.c: conform to C89 pointer rules
modified:
  src/ChangeLog
  src/print.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-02-07 02:18:35 +0000
+++ b/src/ChangeLog     2011-02-07 02:26:14 +0000
@@ -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  <address@hidden>
 

=== modified file 'src/print.c'
--- a/src/print.c       2011-02-07 02:18:35 +0000
+++ b/src/print.c       2011-02-07 02:26:14 +0000
@@ -177,8 +177,8 @@
         {                                                              \
           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 @@
 
          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 @@
          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 @@
                 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 @@
                     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 @@
                     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);
                }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]