23 #if defined (HAVE_CONFIG_H) 46 #if defined (USE_READLINE) 66 #if defined (USE_READLINE) 89 void do_set_input_stream (FILE *
f);
91 FILE * do_get_input_stream (
void);
93 void do_set_output_stream (FILE *
f);
95 FILE * do_get_output_stream (
void);
97 void do_redisplay (
void);
99 int do_terminal_rows (
void);
101 int do_terminal_cols (
void);
103 void do_clear_screen (
bool skip_redisplay);
105 void do_resize_terminal (
void);
107 void do_set_screen_size (
int ht,
int wd);
111 void do_restore_terminal_state (
void);
113 void do_blink_matching_paren (
bool flag);
115 bool do_erase_empty_line (
bool flag);
117 void do_set_basic_word_break_characters (
const std::string&
s);
119 void do_set_completer_word_break_characters (
const std::string&
s);
121 void do_set_basic_quote_characters (
const std::string&
s);
123 void do_set_filename_quote_characters (
const std::string&
s);
125 void do_set_completer_quote_characters (
const std::string&
s);
127 void do_set_completion_append_character (
char c);
129 void do_set_completion_function (completion_fcn
f);
131 void do_set_quoting_function (quoting_fcn
f);
133 void do_set_dequoting_function (dequoting_fcn
f);
135 void do_set_char_is_quoted_function (char_is_quoted_fcn
f);
137 void do_set_user_accept_line_function (user_accept_line_fcn
f);
139 completion_fcn do_get_completion_function (
void)
const;
141 quoting_fcn do_get_quoting_function (
void)
const;
143 dequoting_fcn do_get_dequoting_function (
void)
const;
145 char_is_quoted_fcn do_get_char_is_quoted_function (
void)
const;
147 user_accept_line_fcn do_get_user_accept_line_function (
void)
const;
156 char do_get_prev_char (
int)
const;
160 void do_kill_full_line (
void);
164 void do_newline (
void);
166 void do_accept_line (
void);
170 void do_clear_undo_list (
void);
172 void set_startup_hook (startup_hook_fcn
f);
174 void restore_startup_hook (
void);
176 void set_pre_input_hook (pre_input_hook_fcn
f);
178 void restore_pre_input_hook (
void);
180 void set_event_hook (event_hook_fcn
f);
182 void restore_event_hook (
void);
184 void do_restore_event_hook (
void);
188 void do_re_read_init_file (
void);
190 bool do_filename_completion_desired (
bool);
192 bool do_filename_quoting_desired (
bool);
194 bool do_prefer_env_winsize (
bool);
196 void do_interrupt (
bool);
198 void do_handle_interrupt_signal (
void);
200 static int operate_and_get_next (
int,
int);
202 static int history_search_backward (
int,
int);
204 static int history_search_forward (
int,
int);
208 startup_hook_fcn previous_startup_hook;
210 pre_input_hook_fcn previous_pre_input_hook;
212 event_hook_fcn previous_event_hook;
214 completion_fcn completion_function;
216 quoting_fcn quoting_function;
218 dequoting_fcn dequoting_function;
220 char_is_quoted_fcn char_is_quoted_function;
222 user_accept_line_fcn user_accept_line_function;
226 static char * command_generator (
const char *
text,
int state);
228 static char * command_quoter (
char *
text,
int match_type,
char *quote_pointer);
229 static char * command_dequoter (
char *
text,
int match_type);
231 static int command_char_is_quoted (
char *
text,
int index);
233 static int command_accept_line (
int count,
int key);
235 static char ** command_completer (
const char *
text,
int start,
int end);
240 std::string gnu_readline::completer_quote_characters =
"";
243 : command_editor (), previous_startup_hook (nullptr),
244 previous_pre_input_hook (nullptr),
245 previous_event_hook (nullptr), completion_function (nullptr),
246 quoting_function (nullptr), dequoting_function (nullptr),
247 char_is_quoted_function (nullptr), user_accept_line_function (nullptr)
258 do_blink_matching_paren (
true);
263 gnu_readline::operate_and_get_next,
269 gnu_readline::history_search_backward,
273 gnu_readline::history_search_forward,
284 gnu_readline::do_readline (
const std::string& prompt,
bool& eof)
290 const char *
p = prompt.c_str ();
307 gnu_readline::do_set_input_stream (FILE *
f)
313 gnu_readline::do_get_input_stream (
void)
319 gnu_readline::do_set_output_stream (FILE *
f)
325 gnu_readline::do_get_output_stream (
void)
331 gnu_readline::do_redisplay (
void)
343 gnu_readline::do_terminal_rows (
void)
347 return sh > 0 ? sh : 24;
351 gnu_readline::do_terminal_cols (
void)
355 return sw > 0 ? sw : 80;
359 gnu_readline::do_clear_screen (
bool skip_redisplay)
365 gnu_readline::do_resize_terminal (
void)
371 gnu_readline::do_set_screen_size (
int ht,
int wd)
377 gnu_readline::newline_chars (
void)
383 gnu_readline::do_restore_terminal_state (
void)
389 gnu_readline::do_blink_matching_paren (
bool flag)
395 gnu_readline::do_erase_empty_line (
bool flag)
401 gnu_readline::do_set_basic_word_break_characters (
const std::string&
s)
407 gnu_readline::do_set_completer_word_break_characters (
const std::string&
s)
417 gnu_readline::do_set_basic_quote_characters (
const std::string&
s)
423 gnu_readline::do_set_filename_quote_characters (
const std::string&
s)
429 gnu_readline::do_set_completer_quote_characters (
const std::string&
s)
431 completer_quote_characters =
s;
435 gnu_readline::do_set_completion_append_character (
char c)
441 gnu_readline::do_set_completion_function (completion_fcn
f)
443 completion_function =
f;
446 = (
f ? gnu_readline::command_completer :
nullptr);
452 gnu_readline::do_set_quoting_function (quoting_fcn
f)
454 quoting_function =
f;
457 = (
f ? gnu_readline::command_quoter :
nullptr);
463 gnu_readline::do_set_dequoting_function (dequoting_fcn
f)
465 dequoting_function =
f;
468 = (
f ? gnu_readline::command_dequoter :
nullptr);
474 gnu_readline::do_set_char_is_quoted_function (char_is_quoted_fcn
f)
476 char_is_quoted_function =
f;
479 = (
f ? gnu_readline::command_char_is_quoted :
nullptr);
485 gnu_readline::do_set_user_accept_line_function (user_accept_line_fcn
f)
487 user_accept_line_function =
f;
497 gnu_readline::completion_fcn
498 gnu_readline::do_get_completion_function (
void)
const 500 return completion_function;
503 gnu_readline::quoting_fcn
504 gnu_readline::do_get_quoting_function (
void)
const 506 return quoting_function;
509 gnu_readline::dequoting_fcn
510 gnu_readline::do_get_dequoting_function (
void)
const 512 return dequoting_function;
515 gnu_readline::char_is_quoted_fcn
516 gnu_readline::do_get_char_is_quoted_function (
void)
const 518 return char_is_quoted_function;
521 gnu_readline::user_accept_line_fcn
522 gnu_readline::do_get_user_accept_line_function (
void)
const 524 return user_accept_line_function;
531 looks_like_filename (
const char *
line,
char delim)
535 const char *
s = strrchr (
line, delim);
542 if (
s[1] ==
'~' || (
f &&
f !=
s))
548 candidate_filename = candidate_filename.substr (0,
f -
s);
552 if (candidate_filename[0] ==
'~')
556 sys::file_stat
fs (candidate_filename);
578 const char *l =
line.c_str ();
580 if (looks_like_filename (l,
' ') || looks_like_filename (l,
'\'')
581 || looks_like_filename (l,
'"'))
584 completer_quote_characters.c_str ());
597 gnu_readline::do_generate_filename_completions (
const std::string&
text)
635 gnu_readline::do_get_line_buffer (
void)
const 641 gnu_readline::do_get_current_line (
void)
const 653 gnu_readline::do_get_prev_char (
int offset)
const 658 return p > offset ? buf[
p - offset - 1] :
'\0';
662 gnu_readline::do_replace_line (
const std::string&
text,
bool clear_undo)
668 gnu_readline::do_kill_full_line (
void)
680 gnu_readline::do_newline (
void)
686 gnu_readline::do_accept_line (
void)
688 command_accept_line (1,
'\n');
692 gnu_readline::do_undo (
void)
698 gnu_readline::do_clear_undo_list ()
704 gnu_readline::set_startup_hook (startup_hook_fcn
f)
708 if (
f != previous_startup_hook)
713 gnu_readline::restore_startup_hook (
void)
719 gnu_readline::set_pre_input_hook (pre_input_hook_fcn
f)
723 if (
f != previous_pre_input_hook)
728 gnu_readline::restore_pre_input_hook (
void)
734 gnu_readline::set_event_hook (event_hook_fcn
f)
742 gnu_readline::restore_event_hook (
void)
754 gnu_readline::do_re_read_init_file (
void)
760 gnu_readline::do_filename_completion_desired (
bool arg)
766 gnu_readline::do_filename_quoting_desired (
bool arg)
772 gnu_readline::do_prefer_env_winsize (
bool arg)
778 gnu_readline::do_interrupt (
bool arg)
784 gnu_readline::do_handle_interrupt_signal (
void)
791 throw octave::interrupt_exception ();
795 gnu_readline::operate_and_get_next (
int ,
int )
799 command_editor::accept_line ();
803 int x_where = command_history::where ();
807 if ((command_history::is_stifled ()
808 && (x_length >= command_history::max_input_history ()))
809 || (x_where >= x_length - 1))
810 command_history::set_mark (x_where);
812 command_history::set_mark (x_where + 1);
814 command_editor::add_startup_hook (command_history::goto_mark);
820 gnu_readline::history_search_backward (
int count,
int c)
826 gnu_readline::history_search_forward (
int count,
int c)
832 gnu_readline::command_generator (
const char *
text,
int state)
836 completion_fcn
f = command_editor::get_completion_function ();
840 size_t len =
tmp.length ();
844 retval =
static_cast<char *
> (std::malloc (len+1));
853 gnu_readline::command_quoter (
char *
text,
int matches,
char *qcp)
857 quoting_fcn
f = command_editor::get_quoting_function ();
861 size_t len =
tmp.length ();
865 retval =
static_cast<char *
> (std::malloc (len+1));
874 gnu_readline::command_dequoter (
char *
text,
int quote)
878 dequoting_fcn
f = command_editor::get_dequoting_function ();
882 size_t len =
tmp.length ();
886 retval =
static_cast<char *
> (std::malloc (len+1));
895 gnu_readline::command_char_is_quoted (
char *
text,
int quote)
897 char_is_quoted_fcn
f = command_editor::get_char_is_quoted_function ();
899 return f (
text, quote);
903 gnu_readline::command_accept_line (
int count,
int key)
905 user_accept_line_fcn
f = command_editor::get_user_accept_line_function ();
916 gnu_readline::command_completer (
const char *
text,
int,
int)
918 char **matches =
nullptr;
932 :
command_editor (), input_stream (stdin), output_stream (stdout) { }
944 void do_set_input_stream (FILE *
f);
946 FILE * do_get_input_stream (
void);
948 void do_set_output_stream (FILE *
f);
950 FILE * do_get_output_stream (
void);
958 char do_get_prev_char (
int)
const;
962 void do_kill_full_line (
void);
966 void do_newline (
void);
968 void do_accept_line (
void);
978 default_command_editor::do_readline (
const std::string& prompt,
bool& eof)
981 std::fflush (output_stream);
987 default_command_editor::do_set_input_stream (FILE *
f)
993 default_command_editor::do_get_input_stream (
void)
999 default_command_editor::do_set_output_stream (FILE *
f)
1005 default_command_editor::do_get_output_stream (
void)
1007 return output_stream;
1011 default_command_editor::do_generate_filename_completions (
const std::string&)
1018 default_command_editor::do_get_line_buffer (
void)
const 1024 default_command_editor::do_get_current_line (
void)
const 1031 default_command_editor::do_get_prev_char (
int)
const 1043 default_command_editor::do_kill_full_line (
void)
1055 default_command_editor::do_newline (
void)
1061 default_command_editor::do_accept_line (
void)
1067 command_editor::instance_ok (
void)
1073 make_command_editor ();
1077 instance->set_event_hook (event_handler);
1084 (*current_liboctave_error_handler)
1085 (
"unable to create command history object!");
1091 command_editor::make_command_editor (
void)
1093 #if defined (USE_READLINE) 1101 command_editor::force_default_editor (
void)
1111 instance->initial_input =
text;
1115 command_editor::insert_initial_input (
void)
1117 return instance_ok () ? instance->do_insert_initial_input () : 0;
1121 command_editor::startup_handler (
void)
1123 for (startup_hook_fcn
f : startup_hook_set)
1133 command_editor::pre_input_handler (
void)
1135 for (pre_input_hook_fcn
f : pre_input_hook_set)
1145 command_editor::event_handler (
void)
1148 handle_interrupt_signal ();
1152 std::set<event_hook_fcn> hook_set (event_hook_set);
1156 for (event_hook_fcn
f : hook_set)
1169 instance->do_set_name (n);
1177 return readline (prompt, eof);
1187 if (! instance->initial_input.empty ())
1188 add_pre_input_hook (command_editor::insert_initial_input);
1190 retval = instance->do_readline (prompt, eof);
1197 command_editor::set_input_stream (FILE *
f)
1200 instance->do_set_input_stream (
f);
1204 command_editor::get_input_stream (
void)
1206 return (instance_ok ())
1207 ? instance->do_get_input_stream () :
nullptr;
1211 command_editor::set_output_stream (FILE *
f)
1214 instance->do_set_output_stream (
f);
1218 command_editor::get_output_stream (
void)
1220 return (instance_ok ())
1221 ? instance->do_get_output_stream () :
nullptr;
1225 command_editor::redisplay (
void)
1228 instance->do_redisplay ();
1232 command_editor::terminal_rows (
void)
1234 return (instance_ok ())
1235 ? instance->do_terminal_rows () : -1;
1239 command_editor::terminal_cols (
void)
1241 return (instance_ok ())
1242 ? instance->do_terminal_cols () : -1;
1246 command_editor::clear_screen (
bool skip_redisplay)
1249 instance->do_clear_screen (skip_redisplay);
1253 command_editor::resize_terminal (
void)
1256 instance->do_resize_terminal ();
1260 command_editor::set_screen_size (
int ht,
int wd)
1263 instance->do_set_screen_size (ht, wd);
1269 return (instance_ok ())
1270 ? instance->do_decode_prompt_string (
s) :
"";
1274 command_editor::current_command_number (
void)
1276 return (instance_ok ())
1277 ? instance->command_number : 0;
1281 command_editor::reset_current_command_number (
int n)
1284 instance->command_number = n;
1288 command_editor::increment_current_command_number (
void)
1291 instance->command_number++;
1295 command_editor::restore_terminal_state (
void)
1298 instance->do_restore_terminal_state ();
1302 command_editor::blink_matching_paren (
bool flag)
1305 instance->do_blink_matching_paren (flag);
1309 command_editor::erase_empty_line (
bool flag)
1311 return instance_ok () ? instance->do_erase_empty_line (flag) :
false;
1318 instance->do_set_basic_word_break_characters (
s);
1325 instance->do_set_completer_word_break_characters (
s);
1332 instance->do_set_basic_quote_characters (
s);
1339 instance->do_set_filename_quote_characters (
s);
1346 instance->do_set_completer_quote_characters (
s);
1350 command_editor::set_completion_append_character (
char c)
1353 instance->do_set_completion_append_character (
c);
1357 command_editor::set_completion_function (completion_fcn
f)
1360 instance->do_set_completion_function (
f);
1364 command_editor::set_quoting_function (quoting_fcn
f)
1367 instance->do_set_quoting_function (
f);
1371 command_editor::set_dequoting_function (dequoting_fcn
f)
1374 instance->do_set_dequoting_function (
f);
1378 command_editor::set_char_is_quoted_function (char_is_quoted_fcn
f)
1381 instance->do_set_char_is_quoted_function (
f);
1385 command_editor::set_user_accept_line_function (user_accept_line_fcn
f)
1388 instance->do_set_user_accept_line_function (
f);
1391 command_editor::completion_fcn
1392 command_editor::get_completion_function (
void)
1394 return (instance_ok ())
1395 ? instance->do_get_completion_function () :
nullptr;
1398 command_editor::quoting_fcn
1399 command_editor::get_quoting_function (
void)
1401 return (instance_ok ())
1402 ? instance->do_get_quoting_function () :
nullptr;
1405 command_editor::dequoting_fcn
1406 command_editor::get_dequoting_function (
void)
1408 return (instance_ok ())
1409 ? instance->do_get_dequoting_function () :
nullptr;
1412 command_editor::char_is_quoted_fcn
1413 command_editor::get_char_is_quoted_function (
void)
1415 return (instance_ok ())
1416 ? instance->do_get_char_is_quoted_function () :
nullptr;
1419 command_editor::user_accept_line_fcn
1420 command_editor::get_user_accept_line_function (
void)
1422 return (instance_ok ())
1423 ? instance->do_get_user_accept_line_function () :
nullptr;
1429 return (instance_ok ())
1434 command_editor::get_line_buffer (
void)
1436 return (instance_ok ()) ? instance->do_get_line_buffer () :
"";
1440 command_editor::get_current_line (
void)
1442 return (instance_ok ()) ? instance->do_get_current_line () :
"";
1448 command_editor::get_prev_char (
int offset)
1450 return (instance_ok ()) ? instance->do_get_prev_char (offset) :
'\0';
1457 instance->do_replace_line (
text, clear_undo);
1461 command_editor::kill_full_line (
void)
1464 instance->do_kill_full_line ();
1471 instance->do_insert_text (
text);
1475 command_editor::newline (
void)
1478 instance->do_newline ();
1482 command_editor::accept_line (
void)
1485 instance->do_accept_line ();
1489 command_editor::undo (
void)
1491 return instance_ok () ? instance->do_undo () :
false;
1495 command_editor::clear_undo_list (
void)
1498 instance->do_clear_undo_list ();
1502 command_editor::add_startup_hook (startup_hook_fcn
f)
1506 startup_hook_set.insert (
f);
1508 instance->set_startup_hook (startup_handler);
1513 command_editor::remove_startup_hook (startup_hook_fcn
f)
1517 auto p = startup_hook_set.find (
f);
1519 if (
p != startup_hook_set.end ())
1520 startup_hook_set.erase (
p);
1522 if (startup_hook_set.empty ())
1523 instance->restore_startup_hook ();
1528 command_editor::add_pre_input_hook (pre_input_hook_fcn
f)
1532 pre_input_hook_set.insert (
f);
1534 instance->set_pre_input_hook (pre_input_handler);
1539 command_editor::remove_pre_input_hook (pre_input_hook_fcn
f)
1543 auto p = pre_input_hook_set.find (
f);
1545 if (
p != pre_input_hook_set.end ())
1546 pre_input_hook_set.erase (
p);
1548 if (pre_input_hook_set.empty ())
1549 instance->restore_pre_input_hook ();
1554 command_editor::add_event_hook (event_hook_fcn
f)
1558 event_hook_set.insert (
f);
1562 command_editor::remove_event_hook (event_hook_fcn
f)
1566 auto p = event_hook_set.find (
f);
1568 if (
p != event_hook_set.end ())
1569 event_hook_set.erase (
p);
1574 command_editor::run_event_hooks (
void)
1586 instance->do_read_init_file (
file);
1591 command_editor::re_read_init_file (
void)
1594 instance->do_re_read_init_file ();
1598 command_editor::filename_completion_desired (
bool arg)
1600 return (instance_ok ())
1601 ? instance->do_filename_completion_desired (
arg) :
false;
1605 command_editor::filename_quoting_desired (
bool arg)
1607 return (instance_ok ())
1608 ? instance->do_filename_quoting_desired (
arg) :
false;
1612 command_editor::prefer_env_winsize (
bool arg)
1614 return (instance_ok ())
1615 ? instance->do_prefer_env_winsize (
arg) :
false;
1619 command_editor::interrupt (
bool arg)
1626 retval = instance->interrupted;
1628 instance->do_interrupt (
arg);
1630 instance->interrupted =
arg;
1639 command_editor::handle_interrupt_signal (
void)
1642 instance->do_handle_interrupt_signal ();
1677 size_t slen =
s.length ();
1702 int n = read_octal (
s.substr (
i, 3));
1732 tmpstr =
now.strftime (
"%a %b %d");
1734 tmpstr =
now.strftime (
"%H:%M:%S");
1736 tmpstr =
now.strftime (
"%I:%M:%S");
1738 tmpstr =
now.strftime (
"%I:%M %p");
1740 tmpstr =
now.strftime (
"%H:%M");
1754 tmpstr = sys::env::get_host_name ();
1756 size_t pos = tmpstr.find (
'.');
1758 if (pos != std::string::npos)
1759 tmpstr.resize (pos);
1766 tmpstr = sys::env::get_host_name ();
1773 tmpstr = newline_chars ();
1787 tmpstr = sys::env::get_program_name ();
1788 tmpstr = sys::env::base_pathname (tmpstr);
1795 tmpstr = sys::env::get_user_name ();
1805 tmpstr = sys::env::get_current_directory ();
1812 std::string home_dir = sys::env::get_home_directory ();
1814 if (
c ==
'W' && (home_dir.empty () || tmpstr != home_dir))
1816 if (tmpstr !=
"/" && tmpstr !=
"//")
1818 size_t pos = tmpstr.rfind (
'/');
1820 if (pos != std::string::npos && pos != 0)
1821 tmpstr = tmpstr.substr (pos + 1);
1825 tmpstr = sys::env::polite_directory_format (tmpstr);
1832 char number_buffer[32];
1833 int num = command_history::current_number ();
1835 sprintf (number_buffer,
"%d", num);
1837 strcpy (number_buffer,
"!");
1838 tmpstr = number_buffer;
1845 char number_buffer[32];
1846 sprintf (number_buffer,
"%d", command_number);
1847 tmpstr = number_buffer;
1858 #if defined (USE_READLINE) 1864 tmpstr[0] = ((
c ==
'[')
1899 command_editor::do_insert_initial_input (
void)
1905 do_insert_text (
input);
1923 size_t slen =
s.length ();
1925 while (
i < slen &&
s[
i] >=
'0' &&
s[
i] <
'8')
1932 if (! digits ||
result > 0777 ||
i < slen)
1941 (*current_liboctave_error_handler) (
"%s", std::strerror (err_num));
1947 (*current_liboctave_error_handler) (
"%s",
s.c_str ());
int octave_rl_do_undo(void)
int octave_rl_newline(int, int)
void octave_rl_set_dequoting_function(rl_dequoting_fcn_ptr)
volatile sig_atomic_t octave_signal_caught
char *(* rl_dequoting_fcn_ptr)(char *, int)
uid_t octave_geteuid_wrapper(void)
char * octave_rl_readline(const char *)
For example cd octave end example noindent changes the current working directory to file
char *(* rl_quoting_fcn_ptr)(char *, int, char *)
default_command_editor(void)
char * do_completer_word_break_hook()
void octave_rl_set_terminal_name(const char *)
void octave_rl_set_completion_word_break_hook(rl_completion_hook_fcn_ptr)
void octave_rl_redisplay(void)
int octave_rl_filename_quoting_desired(int)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
int octave_rl_screen_width(void)
std::string tilde_expand(const std::string &name)
void octave_rl_set_event_hook(rl_event_hook_fcn_ptr f)
void error(const char *fmt,...)
void octave_rl_clear_undo_list(void)
static mutex event_hook_lock
void octave_rl_set_completion_function(rl_attempted_completion_fcn_ptr)
int octave_rl_erase_empty_line(int)
void octave_rl_set_basic_word_break_characters(const char *)
char * octave_rl_get_completer_word_break_characters(void)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
void octave_rl_set_basic_quote_characters(const char *)
char octave_rl_prompt_end_ignore(void)
void octave_rl_set_completer_quote_characters(const char *)
void octave_rl_resize_terminal(void)
static std::string getenv(const std::string &name)
octave_value resize(const dim_vector &dv, bool fill=false) const
char octave_rl_prompt_start_ignore(void)
int octave_rl_point(void)
void octave_rl_restore_terminal_state(void)
char **(* rl_attempted_completion_fcn_ptr)(const char *, int, int)
fputs(in, "these\re\ome\trings\)
int octave_rl_filename_completion_desired(int)
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
void octave_rl_clear_screen(int skip_redisplay)
int octave_rl_history_search_forward(int, int)
void octave_rl_read_init_file(const char *)
void octave_rl_recover_from_interrupt(void)
void octave_rl_set_completer_word_break_characters(const char *)
static std::set< pre_input_hook_fcn > pre_input_hook_set
void octave_rl_set_filename_quote_characters(const char *)
void octave_rl_initialize(void)
sig_atomic_t octave_interrupt_state
void octave_rl_set_pre_input_hook(rl_startup_hook_fcn_ptr)
static const char dir_sep_char
void octave_rl_enable_paren_matching(int)
char ** octave_rl_completion_matches(const char *, rl_completer_fcn_ptr)
void octave_rl_set_completion_append_character(char)
void octave_rl_set_screen_size(int ht, int wd)
OCTAVE_EXPORT octave_value_list or cell arrays Arguments are concatenated vertically The returned values are padded with blanks as needed to make each row of the string array have the same length Empty input strings are significant and will concatenated in the output For numerical input
char * octave_rl_filename_completion_function(const char *, int)
int(* event_hook_fcn)(void)
static std::set< event_hook_fcn > event_hook_set
void octave_rl_set_name(const char *)
With real return the complex result
void octave_rl_insert_text(const char *)
int(* rl_char_is_quoted_fcn_ptr)(char *, int)
static uint32_t state[624]
int octave_rl_prefer_env_winsize(int)
OCTAVE_EXPORT octave_value_list the first data row corresponds to an index of zero The a spreadsheet style form such as the file is read until end of file is reached The such as text
char * octave_rl_copy_line(void)
int(* startup_hook_fcn)(void)
void octave_rl_set_startup_hook(rl_startup_hook_fcn_ptr)
char * octave_strdup_wrapper(const char *str)
rl_event_hook_fcn_ptr octave_rl_get_event_hook(void)
std::string(* completion_fcn)(const std::string &, int)
octave::sys::file_stat fs(filename)
int(* pre_input_hook_fcn)(void)
void octave_rl_kill_full_line(void)
rl_pre_input_hook_fcn_ptr octave_rl_get_pre_input_hook(void)
void octave_rl_re_read_init_file(void)
const char * octave_rl_line_buffer(void)
FILE * octave_rl_get_input_stream(void)
int octave_rl_screen_height(void)
void octave_rl_add_defun(const char *, rl_fcn_ptr, int)
void octave_rl_replace_line(const char *s, int clear_undo)
static command_editor * instance
FILE * octave_rl_get_output_stream(void)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
rl_startup_hook_fcn_ptr octave_rl_get_startup_hook(void)
void octave_rl_set_char_is_quoted_function(rl_char_is_quoted_fcn_ptr)
void octave_rl_set_quoting_function(rl_quoting_fcn_ptr)
int octave_rl_history_search_backward(int, int)
static std::set< startup_hook_fcn > startup_hook_set
std::string octave_fgetl(FILE *f)
void octave_rl_set_input_stream(FILE *)
void octave_rl_set_output_stream(FILE *)