GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
input.cc File Reference
#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"
Include dependency graph for input.cc:

Go to the source code of this file.

Functions

octave_value do_keyboard (const octave_value_list &args)
static void execute_in_debugger_handler (const std::pair< std::string, int > &arg)
OCTAVE_EXPORT octave_value_list F__gud_mode__ (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list F__request_drawnow__ (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fadd_input_event_hook (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fcompletion_append_char (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fcompletion_matches (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fecho (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fecho_executing_commands (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Ffilemarker (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Finput (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fkeyboard (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list FPS1 (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list FPS2 (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list FPS4 (const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Freadline_re_read_init_file (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Freadline_read_init_file (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fremove_input_event_hook (const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fyes_or_no (const octave_value_list &args, int)
static std::string generate_completion (const std::string &text, int state)
static string_vector generate_possible_completions (const std::string &text, std::string &prefix, std::string &hint)
static void get_debug_input (const std::string &prompt)
FILE * get_input_from_stdin (void)
static octave_value_list get_user_input (const octave_value_list &args, int nargout)
static std::string gnu_readline (const std::string &s, bool &eof)
void initialize_command_input (void)
static std::string interactive_input (const std::string &s, bool &eof)
static int internal_input_event_hook_fcn (void)
static bool is_completing_dirfns (void)
bool octave_yes_or_no (const std::string &prompt)
static std::string quoting_filename (const std::string &text, int, char quote)
void remove_input_event_hook_functions (void)
void set_default_prompts (void)

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 = "+ "

Function Documentation

octave_value do_keyboard ( const octave_value_list args)
static void execute_in_debugger_handler ( const std::pair< std::string, int > &  arg)
static

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   
)
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 
)
OCTAVE_EXPORT octave_value_list Fecho ( const octave_value_list args,
int   
)
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   
)
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   
)
OCTAVE_EXPORT octave_value_list Fremove_input_event_hook ( const octave_value_list args,
int   
)
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 std::string generate_completion ( const std::string &  text,
int  state 
)
static
static string_vector generate_possible_completions ( const std::string &  text,
std::string &  prefix,
std::string &  hint 
)
static
static void get_debug_input ( const std::string &  prompt)
static
FILE* get_input_from_stdin ( void  )
static octave_value_list get_user_input ( const octave_value_list args,
int  nargout 
)
static
static std::string gnu_readline ( const std::string &  s,
bool eof 
)
static

Definition at line 180 of file input.cc.

References command_editor::readline().

Referenced by interactive_input(), and command_editor::make_command_editor().

void initialize_command_input ( void  )
static std::string interactive_input ( const std::string &  s,
bool eof 
)
inlinestatic
static int internal_input_event_hook_fcn ( void  )
static
static bool is_completing_dirfns ( void  )
static

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().

static std::string quoting_filename ( const std::string &  text,
int  ,
char  quote 
)
static

Definition at line 465 of file input.cc.

Referenced by initialize_command_input().

void remove_input_event_hook_functions ( void  )

Definition at line 132 of file input.cc.

References hook_function_list::clear().

Referenced by do_octave_atexit().

void set_default_prompts ( void  )

Definition at line 138 of file input.cc.

References octave_link::set_default_prompts(), VPS1, VPS2, and VPS4.

Referenced by octave_initialize_interpreter().

Variable Documentation

bool forced_interactive = false
hook_function_list input_event_hook_functions
static

Definition at line 128 of file input.cc.

bool interactive = false
std::string last_debugging_command = "\n"
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().

char Vcompletion_append_char = ' '
static

Definition at line 100 of file input.cc.

bool Vdebugging = false
bool Vdrawnow_requested = false
int Vecho_executing_commands = ECHO_OFF
char Vfilemarker = '>'
bool Vgud_mode = false
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().

std::string VPS1
static
std::string VPS2
static
std::string VPS4 = "+ "