not confused with Insight. */
in_user_command = 1;
- make_cleanup_restore_integer (¤t_ui->async);
- current_ui->async = 0;
+ scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0);
command_nest_depth++;
while (cmdlines)
while_command (char *arg, int from_tty)
{
struct command_line *command = NULL;
- struct cleanup *old_chain;
control_level = 1;
command = get_command_line (while_control, arg);
if (command == NULL)
return;
- old_chain = make_cleanup_restore_integer (¤t_ui->async);
- current_ui->async = 0;
+ scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0);
execute_control_command_untraced (command);
free_command_lines (&command);
-
- do_cleanups (old_chain);
}
/* "if" command support. Execute either the true or false arm depending
if (command == NULL)
return;
- old_chain = make_cleanup_restore_integer (¤t_ui->async);
- current_ui->async = 0;
+ scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0);
execute_control_command_untraced (command);
free_command_lines (&command);
-
- do_cleanups (old_chain);
}
/* Cleanup */
source_line_number = 0;
source_file_name = file;
- make_cleanup_restore_integer (¤t_ui->async);
- current_ui->async = 0;
-
{
+ scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0);
TRY
{