emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103148: Merge: * keymap.c: conform t


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

------------------------------------------------------------
revno: 103148 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2011-02-06 11:56:59 -0800
message:
  Merge: * keymap.c: conform to C89 pointer rules
modified:
  src/ChangeLog
  src/keymap.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-02-06 19:44:36 +0000
+++ b/src/ChangeLog     2011-02-06 19:56:30 +0000
@@ -17,6 +17,7 @@
        * image.c (xbm_read_bitmap_data, xbm_load_image, xbm_load): Likewise.
        * keyboard.c (echo_char, MULTI_LETTER_MOD, tty_read_avail_input):
        Likewise.
+       * keymap.c (Ftext_char_description): Likewise.
        * insdel.c (insert, insert_and_inherit, insert_before_markers):
        (insert_before_markers_and_inherit, insert_1, insert_1_both):
        Likewise.  This changes these functions' signatures, which is
@@ -24,6 +25,9 @@
        callers changed.
        * editfns.c (general_insert_function): Change signature to
        match changes to insert functions' signatures.
+       * keymap.c (map_keymap_char_table_item, map_keymap_internal): Use
+       explicit cast when converting between void * and function pointer
+       types, as C89 requires this.
 
 2011-02-05  Paul Eggert  <address@hidden>
 

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2011-01-25 04:08:28 +0000
+++ b/src/keymap.c      2011-02-06 19:56:30 +0000
@@ -584,7 +584,8 @@
 {
   if (!NILP (val))
     {
-      map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer;
+      map_keymap_function_t fun =
+       (map_keymap_function_t) XSAVE_VALUE (XCAR (args))->pointer;
       args = XCDR (args);
       /* If the key is a range, make a copy since map_char_table modifies
         it in place.  */
@@ -629,7 +630,7 @@
       else if (CHAR_TABLE_P (binding))
        {
          map_char_table (map_keymap_char_table_item, Qnil, binding,
-                         Fcons (make_save_value (fun, 0),
+                         Fcons (make_save_value ((void *) fun, 0),
                                 Fcons (make_save_value (data, 0),
                                        args)));
        }
@@ -2474,7 +2475,7 @@
   (Lisp_Object character)
 {
   /* Currently MAX_MULTIBYTE_LENGTH is 4 (< 6).  */
-  unsigned char str[6];
+  char str[6];
   int c;
 
   CHECK_NUMBER (character);
@@ -2482,7 +2483,7 @@
   c = XINT (character);
   if (!ASCII_CHAR_P (c))
     {
-      int len = CHAR_STRING (c, str);
+      int len = CHAR_STRING (c, (unsigned char *) str);
 
       return make_multibyte_string (str, 1, len);
     }
@@ -3975,4 +3976,3 @@
   initial_define_key (global_map, 033, "ESC-prefix");
   initial_define_key (global_map, Ctl ('X'), "Control-X-prefix");
 }
-


reply via email to

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