aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2010-11-14 15:55:27 +0900
committerYAMAMOTO Mitsuharu2010-11-14 15:55:27 +0900
commit24021b384e7ecf31a0f5be632fc45d7413fb2b91 (patch)
tree492d02898afe602edff0d44da4e49bddbd6038cd
parentafa42fe3f1f069e403c21f2872347c448b06af58 (diff)
downloademacs-24021b384e7ecf31a0f5be632fc45d7413fb2b91.tar.gz
emacs-24021b384e7ecf31a0f5be632fc45d7413fb2b91.zip
Add const to array elements.
* keyboard.c (modify_event_symbol) : Add const to array elements of arg NAME_TABLE. (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys) (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names) (lispy_wheel_names, lispy_drag_n_drop_names, modifier_names): Add const to array elements. (scroll_bar_parts): Make static. Fix position of const. * w32fns.c (lispy_function_keys): Add const to extern. * w32inevt.c (lispy_function_keys): Likewise.
-rw-r--r--src/ChangeLog14
-rw-r--r--src/keyboard.c24
-rw-r--r--src/w32fns.c2
-rw-r--r--src/w32inevt.c2
4 files changed, 28 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dbd735f72f9..62b400c0084 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,17 @@
12010-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * keyboard.c (modify_event_symbol) : Add const to array elements of
4 arg NAME_TABLE.
5 (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys)
6 (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names)
7 (lispy_wheel_names, lispy_drag_n_drop_names, modifier_names):
8 Add const to array elements.
9 (scroll_bar_parts): Make static. Fix position of const.
10
11 * w32fns.c (lispy_function_keys): Add const to extern.
12
13 * w32inevt.c (lispy_function_keys): Likewise.
14
12010-11-14 Chong Yidong <cyd@stupidchicken.com> 152010-11-14 Chong Yidong <cyd@stupidchicken.com>
2 16
3 * xfns.c (Fx_create_frame): Don't check for the cursorColor 17 * xfns.c (Fx_create_frame): Don't check for the cursorColor
diff --git a/src/keyboard.c b/src/keyboard.c
index 9af26cd427d..b9931d5f12d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -620,7 +620,7 @@ static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object,
620 unsigned long); 620 unsigned long);
621#endif 621#endif
622static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object, 622static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object,
623 Lisp_Object, const char **, 623 Lisp_Object, const char *const *,
624 Lisp_Object *, unsigned); 624 Lisp_Object *, unsigned);
625static Lisp_Object make_lispy_switch_frame (Lisp_Object); 625static Lisp_Object make_lispy_switch_frame (Lisp_Object);
626static void save_getcjmp (jmp_buf); 626static void save_getcjmp (jmp_buf);
@@ -4752,7 +4752,7 @@ static const int lispy_accent_codes[] =
4752/* This is a list of Lisp names for special "accent" characters. 4752/* This is a list of Lisp names for special "accent" characters.
4753 It parallels lispy_accent_codes. */ 4753 It parallels lispy_accent_codes. */
4754 4754
4755static const char *lispy_accent_keys[] = 4755static const char *const lispy_accent_keys[] =
4756{ 4756{
4757 "dead-circumflex", 4757 "dead-circumflex",
4758 "dead-grave", 4758 "dead-grave",
@@ -4779,7 +4779,7 @@ static const char *lispy_accent_keys[] =
4779#ifdef HAVE_NTGUI 4779#ifdef HAVE_NTGUI
4780#define FUNCTION_KEY_OFFSET 0x0 4780#define FUNCTION_KEY_OFFSET 0x0
4781 4781
4782char const *lispy_function_keys[] = 4782const char *const lispy_function_keys[] =
4783 { 4783 {
4784 0, /* 0 */ 4784 0, /* 0 */
4785 4785
@@ -4973,7 +4973,7 @@ char const *lispy_function_keys[] =
4973 4973
4974/* Some of these duplicate the "Media keys" on newer keyboards, 4974/* Some of these duplicate the "Media keys" on newer keyboards,
4975 but they are delivered to the application in a different way. */ 4975 but they are delivered to the application in a different way. */
4976static const char *lispy_multimedia_keys[] = 4976static const char *const lispy_multimedia_keys[] =
4977 { 4977 {
4978 0, 4978 0,
4979 "browser-back", 4979 "browser-back",
@@ -5037,7 +5037,7 @@ static const char *lispy_multimedia_keys[] =
5037 the XK_kana_A case below. */ 5037 the XK_kana_A case below. */
5038#if 0 5038#if 0
5039#ifdef XK_kana_A 5039#ifdef XK_kana_A
5040static const char *lispy_kana_keys[] = 5040static const char *const lispy_kana_keys[] =
5041 { 5041 {
5042 /* X Keysym value */ 5042 /* X Keysym value */
5043 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x400 .. 0x40f */ 5043 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x400 .. 0x40f */
@@ -5076,7 +5076,7 @@ static const char *lispy_kana_keys[] =
5076 5076
5077/* You'll notice that this table is arranged to be conveniently 5077/* You'll notice that this table is arranged to be conveniently
5078 indexed by X Windows keysym values. */ 5078 indexed by X Windows keysym values. */
5079static const char *lispy_function_keys[] = 5079static const char *const lispy_function_keys[] =
5080 { 5080 {
5081 /* X Keysym value */ 5081 /* X Keysym value */
5082 5082
@@ -5162,7 +5162,7 @@ static const char *lispy_function_keys[] =
5162/* ISO 9995 Function and Modifier Keys; the first byte is 0xFE. */ 5162/* ISO 9995 Function and Modifier Keys; the first byte is 0xFE. */
5163#define ISO_FUNCTION_KEY_OFFSET 0xfe00 5163#define ISO_FUNCTION_KEY_OFFSET 0xfe00
5164 5164
5165static const char *iso_lispy_function_keys[] = 5165static const char *const iso_lispy_function_keys[] =
5166 { 5166 {
5167 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe00 */ 5167 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe00 */
5168 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe08 */ 5168 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe08 */
@@ -5185,14 +5185,14 @@ static const char *iso_lispy_function_keys[] =
5185 5185
5186Lisp_Object Vlispy_mouse_stem; 5186Lisp_Object Vlispy_mouse_stem;
5187 5187
5188static const char *lispy_wheel_names[] = 5188static const char *const lispy_wheel_names[] =
5189{ 5189{
5190 "wheel-up", "wheel-down", "wheel-left", "wheel-right" 5190 "wheel-up", "wheel-down", "wheel-left", "wheel-right"
5191}; 5191};
5192 5192
5193/* drag-n-drop events are generated when a set of selected files are 5193/* drag-n-drop events are generated when a set of selected files are
5194 dragged from another application and dropped onto an Emacs window. */ 5194 dragged from another application and dropped onto an Emacs window. */
5195static const char *lispy_drag_n_drop_names[] = 5195static const char *const lispy_drag_n_drop_names[] =
5196{ 5196{
5197 "drag-n-drop" 5197 "drag-n-drop"
5198}; 5198};
@@ -5203,7 +5203,7 @@ Lisp_Object Qup, Qdown, Qbottom, Qend_scroll;
5203Lisp_Object Qtop, Qratio; 5203Lisp_Object Qtop, Qratio;
5204 5204
5205/* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */ 5205/* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */
5206const Lisp_Object *scroll_bar_parts[] = { 5206static Lisp_Object *const scroll_bar_parts[] = {
5207 &Qabove_handle, &Qhandle, &Qbelow_handle, 5207 &Qabove_handle, &Qhandle, &Qbelow_handle,
5208 &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio 5208 &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio
5209}; 5209};
@@ -6351,7 +6351,7 @@ apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_
6351} 6351}
6352 6352
6353 6353
6354static const char *modifier_names[] = 6354static const char *const modifier_names[] =
6355{ 6355{
6356 "up", "down", "drag", "click", "double", "triple", 0, 0, 6356 "up", "down", "drag", "click", "double", "triple", 0, 0,
6357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6571,7 +6571,7 @@ reorder_modifiers (Lisp_Object symbol)
6571 6571
6572static Lisp_Object 6572static Lisp_Object
6573modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object symbol_kind, 6573modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object symbol_kind,
6574 Lisp_Object name_alist_or_stem, const char **name_table, 6574 Lisp_Object name_alist_or_stem, const char *const *name_table,
6575 Lisp_Object *symbol_table, unsigned int table_size) 6575 Lisp_Object *symbol_table, unsigned int table_size)
6576{ 6576{
6577 Lisp_Object value; 6577 Lisp_Object value;
diff --git a/src/w32fns.c b/src/w32fns.c
index 5a4f1354993..077387972fb 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -82,7 +82,7 @@ extern const char *map_w32_filename (const char *, const char **);
82 82
83extern int quit_char; 83extern int quit_char;
84 84
85extern char *lispy_function_keys[]; 85extern const char *const lispy_function_keys[];
86 86
87/* The colormap for converting color names to RGB values */ 87/* The colormap for converting color names to RGB values */
88Lisp_Object Vw32_color_map; 88Lisp_Object Vw32_color_map;
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 1111f8dfa44..3757c528e8b 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -282,7 +282,7 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event)
282} 282}
283 283
284 284
285extern char *lispy_function_keys[]; 285extern const char *const lispy_function_keys[];
286 286
287static int faked_key = 0; 287static int faked_key = 0;
288 288