26 #if defined (HAVE_CONFIG_H)
50 #if defined (USE_READLINE)
68 static
mutex event_hook_lock;
70 #if defined (USE_READLINE)
87 OCTAVE_DISABLE_COPY_MOVE (gnu_readline)
89 ~gnu_readline () =
default;
91 void do_set_name (
const std::string&
n);
93 std::string do_readline (
const std::string& prompt,
bool& eof);
95 void do_set_input_stream (FILE *
f);
97 FILE * do_get_input_stream ();
99 void do_set_output_stream (FILE *
f);
101 FILE * do_get_output_stream ();
103 void do_redisplay ();
105 int do_terminal_rows ();
107 int do_terminal_cols ();
109 void do_clear_screen (
bool skip_redisplay);
111 void do_resize_terminal ();
113 void do_set_screen_size (
int ht,
int wd);
115 std::string newline_chars ();
117 void do_restore_terminal_state ();
119 void do_blink_matching_paren (
bool flag);
121 bool do_erase_empty_line (
bool flag);
123 void do_set_basic_word_break_characters (
const std::string& s);
125 void do_set_completer_word_break_characters (
const std::string& s);
127 void do_set_basic_quote_characters (
const std::string& s);
129 void do_set_filename_quote_characters (
const std::string& s);
131 void do_set_completer_quote_characters (
const std::string& s);
133 void do_set_completion_append_character (
char c);
135 void do_set_completion_function (completion_fcn
f);
137 void do_set_quoting_function (quoting_fcn
f);
139 void do_set_dequoting_function (dequoting_fcn
f);
141 void do_set_char_is_quoted_function (char_is_quoted_fcn
f);
143 void do_set_user_accept_line_function (user_accept_line_fcn
f);
145 completion_fcn do_get_completion_function ()
const;
147 quoting_fcn do_get_quoting_function ()
const;
149 dequoting_fcn do_get_dequoting_function ()
const;
151 char_is_quoted_fcn do_get_char_is_quoted_function ()
const;
153 user_accept_line_fcn do_get_user_accept_line_function ()
const;
156 do_generate_filename_completions (
const std::string&
text);
158 std::string do_get_line_buffer ()
const;
160 std::string do_get_current_line ()
const;
162 char do_get_prev_char (
int)
const;
164 void do_replace_line (
const std::string&
text,
bool clear_undo);
166 void do_kill_full_line ();
168 void do_insert_text (
const std::string&
text);
172 void do_accept_line ();
176 void do_clear_undo_list ();
178 void set_startup_hook (startup_hook_fcn
f);
180 void restore_startup_hook ();
182 void set_pre_input_hook (pre_input_hook_fcn
f);
184 void restore_pre_input_hook ();
186 void set_event_hook (event_hook_fcn
f);
188 void restore_event_hook ();
190 void do_restore_event_hook ();
192 void do_read_init_file (
const std::string& file);
194 void do_re_read_init_file ();
196 bool do_filename_completion_desired (
bool);
198 bool do_filename_quoting_desired (
bool);
200 bool do_prefer_env_winsize (
bool);
202 void do_interrupt (
bool);
204 void do_handle_interrupt_signal ();
206 static int operate_and_get_next (
int,
int);
208 static int history_search_backward (
int,
int);
210 static int history_search_forward (
int,
int);
214 static char * command_generator (
const char *
text,
int state);
216 static char * command_quoter (
char *
text,
int match_type,
217 char *quote_pointer);
219 static char * command_dequoter (
char *
text,
int match_type);
221 static int command_char_is_quoted (
char *
text,
int index);
223 static int command_accept_line (
int count,
int key);
225 static char ** command_completer (
const char *
text,
int start,
int end);
229 startup_hook_fcn m_previous_startup_hook;
231 pre_input_hook_fcn m_previous_pre_input_hook;
233 event_hook_fcn m_previous_event_hook;
235 completion_fcn m_completion_function;
237 quoting_fcn m_quoting_function;
239 dequoting_fcn m_dequoting_function;
241 char_is_quoted_fcn m_char_is_quoted_function;
243 user_accept_line_fcn m_user_accept_line_function;
245 static std::string s_completer_quote_characters;
248 std::string gnu_readline::s_completer_quote_characters =
"";
250 gnu_readline::gnu_readline ()
252 m_previous_pre_input_hook (nullptr),
253 m_previous_event_hook (nullptr), m_completion_function (nullptr),
254 m_quoting_function (nullptr), m_dequoting_function (nullptr),
255 m_char_is_quoted_function (nullptr), m_user_accept_line_function (nullptr)
260 std::string term = sys::env::getenv (
"TERM");
266 do_blink_matching_paren (
true);
271 gnu_readline::operate_and_get_next,
276 gnu_readline::do_set_name (
const std::string& nm)
282 gnu_readline::do_readline (
const std::string& prompt,
bool& eof)
288 const char *p = prompt.c_str ();
305 gnu_readline::do_set_input_stream (FILE *
f)
311 gnu_readline::do_get_input_stream ()
317 gnu_readline::do_set_output_stream (FILE *
f)
323 gnu_readline::do_get_output_stream ()
329 gnu_readline::do_redisplay ()
341 gnu_readline::do_terminal_rows ()
345 return sh > 0 ? sh : 24;
349 gnu_readline::do_terminal_cols ()
353 return sw > 0 ? sw : 80;
357 gnu_readline::do_clear_screen (
bool skip_redisplay)
363 gnu_readline::do_resize_terminal ()
369 gnu_readline::do_set_screen_size (
int ht,
int wd)
375 gnu_readline::newline_chars ()
381 gnu_readline::do_restore_terminal_state ()
387 gnu_readline::do_blink_matching_paren (
bool flag)
393 gnu_readline::do_erase_empty_line (
bool flag)
399 gnu_readline::do_set_basic_word_break_characters (
const std::string& s)
405 gnu_readline::do_set_completer_word_break_characters (
const std::string& s)
415 gnu_readline::do_set_basic_quote_characters (
const std::string& s)
421 gnu_readline::do_set_filename_quote_characters (
const std::string& s)
427 gnu_readline::do_set_completer_quote_characters (
const std::string& s)
429 s_completer_quote_characters = s;
433 gnu_readline::do_set_completion_append_character (
char c)
439 gnu_readline::do_set_completion_function (completion_fcn
f)
441 m_completion_function =
f;
444 = (
f ? gnu_readline::command_completer :
nullptr);
450 gnu_readline::do_set_quoting_function (quoting_fcn
f)
452 m_quoting_function =
f;
455 = (
f ? gnu_readline::command_quoter :
nullptr);
461 gnu_readline::do_set_dequoting_function (dequoting_fcn
f)
463 m_dequoting_function =
f;
466 = (
f ? gnu_readline::command_dequoter :
nullptr);
472 gnu_readline::do_set_char_is_quoted_function (char_is_quoted_fcn
f)
474 m_char_is_quoted_function =
f;
477 = (
f ? gnu_readline::command_char_is_quoted :
nullptr);
483 gnu_readline::do_set_user_accept_line_function (user_accept_line_fcn
f)
485 m_user_accept_line_function =
f;
495 gnu_readline::completion_fcn
496 gnu_readline::do_get_completion_function ()
const
498 return m_completion_function;
501 gnu_readline::quoting_fcn
502 gnu_readline::do_get_quoting_function ()
const
504 return m_quoting_function;
507 gnu_readline::dequoting_fcn
508 gnu_readline::do_get_dequoting_function ()
const
510 return m_dequoting_function;
513 gnu_readline::char_is_quoted_fcn
514 gnu_readline::do_get_char_is_quoted_function ()
const
516 return m_char_is_quoted_function;
519 gnu_readline::user_accept_line_fcn
520 gnu_readline::do_get_user_accept_line_function ()
const
522 return m_user_accept_line_function;
529 looks_like_filename (
const char *
line,
char delim)
533 const char *s = strrchr (
line, delim);
540 if (
f && (s[1] ==
'~' ||
f != s))
544 std::string candidate_filename = s+1;
546 candidate_filename = candidate_filename.substr (0,
f - s);
550 if (candidate_filename[0] ==
'~')
571 std::string line = get_line_buffer ();
574 const char *l =
line.c_str ();
576 if (looks_like_filename (l,
' ') || looks_like_filename (l,
'\'')
577 || looks_like_filename (l,
'"'))
580 (s_completer_quote_characters.c_str ());
586 static char *word_break_chars =
nullptr;
590 free (word_break_chars);
595 return word_break_chars;
600 gnu_readline::do_generate_filename_completions (
const std::string&
text)
624 retval[count++] = fn;
638 gnu_readline::do_get_line_buffer ()
const
644 gnu_readline::do_get_current_line ()
const
656 gnu_readline::do_get_prev_char (
int offset)
const
661 return p > offset ? buf[p - offset - 1] :
'\0';
665 gnu_readline::do_replace_line (
const std::string&
text,
bool clear_undo)
671 gnu_readline::do_kill_full_line ()
677 gnu_readline::do_insert_text (
const std::string&
text)
683 gnu_readline::do_newline ()
689 gnu_readline::do_accept_line ()
691 command_accept_line (1,
'\n');
695 gnu_readline::do_undo ()
701 gnu_readline::do_clear_undo_list ()
707 gnu_readline::set_startup_hook (startup_hook_fcn
f)
711 if (
f != m_previous_startup_hook)
716 gnu_readline::restore_startup_hook ()
722 gnu_readline::set_pre_input_hook (pre_input_hook_fcn
f)
726 if (
f != m_previous_pre_input_hook)
731 gnu_readline::restore_pre_input_hook ()
737 gnu_readline::set_event_hook (event_hook_fcn
f)
745 gnu_readline::restore_event_hook ()
751 gnu_readline::do_read_init_file (
const std::string& file)
757 gnu_readline::do_re_read_init_file ()
763 gnu_readline::do_filename_completion_desired (
bool arg)
769 gnu_readline::do_filename_quoting_desired (
bool arg)
775 gnu_readline::do_prefer_env_winsize (
bool arg)
781 gnu_readline::do_interrupt (
bool arg)
787 gnu_readline::do_handle_interrupt_signal ()
794 throw interrupt_exception ();
798 gnu_readline::operate_and_get_next (
int ,
int )
812 || (x_where >= x_length - 1))
823 gnu_readline::history_search_backward (
int count,
int c)
829 gnu_readline::history_search_forward (
int count,
int c)
835 gnu_readline::command_generator (
const char *
text,
int state)
837 char *retval =
nullptr;
841 std::string tmp =
f (
text, state);
843 std::size_t
len = tmp.length ();
850 strcpy (retval, tmp.c_str ());
857 gnu_readline::command_quoter (
char *
text,
int matches,
char *qcp)
859 char *retval =
nullptr;
863 std::string tmp =
f (
text, matches, *qcp);
865 std::size_t
len = tmp.length ();
872 strcpy (retval, tmp.c_str ());
879 gnu_readline::command_dequoter (
char *
text,
int quote)
881 char *retval =
nullptr;
885 std::string tmp =
f (
text, quote);
887 std::size_t
len = tmp.length ();
894 strcpy (retval, tmp.c_str ());
901 gnu_readline::command_char_is_quoted (
char *
text,
int quote)
905 return f (
text, quote);
909 gnu_readline::command_accept_line (
int count,
int key)
922 gnu_readline::command_completer (
const char *
text,
int,
int)
937 default_command_editor ()
938 :
command_editor (), m_input_stream (stdin), m_output_stream (stdout) { }
940 OCTAVE_DISABLE_COPY_MOVE (default_command_editor)
942 ~default_command_editor () =
default;
944 std::string do_readline (
const std::string& prompt,
bool& eof);
946 void do_set_input_stream (FILE *
f);
948 FILE * do_get_input_stream ();
950 void do_set_output_stream (FILE *
f);
952 FILE * do_get_output_stream ();
956 std::string do_get_line_buffer ()
const;
958 std::string do_get_current_line ()
const;
960 char do_get_prev_char (
int)
const;
962 void do_replace_line (
const std::string&
text,
bool clear_undo);
964 void do_kill_full_line ();
966 void do_insert_text (
const std::string&
text);
970 void do_accept_line ();
974 FILE *m_input_stream;
976 FILE *m_output_stream;
980 default_command_editor::do_readline (
const std::string& prompt,
bool& eof)
982 std::fputs (prompt.c_str (), m_output_stream);
983 std::fflush (m_output_stream);
985 return fgetl (m_input_stream, eof);
989 default_command_editor::do_set_input_stream (FILE *
f)
995 default_command_editor::do_get_input_stream ()
997 return m_input_stream;
1001 default_command_editor::do_set_output_stream (FILE *
f)
1003 m_output_stream =
f;
1007 default_command_editor::do_get_output_stream ()
1009 return m_output_stream;
1013 default_command_editor::do_generate_filename_completions (
const std::string&)
1020 default_command_editor::do_get_line_buffer ()
const
1026 default_command_editor::do_get_current_line ()
const
1033 default_command_editor::do_get_prev_char (
int)
const
1039 default_command_editor::do_replace_line (
const std::string&,
bool)
1045 default_command_editor::do_kill_full_line ()
1051 default_command_editor::do_insert_text (
const std::string&)
1057 default_command_editor::do_newline ()
1063 default_command_editor::do_accept_line ()
1069 command_editor::instance_ok ()
1075 make_command_editor ();
1086 (*current_liboctave_error_handler)
1087 (
"unable to create command history object!");
1093 command_editor::make_command_editor ()
1095 #if defined (USE_READLINE)
1096 s_instance =
new gnu_readline ();
1098 s_instance =
new default_command_editor ();
1106 s_instance =
new default_command_editor ();
1123 command_editor::startup_handler ()
1128 std::set<startup_hook_fcn> hook_set = s_startup_hook_set;
1140 command_editor::pre_input_handler ()
1145 std::set<pre_input_hook_fcn> hook_set = s_pre_input_hook_set;
1157 command_editor::event_handler ()
1160 handle_interrupt_signal ();
1162 event_hook_lock.
lock ();
1164 std::set<event_hook_fcn> hook_set (s_event_hook_set);
1166 event_hook_lock.
unlock ();
1418 return (instance_ok ()
1425 return (instance_ok ()
1432 return (instance_ok ()
1495 return instance_ok () ? s_instance->
do_undo () :
false;
1510 s_startup_hook_set.insert (
f);
1521 auto p = s_startup_hook_set.find (
f);
1523 if (p != s_startup_hook_set.end ())
1524 s_startup_hook_set.erase (p);
1526 if (s_startup_hook_set.empty ())
1536 s_pre_input_hook_set.insert (
f);
1547 auto p = s_pre_input_hook_set.find (
f);
1549 if (p != s_pre_input_hook_set.end ())
1550 s_pre_input_hook_set.erase (p);
1552 if (s_pre_input_hook_set.empty ())
1562 s_event_hook_set.insert (
f);
1570 auto p = s_event_hook_set.find (
f);
1572 if (p != s_event_hook_set.end ())
1573 s_event_hook_set.erase (p);
1604 return (instance_ok ()
1611 return (instance_ok ())
1655 command_editor::handle_interrupt_signal ()
1693 std::size_t slen = s.length ();
1748 tmpstr = now.strftime (
"%a %b %d");
1750 tmpstr = now.strftime (
"%H:%M:%S");
1752 tmpstr = now.strftime (
"%I:%M:%S");
1754 tmpstr = now.strftime (
"%I:%M %p");
1756 tmpstr = now.strftime (
"%H:%M");
1770 tmpstr = sys::env::get_host_name ();
1772 std::size_t pos = tmpstr.find (
'.');
1774 if (pos != std::string::npos)
1775 tmpstr.resize (pos);
1782 tmpstr = sys::env::get_host_name ();
1803 tmpstr = sys::env::get_program_name ();
1804 tmpstr = sys::env::base_pathname (tmpstr);
1811 tmpstr = sys::env::get_user_name ();
1821 tmpstr = sys::env::get_current_directory ();
1828 std::string home_dir = sys::env::get_home_directory ();
1830 if (c ==
'W' && (home_dir.empty () || tmpstr != home_dir))
1832 if (tmpstr !=
"/" && tmpstr !=
"//")
1834 std::size_t pos = tmpstr.rfind (
'/');
1836 if (pos != std::string::npos && pos != 0)
1837 tmpstr = tmpstr.substr (pos + 1);
1841 tmpstr = sys::env::polite_directory_format (tmpstr);
1848 char number_buffer[32];
1851 sprintf (number_buffer,
"%d", num);
1853 strcpy (number_buffer,
"!");
1854 tmpstr = number_buffer;
1861 char number_buffer[32];
1863 tmpstr = number_buffer;
1874 #if defined (USE_READLINE)
1880 tmpstr[0] = ((c ==
'[')
1904 retval.append (tmpstr);
1939 std::size_t slen = s.length ();
1941 while (i < slen && s[i] >=
'0' && s[i] <
'8')
1944 result = (result * 8) + s[i] -
'0';
1948 if (! digits || result > 0777 || i < slen)
1957 (*current_liboctave_error_handler) (
"%s", std::strerror (err_num));
1963 (*current_liboctave_error_handler) (
"%s", s.c_str ());
1966 OCTAVE_END_NAMESPACE(
octave)
virtual void do_resize_terminal()
static void replace_line(const std::string &text, bool clear_undo=true)
static void set_input_stream(FILE *f)
static void set_quoting_function(quoting_fcn f)
virtual string_vector do_generate_filename_completions(const std::string &text)=0
static bool filename_quoting_desired(bool)
int(* pre_input_hook_fcn)()
virtual FILE * do_get_input_stream()=0
static void add_startup_hook(startup_hook_fcn f)
void(* user_accept_line_fcn)(const std::string &)
static void run_event_hooks()
static void set_completer_quote_characters(const std::string &s)
static int current_command_number()
virtual std::string newline_chars()
virtual user_accept_line_fcn do_get_user_accept_line_function() const
static void blink_matching_paren(bool flag)
static void set_user_accept_line_function(user_accept_line_fcn f)
static string_vector generate_filename_completions(const std::string &text)
virtual std::string do_get_current_line() const =0
static char get_prev_char(int)
virtual void do_set_screen_size(int ht, int wd)
static void remove_startup_hook(startup_hook_fcn f)
virtual std::string do_get_line_buffer() const =0
static void set_filename_quote_characters(const std::string &s)
static FILE * get_input_stream()
static int terminal_rows()
virtual bool do_erase_empty_line(bool)
virtual void do_redisplay()
virtual void do_set_basic_quote_characters(const std::string &)
std::string do_readline(const std::string &prompt)
static std::string readline(const std::string &prompt)
virtual void do_kill_full_line()=0
virtual void do_set_user_accept_line_function(user_accept_line_fcn)
virtual completion_fcn do_get_completion_function() const
virtual FILE * do_get_output_stream()=0
virtual void do_set_name(const std::string &)
virtual char do_get_prev_char(int) const =0
virtual void do_set_filename_quote_characters(const std::string &)
static void set_name(const std::string &n)
virtual void do_set_completer_word_break_characters(const std::string &)
virtual void restore_startup_hook()
virtual void do_set_input_stream(FILE *)=0
std::string m_initial_input
static void set_completer_word_break_characters(const std::string &s)
static void increment_current_command_number()
virtual void do_read_init_file(const std::string &)
static void clear_undo_list()
virtual void do_set_completion_append_character(char)
virtual dequoting_fcn do_get_dequoting_function() const
virtual int do_terminal_cols()
virtual bool do_filename_completion_desired(bool)
static FILE * get_output_stream()
static bool prefer_env_winsize(bool)
static void reset_current_command_number(int n)
virtual char_is_quoted_fcn do_get_char_is_quoted_function() const
int read_octal(const std::string &s)
static void insert_text(const std::string &text)
static bool interrupt(bool=true)
virtual void do_replace_line(const std::string &text, bool clear_undo)=0
virtual void do_re_read_init_file()
static void resize_terminal()
virtual void do_set_output_stream(FILE *)=0
static bool event_loop_interrupted()
static void clear_screen(bool skip_redisplay=false)
static void set_initial_input(const std::string &text)
static void set_output_stream(FILE *f)
void do_interrupt_event_loop(bool arg)
static void accept_line()
static void set_screen_size(int ht, int wd)
virtual void do_set_quoting_function(quoting_fcn)
static void set_basic_word_break_characters(const std::string &s)
static std::string get_current_line()
static bool erase_empty_line(bool flag)
std::string(* quoting_fcn)(const std::string &, int, char)
virtual quoting_fcn do_get_quoting_function() const
virtual void do_set_char_is_quoted_function(char_is_quoted_fcn)
static void add_pre_input_hook(pre_input_hook_fcn f)
virtual int do_terminal_rows()
static void force_default_editor()
static char_is_quoted_fcn get_char_is_quoted_function()
static void set_completion_function(completion_fcn f)
static void remove_event_hook(event_hook_fcn f)
static void set_char_is_quoted_function(char_is_quoted_fcn f)
virtual void do_interrupt(bool)
static bool filename_completion_desired(bool)
static void set_dequoting_function(dequoting_fcn f)
bool do_event_loop_interrupted() const
static quoting_fcn get_quoting_function()
static int insert_initial_input()
static void set_completion_append_character(char c)
virtual void do_clear_screen(bool)
static void restore_terminal_state()
virtual void do_restore_terminal_state()
virtual void do_set_basic_word_break_characters(const std::string &)
virtual std::string do_decode_prompt_string(const std::string &)
virtual void do_set_completion_function(completion_fcn)
virtual void do_blink_matching_paren(bool)
virtual void restore_pre_input_hook()
int(* char_is_quoted_fcn)(const std::string &, int)
virtual void do_clear_undo_list()
static completion_fcn get_completion_function()
static std::string get_line_buffer()
virtual void do_newline()=0
static void kill_full_line()
virtual void do_accept_line()=0
static std::string decode_prompt_string(const std::string &s)
virtual void do_insert_text(const std::string &text)=0
static void interrupt_event_loop(bool flag=true)
static user_accept_line_fcn get_user_accept_line_function()
virtual void set_pre_input_hook(pre_input_hook_fcn)
virtual bool do_prefer_env_winsize(bool)
virtual void do_set_completer_quote_characters(const std::string &)
static dequoting_fcn get_dequoting_function()
static void add_event_hook(event_hook_fcn f)
virtual bool do_filename_quoting_desired(bool)
static void set_basic_quote_characters(const std::string &s)
virtual void do_handle_interrupt_signal()
virtual void do_set_dequoting_function(dequoting_fcn)
std::string(* completion_fcn)(const std::string &, int)
std::string(* dequoting_fcn)(const std::string &, int)
virtual void set_event_hook(event_hook_fcn)
static void re_read_init_file()
static void read_init_file(const std::string &file="")
static void remove_pre_input_hook(pre_input_hook_fcn f)
static int terminal_cols()
virtual void set_startup_hook(startup_hook_fcn)
int(* startup_hook_fcn)()
int do_insert_initial_input()
static int current_number()
static void set_mark(int n)
static int max_input_history()
void resize(octave_idx_type n, const std::string &rfv="")
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
F77_RET_T const F77_DBLE const F77_DBLE * f
bool dir_exists(const std::string &dirname)
std::string fgetl(FILE *f)
std::string tilde_expand(const std::string &name)
char * do_completer_word_break_hook()
const char * octave_rl_line_buffer(void)
int octave_rl_history_search_backward(int, int)
void octave_rl_set_startup_hook(rl_startup_hook_fcn_ptr)
void octave_rl_set_quoting_function(rl_quoting_fcn_ptr)
void octave_rl_re_read_init_file(void)
void octave_rl_set_completer_word_break_characters(const char *)
void octave_rl_set_pre_input_hook(rl_startup_hook_fcn_ptr)
char *(* rl_quoting_fcn_ptr)(char *, int, char *)
void octave_rl_kill_full_line(void)
char octave_rl_prompt_end_ignore(void)
char **(* rl_attempted_completion_fcn_ptr)(const char *, int, int)
void octave_rl_clear_undo_list(void)
void octave_rl_resize_terminal(void)
int octave_rl_history_search_forward(int, int)
void octave_rl_read_init_file(const char *)
void octave_rl_set_dequoting_function(rl_dequoting_fcn_ptr)
void octave_rl_set_basic_quote_characters(const char *)
void octave_rl_clear_screen(int skip_redisplay)
char *(* rl_dequoting_fcn_ptr)(char *, int)
int octave_rl_screen_width(void)
char * octave_rl_filename_completion_function(const char *, int)
char octave_rl_prompt_start_ignore(void)
const char * octave_rl_get_completer_word_break_characters(void)
char * octave_rl_copy_line(void)
void octave_rl_set_terminal_name(const char *)
void octave_rl_restore_terminal_state(void)
char * octave_rl_readline(const char *)
void octave_rl_set_name(const char *)
char ** octave_rl_completion_matches(const char *, rl_completer_fcn_ptr)
int octave_rl_do_undo(void)
int octave_rl_filename_completion_desired(int)
void octave_rl_set_output_stream(FILE *)
FILE * octave_rl_get_input_stream(void)
void octave_rl_set_completion_word_break_hook(rl_completion_hook_fcn_ptr)
void octave_rl_initialize(void)
void octave_rl_set_filename_quote_characters(const char *)
void octave_rl_enable_paren_matching(int)
void octave_rl_set_event_hook(rl_event_hook_fcn_ptr f)
void octave_rl_set_completion_append_character(char)
int octave_rl_screen_height(void)
rl_startup_hook_fcn_ptr octave_rl_get_startup_hook(void)
void octave_rl_set_completion_function(rl_attempted_completion_fcn_ptr)
int octave_rl_point(void)
rl_event_hook_fcn_ptr octave_rl_get_event_hook(void)
rl_pre_input_hook_fcn_ptr octave_rl_get_pre_input_hook(void)
void octave_rl_insert_text(const char *)
int(* rl_char_is_quoted_fcn_ptr)(char *, int)
int octave_rl_erase_empty_line(int)
FILE * octave_rl_get_output_stream(void)
int octave_rl_filename_quoting_desired(int)
void octave_rl_recover_from_interrupt(void)
void octave_rl_add_defun(const char *, rl_fcn_ptr, int)
void octave_rl_set_completer_quote_characters(const char *)
void octave_rl_set_screen_size(int ht, int wd)
void octave_rl_replace_line(const char *s, int clear_undo)
void octave_rl_set_char_is_quoted_function(rl_char_is_quoted_fcn_ptr)
int octave_rl_newline(int, int)
void octave_rl_set_input_stream(FILE *)
int octave_rl_prefer_env_winsize(int)
void octave_rl_redisplay(void)
void octave_rl_set_basic_word_break_characters(const char *)
std::atomic< sig_atomic_t > octave_interrupt_state
volatile std::atomic< bool > octave_signal_caught
char * octave_strdup_wrapper(const char *str)
uid_t octave_geteuid_wrapper(void)