#include <cstdio>
#include <deque>
#include <string>
#include "quit.h"
#include "input.h"
#include "oct-map.h"
Go to the source code of this file.
Classes | |
struct | octave_call_stack::call_stack_elt |
class | octave_call_stack |
Defines | |
#define | OCTAVE_IGNORE_EXCEPTION(E) |
#define | OCTAVE_SAFE_CALL(F, ARGS) |
Typedefs | |
typedef void(* | octave_exit_func )(int) |
Functions | |
OCTINTERP_API void | clean_up_and_exit (int) |
OCTINTERP_API void | do_octave_atexit (void) |
OCTINTERP_API int | main_loop (void) |
OCTINTERP_API void | octave_add_atexit_function (const std::string &fname) |
OCTINTERP_API bool | octave_remove_atexit_function (const std::string &fname) |
OCTINTERP_API void | recover_from_exception (void) |
Variables | |
OCTINTERP_API int | exit_status |
OCTINTERP_API tree_statement_list * | global_command |
OCTINTERP_API octave_exit_func | octave_exit |
OCTINTERP_API bool | octave_initialized |
OCTINTERP_API bool | octave_interpreter_ready |
OCTINTERP_API bool | quit_allowed |
OCTINTERP_API bool | quitting_gracefully |
#define OCTAVE_IGNORE_EXCEPTION | ( | E | ) |
catch (E) \ { \ std::cerr << "error: ignoring " #E " while preparing to exit" << std::endl; \ recover_from_exception (); \ }
#define OCTAVE_SAFE_CALL | ( | F, | ||
ARGS | ||||
) |
do \ { \ try \ { \ unwind_protect frame; \ \ frame.protect_var (Vdebug_on_error); \ frame.protect_var (Vdebug_on_warning); \ \ Vdebug_on_error = false; \ Vdebug_on_warning = false; \ \ F ARGS; \ } \ OCTAVE_IGNORE_EXCEPTION (octave_interrupt_exception) \ OCTAVE_IGNORE_EXCEPTION (octave_execution_exception) \ OCTAVE_IGNORE_EXCEPTION (std::bad_alloc) \ \ if (error_state) \ error_state = 0; \ } \ while (0)
Definition at line 431 of file toplev.h.
Referenced by close_figure(), and do_octave_atexit().
typedef void(* octave_exit_func)(int) |
OCTINTERP_API void clean_up_and_exit | ( | int | ) |
Definition at line 668 of file toplev.cc.
References do_octave_atexit(), and octave_exit.
Referenced by execute_eval_option_code(), main_loop(), octave_main(), and safe_source_file().
OCTINTERP_API void do_octave_atexit | ( | void | ) |
Definition at line 1023 of file toplev.cc.
References command_history::clean_up_and_save(), symbol_table::cleanup(), cleanup_parser(), cleanup_tmp_files(), octave_chunk_buffer::clear(), clear_mex_functions(), close_files(), feval(), flush_octave_stdout(), forced_interactive, command_history::ignoring_entries(), interactive, octave_atexit_functions, octave_history_write_timestamp(), OCTAVE_SAFE_CALL, octave_stdout, quitting_gracefully, raw_mode(), reset_error_handler(), command_editor::restore_terminal_state(), and sysdep_cleanup().
Referenced by clean_up_and_exit(), and octave_main().
OCTINTERP_API int main_loop | ( | void | ) |
Definition at line 542 of file toplev.cc.
References tree_statement_list::accept(), unwind_protect::add_fcn(), symbol_table::at_top_level(), tree_break_command::breaking, can_interrupt, clean_up_and_exit(), cleanup_statement_list(), current_evaluator, error_state, forced_interactive, command_editor::increment_current_command_number(), interactive, octave_bad_alloc_hook, octave_catch_interrupts(), octave_completion_matches_called, octave_initialized, octave_interrupt_hook, octave_parse(), octave_save_signal_mask(), octave_signal_hook, octave_stdout, parser_end_of_input, unwind_protect::protect_var(), quitting_gracefully, recover_from_exception(), tree_evaluator::reset_debug_state(), reset_error_handler(), reset_parser(), tree_return_command::returning, symbol_table::top_scope(), and symbol_table::unmark_forced_variables().
Referenced by octave_main().
OCTINTERP_API void octave_add_atexit_function | ( | const std::string & | fname | ) |
Definition at line 1102 of file toplev.cc.
References octave_atexit_functions.
Referenced by DEFUN().
OCTINTERP_API bool octave_remove_atexit_function | ( | const std::string & | fname | ) |
Definition at line 1108 of file toplev.cc.
References octave_atexit_functions.
Referenced by DEFUN().
OCTINTERP_API void recover_from_exception | ( | void | ) |
Definition at line 530 of file toplev.cc.
References can_interrupt, octave_catch_interrupts(), octave_exception_state, octave_interrupt_immediately, octave_interrupt_state, octave_restore_signal_mask(), and octave_signal_caught.
Referenced by execute_eval_option_code(), main_loop(), and safe_source_file().
OCTINTERP_API int exit_status |
Definition at line 88 of file toplev.cc.
Referenced by execute_eval_option_code(), and safe_source_file().
OCTINTERP_API tree_statement_list* global_command |
Definition at line 98 of file toplev.cc.
Referenced by get_debug_input().
OCTINTERP_API octave_exit_func octave_exit |
Definition at line 80 of file toplev.cc.
Referenced by clean_up_and_exit().
OCTINTERP_API bool octave_initialized |
Definition at line 95 of file toplev.cc.
Referenced by execute_command_line_file(), execute_eval_option_code(), main_loop(), and user_abort().
OCTINTERP_API bool octave_interpreter_ready |
Definition at line 92 of file toplev.cc.
Referenced by execute_pkg_add_or_del(), and octave_main().
OCTINTERP_API bool quit_allowed |
Definition at line 83 of file toplev.cc.
Referenced by DEFUN(), octave_main(), and octave_oncleanup::~octave_oncleanup().
OCTINTERP_API bool quitting_gracefully |
Definition at line 86 of file toplev.cc.
Referenced by DEFUN(), do_octave_atexit(), execute_eval_option_code(), main_loop(), octave_main(), and safe_source_file().