23 #if defined (HAVE_CONFIG_H) 29 #if defined (USE_READLINE) 35 #include <readline/history.h> 43 check_history_control (
const char *
line,
int history_control)
48 if (history_control == 0)
59 temp = previous_history ();
76 hc_erasedups (
const char *
line)
82 while ((temp = previous_history ()))
99 if (check_history_control (
line, history_control))
118 return where_history ();
124 return history_length;
130 return max_input_history;
148 return unstifle_history ();
154 return history_is_stifled ();
160 return history_set_pos (n);
166 return read_history (
f);
178 return read_history_range (
f,
b,
e);
184 return write_history (
f);
190 return append_history (n,
f);
196 return history_truncate_file (
f, n);
202 HIST_ENTRY *discard = remove_history (n);
205 free (discard->line);
223 if (history_set_pos (n))
225 h = current_history ();
239 HIST_ENTRY *
h = history_get (n);
252 HIST_ENTRY **hlist = 0;
266 hlist = history_list ();
277 beg = (limit < 0 || end < limit) ? 0 : (end - limit);
279 retval = malloc ((
size_t) (end - beg + 1) *
sizeof (
char **));
282 for (
i = beg;
i < end;
i++)
286 char *
tmp = malloc (len + 64);
289 sprintf (
tmp,
"%5d %s",
i + history_base,
306 HIST_ENTRY *discard = replace_history_entry (which,
line, 0);
309 free (discard->line);
void octave_replace_history_entry(int, const char *)
void octave_stifle_history(int)
char * octave_history_get(int n)
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_history_is_stifled(void)
int octave_add_history(const char *, int)
int octave_history_truncate_file(const char *, int)
int octave_max_input_history(void)
int octave_append_history(int, const char *)
void octave_remove_history(int)
char * octave_history_goto_mark(int n)
int octave_history_length(void)
int octave_history_base(void)
bool strcmp(const T &str_a, const T &str_b)
True if strings are the same.
int octave_read_history(const char *)
T::size_type strlen(const typename T::value_type *str)
int octave_where_history(void)
char ** octave_history_list(int, int)
void octave_using_history(void)
int octave_read_history_range(const char *, int, int)
int octave_history_set_pos(int)
int octave_write_history(const char *)
void octave_clear_history(void)
line(const graphics_handle &mh, const graphics_handle &p)
int octave_unstifle_history(void)