23 #if ! defined (octave_cmd_hist_h)
24 #define octave_cmd_hist_h 1
26 #include "octave-config.h"
41 : initialized (
false), ignoring_additions (
false), history_control (0),
42 lines_in_file (0), lines_this_session (0), xfile (), xsize (-1) { }
50 static bool is_initialized (
void);
56 static void process_histcontrol (
const std::string&);
60 static void set_size (
int);
62 static int size (
void);
64 static void ignore_entries (
bool =
true);
66 static bool ignoring_entries (
void);
70 static void remove (
int);
72 static void clear (
void);
74 static int where (
void);
78 static int max_input_history (
void);
80 static int base (
void);
82 static int current_number (
void);
84 static void stifle (
int);
86 static int unstifle (
void);
88 static int is_stifled (
void);
90 static void set_mark (
int n);
95 static int goto_mark (
void);
97 static void read (
bool =
true);
101 static void read_range (
int = -1,
int = -1,
bool =
true);
103 static void read_range (
const std::string&,
int = -1,
int = -1,
110 static void truncate_file (
const std::string& =
"",
int = -1);
116 static void replace_entry (
int,
const std::string&);
118 static void clean_up_and_save (
const std::string& =
"",
int = -1);
128 static bool instance_ok (
void);
130 static void make_command_history (
void);
147 virtual void do_process_histcontrol (
const std::string&);
151 virtual void do_initialize (
bool,
const std::string&,
int,
154 virtual bool do_is_initialized (
void)
const;
156 virtual void do_set_size (
int);
158 virtual int do_size (
void)
const;
160 virtual void do_ignore_entries (
bool);
162 virtual bool do_ignoring_entries (
void)
const;
166 virtual void do_remove (
int);
168 virtual void do_clear (
void);
170 virtual int do_where (
void)
const;
172 virtual int do_length (
void)
const;
174 virtual int do_max_input_history (
void)
const;
176 virtual int do_base (
void)
const;
178 virtual int do_current_number (
void)
const;
180 virtual void do_stifle (
int);
182 virtual int do_unstifle (
void);
184 virtual int do_is_stifled (
void)
const;
186 virtual void do_set_mark (
int);
188 virtual int do_goto_mark (
void);
192 virtual void do_read_range (
const std::string&,
int,
int,
bool);
198 virtual void do_truncate_file (
const std::string&,
int)
const;
204 virtual void do_replace_entry (
int,
const std::string&);
206 virtual void do_clean_up_and_save (
const std::string&,
int);
236 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
238 OCTAVE_DEPRECATED (
"use 'octave::command_history' instead")
239 typedef
octave::command_history command_history;
static void cleanup_instance(void)
Octave interface to the compression and uncompression libraries.
For example cd octave end example noindent changes the current working directory to file
The value of lines which begin with a space character are not saved in the history list A value of all commands are saved on the history list
void error(const char *fmt,...)
virtual ~command_history(void)
static command_history * instance
virtual std::string do_histcontrol(void) const
static void initialize(void)
static void clear(octave::dynamic_library &oct_file)
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