gdb/
[platform/upstream/binutils.git] / gdb / tui / tui-io.c
index a597f37..9dcb228 100644 (file)
@@ -1,7 +1,7 @@
 /* TUI support I/O functions.
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009,
+   2010 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -303,7 +303,7 @@ tui_deprep_terminal (void)
 /* Read readline output pipe and feed the command window with it.
    Should be removed when readline is clean.  */
 static void
-tui_readline_output (int code, gdb_client_data data)
+tui_readline_output (int error, gdb_client_data data)
 {
   int size;
   char buf[256];
@@ -545,6 +545,7 @@ tui_setup_io (int mode)
       gdb_stderr = tui_stderr;
       gdb_stdlog = gdb_stdout; /* for moment */
       gdb_stdtarg = gdb_stderr;        /* for moment */
+      gdb_stdtargerr = gdb_stderr;     /* for moment */
       uiout = tui_out;
 
       /* Save tty for SIGCONT.  */
@@ -557,6 +558,7 @@ tui_setup_io (int mode)
       gdb_stderr = tui_old_stderr;
       gdb_stdlog = gdb_stdout; /* for moment */
       gdb_stdtarg = gdb_stderr;        /* for moment */
+      gdb_stdtargerr = gdb_stderr;     /* for moment */
       uiout = tui_old_uiout;
 
       /* Restore readline.  */
@@ -657,7 +659,7 @@ tui_getc (FILE *fp)
 
 #ifdef TUI_USE_PIPE_FOR_READLINE
   /* Flush readline output.  */
-  tui_readline_output (GDB_READABLE, 0);
+  tui_readline_output (0, 0);
 #endif
 
   ch = wgetch (w);
@@ -711,6 +713,7 @@ tui_handle_resize_during_io (unsigned int original_ch)
 {
   if (tui_win_resized ())
     {
+      tui_resize_all ();
       tui_refresh_all_win ();
       dont_repeat ();
       tui_set_win_resized_to (FALSE);