GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <sys/types.h>
#include <unistd.h>
#include "cmd-edit.h"
#include "file-ops.h"
#include "quit.h"
#include "str-vec.h"
#include "debug.h"
#include "defun.h"
#include "dirfns.h"
#include "error.h"
#include "gripes.h"
#include "help.h"
#include "hook-fcn.h"
#include "input.h"
#include "lex.h"
#include "load-path.h"
#include "octave-link.h"
#include "oct-map.h"
#include "oct-hist.h"
#include "toplev.h"
#include "oct-obj.h"
#include "ov-fcn-handle.h"
#include "pager.h"
#include "parse.h"
#include "pathlen.h"
#include "pt.h"
#include "pt-const.h"
#include "pt-eval.h"
#include "pt-stmt.h"
#include "sighandlers.h"
#include "symtab.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
Go to the source code of this file.
Variables | |
bool | forced_interactive = false |
static hook_function_list | input_event_hook_functions |
bool | interactive = false |
static std::string | last_debugging_command = "\n" |
bool | octave_completion_matches_called = false |
static char | Vcompletion_append_char = ' ' |
bool | Vdebugging = false |
bool | Vdrawnow_requested = false |
int | Vecho_executing_commands = ECHO_OFF |
char | Vfilemarker = '>' |
static bool | Vgud_mode = false |
octave_time | Vlast_prompt_time = 0.0 |
static std::string | VPS1 |
static std::string | VPS2 |
std::string | VPS4 = "+ " |
octave_value do_keyboard | ( | const octave_value_list & | args | ) |
Definition at line 859 of file input.cc.
References action_container::add_fcn(), octave_call_stack::current_frame(), error_state, get_debug_input(), command_history::ignore_entries(), command_history::ignoring_entries(), octave_value_list::length(), action_container::protect_var(), octave_call_stack::restore_frame(), and Vdebugging.
Referenced by tree_evaluator::do_keyboard(), error_2(), Fkeyboard(), and warning_1().
|
static |
Definition at line 502 of file input.cc.
References octave_link::execute_in_debugger_event().
Referenced by get_debug_input().
OCTAVE_EXPORT octave_value_list F__echostate__ | ( | const octave_value_list & | , |
int | |||
) |
Definition at line 1035 of file input.cc.
References ECHO_SCRIPTS, and ovl().
Referenced by root_figure::properties::get_echo().
OCTAVE_EXPORT octave_value_list F__gud_mode__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1434 of file input.cc.
References octave_value::length(), print_usage(), and Vgud_mode.
OCTAVE_EXPORT octave_value_list F__request_drawnow__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1414 of file input.cc.
References octave_value::length(), print_usage(), and Vdrawnow_requested.
OCTAVE_EXPORT octave_value_list Fadd_input_event_hook | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1197 of file input.cc.
References command_editor::add_event_hook(), hook_function_list::empty(), error(), error_state, hook_function::id(), hook_function_list::insert(), internal_input_event_hook_fcn(), octave_value::length(), and print_usage().
Referenced by G__init_fltk__().
OCTAVE_EXPORT octave_value_list Fcompletion_append_char | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1370 of file input.cc.
References SET_INTERNAL_VARIABLE.
OCTAVE_EXPORT octave_value_list Fcompletion_matches | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1049 of file input.cc.
References string_vector::empty(), error_state, generate_completion(), Array< T >::length(), octave_value::length(), octave_completion_matches_called, octave_stdout, print_usage(), and string_vector::resize().
OCTAVE_EXPORT octave_value_list Fecho | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 971 of file input.cc.
References arg(), ECHO_FUNCTIONS, ECHO_OFF, ECHO_SCRIPTS, error_state, octave_value_list::length(), and print_usage().
Referenced by root_figure::properties::set_echo().
OCTAVE_EXPORT octave_value_list Fecho_executing_commands | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1404 of file input.cc.
References SET_INTERNAL_VARIABLE.
Referenced by octave_execute_interpreter(), and octave_process_command_line().
OCTAVE_EXPORT octave_value_list Ffilemarker | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1484 of file input.cc.
References error(), error_state, SET_INTERNAL_VARIABLE, and Vfilemarker.
OCTAVE_EXPORT octave_value_list Finput | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 783 of file input.cc.
References get_user_input(), octave_value_list::length(), max(), and print_usage().
OCTAVE_EXPORT octave_value_list Fkeyboard | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 913 of file input.cc.
References action_container::add_fcn(), tree_evaluator::current_frame, octave_call_stack::current_frame(), tree_evaluator::debug_mode, do_keyboard(), octave_call_stack::goto_frame_relative(), octave_value_list::length(), print_usage(), tree_evaluator::quiet_breakpoint_flag, and octave_call_stack::restore_frame().
OCTAVE_EXPORT octave_value_list FPS1 | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1310 of file input.cc.
References SET_INTERNAL_VARIABLE.
Referenced by maximum_braindamage().
OCTAVE_EXPORT octave_value_list FPS2 | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1332 of file input.cc.
References SET_INTERNAL_VARIABLE.
Referenced by maximum_braindamage().
OCTAVE_EXPORT octave_value_list FPS4 | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1352 of file input.cc.
References SET_INTERNAL_VARIABLE.
Referenced by maximum_braindamage().
OCTAVE_EXPORT octave_value_list Freadline_re_read_init_file | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1156 of file input.cc.
References print_usage(), and command_editor::re_read_init_file().
OCTAVE_EXPORT octave_value_list Freadline_read_init_file | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1127 of file input.cc.
References error_state, octave_value_list::length(), print_usage(), and command_editor::read_init_file().
OCTAVE_EXPORT octave_value_list Fremove_input_event_hook | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1238 of file input.cc.
References hook_function_list::empty(), hook_function_list::end(), hook_function_list::erase(), error(), error_state, hook_function_list::find(), internal_input_event_hook_fcn(), octave_value_list::length(), print_usage(), command_editor::remove_event_hook(), and warning().
OCTAVE_EXPORT octave_value_list Fyes_or_no | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 829 of file input.cc.
References error(), octave_value::length(), octave_yes_or_no(), and print_usage().
|
static |
Definition at line 378 of file input.cc.
References string_vector::append(), command_editor::generate_filename_completions(), generate_possible_completions(), is_completing_dirfns(), Array< T >::length(), looks_like_struct(), and command_editor::set_completion_append_character().
Referenced by Fcompletion_matches(), and initialize_command_input().
|
static |
Definition at line 334 of file input.cc.
References generate_struct_completions(), looks_like_struct(), make_name_list(), names(), and string_vector::sort().
Referenced by generate_completion().
|
static |
Definition at line 508 of file input.cc.
References tree_statement_list::accept(), action_container::add_fcn(), octave_call_stack::caller_user_code(), octave_call_stack::caller_user_code_line(), current_evaluator, octave_call_stack::current_line(), octave_link::enter_debugger_event(), command_editor::erase_empty_line(), execute_in_debugger_handler(), octave_function::fcn_file_name(), forced_interactive, get_file_line(), interactive, command_editor::interrupt(), octave_function::name(), octave_completion_matches_called, action_container::protect_var(), tree_evaluator::quiet_breakpoint_flag, octave_base_parser::reset(), reset_error_handler(), octave_parser::run(), octave_link::set_workspace(), octave_base_parser::stmt_list, Vdebugging, Vgud_mode, and VPS1.
Referenced by do_keyboard().
FILE* get_input_from_stdin | ( | void | ) |
Definition at line 325 of file input.cc.
References command_editor::get_input_stream(), and command_editor::set_input_stream().
|
static |
Definition at line 680 of file input.cc.
References error(), error_state, eval_string(), flush_octave_stdout(), interactive_input(), octave_value_list::length(), octave_diary, octave_value(), octave_pager_stream::reset(), octave_diary_stream::reset(), and Vdebugging.
Referenced by Finput().
|
static |
Definition at line 181 of file input.cc.
References command_editor::readline().
Referenced by interactive_input(), and command_editor::make_command_editor().
void initialize_command_input | ( | void | ) |
Definition at line 475 of file input.cc.
References generate_completion(), quoting_filename(), command_editor::set_basic_quote_characters(), command_editor::set_basic_word_break_characters(), command_editor::set_completer_quote_characters(), command_editor::set_completer_word_break_characters(), command_editor::set_completion_function(), command_editor::set_filename_quote_characters(), command_editor::set_name(), and command_editor::set_quoting_function().
Referenced by octave_initialize_interpreter().
|
inlinestatic |
Definition at line 196 of file input.cc.
References error_state, feval(), flush_octave_stdout(), gnu_readline(), interactive, octave_time::stamp(), and Vdrawnow_requested.
Referenced by get_user_input(), octave_base_reader::octave_gets(), and octave_yes_or_no().
|
static |
Definition at line 1169 of file input.cc.
References hook_function_list::empty(), command_editor::remove_event_hook(), and hook_function_list::run().
Referenced by Fadd_input_event_hook(), and Fremove_input_event_hook().
|
static |
Definition at line 354 of file input.cc.
References command_editor::get_line_buffer().
Referenced by generate_completion().
bool octave_yes_or_no | ( | const std::string & | prompt | ) |
Definition at line 798 of file input.cc.
References interactive_input(), and message().
Referenced by Frmdir(), and Fyes_or_no().
Definition at line 466 of file input.cc.
Referenced by initialize_command_input().
void remove_input_event_hook_functions | ( | void | ) |
Definition at line 133 of file input.cc.
References hook_function_list::clear().
Referenced by do_octave_atexit().
void set_default_prompts | ( | void | ) |
Definition at line 139 of file input.cc.
References octave_link::set_default_prompts(), VPS1, VPS2, and VPS4.
Referenced by octave_initialize_interpreter().
bool forced_interactive = false |
Definition at line 107 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), octave_base_stream::do_oscanf(), octave_base_stream::do_scanf(), Frmdir(), get_debug_input(), octave_execute_interpreter(), octave_initialize_interpreter(), octave_process_command_line(), raw_mode(), octave_pager_buf::sync(), user_abort(), and warning_1().
|
static |
bool interactive = false |
Definition at line 103 of file input.cc.
Referenced by octave_base_stream::do_gets(), do_octave_atexit(), octave_base_stream::do_oscanf(), octave_base_stream::do_scanf(), error_2(), execute_command_line_file(), execute_eval_option_code(), Fkbhit(), Fpopen2(), Frmdir(), get_debug_input(), interactive_input(), main_loop(), octave_base_reader::octave_gets(), octave_initialize_interpreter(), octave_syscalls::popen2(), raw_mode(), octave_base_lexer::reset(), octave_base_stream::skipl(), octave_pager_buf::sync(), user_abort(), and warning_1().
|
static |
Definition at line 121 of file input.cc.
Referenced by octave_base_reader::octave_gets().
bool octave_completion_matches_called = false |
Definition at line 110 of file input.cc.
Referenced by Fcompletion_matches(), get_debug_input(), and main_loop().
bool Vdebugging = false |
Definition at line 117 of file input.cc.
Referenced by bp_table::do_add_breakpoint(), do_keyboard(), bp_table::do_remove_all_breakpoints(), bp_table::do_remove_all_breakpoints_in_file(), bp_table::do_remove_breakpoint(), Fdbcont(), Fdbquit(), Fdbstatus(), Fdbstep(), Fisdebugmode(), get_debug_input(), get_user_input(), octave_base_reader::octave_gets(), parse_dbfunction_params(), tree_evaluator::reset_debug_state(), user_abort(), tree_evaluator::visit_return_command(), and tree_evaluator::visit_statement().
bool Vdrawnow_requested = false |
Definition at line 114 of file input.cc.
Referenced by delete_graphics_object(), gh_manager::do_process_events(), F__request_drawnow__(), F__zoom__(), Fdrawnow(), Fset(), G__fltk_check__(), interactive_input(), and make_graphics_object().
Definition at line 94 of file input.cc.
Referenced by do_edit_history(), octave_user_function::do_multi_index_op(), do_run_history(), and tree_evaluator::visit_statement().
char Vfilemarker = '>' |
Definition at line 127 of file input.cc.
Referenced by fcn_file_in_path(), octave_call_stack::stack_frame::fcn_name(), Ffilemarker(), and symbol_table::find_function().
|
static |
Definition at line 124 of file input.cc.
Referenced by F__gud_mode__(), and get_debug_input().
octave_time Vlast_prompt_time = 0.0 |
Definition at line 97 of file input.cc.
Referenced by out_of_date_check(), and rehash_internal().
|
static |
Definition at line 79 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), get_debug_input(), octave_base_reader::octave_gets(), and set_default_prompts().
|
static |
Definition at line 82 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), octave_base_reader::octave_gets(), and set_default_prompts().
std::string VPS4 = "+ " |
Definition at line 85 of file input.cc.
Referenced by octave_base_reader::do_input_echo(), tree_statement::echo_code(), octave_user_function::print_code_function_header(), octave_user_function::print_code_function_trailer(), and set_default_prompts().