aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-02-06 11:56:30 -0800
committerPaul Eggert2011-02-06 11:56:30 -0800
commit01c9aa3af4214b6d70b0e8d372df68ce6884a898 (patch)
treef196d4f7d571689fbf31da9ff28dbffb7d0105e9 /src
parentb68864e5b9b695570d35dd7c41d5d010ba7cc87d (diff)
downloademacs-01c9aa3af4214b6d70b0e8d372df68ce6884a898.tar.gz
emacs-01c9aa3af4214b6d70b0e8d372df68ce6884a898.zip
* keymap.c: conform to C89 pointer rules
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/keymap.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 35883220197..5e2831ea67e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -17,6 +17,7 @@
17 * image.c (xbm_read_bitmap_data, xbm_load_image, xbm_load): Likewise. 17 * image.c (xbm_read_bitmap_data, xbm_load_image, xbm_load): Likewise.
18 * keyboard.c (echo_char, MULTI_LETTER_MOD, tty_read_avail_input): 18 * keyboard.c (echo_char, MULTI_LETTER_MOD, tty_read_avail_input):
19 Likewise. 19 Likewise.
20 * keymap.c (Ftext_char_description): Likewise.
20 * insdel.c (insert, insert_and_inherit, insert_before_markers): 21 * insdel.c (insert, insert_and_inherit, insert_before_markers):
21 (insert_before_markers_and_inherit, insert_1, insert_1_both): 22 (insert_before_markers_and_inherit, insert_1, insert_1_both):
22 Likewise. This changes these functions' signatures, which is 23 Likewise. This changes these functions' signatures, which is
@@ -24,6 +25,9 @@
24 callers changed. 25 callers changed.
25 * editfns.c (general_insert_function): Change signature to 26 * editfns.c (general_insert_function): Change signature to
26 match changes to insert functions' signatures. 27 match changes to insert functions' signatures.
28 * keymap.c (map_keymap_char_table_item, map_keymap_internal): Use
29 explicit cast when converting between void * and function pointer
30 types, as C89 requires this.
27 31
282011-02-05 Paul Eggert <eggert@cs.ucla.edu> 322011-02-05 Paul Eggert <eggert@cs.ucla.edu>
29 33
diff --git a/src/keymap.c b/src/keymap.c
index 1e6b76a4642..8ee4f41bd6f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -584,7 +584,8 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val)
584{ 584{
585 if (!NILP (val)) 585 if (!NILP (val))
586 { 586 {
587 map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer; 587 map_keymap_function_t fun =
588 (map_keymap_function_t) XSAVE_VALUE (XCAR (args))->pointer;
588 args = XCDR (args); 589 args = XCDR (args);
589 /* If the key is a range, make a copy since map_char_table modifies 590 /* If the key is a range, make a copy since map_char_table modifies
590 it in place. */ 591 it in place. */
@@ -629,7 +630,7 @@ map_keymap_internal (Lisp_Object map,
629 else if (CHAR_TABLE_P (binding)) 630 else if (CHAR_TABLE_P (binding))
630 { 631 {
631 map_char_table (map_keymap_char_table_item, Qnil, binding, 632 map_char_table (map_keymap_char_table_item, Qnil, binding,
632 Fcons (make_save_value (fun, 0), 633 Fcons (make_save_value ((void *) fun, 0),
633 Fcons (make_save_value (data, 0), 634 Fcons (make_save_value (data, 0),
634 args))); 635 args)));
635 } 636 }
@@ -2474,7 +2475,7 @@ See Info node `(elisp)Describing Characters' for examples. */)
2474 (Lisp_Object character) 2475 (Lisp_Object character)
2475{ 2476{
2476 /* Currently MAX_MULTIBYTE_LENGTH is 4 (< 6). */ 2477 /* Currently MAX_MULTIBYTE_LENGTH is 4 (< 6). */
2477 unsigned char str[6]; 2478 char str[6];
2478 int c; 2479 int c;
2479 2480
2480 CHECK_NUMBER (character); 2481 CHECK_NUMBER (character);
@@ -2482,7 +2483,7 @@ See Info node `(elisp)Describing Characters' for examples. */)
2482 c = XINT (character); 2483 c = XINT (character);
2483 if (!ASCII_CHAR_P (c)) 2484 if (!ASCII_CHAR_P (c))
2484 { 2485 {
2485 int len = CHAR_STRING (c, str); 2486 int len = CHAR_STRING (c, (unsigned char *) str);
2486 2487
2487 return make_multibyte_string (str, 1, len); 2488 return make_multibyte_string (str, 1, len);
2488 } 2489 }
@@ -3975,4 +3976,3 @@ keys_of_keymap (void)
3975 initial_define_key (global_map, 033, "ESC-prefix"); 3976 initial_define_key (global_map, 033, "ESC-prefix");
3976 initial_define_key (global_map, Ctl ('X'), "Control-X-prefix"); 3977 initial_define_key (global_map, Ctl ('X'), "Control-X-prefix");
3977} 3978}
3978