diff options
| author | Geoff Voelker | 1998-04-29 04:43:08 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1998-04-29 04:43:08 +0000 |
| commit | 96214669c4709a818a345d3e9aa25767ce92232a (patch) | |
| tree | 1866da720853869420d94cb5cf9d7ad8349d30dc /src | |
| parent | 543b3f021abd29bd87d75bcb9749350600234ddb (diff) | |
| download | emacs-96214669c4709a818a345d3e9aa25767ce92232a.tar.gz emacs-96214669c4709a818a345d3e9aa25767ce92232a.zip | |
Forward declare hooks with full function prototypes.
(x_make_frame_visible): Pass dummy argument to input_poll_signal.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 91 |
1 files changed, 61 insertions, 30 deletions
diff --git a/src/w32term.c b/src/w32term.c index 0ac08d7c8e0..e7254122360 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -201,8 +201,36 @@ static void clear_mouse_face (); | |||
| 201 | static void show_mouse_face (); | 201 | static void show_mouse_face (); |
| 202 | static void do_line_dance (); | 202 | static void do_line_dance (); |
| 203 | 203 | ||
| 204 | static int w32_cursor_to (); | 204 | /* Forward declarations for term hooks. Consistency with the rest of Emacs |
| 205 | static int w32_clear_end_of_line (); | 205 | requires the use of K&R functions prototypes. However, MSVC does not |
| 206 | pick up the function prototypes correctly with K&R function definitions, | ||
| 207 | and so we declare them first to give a little help to MSVC. */ | ||
| 208 | static void w32_clear_frame (); | ||
| 209 | static void w32_clear_end_of_line (int); | ||
| 210 | static void w32_ins_del_lines (int, int); | ||
| 211 | static void w32_change_line_highlight (int, int, int); | ||
| 212 | static void w32_insert_glyphs (GLYPH *, int); | ||
| 213 | static void w32_write_glyphs (GLYPH *, int); | ||
| 214 | static void w32_delete_glyphs (int); | ||
| 215 | static void w32_ring_bell (); | ||
| 216 | static void w32_reset_terminal_modes (); | ||
| 217 | static void w32_set_terminal_modes (); | ||
| 218 | static void w32_update_begin (FRAME_PTR); | ||
| 219 | static void w32_update_end (FRAME_PTR); | ||
| 220 | static void w32_set_terminal_window (int); | ||
| 221 | extern int w32_read_socket (int, struct input_event *, int, int); | ||
| 222 | static void w32_frame_up_to_date (FRAME_PTR); | ||
| 223 | static void w32_cursor_to (int, int); | ||
| 224 | static void w32_reassert_line_highlight (int, int); | ||
| 225 | static void w32_mouse_position (FRAME_PTR *, int, Lisp_Object *, | ||
| 226 | enum scroll_bar_part *, Lisp_Object *, | ||
| 227 | Lisp_Object *, unsigned long *); | ||
| 228 | static void w32_frame_rehighlight (FRAME_PTR); | ||
| 229 | static void w32_frame_raise_lower (FRAME_PTR, int); | ||
| 230 | static void w32_set_vertical_scroll_bar (struct window *, int, int, int); | ||
| 231 | static void w32_condemn_scroll_bars (FRAME_PTR); | ||
| 232 | static void w32_redeem_scroll_bar (struct window *); | ||
| 233 | static void w32_judge_scroll_bars (FRAME_PTR); | ||
| 206 | 234 | ||
| 207 | #if 0 | 235 | #if 0 |
| 208 | /* This is a function useful for recording debugging information | 236 | /* This is a function useful for recording debugging information |
| @@ -287,7 +315,7 @@ w32_clear_window (f) | |||
| 287 | should never be called except during an update, the only exceptions | 315 | should never be called except during an update, the only exceptions |
| 288 | being w32_cursor_to, w32_write_glyphs and w32_reassert_line_highlight. */ | 316 | being w32_cursor_to, w32_write_glyphs and w32_reassert_line_highlight. */ |
| 289 | 317 | ||
| 290 | static | 318 | static void |
| 291 | w32_update_begin (f) | 319 | w32_update_begin (f) |
| 292 | struct frame *f; | 320 | struct frame *f; |
| 293 | { | 321 | { |
| @@ -350,7 +378,7 @@ w32_update_begin (f) | |||
| 350 | UNBLOCK_INPUT; | 378 | UNBLOCK_INPUT; |
| 351 | } | 379 | } |
| 352 | 380 | ||
| 353 | static | 381 | static void |
| 354 | w32_update_end (f) | 382 | w32_update_end (f) |
| 355 | struct frame *f; | 383 | struct frame *f; |
| 356 | { | 384 | { |
| @@ -367,7 +395,7 @@ w32_update_end (f) | |||
| 367 | 395 | ||
| 368 | /* This is called after a redisplay on frame F. */ | 396 | /* This is called after a redisplay on frame F. */ |
| 369 | 397 | ||
| 370 | static | 398 | static void |
| 371 | w32_frame_up_to_date (f) | 399 | w32_frame_up_to_date (f) |
| 372 | FRAME_PTR f; | 400 | FRAME_PTR f; |
| 373 | { | 401 | { |
| @@ -387,6 +415,7 @@ w32_frame_up_to_date (f) | |||
| 387 | Call this when about to modify line at position VPOS | 415 | Call this when about to modify line at position VPOS |
| 388 | and not change whether it is highlighted. */ | 416 | and not change whether it is highlighted. */ |
| 389 | 417 | ||
| 418 | static void | ||
| 390 | w32_reassert_line_highlight (new, vpos) | 419 | w32_reassert_line_highlight (new, vpos) |
| 391 | int new, vpos; | 420 | int new, vpos; |
| 392 | { | 421 | { |
| @@ -396,7 +425,7 @@ w32_reassert_line_highlight (new, vpos) | |||
| 396 | /* Call this when about to modify line at position VPOS | 425 | /* Call this when about to modify line at position VPOS |
| 397 | and change whether it is highlighted. */ | 426 | and change whether it is highlighted. */ |
| 398 | 427 | ||
| 399 | static | 428 | static void |
| 400 | w32_change_line_highlight (new_highlight, vpos, first_unused_hpos) | 429 | w32_change_line_highlight (new_highlight, vpos, first_unused_hpos) |
| 401 | int new_highlight, vpos, first_unused_hpos; | 430 | int new_highlight, vpos, first_unused_hpos; |
| 402 | { | 431 | { |
| @@ -409,8 +438,8 @@ w32_change_line_highlight (new_highlight, vpos, first_unused_hpos) | |||
| 409 | When starting Emacs, no window is mapped. And nothing must be done | 438 | When starting Emacs, no window is mapped. And nothing must be done |
| 410 | to Emacs's own window if it is suspended (though that rarely happens). */ | 439 | to Emacs's own window if it is suspended (though that rarely happens). */ |
| 411 | 440 | ||
| 412 | static | 441 | static void |
| 413 | w32_set_terminal_modes () | 442 | w32_set_terminal_modes (void) |
| 414 | { | 443 | { |
| 415 | } | 444 | } |
| 416 | 445 | ||
| @@ -418,8 +447,8 @@ w32_set_terminal_modes () | |||
| 418 | Exiting will make the W32 windows go away, and suspending | 447 | Exiting will make the W32 windows go away, and suspending |
| 419 | requires no action. */ | 448 | requires no action. */ |
| 420 | 449 | ||
| 421 | static | 450 | static void |
| 422 | w32_reset_terminal_modes () | 451 | w32_reset_terminal_modes (void) |
| 423 | { | 452 | { |
| 424 | } | 453 | } |
| 425 | 454 | ||
| @@ -427,7 +456,7 @@ w32_reset_terminal_modes () | |||
| 427 | This is where display update commands will take effect. | 456 | This is where display update commands will take effect. |
| 428 | This does not affect the place where the cursor-box is displayed. */ | 457 | This does not affect the place where the cursor-box is displayed. */ |
| 429 | 458 | ||
| 430 | static int | 459 | static void |
| 431 | w32_cursor_to (row, col) | 460 | w32_cursor_to (row, col) |
| 432 | register int row, col; | 461 | register int row, col; |
| 433 | { | 462 | { |
| @@ -686,7 +715,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp) | |||
| 686 | `highlight', set up by w32_reassert_line_highlight or w32_change_line_highlight, | 715 | `highlight', set up by w32_reassert_line_highlight or w32_change_line_highlight, |
| 687 | controls the pixel values used for foreground and background. */ | 716 | controls the pixel values used for foreground and background. */ |
| 688 | 717 | ||
| 689 | static | 718 | static void |
| 690 | w32_write_glyphs (start, len) | 719 | w32_write_glyphs (start, len) |
| 691 | register GLYPH *start; | 720 | register GLYPH *start; |
| 692 | int len; | 721 | int len; |
| @@ -735,7 +764,7 @@ w32_write_glyphs (start, len) | |||
| 735 | to column FIRST_UNUSED (exclusive). The idea is that everything | 764 | to column FIRST_UNUSED (exclusive). The idea is that everything |
| 736 | from FIRST_UNUSED onward is already erased. */ | 765 | from FIRST_UNUSED onward is already erased. */ |
| 737 | 766 | ||
| 738 | static | 767 | static void |
| 739 | w32_clear_end_of_line (first_unused) | 768 | w32_clear_end_of_line (first_unused) |
| 740 | register int first_unused; | 769 | register int first_unused; |
| 741 | { | 770 | { |
| @@ -745,9 +774,9 @@ w32_clear_end_of_line (first_unused) | |||
| 745 | abort (); | 774 | abort (); |
| 746 | 775 | ||
| 747 | if (curs_y < 0 || curs_y >= f->height) | 776 | if (curs_y < 0 || curs_y >= f->height) |
| 748 | return 1; | 777 | return; |
| 749 | if (first_unused <= 0) | 778 | if (first_unused <= 0) |
| 750 | return 1; | 779 | return; |
| 751 | 780 | ||
| 752 | if (first_unused >= f->width) | 781 | if (first_unused >= f->width) |
| 753 | first_unused = f->width; | 782 | first_unused = f->width; |
| @@ -773,7 +802,7 @@ w32_clear_end_of_line (first_unused) | |||
| 773 | UNBLOCK_INPUT; | 802 | UNBLOCK_INPUT; |
| 774 | } | 803 | } |
| 775 | 804 | ||
| 776 | static | 805 | static void |
| 777 | w32_clear_frame () | 806 | w32_clear_frame () |
| 778 | { | 807 | { |
| 779 | struct frame *f = updating_frame; | 808 | struct frame *f = updating_frame; |
| @@ -798,7 +827,8 @@ w32_clear_frame () | |||
| 798 | 827 | ||
| 799 | /* Make audible bell. */ | 828 | /* Make audible bell. */ |
| 800 | 829 | ||
| 801 | w32_ring_bell () | 830 | static void |
| 831 | w32_ring_bell (void) | ||
| 802 | { | 832 | { |
| 803 | BLOCK_INPUT; | 833 | BLOCK_INPUT; |
| 804 | 834 | ||
| @@ -808,23 +838,21 @@ w32_ring_bell () | |||
| 808 | w32_sys_ring_bell (); | 838 | w32_sys_ring_bell (); |
| 809 | 839 | ||
| 810 | UNBLOCK_INPUT; | 840 | UNBLOCK_INPUT; |
| 811 | |||
| 812 | return 1; | ||
| 813 | } | 841 | } |
| 814 | 842 | ||
| 815 | /* Insert and delete character. | 843 | /* Insert and delete character. |
| 816 | These are not supposed to be used because we are supposed to turn | 844 | These are not supposed to be used because we are supposed to turn |
| 817 | off the feature of using them. */ | 845 | off the feature of using them. */ |
| 818 | 846 | ||
| 819 | static | 847 | static void |
| 820 | w32_insert_glyphs (start, len) | 848 | w32_insert_glyphs (start, len) |
| 821 | register char *start; | 849 | register GLYPH *start; |
| 822 | register int len; | 850 | register int len; |
| 823 | { | 851 | { |
| 824 | abort (); | 852 | abort (); |
| 825 | } | 853 | } |
| 826 | 854 | ||
| 827 | static | 855 | static void |
| 828 | w32_delete_glyphs (n) | 856 | w32_delete_glyphs (n) |
| 829 | register int n; | 857 | register int n; |
| 830 | { | 858 | { |
| @@ -836,7 +864,7 @@ w32_delete_glyphs (n) | |||
| 836 | This, and those operations, are used only within an update | 864 | This, and those operations, are used only within an update |
| 837 | that is bounded by calls to w32_update_begin and w32_update_end. */ | 865 | that is bounded by calls to w32_update_begin and w32_update_end. */ |
| 838 | 866 | ||
| 839 | static | 867 | static void |
| 840 | w32_set_terminal_window (n) | 868 | w32_set_terminal_window (n) |
| 841 | register int n; | 869 | register int n; |
| 842 | { | 870 | { |
| @@ -867,13 +895,15 @@ static int line_dance_in_progress; | |||
| 867 | 895 | ||
| 868 | /* Perform an insert-lines or delete-lines operation, | 896 | /* Perform an insert-lines or delete-lines operation, |
| 869 | inserting N lines or deleting -N lines at vertical position VPOS. */ | 897 | inserting N lines or deleting -N lines at vertical position VPOS. */ |
| 898 | |||
| 899 | static void | ||
| 870 | w32_ins_del_lines (vpos, n) | 900 | w32_ins_del_lines (vpos, n) |
| 871 | int vpos, n; | 901 | int vpos, n; |
| 872 | { | 902 | { |
| 873 | register int fence, i; | 903 | register int fence, i; |
| 874 | 904 | ||
| 875 | if (vpos >= flexlines) | 905 | if (vpos >= flexlines) |
| 876 | return 1; | 906 | return; |
| 877 | 907 | ||
| 878 | if (!line_dance_in_progress) | 908 | if (!line_dance_in_progress) |
| 879 | { | 909 | { |
| @@ -1083,7 +1113,6 @@ frame_unhighlight (f) | |||
| 1083 | x_display_cursor (f, 1); | 1113 | x_display_cursor (f, 1); |
| 1084 | } | 1114 | } |
| 1085 | 1115 | ||
| 1086 | static void w32_frame_rehighlight (); | ||
| 1087 | static void x_frame_rehighlight (); | 1116 | static void x_frame_rehighlight (); |
| 1088 | 1117 | ||
| 1089 | /* The focus has changed. Update the frames as necessary to reflect | 1118 | /* The focus has changed. Update the frames as necessary to reflect |
| @@ -4011,7 +4040,7 @@ x_make_frame_visible (f) | |||
| 4011 | /* It could be confusing if a real alarm arrives while processing | 4040 | /* It could be confusing if a real alarm arrives while processing |
| 4012 | the fake one. Turn it off and let the handler reset it. */ | 4041 | the fake one. Turn it off and let the handler reset it. */ |
| 4013 | alarm (0); | 4042 | alarm (0); |
| 4014 | input_poll_signal (); | 4043 | input_poll_signal (0); |
| 4015 | } | 4044 | } |
| 4016 | /* Once we have handled input events, | 4045 | /* Once we have handled input events, |
| 4017 | we should have received the MapNotify if one is coming. | 4046 | we should have received the MapNotify if one is coming. |
| @@ -4357,16 +4386,18 @@ DWORD w32_msg_worker (); | |||
| 4357 | 4386 | ||
| 4358 | w32_initialize () | 4387 | w32_initialize () |
| 4359 | { | 4388 | { |
| 4360 | clear_frame_hook = w32_clear_frame; | 4389 | /* MSVC does not type K&R functions with no arguments correctly, and |
| 4390 | so we must explicitly cast them. */ | ||
| 4391 | clear_frame_hook = (void (*)(void)) w32_clear_frame; | ||
| 4361 | clear_end_of_line_hook = w32_clear_end_of_line; | 4392 | clear_end_of_line_hook = w32_clear_end_of_line; |
| 4362 | ins_del_lines_hook = w32_ins_del_lines; | 4393 | ins_del_lines_hook = w32_ins_del_lines; |
| 4363 | change_line_highlight_hook = w32_change_line_highlight; | 4394 | change_line_highlight_hook = w32_change_line_highlight; |
| 4364 | insert_glyphs_hook = w32_insert_glyphs; | 4395 | insert_glyphs_hook = w32_insert_glyphs; |
| 4365 | write_glyphs_hook = w32_write_glyphs; | 4396 | write_glyphs_hook = w32_write_glyphs; |
| 4366 | delete_glyphs_hook = w32_delete_glyphs; | 4397 | delete_glyphs_hook = w32_delete_glyphs; |
| 4367 | ring_bell_hook = w32_ring_bell; | 4398 | ring_bell_hook = (void (*)(void)) w32_ring_bell; |
| 4368 | reset_terminal_modes_hook = w32_reset_terminal_modes; | 4399 | reset_terminal_modes_hook = (void (*)(void)) w32_reset_terminal_modes; |
| 4369 | set_terminal_modes_hook = w32_set_terminal_modes; | 4400 | set_terminal_modes_hook = (void (*)(void)) w32_set_terminal_modes; |
| 4370 | update_begin_hook = w32_update_begin; | 4401 | update_begin_hook = w32_update_begin; |
| 4371 | update_end_hook = w32_update_end; | 4402 | update_end_hook = w32_update_end; |
| 4372 | set_terminal_window_hook = w32_set_terminal_window; | 4403 | set_terminal_window_hook = w32_set_terminal_window; |