return make_cleanup (do_obstack_free, obstack);
}
-static void
-do_ui_file_delete (void *arg)
-{
- ui_file_delete ((struct ui_file *) arg);
-}
-
-struct cleanup *
-make_cleanup_ui_file_delete (struct ui_file *arg)
-{
- return make_cleanup (do_ui_file_delete, arg);
-}
-
/* Helper function for make_cleanup_ui_out_redirect_pop. */
static void
}
void
-error_stream (struct ui_file *stream)
+error_stream (const string_file &stream)
{
- std::string message = ui_file_as_string (stream);
-
- error (("%s"), message.c_str ());
+ error (("%s"), stream.c_str ());
}
/* Emit a message and abort. */
way, important error messages don't get lost when talking to GDB
over a pipe. */
if (current_ui->instream != current_ui->stdin_stream
- || !input_interactive_p (current_ui))
+ || !input_interactive_p (current_ui)
+ /* Restrict queries to the main UI. */
+ || current_ui != main_ui)
{
old_chain = make_cleanup_restore_target_terminal ();