GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
cmd-hist.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1996-2018 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if defined (HAVE_CONFIG_H)
24 # include "config.h"
25 #endif
26 
27 #include <cstring>
28 
29 #include <fstream>
30 #include <iostream>
31 #include <sstream>
32 #include <string>
33 
34 #include "cmd-edit.h"
35 #include "cmd-hist.h"
36 #include "file-ops.h"
37 #include "lo-error.h"
38 #include "singleton-cleanup.h"
39 #include "str-vec.h"
40 
41 #if defined (USE_READLINE)
42 #include <cstdlib>
43 
44 #include "oct-rl-hist.h"
45 
46 #include "file-stat.h"
47 #endif
48 
49 namespace octave
50 {
51  command_history *command_history::instance = nullptr;
52 
53 #if defined (USE_READLINE)
54 
55  class
56  gnu_history : public command_history
57  {
58  public:
59 
60  gnu_history (void)
61  : command_history (), mark (0) { }
62 
63  ~gnu_history (void) = default;
64 
65  void do_process_histcontrol (const std::string&);
66 
67  std::string do_histcontrol (void) const;
68 
69  bool do_add (const std::string&);
70 
71  void do_remove (int);
72 
73  void do_clear (void);
74 
75  int do_where (void) const;
76 
77  int do_length (void) const;
78 
79  int do_max_input_history (void) const;
80 
81  int do_base (void) const;
82 
83  int do_current_number (void) const;
84 
85  void do_stifle (int);
86 
87  int do_unstifle (void);
88 
89  int do_is_stifled (void) const;
90 
91  void do_set_mark (int);
92 
93  int do_goto_mark (void);
94 
95  void do_read (const std::string&, bool);
96 
97  void do_read_range (const std::string&, int, int, bool);
98 
99  void do_write (const std::string&) const;
100 
101  void do_append (const std::string&);
102 
103  void do_truncate_file (const std::string&, int) const;
104 
105  string_vector do_list (int, bool) const;
106 
107  std::string do_get_entry (int) const;
108 
109  void do_replace_entry (int, const std::string&);
110 
111  void do_clean_up_and_save (const std::string&, int);
112 
113  private:
114 
115  int mark;
116  };
117 
118  void
119  gnu_history::do_process_histcontrol (const std::string& control_arg)
120  {
121  history_control = 0;
122 
123  size_t len = control_arg.length ();
124  size_t beg = 0;
125 
126  while (beg < len)
127  {
128  if (control_arg[beg] == ':')
129  beg++;
130  else
131  {
132  size_t end = control_arg.find (':', beg);
133 
134  if (end == std::string::npos)
135  end = len;
136 
137  std::string tmp = control_arg.substr (beg, end-beg);
138 
139  if (tmp == "erasedups")
140  history_control |= HC_ERASEDUPS;
141  else if (tmp == "ignoreboth")
142  history_control |= (HC_IGNDUPS | HC_IGNSPACE);
143  else if (tmp == "ignoredups")
144  history_control |= HC_IGNDUPS;
145  else if (tmp == "ignorespace")
146  history_control |= HC_IGNSPACE;
147  else
149  ("Octave:history-control",
150  "unknown histcontrol directive %s", tmp.c_str ());
151 
152  if (end != std::string::npos)
153  beg = end + 1;
154  }
155  }
156  }
157 
159  gnu_history::do_histcontrol (void) const
160  {
161  // FIXME: instead of reconstructing this value, should we just save
162  // the string we were given when constructing the command_history object?
163 
165 
166  if (history_control & HC_IGNSPACE)
167  retval.append ("ignorespace");
168 
169  if (history_control & HC_IGNDUPS)
170  {
171  if (retval.length () > 0)
172  retval += ':';
173 
174  retval.append ("ignoredups");
175  }
176 
177  if (history_control & HC_ERASEDUPS)
178  {
179  if (retval.length () > 0)
180  retval += ':';
181 
182  retval.append ("erasedups");
183  }
184 
185  return retval;
186  }
187 
188  bool
189  gnu_history::do_add (const std::string& s)
190  {
191  if (! do_ignoring_entries ())
192  {
193  if (s.empty ()
194  || (s.length () == 1 && (s[0] == '\r' || s[0] == '\n')))
195  return false;
196 
197  // Strip newline before adding to list
198  std::string stmp = s;
199  if (stmp.back () == '\n')
200  stmp.pop_back ();
201 
202  int added = ::octave_add_history (stmp.c_str (), history_control);
203  lines_this_session += added;
204  return (added > 0) ? true : false;
205  }
206  return false;
207  }
208 
209  void
210  gnu_history::do_remove (int n)
211  {
213  }
214 
215  void
216  gnu_history::do_clear (void)
217  {
219  }
220 
221  int
222  gnu_history::do_where (void) const
223  {
225  }
226 
227  int
228  gnu_history::do_length (void) const
229  {
231  }
232 
233  int
234  gnu_history::do_max_input_history (void) const
235  {
237  }
238 
239  int
240  gnu_history::do_base (void) const
241  {
243  }
244 
245  int
246  gnu_history::do_current_number (void) const
247  {
248  return (xsize > 0) ? do_base () + do_where () : -1;
249  }
250 
251  void
252  gnu_history::do_stifle (int n)
253  {
255  }
256 
257  int
258  gnu_history::do_unstifle (void)
259  {
261  }
262 
263  int
264  gnu_history::do_is_stifled (void) const
265  {
267  }
268 
269  void
270  gnu_history::do_set_mark (int n)
271  {
272  mark = n;
273  }
274 
275  int
276  gnu_history::do_goto_mark (void)
277  {
278  if (mark)
279  {
280  char *line = ::octave_history_goto_mark (mark);
281 
282  if (line)
283  {
285 
287  }
288  }
289 
290  mark = 0;
291 
292  // FIXME: for operate_and_get_next.
294 
295  return 0;
296  }
297 
298  void
299  gnu_history::do_read (const std::string& f, bool must_exist)
300  {
301  if (! f.empty ())
302  {
303  int status = ::octave_read_history (f.c_str ());
304 
305  if (status != 0 && must_exist)
306  {
307  std::string msg = "reading file '" + f + "'";
308 
309  error (status, msg);
310  }
311  else
312  {
313  lines_in_file = do_where ();
314 
316  }
317  }
318  else
319  error ("gnu_history::read: missing filename");
320  }
321 
322  void
323  gnu_history::do_read_range (const std::string& f, int from, int to,
324  bool must_exist)
325  {
326  if (from < 0)
327  from = lines_in_file;
328 
329  if (! f.empty ())
330  {
331  int status = ::octave_read_history_range (f.c_str (), from, to);
332 
333  if (status != 0 && must_exist)
334  {
335  std::ostringstream buf;
336  buf << "reading lines " << from << " to " << to
337  << " from file '" << f << "'";
338 
339  error (status, buf.str ());
340  }
341  else
342  {
343  lines_in_file = do_where ();
344 
346  }
347  }
348  else
349  error ("gnu_history::read_range: missing filename");
350  }
351 
352  void
353  gnu_history::do_write (const std::string& f_arg) const
354  {
355  if (initialized)
356  {
357  std::string f = f_arg;
358 
359  if (f.empty ())
360  f = xfile;
361 
362  if (! f.empty ())
363  {
364  int status = ::octave_write_history (f.c_str ());
365 
366  if (status != 0)
367  {
368  std::string msg = "writing file '" + f + "'";
369 
370  error (status, msg);
371  }
372  }
373  else
374  error ("gnu_history::write: missing filename");
375  }
376  }
377 
378  void
379  gnu_history::do_append (const std::string& f_arg)
380  {
381  if (initialized)
382  {
383  if (lines_this_session)
384  {
385  if (lines_this_session < do_where ())
386  {
387  // Create file if it doesn't already exist.
388 
389  std::string f = f_arg;
390 
391  if (f.empty ())
392  f = xfile;
393 
394  if (! f.empty ())
395  {
396  sys::file_stat fs (f);
397 
398  if (! fs)
399  {
400  std::fstream tmp (f, std::ios::out);
401  tmp.close ();
402  }
403 
404  int status
405  = ::octave_append_history (lines_this_session, f.c_str ());
406 
407  if (status != 0)
408  {
409  std::string msg = "appending to file '" + f_arg + "'";
410 
411  error (status, msg);
412  }
413  else
414  lines_in_file += lines_this_session;
415 
416  lines_this_session = 0;
417  }
418  else
419  error ("gnu_history::append: missing filename");
420  }
421  }
422  }
423  }
424 
425  void
426  gnu_history::do_truncate_file (const std::string& f_arg, int n) const
427  {
428  if (initialized)
429  {
430  std::string f = f_arg;
431 
432  if (f.empty ())
433  f = xfile;
434 
435  if (! f.empty ())
436  ::octave_history_truncate_file (f.c_str (), n);
437  else
438  error ("gnu_history::truncate_file: missing filename");
439  }
440  }
441 
443  gnu_history::do_list (int limit, bool number_lines) const
444  {
446 
447  if (limit)
448  retval = ::octave_history_list (limit, number_lines);
449 
450  return retval;
451  }
452 
454  gnu_history::do_get_entry (int n) const
455  {
457 
458  char *line = ::octave_history_get (do_base () + n);
459 
460  if (line)
461  retval = line;
462 
463  return retval;
464  }
465 
466  void
467  gnu_history::do_replace_entry (int which, const std::string& line)
468  {
469  ::octave_replace_history_entry (which, line.c_str ());
470  }
471 
472  void
473  gnu_history::do_clean_up_and_save (const std::string& f_arg, int n)
474  {
475  if (initialized)
476  {
477  std::string f = f_arg;
478 
479  if (f.empty ())
480  f = xfile;
481 
482  if (! f.empty ())
483  {
484  if (n < 0)
485  n = xsize;
486 
487  stifle (n);
488 
489  do_write (f.c_str ());
490  }
491  else
492  error ("gnu_history::clean_up_and_save: missing filename");
493  }
494  }
495 
496 #endif
497 
498  bool
500  {
501  bool retval = true;
502 
503  if (! instance)
504  {
506 
507  if (instance)
509  }
510 
511  if (! instance)
512  (*current_liboctave_error_handler)
513  ("unable to create command history object!");
514 
515  return retval;
516  }
517 
518  void
520  {
521 #if defined (USE_READLINE)
522  instance = new gnu_history ();
523 #else
524  instance = new command_history ();
525 #endif
526  }
527 
528  void
529  command_history::initialize (bool read_history_file,
530  const std::string& f_arg, int sz,
531  const std::string & control_arg)
532  {
533  if (instance_ok ())
534  instance->do_initialize (read_history_file, f_arg, sz, control_arg);
535  }
536 
537  bool
539  {
540  // We just want to check the status of an existing instance, not
541  // create one.
542  return instance && instance->do_is_initialized ();
543  }
544 
545  void
547  {
548  if (instance_ok ())
549  {
551 
553  }
554  }
555 
558  {
559  return (instance_ok ())
560  ? instance->do_file () : "";
561  }
562 
563  void
565  {
566  if (instance_ok ())
567  instance->do_process_histcontrol (control_arg);
568  }
569 
572  {
573  return (instance_ok ())
574  ? instance->do_histcontrol () : "";
575  }
576 
577  void
579  {
580  if (instance_ok ())
581  instance->do_set_size (n);
582  }
583 
584  int
586  {
587  return (instance_ok ())
588  ? instance->do_size () : 0;
589  }
590 
591  void
593  {
594  if (instance_ok ())
595  instance->do_ignore_entries (flag);
596  }
597 
598  bool
600  {
601  return (instance_ok ())
602  ? instance->do_ignoring_entries () : false;
603  }
604 
605  bool
607  {
608  if (instance_ok ())
609  return instance->do_add (s);
610  return false;
611  }
612 
613  void
615  {
616  if (instance_ok ())
617  instance->do_remove (n);
618  }
619 
620  void
622  {
623  if (instance_ok ())
624  instance->do_clear ();
625  }
626 
627  int
629  {
630  return (instance_ok ())
631  ? instance->do_where () : 0;
632  }
633 
634  int
636  {
637  return (instance_ok ())
638  ? instance->do_length () : 0;
639  }
640 
641  int
643  {
644  return (instance_ok ())
645  ? instance->do_max_input_history () : 0;
646  }
647 
648  int
650  {
651  return (instance_ok ())
652  ? instance->do_base () : 0;
653  }
654 
655  int
657  {
658  return (instance_ok ())
659  ? instance->do_current_number () : 0;
660  }
661 
662  void
664  {
665  if (instance_ok ())
666  instance->do_stifle (n);
667  }
668 
669  int
671  {
672  return (instance_ok ())
673  ? instance->do_unstifle () : 0;
674  }
675 
676  int
678  {
679  return (instance_ok ())
680  ? instance->do_is_stifled () : 0;
681  }
682 
683  void
685  {
686  if (instance_ok ())
687  instance->do_set_mark (n);
688  }
689 
690  int
692  {
693  return (instance_ok ())
694  ? instance->do_goto_mark () : 0;
695  }
696 
697  void
698  command_history::read (bool must_exist)
699  {
700  read (file (), must_exist);
701  }
702 
703  void
704  command_history::read (const std::string& f, bool must_exist)
705  {
706  if (instance_ok ())
707  instance->do_read (f, must_exist);
708  }
709 
710  void
711  command_history::read_range (int from, int to, bool must_exist)
712  {
713  read_range (file (), from, to, must_exist);
714  }
715 
716  void
717  command_history::read_range (const std::string& f, int from, int to,
718  bool must_exist)
719  {
720  if (instance_ok ())
721  instance->do_read_range (f, from, to, must_exist);
722  }
723 
724  void
726  {
727  if (instance_ok ())
728  instance->do_write (f);
729  }
730 
731  void
733  {
734  if (instance_ok ())
735  instance->do_append (f);
736  }
737 
738  void
740  {
741  if (instance_ok ())
743  }
744 
746  command_history::list (int limit, bool number_lines)
747  {
748  return (instance_ok ())
749  ? instance->do_list (limit, number_lines) : string_vector ();
750  }
751 
754  {
755  return (instance_ok ())
756  ? instance->do_get_entry (n) : "";
757  }
758 
759  void
761  {
762  if (instance_ok ())
763  instance->do_replace_entry (which, line);
764  }
765 
766  void
768  {
769  if (instance_ok ())
771  }
772 
773  void
775  { }
776 
777  void
778  command_history::do_initialize (bool read_history_file,
779  const std::string& f_arg, int sz,
780  const std::string & control_arg)
781  {
785 
786  if (read_history_file)
787  command_history::read (false);
788 
789  initialized = true;
790  }
791 
792  bool
794  {
795  return initialized;
796  }
797 
798  void
800  {
801  xfile = f;
802  }
803 
806  {
807  return xfile;
808  }
809 
810  void
812  {
813  xsize = n;
814  }
815 
816  int
818  {
819  return xsize;
820  }
821 
822  void
824  {
825  ignoring_additions = flag;
826  }
827 
828  bool
830  {
831  return ignoring_additions;
832  }
833 
834  bool
836  {
837  return false;
838  }
839 
840  void
842  { }
843 
844  void
846  { }
847 
848  int
850  {
851  return 0;
852  }
853 
854  int
856  {
857  return 0;
858  }
859 
860  int
862  {
863  return 0;
864  }
865 
866  int
868  {
869  return 0;
870  }
871 
872  int
874  {
875  return (xsize > 0) ? do_base () + do_where () : -1;
876  }
877 
878  void
880  { }
881 
882  int
884  {
885  return -1;
886  }
887 
888  int
890  {
891  return 0;
892  }
893 
894  void
896  { }
897 
898  int
900  {
901  return 0;
902  }
903 
904  void
906  {
907  if (f.empty ())
908  error ("command_history::read: missing filename");
909  }
910 
911  void
913  {
914  if (f.empty ())
915  error ("command_history::read_range: missing filename");
916  }
917 
918  void
920  {
921  if (initialized)
922  {
923  std::string f = f_arg;
924 
925  if (f.empty ())
926  f = xfile;
927 
928  if (f.empty ())
929  error ("command_history::write: missing filename");
930  }
931  }
932 
933  void
935  {
936  if (initialized)
937  {
938  if (lines_this_session)
939  {
940  if (lines_this_session < do_where ())
941  {
942  // Create file if it doesn't already exist.
943 
944  std::string f = f_arg;
945 
946  if (f.empty ())
947  f = xfile;
948 
949  if (f.empty ())
950  error ("command_history::append: missing filename");
951  }
952  }
953  }
954  }
955 
956  void
958  {
959  if (initialized)
960  {
961  std::string f = f_arg;
962 
963  if (f.empty ())
964  f = xfile;
965 
966  if (f.empty ())
967  error ("command_history::truncate_file: missing filename");
968  }
969  }
970 
972  command_history::do_list (int, bool) const
973  {
974  return string_vector ();
975  }
976 
979  {
980  return "";
981  }
982 
983  void
985  { }
986 
987  void
989  {
990  if (initialized)
991  {
992  std::string f = f_arg;
993 
994  if (f.empty ())
995  f = xfile;
996 
997  if (f.empty ())
998  error ("command_history::clean_up_and_save: missing filename");
999  }
1000  }
1001 
1002  void
1003  command_history::error (int err_num, const std::string& msg) const
1004  {
1005  if (msg.empty ())
1006  (*current_liboctave_error_handler) ("%s", std::strerror (err_num));
1007  else
1008  (*current_liboctave_error_handler) ("%s: %s", msg.c_str (),
1009  std::strerror (err_num));
1010  }
1011 
1012  void
1014  {
1015  (*current_liboctave_error_handler) ("%s", s.c_str ());
1016  }
1017 }
static void write(const std::string &="")
Definition: cmd-hist.cc:725
static std::string histcontrol(void)
Definition: cmd-hist.cc:571
virtual bool do_is_initialized(void) const
Definition: cmd-hist.cc:793
static void cleanup_instance(void)
Definition: cmd-hist.h:135
static int length(void)
Definition: cmd-hist.cc:635
virtual void do_clear(void)
Definition: cmd-hist.cc:845
virtual int do_current_number(void) const
Definition: cmd-hist.cc:873
void octave_replace_history_entry(int, const char *)
virtual std::string do_get_entry(int) const
Definition: cmd-hist.cc:978
static void read(bool=true)
Definition: cmd-hist.cc:698
virtual int do_unstifle(void)
Definition: cmd-hist.cc:883
static int current_number(void)
Definition: cmd-hist.cc:656
static int is_stifled(void)
Definition: cmd-hist.cc:677
virtual void do_append(const std::string &)
Definition: cmd-hist.cc:934
static void clear(void)
Definition: cmd-hist.cc:621
void octave_stifle_history(int)
static int goto_mark(void)
Definition: cmd-hist.cc:691
virtual int do_goto_mark(void)
Definition: cmd-hist.cc:899
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
virtual int do_size(void) const
Definition: cmd-hist.cc:817
int octave_history_is_stifled(void)
static int base(void)
Definition: cmd-hist.cc:649
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
Definition: lo-error.c:38
virtual void do_read_range(const std::string &, int, int, bool)
Definition: cmd-hist.cc:912
std::string tilde_expand(const std::string &name)
Definition: file-ops.cc:276
virtual int do_max_input_history(void) const
Definition: cmd-hist.cc:861
static void set_size(int)
Definition: cmd-hist.cc:578
int octave_add_history(const char *, int)
void error(const char *fmt,...)
Definition: error.cc:578
int octave_history_truncate_file(const char *, int)
static std::string get_entry(int)
Definition: cmd-hist.cc:753
int octave_max_input_history(void)
virtual string_vector do_list(int, bool) const
Definition: cmd-hist.cc:972
static void ignore_entries(bool=true)
Definition: cmd-hist.cc:592
int octave_append_history(int, const char *)
static bool add(const std::string &)
Definition: cmd-hist.cc:606
void octave_remove_history(int)
static command_history * instance
Definition: cmd-hist.h:133
s
Definition: file-io.cc:2729
static bool is_initialized(void)
Definition: cmd-hist.cc:538
static void clean_up_and_save(const std::string &="", int=-1)
Definition: cmd-hist.cc:767
static int max_input_history(void)
Definition: cmd-hist.cc:642
liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler
Definition: lo-error.c:50
static void make_command_history(void)
Definition: cmd-hist.cc:519
virtual int do_is_stifled(void) const
Definition: cmd-hist.cc:889
char * octave_history_goto_mark(int n)
virtual int do_base(void) const
Definition: cmd-hist.cc:867
virtual void do_replace_entry(int, const std::string &)
Definition: cmd-hist.cc:984
void error(int, const std::string &msg="") const
Definition: cmd-hist.cc:1003
int octave_history_length(void)
virtual std::string do_histcontrol(void) const
Definition: cmd-hist.h:149
static void truncate_file(const std::string &="", int=-1)
Definition: cmd-hist.cc:739
static void insert_text(const std::string &text)
Definition: cmd-edit.cc:1468
static string_vector list(int=-1, bool=false)
Definition: cmd-hist.cc:746
virtual std::string do_file(void)
Definition: cmd-hist.cc:805
int octave_history_base(void)
static int unstifle(void)
Definition: cmd-hist.cc:670
static void add(fptr f)
static void remove_startup_hook(startup_hook_fcn f)
Definition: cmd-edit.cc:1513
static void clear_undo_list(void)
Definition: cmd-edit.cc:1495
virtual void do_truncate_file(const std::string &, int) const
Definition: cmd-hist.cc:957
virtual void do_set_mark(int)
Definition: cmd-hist.cc:895
virtual void do_remove(int)
Definition: cmd-hist.cc:841
virtual bool do_add(const std::string &)
Definition: cmd-hist.cc:835
virtual void do_write(const std::string &) const
Definition: cmd-hist.cc:919
virtual void do_process_histcontrol(const std::string &)
Definition: cmd-hist.cc:774
double tmp
Definition: data.cc:6252
octave_value retval
Definition: data.cc:6246
static void read_range(int=-1, int=-1, bool=true)
Definition: cmd-hist.cc:711
virtual void do_stifle(int)
Definition: cmd-hist.cc:879
sz
Definition: data.cc:5264
int octave_read_history(const char *)
int octave_where_history(void)
static bool initialized
Definition: defaults.cc:48
static void initialize(bool, const std::string &, int, const std::string &)
Definition: cmd-hist.cc:529
static void set_mark(int n)
Definition: cmd-hist.cc:684
char ** octave_history_list(int, int)
virtual int do_length(void) const
Definition: cmd-hist.cc:855
void octave_using_history(void)
virtual void do_ignore_entries(bool)
Definition: cmd-hist.cc:823
int octave_read_history_range(const char *, int, int)
static void set_file(const std::string &)
Definition: cmd-hist.cc:546
static void stifle(int)
Definition: cmd-hist.cc:663
virtual int do_where(void) const
Definition: cmd-hist.cc:849
virtual void do_set_file(const std::string &)
Definition: cmd-hist.cc:799
static int where(void)
Definition: cmd-hist.cc:628
static bool ignoring_entries(void)
Definition: cmd-hist.cc:599
octave::sys::file_stat fs(filename)
static bool instance_ok(void)
Definition: cmd-hist.cc:499
int octave_write_history(const char *)
octave_idx_type length(void) const
virtual void do_clean_up_and_save(const std::string &, int)
Definition: cmd-hist.cc:988
static int size(void)
Definition: cmd-hist.cc:585
void octave_clear_history(void)
static void append(const std::string &="")
Definition: cmd-hist.cc:732
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
Definition: utils.cc:888
virtual void do_read(const std::string &, bool)
Definition: cmd-hist.cc:905
virtual bool do_ignoring_entries(void) const
Definition: cmd-hist.cc:829
virtual void do_set_size(int)
Definition: cmd-hist.cc:811
static void remove(int)
Definition: cmd-hist.cc:614
static std::string file(void)
Definition: cmd-hist.cc:557
virtual void do_initialize(bool, const std::string &, int, const std::string &)
Definition: cmd-hist.cc:778
int octave_unstifle_history(void)
static void replace_entry(int, const std::string &)
Definition: cmd-hist.cc:760
static void process_histcontrol(const std::string &)
Definition: cmd-hist.cc:564