diff options
| author | Stefan Monnier | 2015-08-14 15:29:11 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-08-14 15:29:11 -0400 |
| commit | e1e33f201698229ae30a29c7008c3f6a3635d71f (patch) | |
| tree | 0ecec98e36275190220f2c1e61b2f7ed7bab5e39 /src | |
| parent | 59ff39dca6e5b85b03ec5453d256382e06771ab3 (diff) | |
| download | emacs-e1e33f201698229ae30a29c7008c3f6a3635d71f.tar.gz emacs-e1e33f201698229ae30a29c7008c3f6a3635d71f.zip | |
* src/keyboard.c: Use false/true instead of 0/1 for booleans
* src/keyboard.h (struct kboard): Mark kbd_queue_has_data as boolean.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 193 | ||||
| -rw-r--r-- | src/keyboard.h | 2 |
2 files changed, 98 insertions, 97 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 6f626b79920..a577105a236 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -583,7 +583,7 @@ echo_now (void) | |||
| 583 | if (!current_kboard->immediate_echo) | 583 | if (!current_kboard->immediate_echo) |
| 584 | { | 584 | { |
| 585 | ptrdiff_t i; | 585 | ptrdiff_t i; |
| 586 | current_kboard->immediate_echo = 1; | 586 | current_kboard->immediate_echo = true; |
| 587 | 587 | ||
| 588 | for (i = 0; i < this_command_key_count; i++) | 588 | for (i = 0; i < this_command_key_count; i++) |
| 589 | { | 589 | { |
| @@ -611,10 +611,10 @@ echo_now (void) | |||
| 611 | echo_dash (); | 611 | echo_dash (); |
| 612 | } | 612 | } |
| 613 | 613 | ||
| 614 | echoing = 1; | 614 | echoing = true; |
| 615 | /* FIXME: Use call (Qmessage) so it can be advised (e.g. emacspeak). */ | 615 | /* FIXME: Use call (Qmessage) so it can be advised (e.g. emacspeak). */ |
| 616 | message3_nolog (KVAR (current_kboard, echo_string)); | 616 | message3_nolog (KVAR (current_kboard, echo_string)); |
| 617 | echoing = 0; | 617 | echoing = false; |
| 618 | 618 | ||
| 619 | /* Record in what buffer we echoed, and from which kboard. */ | 619 | /* Record in what buffer we echoed, and from which kboard. */ |
| 620 | echo_message_buffer = echo_area_buffer[0]; | 620 | echo_message_buffer = echo_area_buffer[0]; |
| @@ -629,7 +629,7 @@ echo_now (void) | |||
| 629 | void | 629 | void |
| 630 | cancel_echoing (void) | 630 | cancel_echoing (void) |
| 631 | { | 631 | { |
| 632 | current_kboard->immediate_echo = 0; | 632 | current_kboard->immediate_echo = false; |
| 633 | current_kboard->echo_after_prompt = -1; | 633 | current_kboard->echo_after_prompt = -1; |
| 634 | kset_echo_string (current_kboard, Qnil); | 634 | kset_echo_string (current_kboard, Qnil); |
| 635 | ok_to_echo_at_next_pause = NULL; | 635 | ok_to_echo_at_next_pause = NULL; |
| @@ -819,11 +819,11 @@ any_kboard_state () | |||
| 819 | { | 819 | { |
| 820 | current_kboard->kbd_queue | 820 | current_kboard->kbd_queue |
| 821 | = nconc2 (Vunread_command_events, current_kboard->kbd_queue); | 821 | = nconc2 (Vunread_command_events, current_kboard->kbd_queue); |
| 822 | current_kboard->kbd_queue_has_data = 1; | 822 | current_kboard->kbd_queue_has_data = true; |
| 823 | } | 823 | } |
| 824 | Vunread_command_events = Qnil; | 824 | Vunread_command_events = Qnil; |
| 825 | #endif | 825 | #endif |
| 826 | single_kboard = 0; | 826 | single_kboard = false; |
| 827 | } | 827 | } |
| 828 | 828 | ||
| 829 | /* Switch to the single-kboard state, making current_kboard | 829 | /* Switch to the single-kboard state, making current_kboard |
| @@ -832,7 +832,7 @@ any_kboard_state () | |||
| 832 | void | 832 | void |
| 833 | single_kboard_state () | 833 | single_kboard_state () |
| 834 | { | 834 | { |
| 835 | single_kboard = 1; | 835 | single_kboard = true; |
| 836 | } | 836 | } |
| 837 | #endif | 837 | #endif |
| 838 | 838 | ||
| @@ -843,7 +843,7 @@ void | |||
| 843 | not_single_kboard_state (KBOARD *kboard) | 843 | not_single_kboard_state (KBOARD *kboard) |
| 844 | { | 844 | { |
| 845 | if (kboard == current_kboard) | 845 | if (kboard == current_kboard) |
| 846 | single_kboard = 0; | 846 | single_kboard = false; |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | /* Maintain a stack of kboards, so other parts of Emacs | 849 | /* Maintain a stack of kboards, so other parts of Emacs |
| @@ -875,13 +875,13 @@ pop_kboard (void) | |||
| 875 | { | 875 | { |
| 876 | struct terminal *t; | 876 | struct terminal *t; |
| 877 | struct kboard_stack *p = kboard_stack; | 877 | struct kboard_stack *p = kboard_stack; |
| 878 | bool found = 0; | 878 | bool found = false; |
| 879 | for (t = terminal_list; t; t = t->next_terminal) | 879 | for (t = terminal_list; t; t = t->next_terminal) |
| 880 | { | 880 | { |
| 881 | if (t->kboard == p->kboard) | 881 | if (t->kboard == p->kboard) |
| 882 | { | 882 | { |
| 883 | current_kboard = p->kboard; | 883 | current_kboard = p->kboard; |
| 884 | found = 1; | 884 | found = true; |
| 885 | break; | 885 | break; |
| 886 | } | 886 | } |
| 887 | } | 887 | } |
| @@ -889,7 +889,7 @@ pop_kboard (void) | |||
| 889 | { | 889 | { |
| 890 | /* The terminal we remembered has been deleted. */ | 890 | /* The terminal we remembered has been deleted. */ |
| 891 | current_kboard = FRAME_KBOARD (SELECTED_FRAME ()); | 891 | current_kboard = FRAME_KBOARD (SELECTED_FRAME ()); |
| 892 | single_kboard = 0; | 892 | single_kboard = false; |
| 893 | } | 893 | } |
| 894 | kboard_stack = p->next; | 894 | kboard_stack = p->next; |
| 895 | xfree (p); | 895 | xfree (p); |
| @@ -929,7 +929,7 @@ temporarily_switch_to_single_kboard (struct frame *f) | |||
| 929 | } | 929 | } |
| 930 | else if (f != NULL) | 930 | else if (f != NULL) |
| 931 | current_kboard = FRAME_KBOARD (f); | 931 | current_kboard = FRAME_KBOARD (f); |
| 932 | single_kboard = 1; | 932 | single_kboard = true; |
| 933 | record_unwind_protect_int (restore_kboard_configuration, was_locked); | 933 | record_unwind_protect_int (restore_kboard_configuration, was_locked); |
| 934 | } | 934 | } |
| 935 | 935 | ||
| @@ -1302,11 +1302,11 @@ command_loop_1 (void) | |||
| 1302 | kset_prefix_arg (current_kboard, Qnil); | 1302 | kset_prefix_arg (current_kboard, Qnil); |
| 1303 | kset_last_prefix_arg (current_kboard, Qnil); | 1303 | kset_last_prefix_arg (current_kboard, Qnil); |
| 1304 | Vdeactivate_mark = Qnil; | 1304 | Vdeactivate_mark = Qnil; |
| 1305 | waiting_for_input = 0; | 1305 | waiting_for_input = false; |
| 1306 | cancel_echoing (); | 1306 | cancel_echoing (); |
| 1307 | 1307 | ||
| 1308 | this_command_key_count = 0; | 1308 | this_command_key_count = 0; |
| 1309 | this_command_key_count_reset = 0; | 1309 | this_command_key_count_reset = false; |
| 1310 | this_single_command_key_start = 0; | 1310 | this_single_command_key_start = 0; |
| 1311 | 1311 | ||
| 1312 | if (NILP (Vmemory_full)) | 1312 | if (NILP (Vmemory_full)) |
| @@ -1424,7 +1424,7 @@ command_loop_1 (void) | |||
| 1424 | { | 1424 | { |
| 1425 | cancel_echoing (); | 1425 | cancel_echoing (); |
| 1426 | this_command_key_count = 0; | 1426 | this_command_key_count = 0; |
| 1427 | this_command_key_count_reset = 0; | 1427 | this_command_key_count_reset = false; |
| 1428 | this_single_command_key_start = 0; | 1428 | this_single_command_key_start = 0; |
| 1429 | goto finalize; | 1429 | goto finalize; |
| 1430 | } | 1430 | } |
| @@ -1566,7 +1566,7 @@ command_loop_1 (void) | |||
| 1566 | kset_last_repeatable_command (current_kboard, Vreal_this_command); | 1566 | kset_last_repeatable_command (current_kboard, Vreal_this_command); |
| 1567 | cancel_echoing (); | 1567 | cancel_echoing (); |
| 1568 | this_command_key_count = 0; | 1568 | this_command_key_count = 0; |
| 1569 | this_command_key_count_reset = 0; | 1569 | this_command_key_count_reset = false; |
| 1570 | this_single_command_key_start = 0; | 1570 | this_single_command_key_start = 0; |
| 1571 | } | 1571 | } |
| 1572 | 1572 | ||
| @@ -1683,7 +1683,8 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) | |||
| 1683 | suppress the point adjustment for automatic composition so that a | 1683 | suppress the point adjustment for automatic composition so that a |
| 1684 | user can keep inserting another character at point or keep | 1684 | user can keep inserting another character at point or keep |
| 1685 | deleting characters around point. */ | 1685 | deleting characters around point. */ |
| 1686 | bool check_composition = ! modified, check_display = 1, check_invisible = 1; | 1686 | bool check_composition = ! modified; |
| 1687 | bool check_display = true, check_invisible = true; | ||
| 1687 | ptrdiff_t orig_pt = PT; | 1688 | ptrdiff_t orig_pt = PT; |
| 1688 | 1689 | ||
| 1689 | eassert (XBUFFER (XWINDOW (selected_window)->contents) == current_buffer); | 1690 | eassert (XBUFFER (XWINDOW (selected_window)->contents) == current_buffer); |
| @@ -1698,9 +1699,9 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) | |||
| 1698 | && (beg = composition_adjust_point (last_pt, PT)) != PT) | 1699 | && (beg = composition_adjust_point (last_pt, PT)) != PT) |
| 1699 | { | 1700 | { |
| 1700 | SET_PT (beg); | 1701 | SET_PT (beg); |
| 1701 | check_display = check_invisible = 1; | 1702 | check_display = check_invisible = true; |
| 1702 | } | 1703 | } |
| 1703 | check_composition = 0; | 1704 | check_composition = false; |
| 1704 | if (check_display | 1705 | if (check_display |
| 1705 | && PT > BEGV && PT < ZV | 1706 | && PT > BEGV && PT < ZV |
| 1706 | && !NILP (val = get_char_property_and_overlay | 1707 | && !NILP (val = get_char_property_and_overlay |
| @@ -1720,13 +1721,13 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) | |||
| 1720 | ? max (beg - 1, BEGV) | 1721 | ? max (beg - 1, BEGV) |
| 1721 | : beg) | 1722 | : beg) |
| 1722 | : end); | 1723 | : end); |
| 1723 | check_composition = check_invisible = 1; | 1724 | check_composition = check_invisible = true; |
| 1724 | } | 1725 | } |
| 1725 | check_display = 0; | 1726 | check_display = false; |
| 1726 | if (check_invisible && PT > BEGV && PT < ZV) | 1727 | if (check_invisible && PT > BEGV && PT < ZV) |
| 1727 | { | 1728 | { |
| 1728 | int inv; | 1729 | int inv; |
| 1729 | bool ellipsis = 0; | 1730 | bool ellipsis = false; |
| 1730 | beg = end = PT; | 1731 | beg = end = PT; |
| 1731 | 1732 | ||
| 1732 | /* Find boundaries `beg' and `end' of the invisible area, if any. */ | 1733 | /* Find boundaries `beg' and `end' of the invisible area, if any. */ |
| @@ -1792,7 +1793,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) | |||
| 1792 | was already in the range: we don't get to choose | 1793 | was already in the range: we don't get to choose |
| 1793 | which end of the range we have to go to. */ | 1794 | which end of the range we have to go to. */ |
| 1794 | : (PT < last_pt ? beg : end)); | 1795 | : (PT < last_pt ? beg : end)); |
| 1795 | check_composition = check_display = 1; | 1796 | check_composition = check_display = true; |
| 1796 | } | 1797 | } |
| 1797 | #if 0 /* This assertion isn't correct, because SET_PT may end up setting | 1798 | #if 0 /* This assertion isn't correct, because SET_PT may end up setting |
| 1798 | the point to something other than its argument, due to | 1799 | the point to something other than its argument, due to |
| @@ -1805,9 +1806,9 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) | |||
| 1805 | if (!modified && !ellipsis && beg < end) | 1806 | if (!modified && !ellipsis && beg < end) |
| 1806 | { | 1807 | { |
| 1807 | if (last_pt == beg && PT == end && end < ZV) | 1808 | if (last_pt == beg && PT == end && end < ZV) |
| 1808 | (check_composition = check_display = 1, SET_PT (end + 1)); | 1809 | (check_composition = check_display = true, SET_PT (end + 1)); |
| 1809 | else if (last_pt == end && PT == beg && beg > BEGV) | 1810 | else if (last_pt == end && PT == beg && beg > BEGV) |
| 1810 | (check_composition = check_display = 1, SET_PT (beg - 1)); | 1811 | (check_composition = check_display = true, SET_PT (beg - 1)); |
| 1811 | else if (PT == ((PT < last_pt) ? beg : end)) | 1812 | else if (PT == ((PT < last_pt) ? beg : end)) |
| 1812 | /* We've already moved as far as we can. Trying to go | 1813 | /* We've already moved as far as we can. Trying to go |
| 1813 | to the other end would mean moving backwards and thus | 1814 | to the other end would mean moving backwards and thus |
| @@ -1820,11 +1821,11 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) | |||
| 1820 | (make_number (PT == beg ? end : beg), | 1821 | (make_number (PT == beg ? end : beg), |
| 1821 | Qinvisible, Qnil)), | 1822 | Qinvisible, Qnil)), |
| 1822 | !TEXT_PROP_MEANS_INVISIBLE (val))) | 1823 | !TEXT_PROP_MEANS_INVISIBLE (val))) |
| 1823 | (check_composition = check_display = 1, | 1824 | (check_composition = check_display = true, |
| 1824 | SET_PT (PT == beg ? end : beg)); | 1825 | SET_PT (PT == beg ? end : beg)); |
| 1825 | } | 1826 | } |
| 1826 | } | 1827 | } |
| 1827 | check_invisible = 0; | 1828 | check_invisible = false; |
| 1828 | } | 1829 | } |
| 1829 | } | 1830 | } |
| 1830 | 1831 | ||
| @@ -1852,11 +1853,11 @@ safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) | |||
| 1852 | if (SYMBOLP (hook)) | 1853 | if (SYMBOLP (hook)) |
| 1853 | { | 1854 | { |
| 1854 | Lisp_Object val; | 1855 | Lisp_Object val; |
| 1855 | bool found = 0; | 1856 | bool found = false; |
| 1856 | Lisp_Object newval = Qnil; | 1857 | Lisp_Object newval = Qnil; |
| 1857 | for (val = find_symbol_value (hook); CONSP (val); val = XCDR (val)) | 1858 | for (val = find_symbol_value (hook); CONSP (val); val = XCDR (val)) |
| 1858 | if (EQ (fun, XCAR (val))) | 1859 | if (EQ (fun, XCAR (val))) |
| 1859 | found = 1; | 1860 | found = true; |
| 1860 | else | 1861 | else |
| 1861 | newval = Fcons (XCAR (val), newval); | 1862 | newval = Fcons (XCAR (val), newval); |
| 1862 | if (found) | 1863 | if (found) |
| @@ -1868,7 +1869,7 @@ safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) | |||
| 1868 | : Fdefault_value (hook)); | 1869 | : Fdefault_value (hook)); |
| 1869 | CONSP (val); val = XCDR (val)) | 1870 | CONSP (val); val = XCDR (val)) |
| 1870 | if (EQ (fun, XCAR (val))) | 1871 | if (EQ (fun, XCAR (val))) |
| 1871 | found = 1; | 1872 | found = true; |
| 1872 | else | 1873 | else |
| 1873 | newval = Fcons (XCAR (val), newval); | 1874 | newval = Fcons (XCAR (val), newval); |
| 1874 | if (found) | 1875 | if (found) |
| @@ -1933,7 +1934,7 @@ static void | |||
| 1933 | poll_for_input (struct atimer *timer) | 1934 | poll_for_input (struct atimer *timer) |
| 1934 | { | 1935 | { |
| 1935 | if (poll_suppress_count == 0) | 1936 | if (poll_suppress_count == 0) |
| 1936 | pending_signals = 1; | 1937 | pending_signals = true; |
| 1937 | } | 1938 | } |
| 1938 | 1939 | ||
| 1939 | #endif /* POLL_FOR_INPUT */ | 1940 | #endif /* POLL_FOR_INPUT */ |
| @@ -2137,7 +2138,7 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, | |||
| 2137 | struct frame *f = NILP (do_mouse_tracking) ? NULL : some_mouse_moved (); | 2138 | struct frame *f = NILP (do_mouse_tracking) ? NULL : some_mouse_moved (); |
| 2138 | help = call1 (Qmouse_fixup_help_message, help); | 2139 | help = call1 (Qmouse_fixup_help_message, help); |
| 2139 | if (f) | 2140 | if (f) |
| 2140 | f->mouse_moved = 1; | 2141 | f->mouse_moved = true; |
| 2141 | } | 2142 | } |
| 2142 | 2143 | ||
| 2143 | if (STRINGP (help) || NILP (help)) | 2144 | if (STRINGP (help) || NILP (help)) |
| @@ -2168,11 +2169,11 @@ read_char_help_form_unwind (void) | |||
| 2168 | 2169 | ||
| 2169 | #define STOP_POLLING \ | 2170 | #define STOP_POLLING \ |
| 2170 | do { if (! polling_stopped_here) stop_polling (); \ | 2171 | do { if (! polling_stopped_here) stop_polling (); \ |
| 2171 | polling_stopped_here = 1; } while (0) | 2172 | polling_stopped_here = true; } while (0) |
| 2172 | 2173 | ||
| 2173 | #define RESUME_POLLING \ | 2174 | #define RESUME_POLLING \ |
| 2174 | do { if (polling_stopped_here) start_polling (); \ | 2175 | do { if (polling_stopped_here) start_polling (); \ |
| 2175 | polling_stopped_here = 0; } while (0) | 2176 | polling_stopped_here = false; } while (0) |
| 2176 | 2177 | ||
| 2177 | static Lisp_Object | 2178 | static Lisp_Object |
| 2178 | read_event_from_main_queue (struct timespec *end_time, | 2179 | read_event_from_main_queue (struct timespec *end_time, |
| @@ -2213,7 +2214,7 @@ read_event_from_main_queue (struct timespec *end_time, | |||
| 2213 | kset_kbd_queue (kb, list1 (c)); | 2214 | kset_kbd_queue (kb, list1 (c)); |
| 2214 | else | 2215 | else |
| 2215 | XSETCDR (last, list1 (c)); | 2216 | XSETCDR (last, list1 (c)); |
| 2216 | kb->kbd_queue_has_data = 1; | 2217 | kb->kbd_queue_has_data = true; |
| 2217 | c = Qnil; | 2218 | c = Qnil; |
| 2218 | if (single_kboard) | 2219 | if (single_kboard) |
| 2219 | goto start; | 2220 | goto start; |
| @@ -2389,7 +2390,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2389 | volatile Lisp_Object also_record; | 2390 | volatile Lisp_Object also_record; |
| 2390 | volatile bool reread, recorded; | 2391 | volatile bool reread, recorded; |
| 2391 | struct gcpro gcpro1, gcpro2; | 2392 | struct gcpro gcpro1, gcpro2; |
| 2392 | bool volatile polling_stopped_here = 0; | 2393 | bool volatile polling_stopped_here = false; |
| 2393 | struct kboard *orig_kboard = current_kboard; | 2394 | struct kboard *orig_kboard = current_kboard; |
| 2394 | 2395 | ||
| 2395 | also_record = Qnil; | 2396 | also_record = Qnil; |
| @@ -2429,7 +2430,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2429 | 2430 | ||
| 2430 | if (CONSP (Vunread_command_events)) | 2431 | if (CONSP (Vunread_command_events)) |
| 2431 | { | 2432 | { |
| 2432 | bool was_disabled = 0; | 2433 | bool was_disabled = false; |
| 2433 | 2434 | ||
| 2434 | c = XCAR (Vunread_command_events); | 2435 | c = XCAR (Vunread_command_events); |
| 2435 | Vunread_command_events = XCDR (Vunread_command_events); | 2436 | Vunread_command_events = XCDR (Vunread_command_events); |
| @@ -2448,7 +2449,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2448 | && EQ (XCDR (c), Qdisabled) | 2449 | && EQ (XCDR (c), Qdisabled) |
| 2449 | && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))) | 2450 | && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))) |
| 2450 | { | 2451 | { |
| 2451 | was_disabled = 1; | 2452 | was_disabled = true; |
| 2452 | c = XCAR (c); | 2453 | c = XCAR (c); |
| 2453 | } | 2454 | } |
| 2454 | 2455 | ||
| @@ -2458,7 +2459,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2458 | /* Also check was_disabled so last-nonmenu-event won't return | 2459 | /* Also check was_disabled so last-nonmenu-event won't return |
| 2459 | a bad value when submenus are involved. (Bug#447) */ | 2460 | a bad value when submenus are involved. (Bug#447) */ |
| 2460 | && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar) || was_disabled)) | 2461 | && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar) || was_disabled)) |
| 2461 | *used_mouse_menu = 1; | 2462 | *used_mouse_menu = true; |
| 2462 | 2463 | ||
| 2463 | goto reread_for_input_method; | 2464 | goto reread_for_input_method; |
| 2464 | } | 2465 | } |
| @@ -2478,7 +2479,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2478 | goto reread_for_input_method; | 2479 | goto reread_for_input_method; |
| 2479 | } | 2480 | } |
| 2480 | 2481 | ||
| 2481 | this_command_key_count_reset = 0; | 2482 | this_command_key_count_reset = false; |
| 2482 | 2483 | ||
| 2483 | if (!NILP (Vexecuting_kbd_macro)) | 2484 | if (!NILP (Vexecuting_kbd_macro)) |
| 2484 | { | 2485 | { |
| @@ -2660,7 +2661,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2660 | kset_kbd_queue (kb, list1 (c)); | 2661 | kset_kbd_queue (kb, list1 (c)); |
| 2661 | else | 2662 | else |
| 2662 | XSETCDR (last, list1 (c)); | 2663 | XSETCDR (last, list1 (c)); |
| 2663 | kb->kbd_queue_has_data = 1; | 2664 | kb->kbd_queue_has_data = true; |
| 2664 | current_kboard = kb; | 2665 | current_kboard = kb; |
| 2665 | /* This is going to exit from read_char | 2666 | /* This is going to exit from read_char |
| 2666 | so we had better get rid of this frame's stuff. */ | 2667 | so we had better get rid of this frame's stuff. */ |
| @@ -2836,7 +2837,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2836 | kset_kbd_queue (current_kboard, | 2837 | kset_kbd_queue (current_kboard, |
| 2837 | XCDR (KVAR (current_kboard, kbd_queue))); | 2838 | XCDR (KVAR (current_kboard, kbd_queue))); |
| 2838 | if (NILP (KVAR (current_kboard, kbd_queue))) | 2839 | if (NILP (KVAR (current_kboard, kbd_queue))) |
| 2839 | current_kboard->kbd_queue_has_data = 0; | 2840 | current_kboard->kbd_queue_has_data = false; |
| 2840 | input_pending = readable_events (0); | 2841 | input_pending = readable_events (0); |
| 2841 | if (EVENT_HAS_PARAMETERS (c) | 2842 | if (EVENT_HAS_PARAMETERS (c) |
| 2842 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qswitch_frame)) | 2843 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qswitch_frame)) |
| @@ -3074,7 +3075,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 3074 | 3075 | ||
| 3075 | /* Clear out this_command_keys. */ | 3076 | /* Clear out this_command_keys. */ |
| 3076 | this_command_key_count = 0; | 3077 | this_command_key_count = 0; |
| 3077 | this_command_key_count_reset = 0; | 3078 | this_command_key_count_reset = false; |
| 3078 | this_single_command_key_start = 0; | 3079 | this_single_command_key_start = 0; |
| 3079 | 3080 | ||
| 3080 | /* Now wipe the echo area. */ | 3081 | /* Now wipe the echo area. */ |
| @@ -3590,7 +3591,7 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event, | |||
| 3590 | kset_kbd_queue | 3591 | kset_kbd_queue |
| 3591 | (kb, list2 (make_lispy_switch_frame (event->ie.frame_or_window), | 3592 | (kb, list2 (make_lispy_switch_frame (event->ie.frame_or_window), |
| 3592 | make_number (c))); | 3593 | make_number (c))); |
| 3593 | kb->kbd_queue_has_data = 1; | 3594 | kb->kbd_queue_has_data = true; |
| 3594 | union buffered_input_event *sp; | 3595 | union buffered_input_event *sp; |
| 3595 | for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) | 3596 | for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) |
| 3596 | { | 3597 | { |
| @@ -3684,7 +3685,7 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event, | |||
| 3684 | do it now. */ | 3685 | do it now. */ |
| 3685 | if (immediate_quit && NILP (Vinhibit_quit)) | 3686 | if (immediate_quit && NILP (Vinhibit_quit)) |
| 3686 | { | 3687 | { |
| 3687 | immediate_quit = 0; | 3688 | immediate_quit = false; |
| 3688 | QUIT; | 3689 | QUIT; |
| 3689 | } | 3690 | } |
| 3690 | } | 3691 | } |
| @@ -4002,7 +4003,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4002 | obj = list1 (intern ("ns-unput-working-text")); | 4003 | obj = list1 (intern ("ns-unput-working-text")); |
| 4003 | kbd_fetch_ptr = event + 1; | 4004 | kbd_fetch_ptr = event + 1; |
| 4004 | if (used_mouse_menu) | 4005 | if (used_mouse_menu) |
| 4005 | *used_mouse_menu = 1; | 4006 | *used_mouse_menu = true; |
| 4006 | } | 4007 | } |
| 4007 | #endif | 4008 | #endif |
| 4008 | 4009 | ||
| @@ -4197,13 +4198,13 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4197 | && !EQ (event->ie.frame_or_window, event->ie.arg) | 4198 | && !EQ (event->ie.frame_or_window, event->ie.arg) |
| 4198 | && (event->kind == MENU_BAR_EVENT | 4199 | && (event->kind == MENU_BAR_EVENT |
| 4199 | || event->kind == TOOL_BAR_EVENT)) | 4200 | || event->kind == TOOL_BAR_EVENT)) |
| 4200 | *used_mouse_menu = 1; | 4201 | *used_mouse_menu = true; |
| 4201 | #endif | 4202 | #endif |
| 4202 | #ifdef HAVE_NS | 4203 | #ifdef HAVE_NS |
| 4203 | /* Certain system events are non-key events. */ | 4204 | /* Certain system events are non-key events. */ |
| 4204 | if (used_mouse_menu | 4205 | if (used_mouse_menu |
| 4205 | && event->kind == NS_NONKEY_EVENT) | 4206 | && event->kind == NS_NONKEY_EVENT) |
| 4206 | *used_mouse_menu = 1; | 4207 | *used_mouse_menu = true; |
| 4207 | #endif | 4208 | #endif |
| 4208 | 4209 | ||
| 4209 | /* Wipe out this event, to catch bugs. */ | 4210 | /* Wipe out this event, to catch bugs. */ |
| @@ -6896,7 +6897,7 @@ int | |||
| 6896 | gobble_input (void) | 6897 | gobble_input (void) |
| 6897 | { | 6898 | { |
| 6898 | int nread = 0; | 6899 | int nread = 0; |
| 6899 | bool err = 0; | 6900 | bool err = false; |
| 6900 | struct terminal *t; | 6901 | struct terminal *t; |
| 6901 | 6902 | ||
| 6902 | /* Store pending user signal events, if any. */ | 6903 | /* Store pending user signal events, if any. */ |
| @@ -6915,7 +6916,7 @@ gobble_input (void) | |||
| 6915 | 6916 | ||
| 6916 | if (input_blocked_p ()) | 6917 | if (input_blocked_p ()) |
| 6917 | { | 6918 | { |
| 6918 | pending_signals = 1; | 6919 | pending_signals = true; |
| 6919 | break; | 6920 | break; |
| 6920 | } | 6921 | } |
| 6921 | 6922 | ||
| @@ -6928,7 +6929,7 @@ gobble_input (void) | |||
| 6928 | 6929 | ||
| 6929 | if (nr == -1) /* Not OK to read input now. */ | 6930 | if (nr == -1) /* Not OK to read input now. */ |
| 6930 | { | 6931 | { |
| 6931 | err = 1; | 6932 | err = true; |
| 6932 | } | 6933 | } |
| 6933 | else if (nr == -2) /* Non-transient error. */ | 6934 | else if (nr == -2) /* Non-transient error. */ |
| 6934 | { | 6935 | { |
| @@ -7188,7 +7189,7 @@ handle_async_input (void) | |||
| 7188 | void | 7189 | void |
| 7189 | process_pending_signals (void) | 7190 | process_pending_signals (void) |
| 7190 | { | 7191 | { |
| 7191 | pending_signals = 0; | 7192 | pending_signals = false; |
| 7192 | handle_async_input (); | 7193 | handle_async_input (); |
| 7193 | do_pending_atimers (); | 7194 | do_pending_atimers (); |
| 7194 | } | 7195 | } |
| @@ -7240,7 +7241,7 @@ totally_unblock_input (void) | |||
| 7240 | void | 7241 | void |
| 7241 | handle_input_available_signal (int sig) | 7242 | handle_input_available_signal (int sig) |
| 7242 | { | 7243 | { |
| 7243 | pending_signals = 1; | 7244 | pending_signals = true; |
| 7244 | 7245 | ||
| 7245 | if (input_available_clear_time) | 7246 | if (input_available_clear_time) |
| 7246 | *input_available_clear_time = make_timespec (0, 0); | 7247 | *input_available_clear_time = make_timespec (0, 0); |
| @@ -7311,8 +7312,8 @@ handle_user_signal (int sig) | |||
| 7311 | && strcmp (special_event_name, p->name) == 0) | 7312 | && strcmp (special_event_name, p->name) == 0) |
| 7312 | { | 7313 | { |
| 7313 | /* Enter the debugger in many ways. */ | 7314 | /* Enter the debugger in many ways. */ |
| 7314 | debug_on_next_call = 1; | 7315 | debug_on_next_call = true; |
| 7315 | debug_on_quit = 1; | 7316 | debug_on_quit = true; |
| 7316 | Vquit_flag = Qt; | 7317 | Vquit_flag = Qt; |
| 7317 | Vinhibit_quit = Qnil; | 7318 | Vinhibit_quit = Qnil; |
| 7318 | 7319 | ||
| @@ -7359,7 +7360,7 @@ store_user_signal_events (void) | |||
| 7359 | { | 7360 | { |
| 7360 | struct user_signal_info *p; | 7361 | struct user_signal_info *p; |
| 7361 | struct input_event buf; | 7362 | struct input_event buf; |
| 7362 | bool buf_initialized = 0; | 7363 | bool buf_initialized = false; |
| 7363 | 7364 | ||
| 7364 | for (p = user_signals; p; p = p->next) | 7365 | for (p = user_signals; p; p = p->next) |
| 7365 | if (p->npending > 0) | 7366 | if (p->npending > 0) |
| @@ -7369,7 +7370,7 @@ store_user_signal_events (void) | |||
| 7369 | memset (&buf, 0, sizeof buf); | 7370 | memset (&buf, 0, sizeof buf); |
| 7370 | buf.kind = USER_SIGNAL_EVENT; | 7371 | buf.kind = USER_SIGNAL_EVENT; |
| 7371 | buf.frame_or_window = selected_frame; | 7372 | buf.frame_or_window = selected_frame; |
| 7372 | buf_initialized = 1; | 7373 | buf_initialized = true; |
| 7373 | } | 7374 | } |
| 7374 | 7375 | ||
| 7375 | do | 7376 | do |
| @@ -8201,7 +8202,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8201 | Lisp_Object filter = Qnil; | 8202 | Lisp_Object filter = Qnil; |
| 8202 | Lisp_Object caption; | 8203 | Lisp_Object caption; |
| 8203 | int i; | 8204 | int i; |
| 8204 | bool have_label = 0; | 8205 | bool have_label = false; |
| 8205 | 8206 | ||
| 8206 | /* Definition looks like `(menu-item CAPTION BINDING PROPS...)'. | 8207 | /* Definition looks like `(menu-item CAPTION BINDING PROPS...)'. |
| 8207 | Rule out items that aren't lists, don't start with | 8208 | Rule out items that aren't lists, don't start with |
| @@ -8310,7 +8311,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8310 | /* `:label LABEL-STRING'. */ | 8311 | /* `:label LABEL-STRING'. */ |
| 8311 | set_prop (TOOL_BAR_ITEM_LABEL, | 8312 | set_prop (TOOL_BAR_ITEM_LABEL, |
| 8312 | STRINGP (value) ? value : build_string (bad_label)); | 8313 | STRINGP (value) ? value : build_string (bad_label)); |
| 8313 | have_label = 1; | 8314 | have_label = true; |
| 8314 | } | 8315 | } |
| 8315 | else if (EQ (ikey, QCfilter)) | 8316 | else if (EQ (ikey, QCfilter)) |
| 8316 | /* ':filter FORM'. */ | 8317 | /* ':filter FORM'. */ |
| @@ -8476,7 +8477,7 @@ read_char_x_menu_prompt (Lisp_Object map, | |||
| 8476 | Lisp_Object prev_event, bool *used_mouse_menu) | 8477 | Lisp_Object prev_event, bool *used_mouse_menu) |
| 8477 | { | 8478 | { |
| 8478 | if (used_mouse_menu) | 8479 | if (used_mouse_menu) |
| 8479 | *used_mouse_menu = 0; | 8480 | *used_mouse_menu = false; |
| 8480 | 8481 | ||
| 8481 | /* Use local over global Menu maps. */ | 8482 | /* Use local over global Menu maps. */ |
| 8482 | 8483 | ||
| @@ -8525,7 +8526,7 @@ read_char_x_menu_prompt (Lisp_Object map, | |||
| 8525 | else if (NILP (value)) | 8526 | else if (NILP (value)) |
| 8526 | value = Qt; | 8527 | value = Qt; |
| 8527 | if (used_mouse_menu) | 8528 | if (used_mouse_menu) |
| 8528 | *used_mouse_menu = 1; | 8529 | *used_mouse_menu = true; |
| 8529 | return value; | 8530 | return value; |
| 8530 | } | 8531 | } |
| 8531 | return Qnil ; | 8532 | return Qnil ; |
| @@ -8540,7 +8541,7 @@ read_char_minibuf_menu_prompt (int commandflag, | |||
| 8540 | /* FIXME: Use the minibuffer's frame width. */ | 8541 | /* FIXME: Use the minibuffer's frame width. */ |
| 8541 | ptrdiff_t width = FRAME_COLS (SELECTED_FRAME ()) - 4; | 8542 | ptrdiff_t width = FRAME_COLS (SELECTED_FRAME ()) - 4; |
| 8542 | ptrdiff_t idx = -1; | 8543 | ptrdiff_t idx = -1; |
| 8543 | bool nobindings = 1; | 8544 | bool nobindings = true; |
| 8544 | Lisp_Object rest, vector; | 8545 | Lisp_Object rest, vector; |
| 8545 | Lisp_Object prompt_strings = Qnil; | 8546 | Lisp_Object prompt_strings = Qnil; |
| 8546 | 8547 | ||
| @@ -8569,7 +8570,7 @@ read_char_minibuf_menu_prompt (int commandflag, | |||
| 8569 | /* Present the documented bindings, a line at a time. */ | 8570 | /* Present the documented bindings, a line at a time. */ |
| 8570 | while (1) | 8571 | while (1) |
| 8571 | { | 8572 | { |
| 8572 | bool notfirst = 0; | 8573 | bool notfirst = false; |
| 8573 | Lisp_Object menu_strings = prompt_strings; | 8574 | Lisp_Object menu_strings = prompt_strings; |
| 8574 | ptrdiff_t i = nlength; | 8575 | ptrdiff_t i = nlength; |
| 8575 | Lisp_Object obj; | 8576 | Lisp_Object obj; |
| @@ -8680,8 +8681,8 @@ read_char_minibuf_menu_prompt (int commandflag, | |||
| 8680 | PUSH_C_STR (", ", menu_strings); | 8681 | PUSH_C_STR (", ", menu_strings); |
| 8681 | i += 2; | 8682 | i += 2; |
| 8682 | } | 8683 | } |
| 8683 | notfirst = 1; | 8684 | notfirst = true; |
| 8684 | nobindings = 0; | 8685 | nobindings = false; |
| 8685 | 8686 | ||
| 8686 | /* If the char to type doesn't match the string's | 8687 | /* If the char to type doesn't match the string's |
| 8687 | first char, explicitly show what char to type. */ | 8688 | first char, explicitly show what char to type. */ |
| @@ -8997,7 +8998,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 8997 | /* True if we are trying to map a key by changing an upper-case | 8998 | /* True if we are trying to map a key by changing an upper-case |
| 8998 | letter to lower case, or a shifted function key to an unshifted | 8999 | letter to lower case, or a shifted function key to an unshifted |
| 8999 | one. */ | 9000 | one. */ |
| 9000 | bool shift_translated = 0; | 9001 | bool shift_translated = false; |
| 9001 | 9002 | ||
| 9002 | /* If we receive a `switch-frame' or `select-window' event in the middle of | 9003 | /* If we receive a `switch-frame' or `select-window' event in the middle of |
| 9003 | a key sequence, we put it off for later. | 9004 | a key sequence, we put it off for later. |
| @@ -9008,7 +9009,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9008 | int original_uppercase_position = -1; | 9009 | int original_uppercase_position = -1; |
| 9009 | 9010 | ||
| 9010 | /* Gets around Microsoft compiler limitations. */ | 9011 | /* Gets around Microsoft compiler limitations. */ |
| 9011 | bool dummyflag = 0; | 9012 | bool dummyflag = false; |
| 9012 | 9013 | ||
| 9013 | struct buffer *starting_buffer; | 9014 | struct buffer *starting_buffer; |
| 9014 | 9015 | ||
| @@ -9098,7 +9099,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9098 | : (/* indec.start < t || fkey.start < t || */ keytran.start < t)) | 9099 | : (/* indec.start < t || fkey.start < t || */ keytran.start < t)) |
| 9099 | { | 9100 | { |
| 9100 | Lisp_Object key; | 9101 | Lisp_Object key; |
| 9101 | bool used_mouse_menu = 0; | 9102 | bool used_mouse_menu = false; |
| 9102 | 9103 | ||
| 9103 | /* Where the last real key started. If we need to throw away a | 9104 | /* Where the last real key started. If we need to throw away a |
| 9104 | key that has expanded into more than one element of keybuf | 9105 | key that has expanded into more than one element of keybuf |
| @@ -9195,12 +9196,12 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9195 | return. Any better way to fix this? -- cyd */ | 9196 | return. Any better way to fix this? -- cyd */ |
| 9196 | || (interrupted_kboard != current_kboard)) | 9197 | || (interrupted_kboard != current_kboard)) |
| 9197 | { | 9198 | { |
| 9198 | bool found = 0; | 9199 | bool found = false; |
| 9199 | struct kboard *k; | 9200 | struct kboard *k; |
| 9200 | 9201 | ||
| 9201 | for (k = all_kboards; k; k = k->next_kboard) | 9202 | for (k = all_kboards; k; k = k->next_kboard) |
| 9202 | if (k == interrupted_kboard) | 9203 | if (k == interrupted_kboard) |
| 9203 | found = 1; | 9204 | found = true; |
| 9204 | 9205 | ||
| 9205 | if (!found) | 9206 | if (!found) |
| 9206 | { | 9207 | { |
| @@ -9261,7 +9262,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9261 | t = 0; | 9262 | t = 0; |
| 9262 | /* The Microsoft C compiler can't handle the goto that | 9263 | /* The Microsoft C compiler can't handle the goto that |
| 9263 | would go here. */ | 9264 | would go here. */ |
| 9264 | dummyflag = 1; | 9265 | dummyflag = true; |
| 9265 | break; | 9266 | break; |
| 9266 | } | 9267 | } |
| 9267 | 9268 | ||
| @@ -9751,7 +9752,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9751 | might get translated through function-key-map. */ | 9752 | might get translated through function-key-map. */ |
| 9752 | keybuf[t - 1] = new_key; | 9753 | keybuf[t - 1] = new_key; |
| 9753 | mock_input = max (t, mock_input); | 9754 | mock_input = max (t, mock_input); |
| 9754 | shift_translated = 1; | 9755 | shift_translated = true; |
| 9755 | 9756 | ||
| 9756 | goto replay_sequence; | 9757 | goto replay_sequence; |
| 9757 | } | 9758 | } |
| @@ -9762,7 +9763,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9762 | read_key_sequence_cmd = Vprefix_help_command; | 9763 | read_key_sequence_cmd = Vprefix_help_command; |
| 9763 | /* The Microsoft C compiler can't handle the goto that | 9764 | /* The Microsoft C compiler can't handle the goto that |
| 9764 | would go here. */ | 9765 | would go here. */ |
| 9765 | dummyflag = 1; | 9766 | dummyflag = true; |
| 9766 | break; | 9767 | break; |
| 9767 | } | 9768 | } |
| 9768 | 9769 | ||
| @@ -9804,7 +9805,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9804 | input-decode-map doesn't need to go through it again. */ | 9805 | input-decode-map doesn't need to go through it again. */ |
| 9805 | fkey.start = fkey.end = 0; | 9806 | fkey.start = fkey.end = 0; |
| 9806 | keytran.start = keytran.end = 0; | 9807 | keytran.start = keytran.end = 0; |
| 9807 | shift_translated = 1; | 9808 | shift_translated = true; |
| 9808 | 9809 | ||
| 9809 | goto replay_sequence; | 9810 | goto replay_sequence; |
| 9810 | } | 9811 | } |
| @@ -9830,7 +9831,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9830 | && t - 1 == original_uppercase_position) | 9831 | && t - 1 == original_uppercase_position) |
| 9831 | { | 9832 | { |
| 9832 | keybuf[t - 1] = original_uppercase; | 9833 | keybuf[t - 1] = original_uppercase; |
| 9833 | shift_translated = 0; | 9834 | shift_translated = false; |
| 9834 | } | 9835 | } |
| 9835 | 9836 | ||
| 9836 | if (shift_translated) | 9837 | if (shift_translated) |
| @@ -9883,7 +9884,7 @@ read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo, | |||
| 9883 | if (NILP (continue_echo)) | 9884 | if (NILP (continue_echo)) |
| 9884 | { | 9885 | { |
| 9885 | this_command_key_count = 0; | 9886 | this_command_key_count = 0; |
| 9886 | this_command_key_count_reset = 0; | 9887 | this_command_key_count_reset = false; |
| 9887 | this_single_command_key_start = 0; | 9888 | this_single_command_key_start = 0; |
| 9888 | } | 9889 | } |
| 9889 | 9890 | ||
| @@ -10018,7 +10019,7 @@ detect_input_pending_run_timers (bool do_display) | |||
| 10018 | void | 10019 | void |
| 10019 | clear_input_pending (void) | 10020 | clear_input_pending (void) |
| 10020 | { | 10021 | { |
| 10021 | input_pending = 0; | 10022 | input_pending = false; |
| 10022 | } | 10023 | } |
| 10023 | 10024 | ||
| 10024 | /* Return true if there are pending requeued events. | 10025 | /* Return true if there are pending requeued events. |
| @@ -10162,7 +10163,7 @@ these events the first time. */) | |||
| 10162 | 10163 | ||
| 10163 | /* Cause whatever we put into unread-command-events | 10164 | /* Cause whatever we put into unread-command-events |
| 10164 | to echo as if it were being freshly read from the keyboard. */ | 10165 | to echo as if it were being freshly read from the keyboard. */ |
| 10165 | this_command_key_count_reset = 1; | 10166 | this_command_key_count_reset = true; |
| 10166 | 10167 | ||
| 10167 | return Qnil; | 10168 | return Qnil; |
| 10168 | } | 10169 | } |
| @@ -10177,7 +10178,7 @@ KEEP-RECORD is non-nil. */) | |||
| 10177 | int i; | 10178 | int i; |
| 10178 | 10179 | ||
| 10179 | this_command_key_count = 0; | 10180 | this_command_key_count = 0; |
| 10180 | this_command_key_count_reset = 0; | 10181 | this_command_key_count_reset = false; |
| 10181 | 10182 | ||
| 10182 | if (NILP (keep_record)) | 10183 | if (NILP (keep_record)) |
| 10183 | { | 10184 | { |
| @@ -10251,7 +10252,7 @@ Also end any kbd macro being defined. */) | |||
| 10251 | discard_tty_input (); | 10252 | discard_tty_input (); |
| 10252 | 10253 | ||
| 10253 | kbd_fetch_ptr = kbd_store_ptr; | 10254 | kbd_fetch_ptr = kbd_store_ptr; |
| 10254 | input_pending = 0; | 10255 | input_pending = false; |
| 10255 | 10256 | ||
| 10256 | return Qnil; | 10257 | return Qnil; |
| 10257 | } | 10258 | } |
| @@ -10349,7 +10350,7 @@ stuff_buffered_input (Lisp_Object stuffstring) | |||
| 10349 | clear_event (kbd_fetch_ptr); | 10350 | clear_event (kbd_fetch_ptr); |
| 10350 | } | 10351 | } |
| 10351 | 10352 | ||
| 10352 | input_pending = 0; | 10353 | input_pending = false; |
| 10353 | #endif /* SIGTSTP */ | 10354 | #endif /* SIGTSTP */ |
| 10354 | } | 10355 | } |
| 10355 | 10356 | ||
| @@ -10359,7 +10360,7 @@ set_waiting_for_input (struct timespec *time_to_clear) | |||
| 10359 | input_available_clear_time = time_to_clear; | 10360 | input_available_clear_time = time_to_clear; |
| 10360 | 10361 | ||
| 10361 | /* Tell handle_interrupt to throw back to read_char, */ | 10362 | /* Tell handle_interrupt to throw back to read_char, */ |
| 10362 | waiting_for_input = 1; | 10363 | waiting_for_input = true; |
| 10363 | 10364 | ||
| 10364 | /* If handle_interrupt was called before and buffered a C-g, | 10365 | /* If handle_interrupt was called before and buffered a C-g, |
| 10365 | make it run again now, to avoid timing error. */ | 10366 | make it run again now, to avoid timing error. */ |
| @@ -10371,7 +10372,7 @@ void | |||
| 10371 | clear_waiting_for_input (void) | 10372 | clear_waiting_for_input (void) |
| 10372 | { | 10373 | { |
| 10373 | /* Tell handle_interrupt not to throw back to read_char, */ | 10374 | /* Tell handle_interrupt not to throw back to read_char, */ |
| 10374 | waiting_for_input = 0; | 10375 | waiting_for_input = false; |
| 10375 | input_available_clear_time = 0; | 10376 | input_available_clear_time = 0; |
| 10376 | } | 10377 | } |
| 10377 | 10378 | ||
| @@ -10532,7 +10533,7 @@ handle_interrupt (bool in_signal_handler) | |||
| 10532 | struct gl_state_s saved; | 10533 | struct gl_state_s saved; |
| 10533 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 10534 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 10534 | 10535 | ||
| 10535 | immediate_quit = 0; | 10536 | immediate_quit = false; |
| 10536 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); | 10537 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); |
| 10537 | saved = gl_state; | 10538 | saved = gl_state; |
| 10538 | GCPRO4 (saved.object, saved.global_code, | 10539 | GCPRO4 (saved.object, saved.global_code, |
| @@ -10547,7 +10548,7 @@ handle_interrupt (bool in_signal_handler) | |||
| 10547 | force_quit_count = count; | 10548 | force_quit_count = count; |
| 10548 | if (count == 3) | 10549 | if (count == 3) |
| 10549 | { | 10550 | { |
| 10550 | immediate_quit = 1; | 10551 | immediate_quit = true; |
| 10551 | Vinhibit_quit = Qnil; | 10552 | Vinhibit_quit = Qnil; |
| 10552 | } | 10553 | } |
| 10553 | Vquit_flag = Qt; | 10554 | Vquit_flag = Qt; |
| @@ -10581,7 +10582,7 @@ quit_throw_to_read_char (bool from_signal) | |||
| 10581 | 10582 | ||
| 10582 | /* Prevent another signal from doing this before we finish. */ | 10583 | /* Prevent another signal from doing this before we finish. */ |
| 10583 | clear_waiting_for_input (); | 10584 | clear_waiting_for_input (); |
| 10584 | input_pending = 0; | 10585 | input_pending = false; |
| 10585 | 10586 | ||
| 10586 | Vunread_command_events = Qnil; | 10587 | Vunread_command_events = Qnil; |
| 10587 | 10588 | ||
| @@ -10609,13 +10610,13 @@ See also `current-input-mode'. */) | |||
| 10609 | { | 10610 | { |
| 10610 | /* When using X, don't give the user a real choice, | 10611 | /* When using X, don't give the user a real choice, |
| 10611 | because we haven't implemented the mechanisms to support it. */ | 10612 | because we haven't implemented the mechanisms to support it. */ |
| 10612 | new_interrupt_input = 1; | 10613 | new_interrupt_input = true; |
| 10613 | } | 10614 | } |
| 10614 | else | 10615 | else |
| 10615 | #endif /* HAVE_X_WINDOWS */ | 10616 | #endif /* HAVE_X_WINDOWS */ |
| 10616 | new_interrupt_input = !NILP (interrupt); | 10617 | new_interrupt_input = !NILP (interrupt); |
| 10617 | #else /* not USABLE_SIGIO */ | 10618 | #else /* not USABLE_SIGIO */ |
| 10618 | new_interrupt_input = 0; | 10619 | new_interrupt_input = false; |
| 10619 | #endif /* not USABLE_SIGIO */ | 10620 | #endif /* not USABLE_SIGIO */ |
| 10620 | 10621 | ||
| 10621 | if (new_interrupt_input != interrupt_input) | 10622 | if (new_interrupt_input != interrupt_input) |
| @@ -10907,8 +10908,8 @@ init_kboard (KBOARD *kb, Lisp_Object type) | |||
| 10907 | kset_prefix_arg (kb, Qnil); | 10908 | kset_prefix_arg (kb, Qnil); |
| 10908 | kset_last_prefix_arg (kb, Qnil); | 10909 | kset_last_prefix_arg (kb, Qnil); |
| 10909 | kset_kbd_queue (kb, Qnil); | 10910 | kset_kbd_queue (kb, Qnil); |
| 10910 | kb->kbd_queue_has_data = 0; | 10911 | kb->kbd_queue_has_data = false; |
| 10911 | kb->immediate_echo = 0; | 10912 | kb->immediate_echo = false; |
| 10912 | kset_echo_string (kb, Qnil); | 10913 | kset_echo_string (kb, Qnil); |
| 10913 | kb->echo_after_prompt = -1; | 10914 | kb->echo_after_prompt = -1; |
| 10914 | kb->kbd_macro_buffer = 0; | 10915 | kb->kbd_macro_buffer = 0; |
| @@ -10968,7 +10969,7 @@ delete_kboard (KBOARD *kb) | |||
| 10968 | && FRAME_LIVE_P (XFRAME (selected_frame))) | 10969 | && FRAME_LIVE_P (XFRAME (selected_frame))) |
| 10969 | { | 10970 | { |
| 10970 | current_kboard = FRAME_KBOARD (XFRAME (selected_frame)); | 10971 | current_kboard = FRAME_KBOARD (XFRAME (selected_frame)); |
| 10971 | single_kboard = 0; | 10972 | single_kboard = false; |
| 10972 | if (current_kboard == kb) | 10973 | if (current_kboard == kb) |
| 10973 | emacs_abort (); | 10974 | emacs_abort (); |
| 10974 | } | 10975 | } |
| @@ -10982,7 +10983,7 @@ init_keyboard (void) | |||
| 10982 | { | 10983 | { |
| 10983 | /* This is correct before outermost invocation of the editor loop. */ | 10984 | /* This is correct before outermost invocation of the editor loop. */ |
| 10984 | command_loop_level = -1; | 10985 | command_loop_level = -1; |
| 10985 | immediate_quit = 0; | 10986 | immediate_quit = false; |
| 10986 | quit_char = Ctl ('g'); | 10987 | quit_char = Ctl ('g'); |
| 10987 | Vunread_command_events = Qnil; | 10988 | Vunread_command_events = Qnil; |
| 10988 | timer_idleness_start_time = invalid_timespec (); | 10989 | timer_idleness_start_time = invalid_timespec (); |
| @@ -10991,9 +10992,9 @@ init_keyboard (void) | |||
| 10991 | kbd_fetch_ptr = kbd_buffer; | 10992 | kbd_fetch_ptr = kbd_buffer; |
| 10992 | kbd_store_ptr = kbd_buffer; | 10993 | kbd_store_ptr = kbd_buffer; |
| 10993 | do_mouse_tracking = Qnil; | 10994 | do_mouse_tracking = Qnil; |
| 10994 | input_pending = 0; | 10995 | input_pending = false; |
| 10995 | interrupt_input_blocked = 0; | 10996 | interrupt_input_blocked = 0; |
| 10996 | pending_signals = 0; | 10997 | pending_signals = false; |
| 10997 | 10998 | ||
| 10998 | /* This means that command_loop_1 won't try to select anything the first | 10999 | /* This means that command_loop_1 won't try to select anything the first |
| 10999 | time through. */ | 11000 | time through. */ |
| @@ -11545,7 +11546,7 @@ See Info node `(elisp)Multiple Terminals'. */); | |||
| 11545 | DEFVAR_BOOL ("cannot-suspend", cannot_suspend, | 11546 | DEFVAR_BOOL ("cannot-suspend", cannot_suspend, |
| 11546 | doc: /* Non-nil means to always spawn a subshell instead of suspending. | 11547 | doc: /* Non-nil means to always spawn a subshell instead of suspending. |
| 11547 | \(Even if the operating system has support for stopping a process.\) */); | 11548 | \(Even if the operating system has support for stopping a process.\) */); |
| 11548 | cannot_suspend = 0; | 11549 | cannot_suspend = false; |
| 11549 | 11550 | ||
| 11550 | DEFVAR_BOOL ("menu-prompting", menu_prompting, | 11551 | DEFVAR_BOOL ("menu-prompting", menu_prompting, |
| 11551 | doc: /* Non-nil means prompt with menus when appropriate. | 11552 | doc: /* Non-nil means prompt with menus when appropriate. |
| @@ -11555,7 +11556,7 @@ The menu is displayed on the screen | |||
| 11555 | if X menus were enabled at configuration | 11556 | if X menus were enabled at configuration |
| 11556 | time and the previous event was a mouse click prefix key. | 11557 | time and the previous event was a mouse click prefix key. |
| 11557 | Otherwise, menu prompting uses the echo area. */); | 11558 | Otherwise, menu prompting uses the echo area. */); |
| 11558 | menu_prompting = 1; | 11559 | menu_prompting = true; |
| 11559 | 11560 | ||
| 11560 | DEFVAR_LISP ("menu-prompt-more-char", menu_prompt_more_char, | 11561 | DEFVAR_LISP ("menu-prompt-more-char", menu_prompt_more_char, |
| 11561 | doc: /* Character to see next line of menu prompt. | 11562 | doc: /* Character to see next line of menu prompt. |
diff --git a/src/keyboard.h b/src/keyboard.h index b843e8db903..3e4c475d285 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -170,7 +170,7 @@ struct kboard | |||
| 170 | kbd_queue_has_data is 0. When we push back an incomplete | 170 | kbd_queue_has_data is 0. When we push back an incomplete |
| 171 | command, then this flag is 0, meaning we don't want to try | 171 | command, then this flag is 0, meaning we don't want to try |
| 172 | reading from this KBOARD again until more input arrives. */ | 172 | reading from this KBOARD again until more input arrives. */ |
| 173 | char kbd_queue_has_data; | 173 | bool_bf kbd_queue_has_data; |
| 174 | 174 | ||
| 175 | /* True means echo each character as typed. */ | 175 | /* True means echo each character as typed. */ |
| 176 | bool_bf immediate_echo : 1; | 176 | bool_bf immediate_echo : 1; |