23 #if defined (HAVE_CONFIG_H) 27 #if defined (USE_READLINE) 32 #include <readline/readline.h> 36 #define OCTAVE_RL_SAVE_STRING(ss, s) \ 37 static char *ss = 0; \ 45 ss = malloc (strlen (s) + 1); \ 59 rl_get_screen_size (&rows, &cols);
67 rl_get_screen_size (&rows, &cols);
74 rl_variable_bind (
"blink-matching-paren",
val ?
"1" :
"0");
80 int retval = rl_erase_empty_line;
81 rl_erase_empty_line =
val;
108 rl_voidfunc_t *saved_redisplay_function = rl_redisplay_function;
112 rl_clear_screen (ignore1, ignore2);
114 rl_redisplay_function = saved_redisplay_function;
117 rl_clear_screen (ignore1, ignore2);
123 rl_resize_terminal ();
129 rl_set_screen_size (ht, wd);
135 if (rl_deprep_term_function)
136 rl_deprep_term_function ();
142 return rl_copy_text (0, rl_end);
148 rl_replace_line (
s, clear_undo);
154 rl_kill_full_line (0, 0);
166 return rl_newline (count, key);
172 return rl_line_buffer;
184 return rl_do_undo ();
192 rl_free_undo_list ();
201 OCTAVE_RL_SAVE_STRING (
nm, n);
203 rl_readline_name =
nm;
209 rl_re_read_init_file (0, 0);
215 return readline (prompt);
245 rl_read_init_file (
f);
251 rl_re_read_init_file (0, 0);
257 int retval = rl_filename_completion_desired;
258 rl_filename_completion_desired =
arg;
265 int retval = rl_filename_quoting_desired;
266 rl_filename_quoting_desired =
arg;
273 int retval = rl_prefer_env_winsize;
274 rl_prefer_env_winsize =
arg;
287 return rl_filename_completion_function (
text,
state);
293 OCTAVE_RL_SAVE_STRING (ss,
s);
295 rl_basic_word_break_characters = ss;
301 OCTAVE_RL_SAVE_STRING (ss,
s);
303 rl_completer_word_break_characters = ss;
309 return rl_completer_word_break_characters;
315 rl_completion_word_break_hook =
f;
321 OCTAVE_RL_SAVE_STRING (ss,
s);
323 rl_basic_quote_characters = ss;
329 OCTAVE_RL_SAVE_STRING (ss,
s);
331 rl_filename_quote_characters = ss;
337 OCTAVE_RL_SAVE_STRING (ss,
s);
339 rl_completer_quote_characters = ss;
345 rl_completion_append_character =
c;
351 rl_attempted_completion_function =
f;
357 rl_filename_quoting_function =
f;
363 rl_filename_dequoting_function =
f;
369 rl_char_is_quoted_p =
f;
381 return rl_startup_hook;
387 rl_pre_input_hook =
f;
393 return rl_pre_input_hook;
405 return rl_event_hook;
411 return rl_completion_matches (
text,
f);
417 return RL_PROMPT_START_IGNORE;
423 return RL_PROMPT_END_IGNORE;
429 rl_add_defun (
name,
f, key);
435 OCTAVE_RL_SAVE_STRING (saved_term, term);
437 rl_terminal_name = saved_term;
443 #if defined (__WIN32__) && ! defined (__CYGWIN__) 444 rl_catch_signals = 0;
453 return rl_history_search_forward (count, ignore);
459 return rl_history_search_backward (count, ignore);
477 rl_free_line_state ();
478 rl_cleanup_after_signal ();
479 rl_reset_after_signal ();
int octave_rl_do_undo(void)
int octave_rl_newline(int, int)
void octave_rl_set_dequoting_function(rl_dequoting_fcn_ptr)
char *(* rl_dequoting_fcn_ptr)(char *, int)
char *(* rl_completion_hook_fcn_ptr)(void)
char * octave_rl_readline(const char *)
char *(* rl_quoting_fcn_ptr)(char *, int, char *)
void octave_rl_set_terminal_name(const char *)
void octave_rl_set_completion_word_break_hook(rl_completion_hook_fcn_ptr)
int(* rl_event_hook_fcn_ptr)(void)
void octave_rl_redisplay(void)
int octave_rl_filename_quoting_desired(int)
identity matrix If supplied two scalar respectively For allows like xample val
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)
void octave_rl_set_event_hook(rl_event_hook_fcn_ptr f)
void octave_rl_clear_undo_list(void)
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)
char *(* rl_completer_fcn_ptr)(const char *, int)
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)
int octave_rl_filename_completion_desired(int)
int(* rl_pre_input_hook_fcn_ptr)(void)
nd deftypefn *std::string name
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 *)
void octave_rl_set_filename_quote_characters(const char *)
void octave_rl_initialize(void)
void octave_rl_set_pre_input_hook(rl_startup_hook_fcn_ptr)
int(* rl_startup_hook_fcn_ptr)(void)
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)
char * octave_rl_filename_completion_function(const char *, int)
int(* rl_fcn_ptr)(int, int)
void octave_rl_set_name(const char *)
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)
char * octave_rl_copy_line(void)
void octave_rl_set_startup_hook(rl_startup_hook_fcn_ptr)
rl_event_hook_fcn_ptr octave_rl_get_event_hook(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)
FILE * octave_rl_get_output_stream(void)
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)
void octave_rl_set_input_stream(FILE *)
void octave_rl_set_output_stream(FILE *)