diff options
| author | Juanma Barranquero | 2010-07-05 12:36:06 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-05 12:36:06 +0200 |
| commit | d3da34e0dab1404e80dba5413b3c449a6ea8fa0c (patch) | |
| tree | c24d736f75b63d4abb1b8ddd49b088632ccd8aee /src/keyboard.c | |
| parent | 00be444c737e95c7455aa1808d9da75d4affd51f (diff) | |
| download | emacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.tar.gz emacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.zip | |
Convert most remaining function definitions to standard C.
* buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c,
* xdisp.c: Convert function definitions to standard C.
* cm.c (cmputc): Arg C is now int, not char.
* process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 427 |
1 files changed, 154 insertions, 273 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index d7e01af0bc4..069ff4993d9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -521,17 +521,17 @@ extern Lisp_Object Qleft_margin, Qright_margin; | |||
| 521 | extern Lisp_Object Qleft_fringe, Qright_fringe; | 521 | extern Lisp_Object Qleft_fringe, Qright_fringe; |
| 522 | extern Lisp_Object QCmap; | 522 | extern Lisp_Object QCmap; |
| 523 | 523 | ||
| 524 | Lisp_Object recursive_edit_unwind (), command_loop (); | 524 | Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); |
| 525 | Lisp_Object Fthis_command_keys (); | 525 | Lisp_Object Fthis_command_keys (void); |
| 526 | Lisp_Object Qextended_command_history; | 526 | Lisp_Object Qextended_command_history; |
| 527 | EMACS_TIME timer_check (); | 527 | EMACS_TIME timer_check (int do_it_now); |
| 528 | 528 | ||
| 529 | extern Lisp_Object Vhistory_length, Vtranslation_table_for_input; | 529 | extern Lisp_Object Vhistory_length, Vtranslation_table_for_input; |
| 530 | 530 | ||
| 531 | extern char *x_get_keysym_name (); | 531 | extern char *x_get_keysym_name (); |
| 532 | 532 | ||
| 533 | static void record_menu_key (); | 533 | static void record_menu_key (Lisp_Object c); |
| 534 | static int echo_length (); | 534 | static int echo_length (void); |
| 535 | 535 | ||
| 536 | Lisp_Object Qpolling_period; | 536 | Lisp_Object Qpolling_period; |
| 537 | 537 | ||
| @@ -618,7 +618,6 @@ static void get_input_pending (int *, int); | |||
| 618 | static int readable_events (int); | 618 | static int readable_events (int); |
| 619 | static Lisp_Object read_char_x_menu_prompt (int, Lisp_Object *, | 619 | static Lisp_Object read_char_x_menu_prompt (int, Lisp_Object *, |
| 620 | Lisp_Object, int *); | 620 | Lisp_Object, int *); |
| 621 | static Lisp_Object read_char_x_menu_prompt (); | ||
| 622 | static Lisp_Object read_char_minibuf_menu_prompt (int, int, | 621 | static Lisp_Object read_char_minibuf_menu_prompt (int, int, |
| 623 | Lisp_Object *); | 622 | Lisp_Object *); |
| 624 | static Lisp_Object make_lispy_event (struct input_event *); | 623 | static Lisp_Object make_lispy_event (struct input_event *); |
| @@ -633,7 +632,6 @@ static Lisp_Object modify_event_symbol (int, unsigned, Lisp_Object, | |||
| 633 | Lisp_Object *, unsigned); | 632 | Lisp_Object *, unsigned); |
| 634 | static Lisp_Object make_lispy_switch_frame (Lisp_Object); | 633 | static Lisp_Object make_lispy_switch_frame (Lisp_Object); |
| 635 | static void save_getcjmp (jmp_buf); | 634 | static void save_getcjmp (jmp_buf); |
| 636 | static void save_getcjmp (); | ||
| 637 | static void restore_getcjmp (jmp_buf); | 635 | static void restore_getcjmp (jmp_buf); |
| 638 | static Lisp_Object apply_modifiers (int, Lisp_Object); | 636 | static Lisp_Object apply_modifiers (int, Lisp_Object); |
| 639 | static void clear_event (struct input_event *); | 637 | static void clear_event (struct input_event *); |
| @@ -658,8 +656,7 @@ extern Lisp_Object Qidentity, Qonly; | |||
| 658 | Also start echoing. */ | 656 | Also start echoing. */ |
| 659 | 657 | ||
| 660 | void | 658 | void |
| 661 | echo_prompt (str) | 659 | echo_prompt (Lisp_Object str) |
| 662 | Lisp_Object str; | ||
| 663 | { | 660 | { |
| 664 | current_kboard->echo_string = str; | 661 | current_kboard->echo_string = str; |
| 665 | current_kboard->echo_after_prompt = SCHARS (str); | 662 | current_kboard->echo_after_prompt = SCHARS (str); |
| @@ -671,8 +668,7 @@ echo_prompt (str) | |||
| 671 | jazz), or a symbol, whose name is printed. */ | 668 | jazz), or a symbol, whose name is printed. */ |
| 672 | 669 | ||
| 673 | void | 670 | void |
| 674 | echo_char (c) | 671 | echo_char (Lisp_Object c) |
| 675 | Lisp_Object c; | ||
| 676 | { | 672 | { |
| 677 | if (current_kboard->immediate_echo) | 673 | if (current_kboard->immediate_echo) |
| 678 | { | 674 | { |
| @@ -759,7 +755,7 @@ echo_char (c) | |||
| 759 | empty, so that it serves as a mini-prompt for the very next character. */ | 755 | empty, so that it serves as a mini-prompt for the very next character. */ |
| 760 | 756 | ||
| 761 | void | 757 | void |
| 762 | echo_dash () | 758 | echo_dash (void) |
| 763 | { | 759 | { |
| 764 | /* Do nothing if not echoing at all. */ | 760 | /* Do nothing if not echoing at all. */ |
| 765 | if (NILP (current_kboard->echo_string)) | 761 | if (NILP (current_kboard->echo_string)) |
| @@ -800,7 +796,7 @@ echo_dash () | |||
| 800 | doing so. */ | 796 | doing so. */ |
| 801 | 797 | ||
| 802 | void | 798 | void |
| 803 | echo_now () | 799 | echo_now (void) |
| 804 | { | 800 | { |
| 805 | if (!current_kboard->immediate_echo) | 801 | if (!current_kboard->immediate_echo) |
| 806 | { | 802 | { |
| @@ -850,7 +846,7 @@ echo_now () | |||
| 850 | /* Turn off echoing, for the start of a new command. */ | 846 | /* Turn off echoing, for the start of a new command. */ |
| 851 | 847 | ||
| 852 | void | 848 | void |
| 853 | cancel_echoing () | 849 | cancel_echoing (void) |
| 854 | { | 850 | { |
| 855 | current_kboard->immediate_echo = 0; | 851 | current_kboard->immediate_echo = 0; |
| 856 | current_kboard->echo_after_prompt = -1; | 852 | current_kboard->echo_after_prompt = -1; |
| @@ -863,7 +859,7 @@ cancel_echoing () | |||
| 863 | /* Return the length of the current echo string. */ | 859 | /* Return the length of the current echo string. */ |
| 864 | 860 | ||
| 865 | static int | 861 | static int |
| 866 | echo_length () | 862 | echo_length (void) |
| 867 | { | 863 | { |
| 868 | return (STRINGP (current_kboard->echo_string) | 864 | return (STRINGP (current_kboard->echo_string) |
| 869 | ? SCHARS (current_kboard->echo_string) | 865 | ? SCHARS (current_kboard->echo_string) |
| @@ -875,8 +871,7 @@ echo_length () | |||
| 875 | switches frames while entering a key sequence. */ | 871 | switches frames while entering a key sequence. */ |
| 876 | 872 | ||
| 877 | static void | 873 | static void |
| 878 | echo_truncate (nchars) | 874 | echo_truncate (int nchars) |
| 879 | int nchars; | ||
| 880 | { | 875 | { |
| 881 | if (STRINGP (current_kboard->echo_string)) | 876 | if (STRINGP (current_kboard->echo_string)) |
| 882 | current_kboard->echo_string | 877 | current_kboard->echo_string |
| @@ -888,8 +883,7 @@ echo_truncate (nchars) | |||
| 888 | 883 | ||
| 889 | /* Functions for manipulating this_command_keys. */ | 884 | /* Functions for manipulating this_command_keys. */ |
| 890 | static void | 885 | static void |
| 891 | add_command_key (key) | 886 | add_command_key (Lisp_Object key) |
| 892 | Lisp_Object key; | ||
| 893 | { | 887 | { |
| 894 | #if 0 /* Not needed after we made Freset_this_command_lengths | 888 | #if 0 /* Not needed after we made Freset_this_command_lengths |
| 895 | do the job immediately. */ | 889 | do the job immediately. */ |
| @@ -916,7 +910,7 @@ add_command_key (key) | |||
| 916 | 910 | ||
| 917 | 911 | ||
| 918 | Lisp_Object | 912 | Lisp_Object |
| 919 | recursive_edit_1 () | 913 | recursive_edit_1 (void) |
| 920 | { | 914 | { |
| 921 | int count = SPECPDL_INDEX (); | 915 | int count = SPECPDL_INDEX (); |
| 922 | Lisp_Object val; | 916 | Lisp_Object val; |
| @@ -961,7 +955,7 @@ recursive_edit_1 () | |||
| 961 | /* When an auto-save happens, record the "time", and don't do again soon. */ | 955 | /* When an auto-save happens, record the "time", and don't do again soon. */ |
| 962 | 956 | ||
| 963 | void | 957 | void |
| 964 | record_auto_save () | 958 | record_auto_save (void) |
| 965 | { | 959 | { |
| 966 | last_auto_save = num_nonmacro_input_events; | 960 | last_auto_save = num_nonmacro_input_events; |
| 967 | } | 961 | } |
| @@ -969,7 +963,7 @@ record_auto_save () | |||
| 969 | /* Make an auto save happen as soon as possible at command level. */ | 963 | /* Make an auto save happen as soon as possible at command level. */ |
| 970 | 964 | ||
| 971 | void | 965 | void |
| 972 | force_auto_save_soon () | 966 | force_auto_save_soon (void) |
| 973 | { | 967 | { |
| 974 | last_auto_save = - auto_save_interval - 1; | 968 | last_auto_save = - auto_save_interval - 1; |
| 975 | 969 | ||
| @@ -1014,8 +1008,7 @@ This function is called by the editor initialization to begin editing. */) | |||
| 1014 | } | 1008 | } |
| 1015 | 1009 | ||
| 1016 | Lisp_Object | 1010 | Lisp_Object |
| 1017 | recursive_edit_unwind (buffer) | 1011 | recursive_edit_unwind (Lisp_Object buffer) |
| 1018 | Lisp_Object buffer; | ||
| 1019 | { | 1012 | { |
| 1020 | if (BUFFERP (buffer)) | 1013 | if (BUFFERP (buffer)) |
| 1021 | Fset_buffer (buffer); | 1014 | Fset_buffer (buffer); |
| @@ -1060,8 +1053,7 @@ single_kboard_state () | |||
| 1060 | get out of it. */ | 1053 | get out of it. */ |
| 1061 | 1054 | ||
| 1062 | void | 1055 | void |
| 1063 | not_single_kboard_state (kboard) | 1056 | not_single_kboard_state (KBOARD *kboard) |
| 1064 | KBOARD *kboard; | ||
| 1065 | { | 1057 | { |
| 1066 | if (kboard == current_kboard) | 1058 | if (kboard == current_kboard) |
| 1067 | single_kboard = 0; | 1059 | single_kboard = 0; |
| @@ -1080,8 +1072,7 @@ struct kboard_stack | |||
| 1080 | static struct kboard_stack *kboard_stack; | 1072 | static struct kboard_stack *kboard_stack; |
| 1081 | 1073 | ||
| 1082 | void | 1074 | void |
| 1083 | push_kboard (k) | 1075 | push_kboard (struct kboard *k) |
| 1084 | struct kboard *k; | ||
| 1085 | { | 1076 | { |
| 1086 | struct kboard_stack *p | 1077 | struct kboard_stack *p |
| 1087 | = (struct kboard_stack *) xmalloc (sizeof (struct kboard_stack)); | 1078 | = (struct kboard_stack *) xmalloc (sizeof (struct kboard_stack)); |
| @@ -1094,7 +1085,7 @@ push_kboard (k) | |||
| 1094 | } | 1085 | } |
| 1095 | 1086 | ||
| 1096 | void | 1087 | void |
| 1097 | pop_kboard () | 1088 | pop_kboard (void) |
| 1098 | { | 1089 | { |
| 1099 | struct terminal *t; | 1090 | struct terminal *t; |
| 1100 | struct kboard_stack *p = kboard_stack; | 1091 | struct kboard_stack *p = kboard_stack; |
| @@ -1129,8 +1120,7 @@ pop_kboard () | |||
| 1129 | locked, then this function will throw an errow. */ | 1120 | locked, then this function will throw an errow. */ |
| 1130 | 1121 | ||
| 1131 | void | 1122 | void |
| 1132 | temporarily_switch_to_single_kboard (f) | 1123 | temporarily_switch_to_single_kboard (struct frame *f) |
| 1133 | struct frame *f; | ||
| 1134 | { | 1124 | { |
| 1135 | int was_locked = single_kboard; | 1125 | int was_locked = single_kboard; |
| 1136 | if (was_locked) | 1126 | if (was_locked) |
| @@ -1170,8 +1160,7 @@ record_single_kboard_state () | |||
| 1170 | #endif | 1160 | #endif |
| 1171 | 1161 | ||
| 1172 | static Lisp_Object | 1162 | static Lisp_Object |
| 1173 | restore_kboard_configuration (was_locked) | 1163 | restore_kboard_configuration (Lisp_Object was_locked) |
| 1174 | Lisp_Object was_locked; | ||
| 1175 | { | 1164 | { |
| 1176 | if (NILP (was_locked)) | 1165 | if (NILP (was_locked)) |
| 1177 | single_kboard = 0; | 1166 | single_kboard = 0; |
| @@ -1192,8 +1181,7 @@ restore_kboard_configuration (was_locked) | |||
| 1192 | by printing an error message and returning to the editor command loop. */ | 1181 | by printing an error message and returning to the editor command loop. */ |
| 1193 | 1182 | ||
| 1194 | Lisp_Object | 1183 | Lisp_Object |
| 1195 | cmd_error (data) | 1184 | cmd_error (Lisp_Object data) |
| 1196 | Lisp_Object data; | ||
| 1197 | { | 1185 | { |
| 1198 | Lisp_Object old_level, old_length; | 1186 | Lisp_Object old_level, old_length; |
| 1199 | char macroerror[50]; | 1187 | char macroerror[50]; |
| @@ -1251,9 +1239,7 @@ cmd_error (data) | |||
| 1251 | string. */ | 1239 | string. */ |
| 1252 | 1240 | ||
| 1253 | void | 1241 | void |
| 1254 | cmd_error_internal (data, context) | 1242 | cmd_error_internal (Lisp_Object data, char *context) |
| 1255 | Lisp_Object data; | ||
| 1256 | char *context; | ||
| 1257 | { | 1243 | { |
| 1258 | struct frame *sf = SELECTED_FRAME (); | 1244 | struct frame *sf = SELECTED_FRAME (); |
| 1259 | 1245 | ||
| @@ -1304,16 +1290,16 @@ cmd_error_internal (data, context) | |||
| 1304 | Vsignaling_function = Qnil; | 1290 | Vsignaling_function = Qnil; |
| 1305 | } | 1291 | } |
| 1306 | 1292 | ||
| 1307 | Lisp_Object command_loop_1 (); | 1293 | Lisp_Object command_loop_1 (void); |
| 1308 | Lisp_Object command_loop_2 (); | 1294 | Lisp_Object command_loop_2 (Lisp_Object); |
| 1309 | Lisp_Object top_level_1 (); | 1295 | Lisp_Object top_level_1 (Lisp_Object); |
| 1310 | 1296 | ||
| 1311 | /* Entry to editor-command-loop. | 1297 | /* Entry to editor-command-loop. |
| 1312 | This level has the catches for exiting/returning to editor command loop. | 1298 | This level has the catches for exiting/returning to editor command loop. |
| 1313 | It returns nil to exit recursive edit, t to abort it. */ | 1299 | It returns nil to exit recursive edit, t to abort it. */ |
| 1314 | 1300 | ||
| 1315 | Lisp_Object | 1301 | Lisp_Object |
| 1316 | command_loop () | 1302 | command_loop (void) |
| 1317 | { | 1303 | { |
| 1318 | if (command_loop_level > 0 || minibuf_level > 0) | 1304 | if (command_loop_level > 0 || minibuf_level > 0) |
| 1319 | { | 1305 | { |
| @@ -1348,7 +1334,7 @@ command_loop () | |||
| 1348 | returned due to end of file (or end of kbd macro). */ | 1334 | returned due to end of file (or end of kbd macro). */ |
| 1349 | 1335 | ||
| 1350 | Lisp_Object | 1336 | Lisp_Object |
| 1351 | command_loop_2 () | 1337 | command_loop_2 (Lisp_Object ignore) |
| 1352 | { | 1338 | { |
| 1353 | register Lisp_Object val; | 1339 | register Lisp_Object val; |
| 1354 | 1340 | ||
| @@ -1360,13 +1346,13 @@ command_loop_2 () | |||
| 1360 | } | 1346 | } |
| 1361 | 1347 | ||
| 1362 | Lisp_Object | 1348 | Lisp_Object |
| 1363 | top_level_2 () | 1349 | top_level_2 (void) |
| 1364 | { | 1350 | { |
| 1365 | return Feval (Vtop_level); | 1351 | return Feval (Vtop_level); |
| 1366 | } | 1352 | } |
| 1367 | 1353 | ||
| 1368 | Lisp_Object | 1354 | Lisp_Object |
| 1369 | top_level_1 () | 1355 | top_level_1 (Lisp_Object ignore) |
| 1370 | { | 1356 | { |
| 1371 | /* On entry to the outer level, run the startup file */ | 1357 | /* On entry to the outer level, run the startup file */ |
| 1372 | if (!NILP (Vtop_level)) | 1358 | if (!NILP (Vtop_level)) |
| @@ -1424,8 +1410,7 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, | |||
| 1424 | of this function. */ | 1410 | of this function. */ |
| 1425 | 1411 | ||
| 1426 | static Lisp_Object | 1412 | static Lisp_Object |
| 1427 | tracking_off (old_value) | 1413 | tracking_off (Lisp_Object old_value) |
| 1428 | Lisp_Object old_value; | ||
| 1429 | { | 1414 | { |
| 1430 | do_mouse_tracking = old_value; | 1415 | do_mouse_tracking = old_value; |
| 1431 | if (NILP (old_value)) | 1416 | if (NILP (old_value)) |
| @@ -1475,7 +1460,7 @@ usage: (track-mouse BODY...) */) | |||
| 1475 | int ignore_mouse_drag_p; | 1460 | int ignore_mouse_drag_p; |
| 1476 | 1461 | ||
| 1477 | static FRAME_PTR | 1462 | static FRAME_PTR |
| 1478 | some_mouse_moved () | 1463 | some_mouse_moved (void) |
| 1479 | { | 1464 | { |
| 1480 | Lisp_Object tail, frame; | 1465 | Lisp_Object tail, frame; |
| 1481 | 1466 | ||
| @@ -1508,8 +1493,7 @@ static void adjust_point_for_property (int, int); | |||
| 1508 | ARG is not used. */ | 1493 | ARG is not used. */ |
| 1509 | #ifdef HAVE_WINDOW_SYSTEM | 1494 | #ifdef HAVE_WINDOW_SYSTEM |
| 1510 | static Lisp_Object | 1495 | static Lisp_Object |
| 1511 | cancel_hourglass_unwind (arg) | 1496 | cancel_hourglass_unwind (Lisp_Object arg) |
| 1512 | Lisp_Object arg; | ||
| 1513 | { | 1497 | { |
| 1514 | cancel_hourglass (); | 1498 | cancel_hourglass (); |
| 1515 | return Qnil; | 1499 | return Qnil; |
| @@ -1517,7 +1501,7 @@ cancel_hourglass_unwind (arg) | |||
| 1517 | #endif | 1501 | #endif |
| 1518 | 1502 | ||
| 1519 | Lisp_Object | 1503 | Lisp_Object |
| 1520 | command_loop_1 () | 1504 | command_loop_1 (void) |
| 1521 | { | 1505 | { |
| 1522 | Lisp_Object cmd; | 1506 | Lisp_Object cmd; |
| 1523 | Lisp_Object keybuf[30]; | 1507 | Lisp_Object keybuf[30]; |
| @@ -1865,9 +1849,7 @@ extern Lisp_Object Qafter_string, Qbefore_string; | |||
| 1865 | extern Lisp_Object get_pos_property (Lisp_Object, Lisp_Object, Lisp_Object); | 1849 | extern Lisp_Object get_pos_property (Lisp_Object, Lisp_Object, Lisp_Object); |
| 1866 | 1850 | ||
| 1867 | static void | 1851 | static void |
| 1868 | adjust_point_for_property (last_pt, modified) | 1852 | adjust_point_for_property (int last_pt, int modified) |
| 1869 | int last_pt; | ||
| 1870 | int modified; | ||
| 1871 | { | 1853 | { |
| 1872 | EMACS_INT beg, end; | 1854 | EMACS_INT beg, end; |
| 1873 | Lisp_Object val, overlay, tmp; | 1855 | Lisp_Object val, overlay, tmp; |
| @@ -2017,8 +1999,7 @@ adjust_point_for_property (last_pt, modified) | |||
| 2017 | /* Subroutine for safe_run_hooks: run the hook HOOK. */ | 1999 | /* Subroutine for safe_run_hooks: run the hook HOOK. */ |
| 2018 | 2000 | ||
| 2019 | static Lisp_Object | 2001 | static Lisp_Object |
| 2020 | safe_run_hooks_1 (hook) | 2002 | safe_run_hooks_1 (void) |
| 2021 | Lisp_Object hook; | ||
| 2022 | { | 2003 | { |
| 2023 | if (NILP (Vrun_hooks)) | 2004 | if (NILP (Vrun_hooks)) |
| 2024 | return Qnil; | 2005 | return Qnil; |
| @@ -2028,8 +2009,7 @@ safe_run_hooks_1 (hook) | |||
| 2028 | /* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ | 2009 | /* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ |
| 2029 | 2010 | ||
| 2030 | static Lisp_Object | 2011 | static Lisp_Object |
| 2031 | safe_run_hooks_error (data) | 2012 | safe_run_hooks_error (Lisp_Object data) |
| 2032 | Lisp_Object data; | ||
| 2033 | { | 2013 | { |
| 2034 | Lisp_Object args[3]; | 2014 | Lisp_Object args[3]; |
| 2035 | args[0] = build_string ("Error in %s: %s"); | 2015 | args[0] = build_string ("Error in %s: %s"); |
| @@ -2044,8 +2024,7 @@ safe_run_hooks_error (data) | |||
| 2044 | to mysteriously evaporate. */ | 2024 | to mysteriously evaporate. */ |
| 2045 | 2025 | ||
| 2046 | void | 2026 | void |
| 2047 | safe_run_hooks (hook) | 2027 | safe_run_hooks (Lisp_Object hook) |
| 2048 | Lisp_Object hook; | ||
| 2049 | { | 2028 | { |
| 2050 | int count = SPECPDL_INDEX (); | 2029 | int count = SPECPDL_INDEX (); |
| 2051 | specbind (Qinhibit_quit, hook); | 2030 | specbind (Qinhibit_quit, hook); |
| @@ -2077,7 +2056,7 @@ struct atimer *poll_timer; | |||
| 2077 | there. */ | 2056 | there. */ |
| 2078 | 2057 | ||
| 2079 | void | 2058 | void |
| 2080 | poll_for_input_1 () | 2059 | poll_for_input_1 (void) |
| 2081 | { | 2060 | { |
| 2082 | /* Tell ns_read_socket() it is being called asynchronously so it can avoid | 2061 | /* Tell ns_read_socket() it is being called asynchronously so it can avoid |
| 2083 | doing anything dangerous. */ | 2062 | doing anything dangerous. */ |
| @@ -2096,8 +2075,7 @@ poll_for_input_1 () | |||
| 2096 | poll_timer. */ | 2075 | poll_timer. */ |
| 2097 | 2076 | ||
| 2098 | void | 2077 | void |
| 2099 | poll_for_input (timer) | 2078 | poll_for_input (struct atimer *timer) |
| 2100 | struct atimer *timer; | ||
| 2101 | { | 2079 | { |
| 2102 | if (poll_suppress_count == 0) | 2080 | if (poll_suppress_count == 0) |
| 2103 | { | 2081 | { |
| @@ -2116,7 +2094,7 @@ poll_for_input (timer) | |||
| 2116 | This function is called unconditionally from various places. */ | 2094 | This function is called unconditionally from various places. */ |
| 2117 | 2095 | ||
| 2118 | void | 2096 | void |
| 2119 | start_polling () | 2097 | start_polling (void) |
| 2120 | { | 2098 | { |
| 2121 | #ifdef POLL_FOR_INPUT | 2099 | #ifdef POLL_FOR_INPUT |
| 2122 | /* XXX This condition was (read_socket_hook && !interrupt_input), | 2100 | /* XXX This condition was (read_socket_hook && !interrupt_input), |
| @@ -2153,7 +2131,7 @@ start_polling () | |||
| 2153 | /* Nonzero if we are using polling to handle input asynchronously. */ | 2131 | /* Nonzero if we are using polling to handle input asynchronously. */ |
| 2154 | 2132 | ||
| 2155 | int | 2133 | int |
| 2156 | input_polling_used () | 2134 | input_polling_used (void) |
| 2157 | { | 2135 | { |
| 2158 | #ifdef POLL_FOR_INPUT | 2136 | #ifdef POLL_FOR_INPUT |
| 2159 | /* XXX This condition was (read_socket_hook && !interrupt_input), | 2137 | /* XXX This condition was (read_socket_hook && !interrupt_input), |
| @@ -2168,7 +2146,7 @@ input_polling_used () | |||
| 2168 | /* Turn off polling. */ | 2146 | /* Turn off polling. */ |
| 2169 | 2147 | ||
| 2170 | void | 2148 | void |
| 2171 | stop_polling () | 2149 | stop_polling (void) |
| 2172 | { | 2150 | { |
| 2173 | #ifdef POLL_FOR_INPUT | 2151 | #ifdef POLL_FOR_INPUT |
| 2174 | /* XXX This condition was (read_socket_hook && !interrupt_input), | 2152 | /* XXX This condition was (read_socket_hook && !interrupt_input), |
| @@ -2183,8 +2161,7 @@ stop_polling () | |||
| 2183 | and start or stop polling accordingly. */ | 2161 | and start or stop polling accordingly. */ |
| 2184 | 2162 | ||
| 2185 | void | 2163 | void |
| 2186 | set_poll_suppress_count (count) | 2164 | set_poll_suppress_count (int count) |
| 2187 | int count; | ||
| 2188 | { | 2165 | { |
| 2189 | #ifdef POLL_FOR_INPUT | 2166 | #ifdef POLL_FOR_INPUT |
| 2190 | if (count == 0 && poll_suppress_count != 0) | 2167 | if (count == 0 && poll_suppress_count != 0) |
| @@ -2204,8 +2181,7 @@ set_poll_suppress_count (count) | |||
| 2204 | But don't decrease it. */ | 2181 | But don't decrease it. */ |
| 2205 | 2182 | ||
| 2206 | void | 2183 | void |
| 2207 | bind_polling_period (n) | 2184 | bind_polling_period (int n) |
| 2208 | int n; | ||
| 2209 | { | 2185 | { |
| 2210 | #ifdef POLL_FOR_INPUT | 2186 | #ifdef POLL_FOR_INPUT |
| 2211 | int new = polling_period; | 2187 | int new = polling_period; |
| @@ -2224,8 +2200,7 @@ bind_polling_period (n) | |||
| 2224 | /* Apply the control modifier to CHARACTER. */ | 2200 | /* Apply the control modifier to CHARACTER. */ |
| 2225 | 2201 | ||
| 2226 | int | 2202 | int |
| 2227 | make_ctrl_char (c) | 2203 | make_ctrl_char (int c) |
| 2228 | int c; | ||
| 2229 | { | 2204 | { |
| 2230 | /* Save the upper bits here. */ | 2205 | /* Save the upper bits here. */ |
| 2231 | int upper = c & ~0177; | 2206 | int upper = c & ~0177; |
| @@ -2294,9 +2269,8 @@ make_ctrl_char (c) | |||
| 2294 | from X code running asynchronously. */ | 2269 | from X code running asynchronously. */ |
| 2295 | 2270 | ||
| 2296 | void | 2271 | void |
| 2297 | show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) | 2272 | show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, |
| 2298 | Lisp_Object help, window, object, pos; | 2273 | Lisp_Object pos, int ok_to_overwrite_keystroke_echo) |
| 2299 | int ok_to_overwrite_keystroke_echo; | ||
| 2300 | { | 2274 | { |
| 2301 | if (!NILP (help) && !STRINGP (help)) | 2275 | if (!NILP (help) && !STRINGP (help)) |
| 2302 | { | 2276 | { |
| @@ -2343,9 +2317,10 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) | |||
| 2343 | 2317 | ||
| 2344 | /* Input of single characters from keyboard */ | 2318 | /* Input of single characters from keyboard */ |
| 2345 | 2319 | ||
| 2346 | Lisp_Object print_help (); | 2320 | Lisp_Object print_help (Lisp_Object object); |
| 2347 | static Lisp_Object kbd_buffer_get_event (); | 2321 | static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu, |
| 2348 | static void record_char (); | 2322 | struct timeval *end_time); |
| 2323 | static void record_char (Lisp_Object c); | ||
| 2349 | 2324 | ||
| 2350 | static Lisp_Object help_form_saved_window_configs; | 2325 | static Lisp_Object help_form_saved_window_configs; |
| 2351 | static Lisp_Object | 2326 | static Lisp_Object |
| @@ -2394,13 +2369,8 @@ do { if (polling_stopped_here) start_polling (); \ | |||
| 2394 | Value is t if we showed a menu and the user rejected it. */ | 2369 | Value is t if we showed a menu and the user rejected it. */ |
| 2395 | 2370 | ||
| 2396 | Lisp_Object | 2371 | Lisp_Object |
| 2397 | read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | 2372 | read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event, |
| 2398 | int commandflag; | 2373 | int *used_mouse_menu, struct timeval *end_time) |
| 2399 | int nmaps; | ||
| 2400 | Lisp_Object *maps; | ||
| 2401 | Lisp_Object prev_event; | ||
| 2402 | int *used_mouse_menu; | ||
| 2403 | EMACS_TIME *end_time; | ||
| 2404 | { | 2374 | { |
| 2405 | volatile Lisp_Object c; | 2375 | volatile Lisp_Object c; |
| 2406 | int count, jmpcount; | 2376 | int count, jmpcount; |
| @@ -3311,8 +3281,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 3311 | Record it for echoing, for this-command-keys, and so on. */ | 3281 | Record it for echoing, for this-command-keys, and so on. */ |
| 3312 | 3282 | ||
| 3313 | static void | 3283 | static void |
| 3314 | record_menu_key (c) | 3284 | record_menu_key (Lisp_Object c) |
| 3315 | Lisp_Object c; | ||
| 3316 | { | 3285 | { |
| 3317 | /* Wipe the echo area. */ | 3286 | /* Wipe the echo area. */ |
| 3318 | clear_message (1, 0); | 3287 | clear_message (1, 0); |
| @@ -3346,8 +3315,7 @@ record_menu_key (c) | |||
| 3346 | /* Return 1 if should recognize C as "the help character". */ | 3315 | /* Return 1 if should recognize C as "the help character". */ |
| 3347 | 3316 | ||
| 3348 | int | 3317 | int |
| 3349 | help_char_p (c) | 3318 | help_char_p (Lisp_Object c) |
| 3350 | Lisp_Object c; | ||
| 3351 | { | 3319 | { |
| 3352 | Lisp_Object tail; | 3320 | Lisp_Object tail; |
| 3353 | 3321 | ||
| @@ -3362,8 +3330,7 @@ help_char_p (c) | |||
| 3362 | /* Record the input event C in various ways. */ | 3330 | /* Record the input event C in various ways. */ |
| 3363 | 3331 | ||
| 3364 | static void | 3332 | static void |
| 3365 | record_char (c) | 3333 | record_char (Lisp_Object c) |
| 3366 | Lisp_Object c; | ||
| 3367 | { | 3334 | { |
| 3368 | int recorded = 0; | 3335 | int recorded = 0; |
| 3369 | 3336 | ||
| @@ -3497,8 +3464,7 @@ record_char (c) | |||
| 3497 | } | 3464 | } |
| 3498 | 3465 | ||
| 3499 | Lisp_Object | 3466 | Lisp_Object |
| 3500 | print_help (object) | 3467 | print_help (Lisp_Object object) |
| 3501 | Lisp_Object object; | ||
| 3502 | { | 3468 | { |
| 3503 | struct buffer *old = current_buffer; | 3469 | struct buffer *old = current_buffer; |
| 3504 | Fprinc (object, Qnil); | 3470 | Fprinc (object, Qnil); |
| @@ -3514,15 +3480,13 @@ print_help (object) | |||
| 3514 | See read_process_output. */ | 3480 | See read_process_output. */ |
| 3515 | 3481 | ||
| 3516 | static void | 3482 | static void |
| 3517 | save_getcjmp (temp) | 3483 | save_getcjmp (jmp_buf temp) |
| 3518 | jmp_buf temp; | ||
| 3519 | { | 3484 | { |
| 3520 | bcopy (getcjmp, temp, sizeof getcjmp); | 3485 | bcopy (getcjmp, temp, sizeof getcjmp); |
| 3521 | } | 3486 | } |
| 3522 | 3487 | ||
| 3523 | static void | 3488 | static void |
| 3524 | restore_getcjmp (temp) | 3489 | restore_getcjmp (jmp_buf temp) |
| 3525 | jmp_buf temp; | ||
| 3526 | { | 3490 | { |
| 3527 | bcopy (temp, getcjmp, sizeof getcjmp); | 3491 | bcopy (temp, getcjmp, sizeof getcjmp); |
| 3528 | } | 3492 | } |
| @@ -3534,8 +3498,7 @@ restore_getcjmp (temp) | |||
| 3534 | /* Return true if there are any events in the queue that read-char | 3498 | /* Return true if there are any events in the queue that read-char |
| 3535 | would return. If this returns false, a read-char would block. */ | 3499 | would return. If this returns false, a read-char would block. */ |
| 3536 | static int | 3500 | static int |
| 3537 | readable_events (flags) | 3501 | readable_events (int flags) |
| 3538 | int flags; | ||
| 3539 | { | 3502 | { |
| 3540 | #ifdef HAVE_DBUS | 3503 | #ifdef HAVE_DBUS |
| 3541 | /* Check whether a D-Bus message has arrived. */ | 3504 | /* Check whether a D-Bus message has arrived. */ |
| @@ -3611,8 +3574,7 @@ readable_events (flags) | |||
| 3611 | int stop_character; | 3574 | int stop_character; |
| 3612 | 3575 | ||
| 3613 | static KBOARD * | 3576 | static KBOARD * |
| 3614 | event_to_kboard (event) | 3577 | event_to_kboard (struct input_event *event) |
| 3615 | struct input_event *event; | ||
| 3616 | { | 3578 | { |
| 3617 | Lisp_Object frame; | 3579 | Lisp_Object frame; |
| 3618 | frame = event->frame_or_window; | 3580 | frame = event->frame_or_window; |
| @@ -3636,8 +3598,7 @@ Lisp_Object Vthrow_on_input; | |||
| 3636 | /* Store an event obtained at interrupt level into kbd_buffer, fifo */ | 3598 | /* Store an event obtained at interrupt level into kbd_buffer, fifo */ |
| 3637 | 3599 | ||
| 3638 | void | 3600 | void |
| 3639 | kbd_buffer_store_event (event) | 3601 | kbd_buffer_store_event (register struct input_event *event) |
| 3640 | register struct input_event *event; | ||
| 3641 | { | 3602 | { |
| 3642 | kbd_buffer_store_event_hold (event, 0); | 3603 | kbd_buffer_store_event_hold (event, 0); |
| 3643 | } | 3604 | } |
| @@ -3655,9 +3616,8 @@ kbd_buffer_store_event (event) | |||
| 3655 | */ | 3616 | */ |
| 3656 | 3617 | ||
| 3657 | void | 3618 | void |
| 3658 | kbd_buffer_store_event_hold (event, hold_quit) | 3619 | kbd_buffer_store_event_hold (register struct input_event *event, |
| 3659 | register struct input_event *event; | 3620 | struct input_event *hold_quit) |
| 3660 | struct input_event *hold_quit; | ||
| 3661 | { | 3621 | { |
| 3662 | if (event->kind == NO_EVENT) | 3622 | if (event->kind == NO_EVENT) |
| 3663 | abort (); | 3623 | abort (); |
| @@ -3778,8 +3738,7 @@ kbd_buffer_store_event_hold (event, hold_quit) | |||
| 3778 | /* Put an input event back in the head of the event queue. */ | 3738 | /* Put an input event back in the head of the event queue. */ |
| 3779 | 3739 | ||
| 3780 | void | 3740 | void |
| 3781 | kbd_buffer_unget_event (event) | 3741 | kbd_buffer_unget_event (register struct input_event *event) |
| 3782 | register struct input_event *event; | ||
| 3783 | { | 3742 | { |
| 3784 | if (kbd_fetch_ptr == kbd_buffer) | 3743 | if (kbd_fetch_ptr == kbd_buffer) |
| 3785 | kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE; | 3744 | kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE; |
| @@ -3807,9 +3766,8 @@ kbd_buffer_unget_event (event) | |||
| 3807 | Value is the number of input_events generated. */ | 3766 | Value is the number of input_events generated. */ |
| 3808 | 3767 | ||
| 3809 | void | 3768 | void |
| 3810 | gen_help_event (help, frame, window, object, pos) | 3769 | gen_help_event (Lisp_Object help, Lisp_Object frame, Lisp_Object window, |
| 3811 | Lisp_Object help, frame, object, window; | 3770 | Lisp_Object object, int pos) |
| 3812 | int pos; | ||
| 3813 | { | 3771 | { |
| 3814 | struct input_event event; | 3772 | struct input_event event; |
| 3815 | 3773 | ||
| @@ -3828,8 +3786,7 @@ gen_help_event (help, frame, window, object, pos) | |||
| 3828 | /* Store HELP_EVENTs for HELP on FRAME in the input queue. */ | 3786 | /* Store HELP_EVENTs for HELP on FRAME in the input queue. */ |
| 3829 | 3787 | ||
| 3830 | void | 3788 | void |
| 3831 | kbd_buffer_store_help_event (frame, help) | 3789 | kbd_buffer_store_help_event (Lisp_Object frame, Lisp_Object help) |
| 3832 | Lisp_Object frame, help; | ||
| 3833 | { | 3790 | { |
| 3834 | struct input_event event; | 3791 | struct input_event event; |
| 3835 | 3792 | ||
| @@ -3846,7 +3803,7 @@ kbd_buffer_store_help_event (frame, help) | |||
| 3846 | /* Discard any mouse events in the event buffer by setting them to | 3803 | /* Discard any mouse events in the event buffer by setting them to |
| 3847 | NO_EVENT. */ | 3804 | NO_EVENT. */ |
| 3848 | void | 3805 | void |
| 3849 | discard_mouse_events () | 3806 | discard_mouse_events (void) |
| 3850 | { | 3807 | { |
| 3851 | struct input_event *sp; | 3808 | struct input_event *sp; |
| 3852 | for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) | 3809 | for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) |
| @@ -3876,8 +3833,7 @@ discard_mouse_events () | |||
| 3876 | are no real input events. */ | 3833 | are no real input events. */ |
| 3877 | 3834 | ||
| 3878 | int | 3835 | int |
| 3879 | kbd_buffer_events_waiting (discard) | 3836 | kbd_buffer_events_waiting (int discard) |
| 3880 | int discard; | ||
| 3881 | { | 3837 | { |
| 3882 | struct input_event *sp; | 3838 | struct input_event *sp; |
| 3883 | 3839 | ||
| @@ -3899,8 +3855,7 @@ kbd_buffer_events_waiting (discard) | |||
| 3899 | /* Clear input event EVENT. */ | 3855 | /* Clear input event EVENT. */ |
| 3900 | 3856 | ||
| 3901 | static INLINE void | 3857 | static INLINE void |
| 3902 | clear_event (event) | 3858 | clear_event (struct input_event *event) |
| 3903 | struct input_event *event; | ||
| 3904 | { | 3859 | { |
| 3905 | event->kind = NO_EVENT; | 3860 | event->kind = NO_EVENT; |
| 3906 | } | 3861 | } |
| @@ -3913,10 +3868,7 @@ clear_event (event) | |||
| 3913 | We always read and discard one event. */ | 3868 | We always read and discard one event. */ |
| 3914 | 3869 | ||
| 3915 | static Lisp_Object | 3870 | static Lisp_Object |
| 3916 | kbd_buffer_get_event (kbp, used_mouse_menu, end_time) | 3871 | kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu, struct timeval *end_time) |
| 3917 | KBOARD **kbp; | ||
| 3918 | int *used_mouse_menu; | ||
| 3919 | EMACS_TIME *end_time; | ||
| 3920 | { | 3872 | { |
| 3921 | register int c; | 3873 | register int c; |
| 3922 | Lisp_Object obj; | 3874 | Lisp_Object obj; |
| @@ -4283,8 +4235,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time) | |||
| 4283 | then return, without reading any user-visible events. */ | 4235 | then return, without reading any user-visible events. */ |
| 4284 | 4236 | ||
| 4285 | void | 4237 | void |
| 4286 | swallow_events (do_display) | 4238 | swallow_events (int do_display) |
| 4287 | int do_display; | ||
| 4288 | { | 4239 | { |
| 4289 | int old_timers_run; | 4240 | int old_timers_run; |
| 4290 | 4241 | ||
| @@ -4334,7 +4285,7 @@ swallow_events (do_display) | |||
| 4334 | for the sake of running idle-time timers. */ | 4285 | for the sake of running idle-time timers. */ |
| 4335 | 4286 | ||
| 4336 | static void | 4287 | static void |
| 4337 | timer_start_idle () | 4288 | timer_start_idle (void) |
| 4338 | { | 4289 | { |
| 4339 | Lisp_Object timers; | 4290 | Lisp_Object timers; |
| 4340 | 4291 | ||
| @@ -4362,7 +4313,7 @@ timer_start_idle () | |||
| 4362 | /* Record that Emacs is no longer idle, so stop running idle-time timers. */ | 4313 | /* Record that Emacs is no longer idle, so stop running idle-time timers. */ |
| 4363 | 4314 | ||
| 4364 | static void | 4315 | static void |
| 4365 | timer_stop_idle () | 4316 | timer_stop_idle (void) |
| 4366 | { | 4317 | { |
| 4367 | EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); | 4318 | EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); |
| 4368 | } | 4319 | } |
| @@ -4370,7 +4321,7 @@ timer_stop_idle () | |||
| 4370 | /* Resume idle timer from last idle start time. */ | 4321 | /* Resume idle timer from last idle start time. */ |
| 4371 | 4322 | ||
| 4372 | static void | 4323 | static void |
| 4373 | timer_resume_idle () | 4324 | timer_resume_idle (void) |
| 4374 | { | 4325 | { |
| 4375 | if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) | 4326 | if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) |
| 4376 | return; | 4327 | return; |
| @@ -4401,7 +4352,7 @@ extern Lisp_Object Qapply; | |||
| 4401 | should be done. */ | 4352 | should be done. */ |
| 4402 | 4353 | ||
| 4403 | static EMACS_TIME | 4354 | static EMACS_TIME |
| 4404 | timer_check_2 () | 4355 | timer_check_2 (void) |
| 4405 | { | 4356 | { |
| 4406 | EMACS_TIME nexttime; | 4357 | EMACS_TIME nexttime; |
| 4407 | EMACS_TIME now, idleness_now; | 4358 | EMACS_TIME now, idleness_now; |
| @@ -4602,12 +4553,11 @@ timer_check_2 () | |||
| 4602 | Now we always run timers directly. */ | 4553 | Now we always run timers directly. */ |
| 4603 | 4554 | ||
| 4604 | EMACS_TIME | 4555 | EMACS_TIME |
| 4605 | timer_check (do_it_now) | 4556 | timer_check (int do_it_now) |
| 4606 | int do_it_now; | ||
| 4607 | { | 4557 | { |
| 4608 | EMACS_TIME nexttime; | 4558 | EMACS_TIME nexttime; |
| 4609 | 4559 | ||
| 4610 | do | 4560 | do |
| 4611 | { | 4561 | { |
| 4612 | nexttime = timer_check_2 (); | 4562 | nexttime = timer_check_2 (); |
| 4613 | } | 4563 | } |
| @@ -5254,10 +5204,8 @@ int double_click_count; | |||
| 5254 | /* Return position of a mouse click or wheel event */ | 5204 | /* Return position of a mouse click or wheel event */ |
| 5255 | 5205 | ||
| 5256 | static Lisp_Object | 5206 | static Lisp_Object |
| 5257 | make_lispy_position (f, x, y, time) | 5207 | make_lispy_position (struct frame *f, Lisp_Object *x, Lisp_Object *y, |
| 5258 | struct frame *f; | 5208 | unsigned long time) |
| 5259 | Lisp_Object *x, *y; | ||
| 5260 | unsigned long time; | ||
| 5261 | { | 5209 | { |
| 5262 | Lisp_Object window; | 5210 | Lisp_Object window; |
| 5263 | enum window_part part; | 5211 | enum window_part part; |
| @@ -5444,8 +5392,7 @@ make_lispy_position (f, x, y, time) | |||
| 5444 | in order to build drag events when the button is released. */ | 5392 | in order to build drag events when the button is released. */ |
| 5445 | 5393 | ||
| 5446 | static Lisp_Object | 5394 | static Lisp_Object |
| 5447 | make_lispy_event (event) | 5395 | make_lispy_event (struct input_event *event) |
| 5448 | struct input_event *event; | ||
| 5449 | { | 5396 | { |
| 5450 | int i; | 5397 | int i; |
| 5451 | 5398 | ||
| @@ -6152,12 +6099,8 @@ make_lispy_event (event) | |||
| 6152 | #if defined(HAVE_MOUSE) || defined(HAVE_GPM) | 6099 | #if defined(HAVE_MOUSE) || defined(HAVE_GPM) |
| 6153 | 6100 | ||
| 6154 | static Lisp_Object | 6101 | static Lisp_Object |
| 6155 | make_lispy_movement (frame, bar_window, part, x, y, time) | 6102 | make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, |
| 6156 | FRAME_PTR frame; | 6103 | Lisp_Object x, Lisp_Object y, unsigned long time) |
| 6157 | Lisp_Object bar_window; | ||
| 6158 | enum scroll_bar_part part; | ||
| 6159 | Lisp_Object x, y; | ||
| 6160 | unsigned long time; | ||
| 6161 | { | 6104 | { |
| 6162 | /* Is it a scroll bar movement? */ | 6105 | /* Is it a scroll bar movement? */ |
| 6163 | if (frame && ! NILP (bar_window)) | 6106 | if (frame && ! NILP (bar_window)) |
| @@ -6192,8 +6135,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time) | |||
| 6192 | 6135 | ||
| 6193 | /* Construct a switch frame event. */ | 6136 | /* Construct a switch frame event. */ |
| 6194 | static Lisp_Object | 6137 | static Lisp_Object |
| 6195 | make_lispy_switch_frame (frame) | 6138 | make_lispy_switch_frame (Lisp_Object frame) |
| 6196 | Lisp_Object frame; | ||
| 6197 | { | 6139 | { |
| 6198 | return Fcons (Qswitch_frame, Fcons (frame, Qnil)); | 6140 | return Fcons (Qswitch_frame, Fcons (frame, Qnil)); |
| 6199 | } | 6141 | } |
| @@ -6209,9 +6151,7 @@ make_lispy_switch_frame (frame) | |||
| 6209 | This doesn't use any caches. */ | 6151 | This doesn't use any caches. */ |
| 6210 | 6152 | ||
| 6211 | static int | 6153 | static int |
| 6212 | parse_modifiers_uncached (symbol, modifier_end) | 6154 | parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) |
| 6213 | Lisp_Object symbol; | ||
| 6214 | int *modifier_end; | ||
| 6215 | { | 6155 | { |
| 6216 | Lisp_Object name; | 6156 | Lisp_Object name; |
| 6217 | int i; | 6157 | int i; |
| @@ -6321,10 +6261,7 @@ parse_modifiers_uncached (symbol, modifier_end) | |||
| 6321 | prepended to the string BASE[0..BASE_LEN-1]. | 6261 | prepended to the string BASE[0..BASE_LEN-1]. |
| 6322 | This doesn't use any caches. */ | 6262 | This doesn't use any caches. */ |
| 6323 | static Lisp_Object | 6263 | static Lisp_Object |
| 6324 | apply_modifiers_uncached (modifiers, base, base_len, base_len_byte) | 6264 | apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_byte) |
| 6325 | int modifiers; | ||
| 6326 | char *base; | ||
| 6327 | int base_len, base_len_byte; | ||
| 6328 | { | 6265 | { |
| 6329 | /* Since BASE could contain nulls, we can't use intern here; we have | 6266 | /* Since BASE could contain nulls, we can't use intern here; we have |
| 6330 | to use Fintern, which expects a genuine Lisp_String, and keeps a | 6267 | to use Fintern, which expects a genuine Lisp_String, and keeps a |
| @@ -6383,8 +6320,7 @@ static Lisp_Object modifier_symbols; | |||
| 6383 | 6320 | ||
| 6384 | /* Return the list of modifier symbols corresponding to the mask MODIFIERS. */ | 6321 | /* Return the list of modifier symbols corresponding to the mask MODIFIERS. */ |
| 6385 | static Lisp_Object | 6322 | static Lisp_Object |
| 6386 | lispy_modifier_list (modifiers) | 6323 | lispy_modifier_list (int modifiers) |
| 6387 | int modifiers; | ||
| 6388 | { | 6324 | { |
| 6389 | Lisp_Object modifier_list; | 6325 | Lisp_Object modifier_list; |
| 6390 | int i; | 6326 | int i; |
| @@ -6409,8 +6345,7 @@ lispy_modifier_list (modifiers) | |||
| 6409 | #define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1)) | 6345 | #define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1)) |
| 6410 | 6346 | ||
| 6411 | Lisp_Object | 6347 | Lisp_Object |
| 6412 | parse_modifiers (symbol) | 6348 | parse_modifiers (Lisp_Object symbol) |
| 6413 | Lisp_Object symbol; | ||
| 6414 | { | 6349 | { |
| 6415 | Lisp_Object elements; | 6350 | Lisp_Object elements; |
| 6416 | 6351 | ||
| @@ -6479,9 +6414,7 @@ DEFUN ("internal-event-symbol-parse-modifiers", Fevent_symbol_parse_modifiers, | |||
| 6479 | apply_modifiers copies the value of BASE's Qevent_kind property to | 6414 | apply_modifiers copies the value of BASE's Qevent_kind property to |
| 6480 | the modified symbol. */ | 6415 | the modified symbol. */ |
| 6481 | static Lisp_Object | 6416 | static Lisp_Object |
| 6482 | apply_modifiers (modifiers, base) | 6417 | apply_modifiers (int modifiers, Lisp_Object base) |
| 6483 | int modifiers; | ||
| 6484 | Lisp_Object base; | ||
| 6485 | { | 6418 | { |
| 6486 | Lisp_Object cache, index, entry, new_symbol; | 6419 | Lisp_Object cache, index, entry, new_symbol; |
| 6487 | 6420 | ||
| @@ -6550,8 +6483,7 @@ apply_modifiers (modifiers, base) | |||
| 6550 | and M-C-foo end up being equivalent in the keymap. */ | 6483 | and M-C-foo end up being equivalent in the keymap. */ |
| 6551 | 6484 | ||
| 6552 | Lisp_Object | 6485 | Lisp_Object |
| 6553 | reorder_modifiers (symbol) | 6486 | reorder_modifiers (Lisp_Object symbol) |
| 6554 | Lisp_Object symbol; | ||
| 6555 | { | 6487 | { |
| 6556 | /* It's hopefully okay to write the code this way, since everything | 6488 | /* It's hopefully okay to write the code this way, since everything |
| 6557 | will soon be in caches, and no consing will be done at all. */ | 6489 | will soon be in caches, and no consing will be done at all. */ |
| @@ -6596,15 +6528,9 @@ reorder_modifiers (symbol) | |||
| 6596 | in the symbol's name. */ | 6528 | in the symbol's name. */ |
| 6597 | 6529 | ||
| 6598 | static Lisp_Object | 6530 | static Lisp_Object |
| 6599 | modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist_or_stem, | 6531 | modify_event_symbol (int symbol_num, unsigned int modifiers, Lisp_Object symbol_kind, |
| 6600 | name_table, symbol_table, table_size) | 6532 | Lisp_Object name_alist_or_stem, char **name_table, |
| 6601 | int symbol_num; | 6533 | Lisp_Object *symbol_table, unsigned int table_size) |
| 6602 | unsigned modifiers; | ||
| 6603 | Lisp_Object symbol_kind; | ||
| 6604 | Lisp_Object name_alist_or_stem; | ||
| 6605 | char **name_table; | ||
| 6606 | Lisp_Object *symbol_table; | ||
| 6607 | unsigned int table_size; | ||
| 6608 | { | 6534 | { |
| 6609 | Lisp_Object value; | 6535 | Lisp_Object value; |
| 6610 | Lisp_Object symbol_int; | 6536 | Lisp_Object symbol_int; |
| @@ -6841,8 +6767,7 @@ parse_solitary_modifier (Lisp_Object symbol) | |||
| 6841 | but it can be a Lucid-style event type list. */ | 6767 | but it can be a Lucid-style event type list. */ |
| 6842 | 6768 | ||
| 6843 | int | 6769 | int |
| 6844 | lucid_event_type_list_p (object) | 6770 | lucid_event_type_list_p (Lisp_Object object) |
| 6845 | Lisp_Object object; | ||
| 6846 | { | 6771 | { |
| 6847 | Lisp_Object tail; | 6772 | Lisp_Object tail; |
| 6848 | 6773 | ||
| @@ -6879,9 +6804,7 @@ lucid_event_type_list_p (object) | |||
| 6879 | movements and toolkit scroll bar thumb drags. */ | 6804 | movements and toolkit scroll bar thumb drags. */ |
| 6880 | 6805 | ||
| 6881 | static void | 6806 | static void |
| 6882 | get_input_pending (addr, flags) | 6807 | get_input_pending (int *addr, int flags) |
| 6883 | int *addr; | ||
| 6884 | int flags; | ||
| 6885 | { | 6808 | { |
| 6886 | /* First of all, have we already counted some input? */ | 6809 | /* First of all, have we already counted some input? */ |
| 6887 | *addr = (!NILP (Vquit_flag) || readable_events (flags)); | 6810 | *addr = (!NILP (Vquit_flag) || readable_events (flags)); |
| @@ -6898,8 +6821,7 @@ get_input_pending (addr, flags) | |||
| 6898 | /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */ | 6821 | /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */ |
| 6899 | 6822 | ||
| 6900 | void | 6823 | void |
| 6901 | gobble_input (expected) | 6824 | gobble_input (int expected) |
| 6902 | int expected; | ||
| 6903 | { | 6825 | { |
| 6904 | #ifdef HAVE_DBUS | 6826 | #ifdef HAVE_DBUS |
| 6905 | /* Read D-Bus messages. */ | 6827 | /* Read D-Bus messages. */ |
| @@ -6936,7 +6858,7 @@ gobble_input (expected) | |||
| 6936 | so that read_key_sequence will notice the new current buffer. */ | 6858 | so that read_key_sequence will notice the new current buffer. */ |
| 6937 | 6859 | ||
| 6938 | void | 6860 | void |
| 6939 | record_asynch_buffer_change () | 6861 | record_asynch_buffer_change (void) |
| 6940 | { | 6862 | { |
| 6941 | struct input_event event; | 6863 | struct input_event event; |
| 6942 | Lisp_Object tem; | 6864 | Lisp_Object tem; |
| @@ -6986,8 +6908,7 @@ record_asynch_buffer_change () | |||
| 6986 | this is a bad time to try to read input. */ | 6908 | this is a bad time to try to read input. */ |
| 6987 | 6909 | ||
| 6988 | static int | 6910 | static int |
| 6989 | read_avail_input (expected) | 6911 | read_avail_input (int expected) |
| 6990 | int expected; | ||
| 6991 | { | 6912 | { |
| 6992 | int nread = 0; | 6913 | int nread = 0; |
| 6993 | int err = 0; | 6914 | int err = 0; |
| @@ -7313,7 +7234,7 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 7313 | } | 7234 | } |
| 7314 | 7235 | ||
| 7315 | void | 7236 | void |
| 7316 | handle_async_input () | 7237 | handle_async_input (void) |
| 7317 | { | 7238 | { |
| 7318 | interrupt_input_pending = 0; | 7239 | interrupt_input_pending = 0; |
| 7319 | #ifdef SYNC_INPUT | 7240 | #ifdef SYNC_INPUT |
| @@ -7340,7 +7261,7 @@ handle_async_input () | |||
| 7340 | } | 7261 | } |
| 7341 | 7262 | ||
| 7342 | void | 7263 | void |
| 7343 | process_pending_signals () | 7264 | process_pending_signals (void) |
| 7344 | { | 7265 | { |
| 7345 | if (interrupt_input_pending) | 7266 | if (interrupt_input_pending) |
| 7346 | handle_async_input (); | 7267 | handle_async_input (); |
| @@ -7351,8 +7272,7 @@ process_pending_signals () | |||
| 7351 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | 7272 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ |
| 7352 | 7273 | ||
| 7353 | static SIGTYPE | 7274 | static SIGTYPE |
| 7354 | input_available_signal (signo) | 7275 | input_available_signal (int signo) |
| 7355 | int signo; | ||
| 7356 | { | 7276 | { |
| 7357 | /* Must preserve main program's value of errno. */ | 7277 | /* Must preserve main program's value of errno. */ |
| 7358 | int old_errno = errno; | 7278 | int old_errno = errno; |
| @@ -7381,7 +7301,7 @@ input_available_signal (signo) | |||
| 7381 | dealing with, without assuming that every file which uses | 7301 | dealing with, without assuming that every file which uses |
| 7382 | UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */ | 7302 | UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */ |
| 7383 | void | 7303 | void |
| 7384 | reinvoke_input_signal () | 7304 | reinvoke_input_signal (void) |
| 7385 | { | 7305 | { |
| 7386 | #ifdef SIGIO | 7306 | #ifdef SIGIO |
| 7387 | handle_async_input (); | 7307 | handle_async_input (); |
| @@ -7410,9 +7330,7 @@ struct user_signal_info | |||
| 7410 | static struct user_signal_info *user_signals = NULL; | 7330 | static struct user_signal_info *user_signals = NULL; |
| 7411 | 7331 | ||
| 7412 | void | 7332 | void |
| 7413 | add_user_signal (sig, name) | 7333 | add_user_signal (int sig, const char *name) |
| 7414 | int sig; | ||
| 7415 | const char *name; | ||
| 7416 | { | 7334 | { |
| 7417 | struct user_signal_info *p; | 7335 | struct user_signal_info *p; |
| 7418 | 7336 | ||
| @@ -7432,8 +7350,7 @@ add_user_signal (sig, name) | |||
| 7432 | } | 7350 | } |
| 7433 | 7351 | ||
| 7434 | static SIGTYPE | 7352 | static SIGTYPE |
| 7435 | handle_user_signal (sig) | 7353 | handle_user_signal (int sig) |
| 7436 | int sig; | ||
| 7437 | { | 7354 | { |
| 7438 | int old_errno = errno; | 7355 | int old_errno = errno; |
| 7439 | struct user_signal_info *p; | 7356 | struct user_signal_info *p; |
| @@ -7462,8 +7379,7 @@ handle_user_signal (sig) | |||
| 7462 | } | 7379 | } |
| 7463 | 7380 | ||
| 7464 | static char * | 7381 | static char * |
| 7465 | find_user_signal_name (sig) | 7382 | find_user_signal_name (int sig) |
| 7466 | int sig; | ||
| 7467 | { | 7383 | { |
| 7468 | struct user_signal_info *p; | 7384 | struct user_signal_info *p; |
| 7469 | 7385 | ||
| @@ -7475,7 +7391,7 @@ find_user_signal_name (sig) | |||
| 7475 | } | 7391 | } |
| 7476 | 7392 | ||
| 7477 | static int | 7393 | static int |
| 7478 | store_user_signal_events () | 7394 | store_user_signal_events (void) |
| 7479 | { | 7395 | { |
| 7480 | struct user_signal_info *p; | 7396 | struct user_signal_info *p; |
| 7481 | struct input_event buf; | 7397 | struct input_event buf; |
| @@ -7525,8 +7441,7 @@ static int menu_bar_items_index; | |||
| 7525 | OLD is an old vector we can optionally reuse, or nil. */ | 7441 | OLD is an old vector we can optionally reuse, or nil. */ |
| 7526 | 7442 | ||
| 7527 | Lisp_Object | 7443 | Lisp_Object |
| 7528 | menu_bar_items (old) | 7444 | menu_bar_items (Lisp_Object old) |
| 7529 | Lisp_Object old; | ||
| 7530 | { | 7445 | { |
| 7531 | /* The number of keymaps we're scanning right now, and the number of | 7446 | /* The number of keymaps we're scanning right now, and the number of |
| 7532 | keymaps we have allocated space for. */ | 7447 | keymaps we have allocated space for. */ |
| @@ -7666,9 +7581,7 @@ menu_bar_items (old) | |||
| 7666 | Lisp_Object item_properties; | 7581 | Lisp_Object item_properties; |
| 7667 | 7582 | ||
| 7668 | static void | 7583 | static void |
| 7669 | menu_bar_item (key, item, dummy1, dummy2) | 7584 | menu_bar_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy1, void *dummy2) |
| 7670 | Lisp_Object key, item, dummy1; | ||
| 7671 | void *dummy2; | ||
| 7672 | { | 7585 | { |
| 7673 | struct gcpro gcpro1; | 7586 | struct gcpro gcpro1; |
| 7674 | int i; | 7587 | int i; |
| @@ -7743,8 +7656,7 @@ menu_bar_item (key, item, dummy1, dummy2) | |||
| 7743 | 7656 | ||
| 7744 | /* This is used as the handler when calling menu_item_eval_property. */ | 7657 | /* This is used as the handler when calling menu_item_eval_property. */ |
| 7745 | static Lisp_Object | 7658 | static Lisp_Object |
| 7746 | menu_item_eval_property_1 (arg) | 7659 | menu_item_eval_property_1 (Lisp_Object arg) |
| 7747 | Lisp_Object arg; | ||
| 7748 | { | 7660 | { |
| 7749 | /* If we got a quit from within the menu computation, | 7661 | /* If we got a quit from within the menu computation, |
| 7750 | quit all the way out of it. This takes care of C-] in the debugger. */ | 7662 | quit all the way out of it. This takes care of C-] in the debugger. */ |
| @@ -7757,8 +7669,7 @@ menu_item_eval_property_1 (arg) | |||
| 7757 | /* Evaluate an expression and return the result (or nil if something | 7669 | /* Evaluate an expression and return the result (or nil if something |
| 7758 | went wrong). Used to evaluate dynamic parts of menu items. */ | 7670 | went wrong). Used to evaluate dynamic parts of menu items. */ |
| 7759 | Lisp_Object | 7671 | Lisp_Object |
| 7760 | menu_item_eval_property (sexpr) | 7672 | menu_item_eval_property (Lisp_Object sexpr) |
| 7761 | Lisp_Object sexpr; | ||
| 7762 | { | 7673 | { |
| 7763 | int count = SPECPDL_INDEX (); | 7674 | int count = SPECPDL_INDEX (); |
| 7764 | Lisp_Object val; | 7675 | Lisp_Object val; |
| @@ -7778,9 +7689,7 @@ menu_item_eval_property (sexpr) | |||
| 7778 | otherwise. */ | 7689 | otherwise. */ |
| 7779 | 7690 | ||
| 7780 | int | 7691 | int |
| 7781 | parse_menu_item (item, inmenubar) | 7692 | parse_menu_item (Lisp_Object item, int inmenubar) |
| 7782 | Lisp_Object item; | ||
| 7783 | int inmenubar; | ||
| 7784 | { | 7693 | { |
| 7785 | Lisp_Object def, tem, item_string, start; | 7694 | Lisp_Object def, tem, item_string, start; |
| 7786 | Lisp_Object filter; | 7695 | Lisp_Object filter; |
| @@ -8088,9 +7997,7 @@ static void append_tool_bar_item (void); | |||
| 8088 | tool bar items found. */ | 7997 | tool bar items found. */ |
| 8089 | 7998 | ||
| 8090 | Lisp_Object | 7999 | Lisp_Object |
| 8091 | tool_bar_items (reuse, nitems) | 8000 | tool_bar_items (Lisp_Object reuse, int *nitems) |
| 8092 | Lisp_Object reuse; | ||
| 8093 | int *nitems; | ||
| 8094 | { | 8001 | { |
| 8095 | Lisp_Object *maps; | 8002 | Lisp_Object *maps; |
| 8096 | int nmaps, i; | 8003 | int nmaps, i; |
| @@ -8168,9 +8075,7 @@ tool_bar_items (reuse, nitems) | |||
| 8168 | /* Process the definition of KEY which is DEF. */ | 8075 | /* Process the definition of KEY which is DEF. */ |
| 8169 | 8076 | ||
| 8170 | static void | 8077 | static void |
| 8171 | process_tool_bar_item (key, def, data, args) | 8078 | process_tool_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void *args) |
| 8172 | Lisp_Object key, def, data; | ||
| 8173 | void *args; | ||
| 8174 | { | 8079 | { |
| 8175 | int i; | 8080 | int i; |
| 8176 | extern Lisp_Object Qundefined; | 8081 | extern Lisp_Object Qundefined; |
| @@ -8255,8 +8160,7 @@ process_tool_bar_item (key, def, data, args) | |||
| 8255 | A text label to show with the tool bar button if labels are enabled. */ | 8160 | A text label to show with the tool bar button if labels are enabled. */ |
| 8256 | 8161 | ||
| 8257 | static int | 8162 | static int |
| 8258 | parse_tool_bar_item (key, item) | 8163 | parse_tool_bar_item (Lisp_Object key, Lisp_Object item) |
| 8259 | Lisp_Object key, item; | ||
| 8260 | { | 8164 | { |
| 8261 | /* Access slot with index IDX of vector tool_bar_item_properties. */ | 8165 | /* Access slot with index IDX of vector tool_bar_item_properties. */ |
| 8262 | #define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX] | 8166 | #define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX] |
| @@ -8386,7 +8290,7 @@ parse_tool_bar_item (key, item) | |||
| 8386 | EMACS_INT max_lbl = 2*tool_bar_max_label_size; | 8290 | EMACS_INT max_lbl = 2*tool_bar_max_label_size; |
| 8387 | Lisp_Object new_lbl; | 8291 | Lisp_Object new_lbl; |
| 8388 | 8292 | ||
| 8389 | if (strlen (caption) < max_lbl && caption[0] != '\0') | 8293 | if (strlen (caption) < max_lbl && caption[0] != '\0') |
| 8390 | { | 8294 | { |
| 8391 | strcpy (buf, caption); | 8295 | strcpy (buf, caption); |
| 8392 | while (buf[0] != '\0' && buf[strlen (buf) -1] == '.') | 8296 | while (buf[0] != '\0' && buf[strlen (buf) -1] == '.') |
| @@ -8398,17 +8302,17 @@ parse_tool_bar_item (key, item) | |||
| 8398 | if (strlen (caption) <= max_lbl) | 8302 | if (strlen (caption) <= max_lbl) |
| 8399 | label = caption; | 8303 | label = caption; |
| 8400 | 8304 | ||
| 8401 | if (strlen (label) <= max_lbl && label[0] != '\0') | 8305 | if (strlen (label) <= max_lbl && label[0] != '\0') |
| 8402 | { | 8306 | { |
| 8403 | int i; | 8307 | int i; |
| 8404 | if (label != buf) strcpy (buf, label); | 8308 | if (label != buf) strcpy (buf, label); |
| 8405 | 8309 | ||
| 8406 | for (i = 0; i < strlen (buf); ++i) | 8310 | for (i = 0; i < strlen (buf); ++i) |
| 8407 | { | 8311 | { |
| 8408 | if (buf[i] == '-') buf[i] = ' '; | 8312 | if (buf[i] == '-') buf[i] = ' '; |
| 8409 | } | 8313 | } |
| 8410 | label = buf; | 8314 | label = buf; |
| 8411 | 8315 | ||
| 8412 | } | 8316 | } |
| 8413 | else label = ""; | 8317 | else label = ""; |
| 8414 | 8318 | ||
| @@ -8448,8 +8352,7 @@ parse_tool_bar_item (key, item) | |||
| 8448 | that can be reused. */ | 8352 | that can be reused. */ |
| 8449 | 8353 | ||
| 8450 | static void | 8354 | static void |
| 8451 | init_tool_bar_items (reuse) | 8355 | init_tool_bar_items (Lisp_Object reuse) |
| 8452 | Lisp_Object reuse; | ||
| 8453 | { | 8356 | { |
| 8454 | if (VECTORP (reuse)) | 8357 | if (VECTORP (reuse)) |
| 8455 | tool_bar_items_vector = reuse; | 8358 | tool_bar_items_vector = reuse; |
| @@ -8463,7 +8366,7 @@ init_tool_bar_items (reuse) | |||
| 8463 | tool_bar_item_properties */ | 8366 | tool_bar_item_properties */ |
| 8464 | 8367 | ||
| 8465 | static void | 8368 | static void |
| 8466 | append_tool_bar_item () | 8369 | append_tool_bar_item (void) |
| 8467 | { | 8370 | { |
| 8468 | Lisp_Object *to, *from; | 8371 | Lisp_Object *to, *from; |
| 8469 | 8372 | ||
| @@ -8507,11 +8410,8 @@ append_tool_bar_item () | |||
| 8507 | and do auto-saving in the inner call of read_char. */ | 8410 | and do auto-saving in the inner call of read_char. */ |
| 8508 | 8411 | ||
| 8509 | static Lisp_Object | 8412 | static Lisp_Object |
| 8510 | read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) | 8413 | read_char_x_menu_prompt (int nmaps, Lisp_Object *maps, Lisp_Object prev_event, |
| 8511 | int nmaps; | 8414 | int *used_mouse_menu) |
| 8512 | Lisp_Object *maps; | ||
| 8513 | Lisp_Object prev_event; | ||
| 8514 | int *used_mouse_menu; | ||
| 8515 | { | 8415 | { |
| 8516 | int mapno; | 8416 | int mapno; |
| 8517 | 8417 | ||
| @@ -8595,10 +8495,7 @@ static char *read_char_minibuf_menu_text; | |||
| 8595 | static int read_char_minibuf_menu_width; | 8495 | static int read_char_minibuf_menu_width; |
| 8596 | 8496 | ||
| 8597 | static Lisp_Object | 8497 | static Lisp_Object |
| 8598 | read_char_minibuf_menu_prompt (commandflag, nmaps, maps) | 8498 | read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps) |
| 8599 | int commandflag ; | ||
| 8600 | int nmaps; | ||
| 8601 | Lisp_Object *maps; | ||
| 8602 | { | 8499 | { |
| 8603 | int mapno; | 8500 | int mapno; |
| 8604 | register Lisp_Object name; | 8501 | register Lisp_Object name; |
| @@ -8863,10 +8760,8 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps) | |||
| 8863 | NEXT may be the same array as CURRENT. */ | 8760 | NEXT may be the same array as CURRENT. */ |
| 8864 | 8761 | ||
| 8865 | static int | 8762 | static int |
| 8866 | follow_key (key, nmaps, current, defs, next) | 8763 | follow_key (Lisp_Object key, int nmaps, Lisp_Object *current, Lisp_Object *defs, |
| 8867 | Lisp_Object key; | 8764 | Lisp_Object *next) |
| 8868 | Lisp_Object *current, *defs, *next; | ||
| 8869 | int nmaps; | ||
| 8870 | { | 8765 | { |
| 8871 | int i, first_binding; | 8766 | int i, first_binding; |
| 8872 | 8767 | ||
| @@ -8915,9 +8810,8 @@ typedef struct keyremap | |||
| 8915 | that it is indeed a vector). */ | 8810 | that it is indeed a vector). */ |
| 8916 | 8811 | ||
| 8917 | static Lisp_Object | 8812 | static Lisp_Object |
| 8918 | access_keymap_keyremap (map, key, prompt, do_funcall) | 8813 | access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt, |
| 8919 | Lisp_Object map, key, prompt; | 8814 | int do_funcall) |
| 8920 | int do_funcall; | ||
| 8921 | { | 8815 | { |
| 8922 | Lisp_Object next; | 8816 | Lisp_Object next; |
| 8923 | 8817 | ||
| @@ -8968,10 +8862,8 @@ access_keymap_keyremap (map, key, prompt, do_funcall) | |||
| 8968 | The return value is non-zero if the remapping actually took place. */ | 8862 | The return value is non-zero if the remapping actually took place. */ |
| 8969 | 8863 | ||
| 8970 | static int | 8864 | static int |
| 8971 | keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt) | 8865 | keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, |
| 8972 | Lisp_Object *keybuf, prompt; | 8866 | int input, int doit, int *diff, Lisp_Object prompt) |
| 8973 | keyremap *fkey; | ||
| 8974 | int input, doit, *diff, bufsize; | ||
| 8975 | { | 8867 | { |
| 8976 | Lisp_Object next, key; | 8868 | Lisp_Object next, key; |
| 8977 | 8869 | ||
| @@ -9063,14 +8955,9 @@ keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt) | |||
| 9063 | from the selected window's buffer. */ | 8955 | from the selected window's buffer. */ |
| 9064 | 8956 | ||
| 9065 | static int | 8957 | static int |
| 9066 | read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | 8958 | read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, |
| 9067 | can_return_switch_frame, fix_current_buffer) | 8959 | int dont_downcase_last, int can_return_switch_frame, |
| 9068 | Lisp_Object *keybuf; | 8960 | int fix_current_buffer) |
| 9069 | int bufsize; | ||
| 9070 | Lisp_Object prompt; | ||
| 9071 | int dont_downcase_last; | ||
| 9072 | int can_return_switch_frame; | ||
| 9073 | int fix_current_buffer; | ||
| 9074 | { | 8961 | { |
| 9075 | volatile Lisp_Object from_string; | 8962 | volatile Lisp_Object from_string; |
| 9076 | volatile int count = SPECPDL_INDEX (); | 8963 | volatile int count = SPECPDL_INDEX (); |
| @@ -10565,7 +10452,7 @@ give to the command you invoke, if it asks for an argument. */) | |||
| 10565 | /* Return nonzero if input events are pending. */ | 10452 | /* Return nonzero if input events are pending. */ |
| 10566 | 10453 | ||
| 10567 | int | 10454 | int |
| 10568 | detect_input_pending () | 10455 | detect_input_pending (void) |
| 10569 | { | 10456 | { |
| 10570 | if (!input_pending) | 10457 | if (!input_pending) |
| 10571 | get_input_pending (&input_pending, 0); | 10458 | get_input_pending (&input_pending, 0); |
| @@ -10577,7 +10464,7 @@ detect_input_pending () | |||
| 10577 | pending. */ | 10464 | pending. */ |
| 10578 | 10465 | ||
| 10579 | int | 10466 | int |
| 10580 | detect_input_pending_ignore_squeezables () | 10467 | detect_input_pending_ignore_squeezables (void) |
| 10581 | { | 10468 | { |
| 10582 | if (!input_pending) | 10469 | if (!input_pending) |
| 10583 | get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES); | 10470 | get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES); |
| @@ -10588,8 +10475,7 @@ detect_input_pending_ignore_squeezables () | |||
| 10588 | /* Return nonzero if input events are pending, and run any pending timers. */ | 10475 | /* Return nonzero if input events are pending, and run any pending timers. */ |
| 10589 | 10476 | ||
| 10590 | int | 10477 | int |
| 10591 | detect_input_pending_run_timers (do_display) | 10478 | detect_input_pending_run_timers (int do_display) |
| 10592 | int do_display; | ||
| 10593 | { | 10479 | { |
| 10594 | int old_timers_run = timers_run; | 10480 | int old_timers_run = timers_run; |
| 10595 | 10481 | ||
| @@ -10620,7 +10506,7 @@ detect_input_pending_run_timers (do_display) | |||
| 10620 | So calling this function unnecessarily can't do any harm. */ | 10506 | So calling this function unnecessarily can't do any harm. */ |
| 10621 | 10507 | ||
| 10622 | void | 10508 | void |
| 10623 | clear_input_pending () | 10509 | clear_input_pending (void) |
| 10624 | { | 10510 | { |
| 10625 | input_pending = 0; | 10511 | input_pending = 0; |
| 10626 | } | 10512 | } |
| @@ -10632,7 +10518,7 @@ clear_input_pending () | |||
| 10632 | to do in that case. It isn't trivial. */ | 10518 | to do in that case. It isn't trivial. */ |
| 10633 | 10519 | ||
| 10634 | int | 10520 | int |
| 10635 | requeued_events_pending_p () | 10521 | requeued_events_pending_p (void) |
| 10636 | { | 10522 | { |
| 10637 | return (!NILP (Vunread_command_events) || unread_command_char != -1); | 10523 | return (!NILP (Vunread_command_events) || unread_command_char != -1); |
| 10638 | } | 10524 | } |
| @@ -10904,8 +10790,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10904 | Then in any case stuff anything Emacs has read ahead and not used. */ | 10790 | Then in any case stuff anything Emacs has read ahead and not used. */ |
| 10905 | 10791 | ||
| 10906 | void | 10792 | void |
| 10907 | stuff_buffered_input (stuffstring) | 10793 | stuff_buffered_input (Lisp_Object stuffstring) |
| 10908 | Lisp_Object stuffstring; | ||
| 10909 | { | 10794 | { |
| 10910 | #ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */ | 10795 | #ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */ |
| 10911 | register unsigned char *p; | 10796 | register unsigned char *p; |
| @@ -10943,8 +10828,7 @@ stuff_buffered_input (stuffstring) | |||
| 10943 | } | 10828 | } |
| 10944 | 10829 | ||
| 10945 | void | 10830 | void |
| 10946 | set_waiting_for_input (time_to_clear) | 10831 | set_waiting_for_input (struct timeval *time_to_clear) |
| 10947 | EMACS_TIME *time_to_clear; | ||
| 10948 | { | 10832 | { |
| 10949 | input_available_clear_time = time_to_clear; | 10833 | input_available_clear_time = time_to_clear; |
| 10950 | 10834 | ||
| @@ -10958,7 +10842,7 @@ set_waiting_for_input (time_to_clear) | |||
| 10958 | } | 10842 | } |
| 10959 | 10843 | ||
| 10960 | void | 10844 | void |
| 10961 | clear_waiting_for_input () | 10845 | clear_waiting_for_input (void) |
| 10962 | { | 10846 | { |
| 10963 | /* Tell handle_interrupt not to throw back to read_char, */ | 10847 | /* Tell handle_interrupt not to throw back to read_char, */ |
| 10964 | waiting_for_input = 0; | 10848 | waiting_for_input = 0; |
| @@ -10972,8 +10856,8 @@ clear_waiting_for_input () | |||
| 10972 | Otherwise, the handler kills Emacs. */ | 10856 | Otherwise, the handler kills Emacs. */ |
| 10973 | 10857 | ||
| 10974 | static SIGTYPE | 10858 | static SIGTYPE |
| 10975 | interrupt_signal (signalnum) /* If we don't have an argument, */ | 10859 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ |
| 10976 | int signalnum; /* some compilers complain in signal calls. */ | 10860 | /* compilers complain in signal calls. */ |
| 10977 | { | 10861 | { |
| 10978 | /* Must preserve main program's value of errno. */ | 10862 | /* Must preserve main program's value of errno. */ |
| 10979 | int old_errno = errno; | 10863 | int old_errno = errno; |
| @@ -11017,7 +10901,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 11017 | non-nil, it stops the job right away. */ | 10901 | non-nil, it stops the job right away. */ |
| 11018 | 10902 | ||
| 11019 | static void | 10903 | static void |
| 11020 | handle_interrupt () | 10904 | handle_interrupt (void) |
| 11021 | { | 10905 | { |
| 11022 | char c; | 10906 | char c; |
| 11023 | 10907 | ||
| @@ -11143,7 +11027,7 @@ handle_interrupt () | |||
| 11143 | /* Handle a C-g by making read_char return C-g. */ | 11027 | /* Handle a C-g by making read_char return C-g. */ |
| 11144 | 11028 | ||
| 11145 | void | 11029 | void |
| 11146 | quit_throw_to_read_char () | 11030 | quit_throw_to_read_char (void) |
| 11147 | { | 11031 | { |
| 11148 | sigfree (); | 11032 | sigfree (); |
| 11149 | /* Prevent another signal from doing this before we finish. */ | 11033 | /* Prevent another signal from doing this before we finish. */ |
| @@ -11478,8 +11362,7 @@ The `posn-' functions access elements of such lists. */) | |||
| 11478 | * Set up a new kboard object with reasonable initial values. | 11362 | * Set up a new kboard object with reasonable initial values. |
| 11479 | */ | 11363 | */ |
| 11480 | void | 11364 | void |
| 11481 | init_kboard (kb) | 11365 | init_kboard (KBOARD *kb) |
| 11482 | KBOARD *kb; | ||
| 11483 | { | 11366 | { |
| 11484 | kb->Voverriding_terminal_local_map = Qnil; | 11367 | kb->Voverriding_terminal_local_map = Qnil; |
| 11485 | kb->Vlast_command = Qnil; | 11368 | kb->Vlast_command = Qnil; |
| @@ -11513,8 +11396,7 @@ init_kboard (kb) | |||
| 11513 | * it a second time. | 11396 | * it a second time. |
| 11514 | */ | 11397 | */ |
| 11515 | static void | 11398 | static void |
| 11516 | wipe_kboard (kb) | 11399 | wipe_kboard (KBOARD *kb) |
| 11517 | KBOARD *kb; | ||
| 11518 | { | 11400 | { |
| 11519 | xfree (kb->kbd_macro_buffer); | 11401 | xfree (kb->kbd_macro_buffer); |
| 11520 | } | 11402 | } |
| @@ -11522,8 +11404,7 @@ wipe_kboard (kb) | |||
| 11522 | /* Free KB and memory referenced from it. */ | 11404 | /* Free KB and memory referenced from it. */ |
| 11523 | 11405 | ||
| 11524 | void | 11406 | void |
| 11525 | delete_kboard (kb) | 11407 | delete_kboard (KBOARD *kb) |
| 11526 | KBOARD *kb; | ||
| 11527 | { | 11408 | { |
| 11528 | KBOARD **kbp; | 11409 | KBOARD **kbp; |
| 11529 | 11410 | ||
| @@ -11548,7 +11429,7 @@ delete_kboard (kb) | |||
| 11548 | } | 11429 | } |
| 11549 | 11430 | ||
| 11550 | void | 11431 | void |
| 11551 | init_keyboard () | 11432 | init_keyboard (void) |
| 11552 | { | 11433 | { |
| 11553 | /* This is correct before outermost invocation of the editor loop */ | 11434 | /* This is correct before outermost invocation of the editor loop */ |
| 11554 | command_loop_level = -1; | 11435 | command_loop_level = -1; |
| @@ -11648,7 +11529,7 @@ struct event_head head_table[] = { | |||
| 11648 | }; | 11529 | }; |
| 11649 | 11530 | ||
| 11650 | void | 11531 | void |
| 11651 | syms_of_keyboard () | 11532 | syms_of_keyboard (void) |
| 11652 | { | 11533 | { |
| 11653 | pending_funcalls = Qnil; | 11534 | pending_funcalls = Qnil; |
| 11654 | staticpro (&pending_funcalls); | 11535 | staticpro (&pending_funcalls); |
| @@ -12424,7 +12305,7 @@ and tool-bar buttons. */); | |||
| 12424 | } | 12305 | } |
| 12425 | 12306 | ||
| 12426 | void | 12307 | void |
| 12427 | keys_of_keyboard () | 12308 | keys_of_keyboard (void) |
| 12428 | { | 12309 | { |
| 12429 | initial_define_key (global_map, Ctl ('Z'), "suspend-emacs"); | 12310 | initial_define_key (global_map, Ctl ('Z'), "suspend-emacs"); |
| 12430 | initial_define_key (control_x_map, Ctl ('Z'), "suspend-emacs"); | 12311 | initial_define_key (control_x_map, Ctl ('Z'), "suspend-emacs"); |
| @@ -12484,7 +12365,7 @@ keys_of_keyboard () | |||
| 12484 | /* Mark the pointers in the kboard objects. | 12365 | /* Mark the pointers in the kboard objects. |
| 12485 | Called by the Fgarbage_collector. */ | 12366 | Called by the Fgarbage_collector. */ |
| 12486 | void | 12367 | void |
| 12487 | mark_kboards () | 12368 | mark_kboards (void) |
| 12488 | { | 12369 | { |
| 12489 | KBOARD *kb; | 12370 | KBOARD *kb; |
| 12490 | Lisp_Object *p; | 12371 | Lisp_Object *p; |