diff options
| author | Paul Eggert | 2014-04-05 12:30:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-04-05 12:30:36 -0700 |
| commit | faa521749378dbfd97f49a0e5c48f6da2ce1ddba (patch) | |
| tree | d470dbfa3328aaeffe5cba065103e237238a13be /src/keyboard.c | |
| parent | 1b058e42524353c9ff133ea330876ed2d39b6515 (diff) | |
| download | emacs-faa521749378dbfd97f49a0e5c48f6da2ce1ddba.tar.gz emacs-faa521749378dbfd97f49a0e5c48f6da2ce1ddba.zip | |
Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
* alloc.c (memory_full):
* charset.c (syms_of_charset):
* doc.c (Fsnarf_documentation):
* emacs.c (main):
* font.c (BUILD_STYLE_TABLE):
* keyboard.c (make_lispy_event):
* profiler.c (setup_cpu_timer):
* xgselect.c (xg_select):
* xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
Use ARRAYELTS.
* font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
Replace the only use with ARRAYELTS (font_property_table).
* xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 6de537085fe..277d4f1047c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -5478,7 +5478,7 @@ make_lispy_event (struct input_event *event) | |||
| 5478 | case NON_ASCII_KEYSTROKE_EVENT: | 5478 | case NON_ASCII_KEYSTROKE_EVENT: |
| 5479 | button_down_time = 0; | 5479 | button_down_time = 0; |
| 5480 | 5480 | ||
| 5481 | for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++) | 5481 | for (i = 0; i < ARRAYELTS (lispy_accent_codes); i++) |
| 5482 | if (event->code == lispy_accent_codes[i]) | 5482 | if (event->code == lispy_accent_codes[i]) |
| 5483 | return modify_event_symbol (i, | 5483 | return modify_event_symbol (i, |
| 5484 | event->modifiers, | 5484 | event->modifiers, |
| @@ -5511,7 +5511,7 @@ make_lispy_event (struct input_event *event) | |||
| 5511 | if (event->code & (1 << 28) | 5511 | if (event->code & (1 << 28) |
| 5512 | || event->code - FUNCTION_KEY_OFFSET < 0 | 5512 | || event->code - FUNCTION_KEY_OFFSET < 0 |
| 5513 | || (event->code - FUNCTION_KEY_OFFSET | 5513 | || (event->code - FUNCTION_KEY_OFFSET |
| 5514 | >= sizeof lispy_function_keys / sizeof *lispy_function_keys) | 5514 | >= ARRAYELTS (lispy_function_keys)) |
| 5515 | || !lispy_function_keys[event->code - FUNCTION_KEY_OFFSET]) | 5515 | || !lispy_function_keys[event->code - FUNCTION_KEY_OFFSET]) |
| 5516 | { | 5516 | { |
| 5517 | /* We need to use an alist rather than a vector as the cache | 5517 | /* We need to use an alist rather than a vector as the cache |
| @@ -7282,7 +7282,7 @@ store_user_signal_events (void) | |||
| 7282 | } | 7282 | } |
| 7283 | 7283 | ||
| 7284 | 7284 | ||
| 7285 | static void menu_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*); | 7285 | static void menu_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void *); |
| 7286 | static Lisp_Object menu_bar_one_keymap_changed_items; | 7286 | static Lisp_Object menu_bar_one_keymap_changed_items; |
| 7287 | 7287 | ||
| 7288 | /* These variables hold the vector under construction within | 7288 | /* These variables hold the vector under construction within |
| @@ -7292,7 +7292,7 @@ static Lisp_Object menu_bar_items_vector; | |||
| 7292 | static int menu_bar_items_index; | 7292 | static int menu_bar_items_index; |
| 7293 | 7293 | ||
| 7294 | 7294 | ||
| 7295 | static const char* separator_names[] = { | 7295 | static const char *separator_names[] = { |
| 7296 | "space", | 7296 | "space", |
| 7297 | "no-line", | 7297 | "no-line", |
| 7298 | "single-line", | 7298 | "single-line", |
| @@ -7900,7 +7900,8 @@ static Lisp_Object QCrtl; | |||
| 7900 | /* Function prototypes. */ | 7900 | /* Function prototypes. */ |
| 7901 | 7901 | ||
| 7902 | static void init_tool_bar_items (Lisp_Object); | 7902 | static void init_tool_bar_items (Lisp_Object); |
| 7903 | static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*); | 7903 | static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, |
| 7904 | void *); | ||
| 7904 | static bool parse_tool_bar_item (Lisp_Object, Lisp_Object); | 7905 | static bool parse_tool_bar_item (Lisp_Object, Lisp_Object); |
| 7905 | static void append_tool_bar_item (void); | 7906 | static void append_tool_bar_item (void); |
| 7906 | 7907 | ||