diff options
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r-- | gdb/event-top.c | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c index 1281df8..b1cc8b9 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -548,7 +548,7 @@ async_enable_stdin (void) if (ui->prompt_state == PROMPT_BLOCKED) { - target_terminal_ours (); + target_terminal::ours (); ui_register_input_event_handler (ui); ui->prompt_state = PROMPT_NEEDED; } @@ -957,7 +957,7 @@ default_quit_handler (void) { if (check_quit_flag ()) { - if (target_terminal_is_ours ()) + if (target_terminal::is_ours ()) quit (); else target_pass_ctrlc (); @@ -967,51 +967,6 @@ default_quit_handler (void) /* See defs.h. */ quit_handler_ftype *quit_handler = default_quit_handler; -/* Data for make_cleanup_override_quit_handler. Wrap the previous - handler pointer in a data struct because it's not portable to cast - a function pointer to a data pointer, which is what make_cleanup - expects. */ -struct quit_handler_cleanup_data -{ - /* The previous quit handler. */ - quit_handler_ftype *prev_handler; -}; - -/* Cleanup call that restores the previous quit handler. */ - -static void -restore_quit_handler (void *arg) -{ - struct quit_handler_cleanup_data *data - = (struct quit_handler_cleanup_data *) arg; - - quit_handler = data->prev_handler; -} - -/* Destructor for the quit handler cleanup. */ - -static void -restore_quit_handler_dtor (void *arg) -{ - xfree (arg); -} - -/* See defs.h. */ - -struct cleanup * -make_cleanup_override_quit_handler (quit_handler_ftype *new_quit_handler) -{ - struct cleanup *old_chain; - struct quit_handler_cleanup_data *data; - - data = XNEW (struct quit_handler_cleanup_data); - data->prev_handler = quit_handler; - old_chain = make_cleanup_dtor (restore_quit_handler, data, - restore_quit_handler_dtor); - quit_handler = new_quit_handler; - return old_chain; -} - /* Handle a SIGINT. */ void |