GNU Octave
3.8.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 839 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 error_2(), Fkeyboard(), and warning_1().
Definition at line 501 of file input.cc.
References octave_link::execute_in_debugger_event().
Referenced by get_debug_input().
OCTAVE_EXPORT octave_value_list F__gud_mode__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1390 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 1370 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 1159 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 DEFUN_DLD().
OCTAVE_EXPORT octave_value_list Fcompletion_append_char | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1327 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 1013 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 944 of file input.cc.
References arg(), ECHO_FUNCTIONS, ECHO_OFF, ECHO_SCRIPTS, error_state, octave_value_list::length(), and print_usage().
OCTAVE_EXPORT octave_value_list Fecho_executing_commands | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1360 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 1435 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 765 of file input.cc.
References get_user_input(), octave_value_list::length(), and print_usage().
OCTAVE_EXPORT octave_value_list Fkeyboard | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 892 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(), and octave_call_stack::restore_frame().
OCTAVE_EXPORT octave_value_list FPS1 | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1270 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 1291 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 1310 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 1118 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 1090 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 1200 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 809 of file input.cc.
References error(), error_state, octave_value::length(), octave_yes_or_no(), and print_usage().
|
static |
Definition at line 377 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 333 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 507 of file input.cc.
References tree_statement_list::accept(), action_container::add_fcn(), octave_call_stack::caller_user_code(), current_evaluator, octave_call_stack::current_line(), octave_link::enter_debugger_event(), 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(), 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 324 of file input.cc.
References command_editor::get_input_stream(), and command_editor::set_input_stream().
|
static |
Definition at line 664 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 180 of file input.cc.
References command_editor::readline().
Referenced by interactive_input(), and command_editor::make_command_editor().
Definition at line 474 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 195 of file input.cc.
References error_state, feval(), flush_octave_stdout(), forced_interactive, gnu_readline(), interactive, octave_time::stamp(), and Vdrawnow_requested.
Referenced by get_user_input(), octave_base_reader::octave_gets(), and octave_yes_or_no().
Definition at line 1131 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().
Definition at line 353 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 780 of file input.cc.
References interactive_input(), and message().
Referenced by Frmdir(), and Fyes_or_no().
Definition at line 465 of file input.cc.
Referenced by initialize_command_input().
Definition at line 132 of file input.cc.
References hook_function_list::clear().
Referenced by do_octave_atexit().
Definition at line 138 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 106 of file input.cc.
Referenced by octave_base_stream::do_gets(), octave_base_reader::do_input_echo(), do_octave_atexit(), octave_base_stream::do_scanf(), error_2(), Fkbhit(), get_debug_input(), interactive_input(), main_loop(), octave_execute_interpreter(), octave_base_reader::octave_gets(), octave_process_command_line(), octave_base_lexer::reset(), octave_base_stream::skipl(), 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_execute_interpreter(), 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 120 of file input.cc.
Referenced by octave_base_reader::octave_gets().
bool octave_completion_matches_called = false |
Definition at line 109 of file input.cc.
Referenced by Fcompletion_matches(), get_debug_input(), and main_loop().
bool Vdebugging = false |
Definition at line 116 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(), Fdbstep(), Fisdebugmode(), get_debug_input(), get_user_input(), octave_base_reader::octave_gets(), tree_evaluator::reset_debug_state(), user_abort(), tree_evaluator::visit_return_command(), and tree_evaluator::visit_statement().
bool Vdrawnow_requested = false |
Definition at line 113 of file input.cc.
Referenced by delete_graphics_object(), gh_manager::do_process_events(), F__request_drawnow__(), Fdrawnow(), Fset(), 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 126 of file input.cc.
Referenced by octave_call_stack::do_backtrace(), fcn_file_in_path(), Ffilemarker(), and symbol_table::find_function().
|
static |
Definition at line 123 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().