aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32console.c
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-06 16:22:29 +0200
committerJuanma Barranquero2010-07-06 16:22:29 +0200
commitb56ceb92bf4d470af2e9172d1fcd4d85232c40a6 (patch)
tree50ab60b4715be45ed671c386c5b9336b45443539 /src/w32console.c
parent7af07b967171736a35e0af8b6ecf6feb072184dc (diff)
downloademacs-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.c47
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 */
45extern Lisp_Object Frecenter (); 45extern Lisp_Object Frecenter (Lisp_Object);
46 46
47/* from keyboard.c */ 47/* from keyboard.c */
48extern int detect_input_pending (); 48extern int detect_input_pending (void);
49 49
50/* from sysdep.c */ 50/* from sysdep.c */
51extern int read_input_pending (); 51extern int read_input_pending (void);
52 52
53static void w32con_move_cursor (struct frame *f, int row, int col); 53static void w32con_move_cursor (struct frame *f, int row, int col);
54static void w32con_clear_to_end (struct frame *f); 54static void w32con_clear_to_end (struct frame *f);
@@ -68,7 +68,7 @@ static WORD w32_face_attributes (struct frame *f, int face_id);
68static COORD cursor_coords; 68static COORD cursor_coords;
69static HANDLE prev_screen, cur_screen; 69static HANDLE prev_screen, cur_screen;
70static WORD char_attr_normal; 70static WORD char_attr_normal;
71static DWORD prev_console_mode; 71static DWORD prev_console_mode;
72 72
73#ifndef USE_SEPARATE_SCREEN 73#ifndef USE_SEPARATE_SCREEN
74static CONSOLE_CURSOR_INFO prev_console_cursor; 74static 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 ?. */
270static void 270static void
271w32con_insert_glyphs (struct frame *f, register struct glyph *start, register int len) 271w32con_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
289extern unsigned char *encode_terminal_code (struct glyph *, int, 290extern unsigned char *encode_terminal_code (struct glyph *, int,
290 struct coding_system *); 291 struct coding_system *);
291 292
292static void 293static 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;
511int cost = 0; 512int cost = 0;
512 513
513int 514int
514evalcost (char c) 515evalcost (int c)
515{ 516{
516 return c; 517 return c;
517} 518}
518 519
519int 520int
520cmputc (char c) 521cmputc (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
553static WORD 554static WORD
554w32_face_attributes (f, face_id) 555w32_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
612typedef int (*term_hook) ();
613
614void 611void
615initialize_w32_display (struct terminal *term) 612initialize_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
777void 774void
778syms_of_ntterm () 775syms_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,