2004-08-27 Michael Chastain <mec.gnu@mindspring.com>
[deliverable/binutils-gdb.git] / gdb / tui / tui-io.c
index 559ff454a4da0e34edc1346fc961bb9fb0a4b811..07926d9e9bfb79f222f506cd79cefa0347debb6e 100644 (file)
@@ -29,7 +29,6 @@
 #include "event-top.h"
 #include "command.h"
 #include "top.h"
-#include "readline/readline.h"
 #include "tui/tui.h"
 #include "tui/tui-data.h"
 #include "tui/tui-io.h"
 #include <signal.h>
 #include <stdio.h>
 
-#ifdef HAVE_NCURSES_H       
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
+
+/* This redefines CTRL if it is not already defined, so it must come
+   after terminal state releated include files like <term.h> and
+   "gdb_curses.h".  */
+#include "readline/readline.h"
 
 int
 key_is_start_sequence (int ch)
@@ -322,8 +320,7 @@ tui_readline_output (int code, gdb_client_data data)
 
    Comes from readline/complete.c  */
 static char *
-printable_part (pathname)
-     char *pathname;
+printable_part (char *pathname)
 {
   char *temp;
 
@@ -360,8 +357,7 @@ printable_part (pathname)
     } while (0)
 
 static int
-print_filename (to_print, full_pathname)
-     char *to_print, *full_pathname;
+print_filename (char *to_print, char *full_pathname)
 {
   int printed_len = 0;
   char *s;
@@ -376,7 +372,7 @@ print_filename (to_print, full_pathname)
 /* The user must press "y" or "n".  Non-zero return means "y" pressed.
    Comes from readline/complete.c  */
 static int
-get_y_or_n ()
+get_y_or_n (void)
 {
   extern int _rl_abort_internal ();
   int c;
@@ -402,9 +398,7 @@ get_y_or_n ()
    Comes from readline/complete.c and modified to write in
    the TUI command window using tui_putc/tui_puts.  */
 static void
-tui_rl_display_match_list (matches, len, max)
-     char **matches;
-     int len, max;
+tui_rl_display_match_list (char **matches, int len, int max)
 {
   typedef int QSFUNC (const void *, const void *);
   extern int _rl_qsort_string_compare (const void*, const void*);
@@ -598,7 +592,7 @@ tui_cont_sig (int sig)
 
 /* Initialize the IO for gdb in curses mode.  */
 void
-tui_initialize_io ()
+tui_initialize_io (void)
 {
 #ifdef SIGCONT
   signal (SIGCONT, tui_cont_sig);
@@ -609,8 +603,8 @@ tui_initialize_io ()
   tui_stderr = tui_fileopen (stderr);
   tui_out = tui_out_new (tui_stdout);
 
-  /* Create the default UI.  It is not created because we installed
-     init_ui_hook.  */
+  /* Create the default UI.  It is not created because we installed a
+     deprecated_init_ui_hook.  */
   tui_old_uiout = uiout = cli_out_new (gdb_stdout);
 
 #ifdef TUI_USE_PIPE_FOR_READLINE
This page took 0.025793 seconds and 4 git commands to generate.