Defines |
#define | IGNORE_EXCEPTION(E) |
#define | SAFE_CALL(F, ARGS) |
Enumerations |
enum | system_exec_type { et_sync,
et_async
} |
Functions |
void | recover_from_exception (void) |
int | main_loop (void) |
void | clean_up_and_exit (int retval) |
| DEFUN (quit, args,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} exit (@var{status})\n\
@deftypefnx {Built-in Function} {} quit (@var{status})\n\
Exit the current Octave session. If the optional integer value\n\
@var{status} is supplied, pass that value to the operating system as the\n\
Octave's exit status. The default value is zero.\n\
@end deftypefn") |
| DEFALIAS (exit, quit) |
| DEFUN (warranty,,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} warranty ()\n\
Describe the conditions for copying and distributing Octave.\n\
@end deftypefn") |
| DEFUN (system, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {[@var{status}, @var{output}]} system (@var{string}, @var{return_output}, @var{type})\n\
@deftypefnx {Built-in Function} {[@var{status}, @var{output}]} shell_cmd (@var{string}, @var{return_output}, @var{type})\n\
Execute a shell command specified by @var{string}.\n\
If the optional argument @var{type} is @code{\"async\"}, the process\n\
is started in the background and the process id of the child process\n\
is returned immediately. Otherwise, the process is started, and\n\
Octave waits until it exits. If the @var{type} argument is omitted, a\n\
value of @code{\"sync\"} is assumed.\n\
\n\
If the optional argument @var{return_output} is true and the subprocess\n\
is started synchronously, or if @var{system} is called with one input\n\
argument and one or more output arguments, the output from the command\n\
is returned. Otherwise, if the subprocess is executed synchronously, its\n\
output is sent to the standard output. To send the output of a command\n\
executed with @code{system} through the pager, use a command like\n\
\n\
@example\n\
disp (system (cmd, 1));\n\
@end example\n\
\n\
@noindent\n\
or\n\
\n\
@example\n\
printf (\"%s\\n\", system (cmd, 1));\n\
@end example\n\
\n\
The @code{system} function can return two values. The first is the\n\
exit status of the command and the second is any output from the\n\
command that was written to the standard output stream. For example,\n\
\n\
@example\n\
[status, output] = system (\"echo foo; exit 2\");\n\
@end example\n\
\n\
@noindent\n\
will set the variable @code{output} to the string @samp{foo}, and the\n\
variable @code{status} to the integer @samp{2}.\n\
\n\
For commands run asynchronously, @var{status} is the process id of the\n\
command shell that is started to run the command.\n\
@end deftypefn") |
| DEFALIAS (shell_cmd, system) |
void | do_octave_atexit (void) |
void | octave_add_atexit_function (const std::string &fname) |
bool | octave_remove_atexit_function (const std::string &fname) |
| DEFUN (atexit, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} atexit (@var{fcn})\n\
@deftypefnx {Built-in Function} {} atexit (@var{fcn}, @var{flag})\n\
Register a function to be called when Octave exits. For example,\n\
\n\
@example\n\
@group\n\
function last_words ()\n\
disp (\"Bye bye\");\n\
endfunction\n\
atexit (\"last_words\");\n\
@end group\n\
@end example\n\
\n\
@noindent\n\
will print the message \"Bye bye\" when Octave exits.\n\
\n\
The additional argument @var{flag} will register or unregister\n\
@var{fcn} from the list of functions to be called when Octave\n\
exits. If @var{flag} is true, the function is registered, and if\n\
@var{flag} is false, it is unregistered. For example,\n\
after registering the function @code{last_words} above,\n\
\n\
@example\n\
atexit (\"last_words\", false);\n\
@end example\n\
\n\
@noindent\n\
will remove the function from the list and Octave will not call\n\
@code{last_words} when it exits.\n\
\n\
Note that @code{atexit} only removes the first occurrence of a function\n\
from the list, so if a function was placed in the list multiple\n\
times with @code{atexit}, it must also be removed from the list\n\
multiple times.\n\
@end deftypefn") |
| DEFUN (octave_config_info, args,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} octave_config_info ()\n\
@deftypefnx {Built-in Function} {} octave_config_info (@var{option})\n\
Return a structure containing configuration and installation\n\
information for Octave.\n\
\n\
If @var{option} is a string, return the configuration information for the\n\
specified option.\n\
\n\
@end deftypefn") |
Variables |
void(* | octave_exit )(int) = ::exit |
bool | quit_allowed = true |
bool | quitting_gracefully = false |
int | exit_status = 0 |
bool | octave_interpreter_ready = false |
bool | octave_initialized = false |
tree_statement_list * | global_command = 0 |
std::list< std::string > | octave_atexit_functions |