emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103168: Merge: * fns.c: conform to C


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

------------------------------------------------------------
revno: 103168 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2011-02-06 20:44:05 -0800
message:
  Merge: * fns.c: conform to C89 pointer rules
modified:
  src/ChangeLog
  src/fns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-02-07 03:09:32 +0000
+++ b/src/ChangeLog     2011-02-07 04:43:35 +0000
@@ -16,6 +16,10 @@
        (Fuser_full_name, Fsubst_char_in_region, Ftranslate_region_internal):
        (Fformat): Likewise.
        * callint.c (Fcall_interactively): Likewise.
+       * fns.c (string_make_multibyte, string_to_multibyte):
+       (string_make_unibyte, Fstring_as_unibyte, Fstring_to_unibyte):
+       (Fbase64_encode_region, base64_encode_1, Fbase64_decode_region, Fmd5):
+       Likewise.
 
 2011-02-06  Paul Eggert  <address@hidden>
 

=== modified file 'src/fns.c'
--- a/src/fns.c 2011-01-30 22:17:44 +0000
+++ b/src/fns.c 2011-02-07 04:43:35 +0000
@@ -882,7 +882,7 @@
   copy_text (SDATA (string), buf, SBYTES (string),
             0, 1);
 
-  ret = make_multibyte_string (buf, SCHARS (string), nbytes);
+  ret = make_multibyte_string ((char *) buf, SCHARS (string), nbytes);
   SAFE_FREE ();
 
   return ret;
@@ -914,7 +914,7 @@
   memcpy (buf, SDATA (string), SBYTES (string));
   str_to_multibyte (buf, nbytes, SBYTES (string));
 
-  ret = make_multibyte_string (buf, SCHARS (string), nbytes);
+  ret = make_multibyte_string ((char *) buf, SCHARS (string), nbytes);
   SAFE_FREE ();
 
   return ret;
@@ -940,7 +940,7 @@
   copy_text (SDATA (string), buf, SBYTES (string),
             1, 0);
 
-  ret = make_unibyte_string (buf, nchars);
+  ret = make_unibyte_string ((char *) buf, nchars);
   SAFE_FREE ();
 
   return ret;
@@ -996,7 +996,7 @@
 
       memcpy (str, SDATA (string), bytes);
       bytes = str_as_unibyte (str, bytes);
-      string = make_unibyte_string (str, bytes);
+      string = make_unibyte_string ((char *) str, bytes);
       xfree (str);
     }
   return string;
@@ -1079,7 +1079,7 @@
 
       if (converted < chars)
        error ("Can't convert the %dth character to unibyte", converted);
-      string = make_unibyte_string (str, chars);
+      string = make_unibyte_string ((char *) str, chars);
       xfree (str);
     }
   return string;
@@ -2982,8 +2982,8 @@
   allength += allength / MIME_LINE_LENGTH + 1 + 6;
 
   SAFE_ALLOCA (encoded, char *, allength);
-  encoded_length = base64_encode_1 (BYTE_POS_ADDR (ibeg), encoded, length,
-                                   NILP (no_line_break),
+  encoded_length = base64_encode_1 ((char *) BYTE_POS_ADDR (ibeg),
+                                   encoded, length, NILP (no_line_break),
                                    !NILP 
(current_buffer->enable_multibyte_characters));
   if (encoded_length > allength)
     abort ();
@@ -3072,7 +3072,7 @@
     {
       if (multibyte)
        {
-         c = STRING_CHAR_AND_LENGTH (from + i, bytes);
+         c = STRING_CHAR_AND_LENGTH ((unsigned char *) from + i, bytes);
          if (CHAR_BYTE8_P (c))
            c = CHAR_TO_BYTE8 (c);
          else if (c >= 256)
@@ -3112,7 +3112,7 @@
 
       if (multibyte)
        {
-         c = STRING_CHAR_AND_LENGTH (from + i, bytes);
+         c = STRING_CHAR_AND_LENGTH ((unsigned char *) from + i, bytes);
          if (CHAR_BYTE8_P (c))
            c = CHAR_TO_BYTE8 (c);
          else if (c >= 256)
@@ -3136,7 +3136,7 @@
 
       if (multibyte)
        {
-         c = STRING_CHAR_AND_LENGTH (from + i, bytes);
+         c = STRING_CHAR_AND_LENGTH ((unsigned char *) from + i, bytes);
          if (CHAR_BYTE8_P (c))
            c = CHAR_TO_BYTE8 (c);
          else if (c >= 256)
@@ -3183,7 +3183,8 @@
   SAFE_ALLOCA (decoded, char *, allength);
 
   move_gap_both (XFASTINT (beg), ibeg);
-  decoded_length = base64_decode_1 (BYTE_POS_ADDR (ibeg), decoded, length,
+  decoded_length = base64_decode_1 ((char *) BYTE_POS_ADDR (ibeg),
+                                   decoded, length,
                                    multibyte, &inserted_chars);
   if (decoded_length > allength)
     abort ();
@@ -4566,7 +4567,7 @@
   (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object 
coding_system, Lisp_Object noerror)
 {
   unsigned char digest[16];
-  unsigned char value[33];
+  char value[33];
   int i;
   EMACS_INT size;
   EMACS_INT size_byte = 0;


reply via email to

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