]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/tui/tui-hooks.c
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / tui / tui-hooks.c
index 6f880aba994e728ced056dc4a071c0315d38d5b8..2e1f1f1991b009dd53d115b7a11dbfb4339829dc 100644 (file)
@@ -1,6 +1,7 @@
 /* GDB hooks for TUI.
 
-   Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "symtab.h"
@@ -70,17 +71,13 @@ tui_new_objfile_hook (struct objfile* objfile)
     tui_target_new_objfile_chain (objfile);
 }
 
-static int
+static int ATTR_FORMAT (printf, 1, 0)
 tui_query_hook (const char * msg, va_list argp)
 {
   int retval;
   int ans2;
   int answer;
 
-  /* Automatically answer "yes" if input is not from a terminal.  */
-  if (!input_from_terminal_p ())
-    return 1;
-
   echo ();
   while (1)
     {
@@ -88,7 +85,7 @@ tui_query_hook (const char * msg, va_list argp)
       gdb_flush (gdb_stdout);
 
       vfprintf_filtered (gdb_stdout, msg, argp);
-      printf_filtered ("(y or n) ");
+      printf_filtered (_("(y or n) "));
 
       wrap_here ("");
       gdb_flush (gdb_stdout);
@@ -121,7 +118,7 @@ tui_query_hook (const char * msg, va_list argp)
          retval = 0;
          break;
        }
-      printf_filtered ("Please answer y or n.\n");
+      printf_filtered (_("Please answer y or n.\n"));
     }
   noecho ();
   return retval;
@@ -290,7 +287,7 @@ tui_install_hooks (void)
   deprecated_query_hook = tui_query_hook;
 
   /* Install the event hooks.  */
-  tui_old_event_hooks = set_gdb_event_hooks (&tui_event_hooks);
+  tui_old_event_hooks = deprecated_set_gdb_event_hooks (&tui_event_hooks);
 
   deprecated_registers_changed_hook = tui_registers_changed_hook;
   deprecated_register_changed_hook = tui_register_changed_hook;
@@ -310,7 +307,7 @@ tui_remove_hooks (void)
   deprecated_detach_hook = 0;
 
   /* Restore the previous event hooks.  */
-  set_gdb_event_hooks (tui_old_event_hooks);
+  deprecated_set_gdb_event_hooks (tui_old_event_hooks);
 }
 
 void _initialize_tui_hooks (void);