/* 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.
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"
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)
{
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);
retval = 0;
break;
}
- printf_filtered ("Please answer y or n.\n");
+ printf_filtered (_("Please answer y or n.\n"));
}
noecho ();
return retval;
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;
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);