diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-10-10 13:09:47 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-10-10 13:09:47 -0700 |
commit | 9fa1de305acd530060062a1470f3018de7937bb1 (patch) | |
tree | bb182ee666aef3b52b046d56e10ab282cad65bc9 /src/keyboard.h | |
parent | e738ca5624ba0f3703095e0ad48b4ef7b97973bf (diff) | |
download | emacs-9fa1de305acd530060062a1470f3018de7937bb1.tar.gz |
keyboard.c, keymap.c: Use bool for booleans.
* dispnew.c (sit_for): Distinguish between 3-way display_option
and boolean do_display.
* keyboard.c (single_kboard, this_command_key_count_reset)
(waiting_for_input, echoing, immediate_quit, input_pending)
(interrupt_input, interrupts_deferred, pop_kboard)
(temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
(command_loop_1, adjust_point_for_property)
(safe_run_hooks_error, input_polling_used, read_char):
(help_char_p, readable_events, kbd_buffer_events_waiting)
(kbd_buffer_get_event, timer_check_2, make_lispy_event)
(lucid_event_type_list_p, get_input_pending):
(gobble_input, menu_separator_name_p, menu_bar_item)
(parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
(read_char_minibuf_menu_prompt, access_keymap_keyremap)
(keyremap_step, test_undefined, read_key_sequence)
(detect_input_pending, detect_input_pending_ignore_squeezables)
(detect_input_pending_run_timers, requeued_events_pending_p)
(quit_throw_to_read_char, Fset_input_interrupt_mode):
* keymap.c (get_keymap, keymap_parent, keymap_memberp)
(access_keymap_1, access_keymap, map_keymap, get_keyelt)
(Fdefine_key, Flookup_key, struct accessible_keymaps_data)
(accessible_keymaps_1, Fkey_description, push_key_description):
(shadow_lookup, struct where_is_internal_data)
(where_is_internal, Fwhere_is_internal, where_is_internal_1)
(Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
(describe_map, describe_vector):
* menu.c (single_menu_item):
* nsmenu.m (ns_update_menubar):
* process.c (wait_reading_process_output):
* search.c (scan_buffer, scan_newline):
Use bool for boolean.
* keyboard.c (timers_run, swallow_events)
(detect_input_pending_run_timers):
* process.c (wait_reading_process_output):
Use unsigned for counter where wraparound-on-overflow is desired,
since unsigned is guaranteed to have that behavior and signed is not.
(read_char): Use ptrdiff_t for string length.
(get_input_pending): Remove first argument, since it was always
the same pointer-to-int (now pointer-to-boolean) &input_pending,
and behave as if it had that value. Return new value of
input_pending. All callers changed.
* keyboard.h (struct kboard): Use unsigned : 1 for boolean member
immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
a string length.
* keymap.c (push_key_description): Omit last arg, which was always 1.
All callers changed.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r-- | src/keyboard.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index d78c27fbf9b..e57c8cc7193 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -169,12 +169,12 @@ struct kboard reading from this KBOARD again until more input arrives. */ char kbd_queue_has_data; - /* Nonzero means echo each character as typed. */ - char immediate_echo; + /* True means echo each character as typed. */ + unsigned immediate_echo : 1; /* If we have echoed a prompt string specified by the user, this is its length in characters. Otherwise this is -1. */ - char echo_after_prompt; + ptrdiff_t echo_after_prompt; }; KEYBOARD_INLINE void @@ -463,14 +463,14 @@ extern Lisp_Object Qhelp_echo; extern Lisp_Object Qmode_line, Qvertical_line, Qheader_line; /* True while doing kbd input. */ -extern int waiting_for_input; +extern bool waiting_for_input; /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt happens. */ extern EMACS_TIME *input_available_clear_time; #if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS -extern int ignore_mouse_drag_p; +extern bool ignore_mouse_drag_p; #endif /* The primary selection. */ @@ -482,7 +482,7 @@ struct input_event; extern Lisp_Object parse_modifiers (Lisp_Object); extern Lisp_Object reorder_modifiers (Lisp_Object); extern Lisp_Object read_char (int, ptrdiff_t, Lisp_Object *, Lisp_Object, - int *, EMACS_TIME *); + bool *, EMACS_TIME *); extern int parse_solitary_modifier (Lisp_Object symbol); @@ -506,10 +506,10 @@ extern Time last_event_timestamp; extern int quit_char; -extern int timers_run; +extern unsigned int timers_run; -extern int menu_separator_name_p (const char *); -extern int parse_menu_item (Lisp_Object, int); +extern bool menu_separator_name_p (const char *); +extern bool parse_menu_item (Lisp_Object, int); extern void init_kboard (KBOARD *); extern void delete_kboard (KBOARD *); @@ -524,15 +524,15 @@ extern void start_polling (void); extern void stop_polling (void); extern void set_poll_suppress_count (int); extern int gobble_input (void); -extern int input_polling_used (void); +extern bool input_polling_used (void); extern void clear_input_pending (void); -extern int requeued_events_pending_p (void); +extern bool requeued_events_pending_p (void); extern void bind_polling_period (int); extern int make_ctrl_char (int) ATTRIBUTE_CONST; extern void stuff_buffered_input (Lisp_Object); extern void clear_waiting_for_input (void); -extern void swallow_events (int); -extern int lucid_event_type_list_p (Lisp_Object); +extern void swallow_events (bool); +extern bool lucid_event_type_list_p (Lisp_Object); extern void kbd_buffer_store_event (struct input_event *); extern void kbd_buffer_store_event_hold (struct input_event *, struct input_event *); @@ -544,7 +544,7 @@ extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, ptrdiff_t); extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object); extern Lisp_Object menu_item_eval_property (Lisp_Object); -extern int kbd_buffer_events_waiting (int); +extern bool kbd_buffer_events_waiting (void); extern void add_user_signal (int, const char *); extern int tty_read_avail_input (struct terminal *, struct input_event *); |