diff options
| author | Juanma Barranquero | 2010-07-06 16:22:29 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-06 16:22:29 +0200 |
| commit | b56ceb92bf4d470af2e9172d1fcd4d85232c40a6 (patch) | |
| tree | 50ab60b4715be45ed671c386c5b9336b45443539 /src/w32console.c | |
| parent | 7af07b967171736a35e0af8b6ecf6feb072184dc (diff) | |
| download | emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.tar.gz emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.zip | |
src/w32*.c: Convert function definitions to standard C.
Diffstat (limited to 'src/w32console.c')
| -rw-r--r-- | src/w32console.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/w32console.c b/src/w32console.c index 83c7430f6dc..c2fe6e7db5c 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -42,13 +42,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 42 | #include "w32inevt.h" | 42 | #include "w32inevt.h" |
| 43 | 43 | ||
| 44 | /* from window.c */ | 44 | /* from window.c */ |
| 45 | extern Lisp_Object Frecenter (); | 45 | extern Lisp_Object Frecenter (Lisp_Object); |
| 46 | 46 | ||
| 47 | /* from keyboard.c */ | 47 | /* from keyboard.c */ |
| 48 | extern int detect_input_pending (); | 48 | extern int detect_input_pending (void); |
| 49 | 49 | ||
| 50 | /* from sysdep.c */ | 50 | /* from sysdep.c */ |
| 51 | extern int read_input_pending (); | 51 | extern int read_input_pending (void); |
| 52 | 52 | ||
| 53 | static void w32con_move_cursor (struct frame *f, int row, int col); | 53 | static void w32con_move_cursor (struct frame *f, int row, int col); |
| 54 | static void w32con_clear_to_end (struct frame *f); | 54 | static void w32con_clear_to_end (struct frame *f); |
| @@ -68,7 +68,7 @@ static WORD w32_face_attributes (struct frame *f, int face_id); | |||
| 68 | static COORD cursor_coords; | 68 | static COORD cursor_coords; |
| 69 | static HANDLE prev_screen, cur_screen; | 69 | static HANDLE prev_screen, cur_screen; |
| 70 | static WORD char_attr_normal; | 70 | static WORD char_attr_normal; |
| 71 | static DWORD prev_console_mode; | 71 | static DWORD prev_console_mode; |
| 72 | 72 | ||
| 73 | #ifndef USE_SEPARATE_SCREEN | 73 | #ifndef USE_SEPARATE_SCREEN |
| 74 | static CONSOLE_CURSOR_INFO prev_console_cursor; | 74 | static CONSOLE_CURSOR_INFO prev_console_cursor; |
| @@ -268,7 +268,8 @@ scroll_line (struct frame *f, int dist, int direction) | |||
| 268 | 268 | ||
| 269 | /* If start is zero insert blanks instead of a string at start ?. */ | 269 | /* If start is zero insert blanks instead of a string at start ?. */ |
| 270 | static void | 270 | static void |
| 271 | w32con_insert_glyphs (struct frame *f, register struct glyph *start, register int len) | 271 | w32con_insert_glyphs (struct frame *f, register struct glyph *start, |
| 272 | register int len) | ||
| 272 | { | 273 | { |
| 273 | scroll_line (f, len, RIGHT); | 274 | scroll_line (f, len, RIGHT); |
| 274 | 275 | ||
| @@ -286,7 +287,7 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start, register in | |||
| 286 | } | 287 | } |
| 287 | } | 288 | } |
| 288 | 289 | ||
| 289 | extern unsigned char *encode_terminal_code (struct glyph *, int, | 290 | extern unsigned char *encode_terminal_code (struct glyph *, int, |
| 290 | struct coding_system *); | 291 | struct coding_system *); |
| 291 | 292 | ||
| 292 | static void | 293 | static void |
| @@ -438,7 +439,7 @@ w32con_reset_terminal_modes (struct terminal *t) | |||
| 438 | FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); | 439 | FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); |
| 439 | /* Now that the screen is clear, put the cursor at the top. */ | 440 | /* Now that the screen is clear, put the cursor at the top. */ |
| 440 | SetConsoleCursorPosition (cur_screen, dest); | 441 | SetConsoleCursorPosition (cur_screen, dest); |
| 441 | 442 | ||
| 442 | #ifdef USE_SEPARATE_SCREEN | 443 | #ifdef USE_SEPARATE_SCREEN |
| 443 | SetConsoleActiveScreenBuffer (prev_screen); | 444 | SetConsoleActiveScreenBuffer (prev_screen); |
| 444 | #else | 445 | #else |
| @@ -511,13 +512,13 @@ struct tty_display_info *current_tty = NULL; | |||
| 511 | int cost = 0; | 512 | int cost = 0; |
| 512 | 513 | ||
| 513 | int | 514 | int |
| 514 | evalcost (char c) | 515 | evalcost (int c) |
| 515 | { | 516 | { |
| 516 | return c; | 517 | return c; |
| 517 | } | 518 | } |
| 518 | 519 | ||
| 519 | int | 520 | int |
| 520 | cmputc (char c) | 521 | cmputc (int c) |
| 521 | { | 522 | { |
| 522 | return c; | 523 | return c; |
| 523 | } | 524 | } |
| @@ -551,9 +552,7 @@ Wcm_clear (struct tty_display_info *tty) | |||
| 551 | /* Turn appearances of face FACE_ID on tty frame F on. */ | 552 | /* Turn appearances of face FACE_ID on tty frame F on. */ |
| 552 | 553 | ||
| 553 | static WORD | 554 | static WORD |
| 554 | w32_face_attributes (f, face_id) | 555 | w32_face_attributes (struct frame *f, int face_id) |
| 555 | struct frame *f; | ||
| 556 | int face_id; | ||
| 557 | { | 556 | { |
| 558 | WORD char_attr; | 557 | WORD char_attr; |
| 559 | struct face *face = FACE_FROM_ID (f, face_id); | 558 | struct face *face = FACE_FROM_ID (f, face_id); |
| @@ -609,8 +608,6 @@ vga_stdcolor_name (int idx) | |||
| 609 | return Qunspecified; /* meaning the default */ | 608 | return Qunspecified; /* meaning the default */ |
| 610 | } | 609 | } |
| 611 | 610 | ||
| 612 | typedef int (*term_hook) (); | ||
| 613 | |||
| 614 | void | 611 | void |
| 615 | initialize_w32_display (struct terminal *term) | 612 | initialize_w32_display (struct terminal *term) |
| 616 | { | 613 | { |
| @@ -618,19 +615,19 @@ initialize_w32_display (struct terminal *term) | |||
| 618 | 615 | ||
| 619 | term->rif = 0; /* No window based redisplay on the console. */ | 616 | term->rif = 0; /* No window based redisplay on the console. */ |
| 620 | term->cursor_to_hook = w32con_move_cursor; | 617 | term->cursor_to_hook = w32con_move_cursor; |
| 621 | term->raw_cursor_to_hook = w32con_move_cursor; | 618 | term->raw_cursor_to_hook = w32con_move_cursor; |
| 622 | term->clear_to_end_hook = w32con_clear_to_end; | 619 | term->clear_to_end_hook = w32con_clear_to_end; |
| 623 | term->clear_frame_hook = w32con_clear_frame; | 620 | term->clear_frame_hook = w32con_clear_frame; |
| 624 | term->clear_end_of_line_hook = w32con_clear_end_of_line; | 621 | term->clear_end_of_line_hook = w32con_clear_end_of_line; |
| 625 | term->ins_del_lines_hook = w32con_ins_del_lines; | 622 | term->ins_del_lines_hook = w32con_ins_del_lines; |
| 626 | term->insert_glyphs_hook = w32con_insert_glyphs; | 623 | term->insert_glyphs_hook = w32con_insert_glyphs; |
| 627 | term->write_glyphs_hook = w32con_write_glyphs; | 624 | term->write_glyphs_hook = w32con_write_glyphs; |
| 628 | term->delete_glyphs_hook = w32con_delete_glyphs; | 625 | term->delete_glyphs_hook = w32con_delete_glyphs; |
| 629 | term->ring_bell_hook = w32_sys_ring_bell; | 626 | term->ring_bell_hook = w32_sys_ring_bell; |
| 630 | term->reset_terminal_modes_hook = w32con_reset_terminal_modes; | 627 | term->reset_terminal_modes_hook = w32con_reset_terminal_modes; |
| 631 | term->set_terminal_modes_hook = w32con_set_terminal_modes; | 628 | term->set_terminal_modes_hook = w32con_set_terminal_modes; |
| 632 | term->set_terminal_window_hook = w32con_set_terminal_window; | 629 | term->set_terminal_window_hook = w32con_set_terminal_window; |
| 633 | term->update_begin_hook = w32con_update_begin; | 630 | term->update_begin_hook = w32con_update_begin; |
| 634 | term->update_end_hook = w32con_update_end; | 631 | term->update_end_hook = w32con_update_end; |
| 635 | 632 | ||
| 636 | term->read_socket_hook = w32_console_read_socket; | 633 | term->read_socket_hook = w32_console_read_socket; |
| @@ -775,7 +772,7 @@ DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0, | |||
| 775 | } | 772 | } |
| 776 | 773 | ||
| 777 | void | 774 | void |
| 778 | syms_of_ntterm () | 775 | syms_of_ntterm (void) |
| 779 | { | 776 | { |
| 780 | DEFVAR_BOOL ("w32-use-full-screen-buffer", | 777 | DEFVAR_BOOL ("w32-use-full-screen-buffer", |
| 781 | &w32_use_full_screen_buffer, | 778 | &w32_use_full_screen_buffer, |