annotate liboctave/cmd-hist.h @ 4337:d56e0d75e7c9 ss-2-1-45

[project @ 2003-02-19 21:20:19 by jwe]
author jwe
date Wed, 19 Feb 2003 21:20:19 +0000
parents bd422cf62f0c
children b3f20980be32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
1 /*
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 2659
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
4
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
6
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
10 later version.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
11
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
15 for more details.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
16
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, write to the Free
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
20
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
21 */
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
22
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
23 #if !defined (octave_cmd_hist_h)
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
24 #define octave_cmd_hist_h 1
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
25
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
26 #include <string>
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
27
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
28 #include "str-vec.h"
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
29
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
30 class
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
31 command_history
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
32 {
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
33 protected:
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
34
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
35 command_history (void)
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
36 : ignoring_additions (false), lines_in_file (0),
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
37 lines_this_session (0), xfile (), xsize (-1) { }
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
38
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
39 public:
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
40
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
41 virtual ~command_history (void) { }
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
42
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
43 static void set_file (const std::string&);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
44
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
45 static std::string file (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
46
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
47 static void set_size (int);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
48
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
49 static int size (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
50
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
51 static void ignore_entries (bool = true);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
52
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
53 static bool ignoring_entries (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
54
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
55 static void add (const std::string&);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
56
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
57 static void remove (int);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
58
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
59 static int where (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
60
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
61 static int length (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
62
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
63 static int max_input_history (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
64
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
65 static int base (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
66
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
67 static int current_number (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
68
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
69 static void stifle (int);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
70
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
71 static int unstifle (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
72
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
73 static int is_stifled (void);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
74
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
75 static void set_mark (int n);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
76
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
77 // Gag. This declaration has to match the Function typedef in
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
78 // readline.h.
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
79
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents: 3504
diff changeset
80 static void goto_mark (void);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
81
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
82 static void read (bool = true);
2658
dd71eb0bb414 [project @ 1997-02-03 04:49:57 by jwe]
jwe
parents: 1993
diff changeset
83
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
84 static void read (const std::string&, bool = true);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
85
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
86 static void read_range (int = -1, int = -1, bool = true);
2658
dd71eb0bb414 [project @ 1997-02-03 04:49:57 by jwe]
jwe
parents: 1993
diff changeset
87
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
88 static void read_range (const std::string&, int = -1, int = -1,
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
89 bool = true);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
90
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
91 static void write (const std::string& = std::string ());
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
92
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
93 static void append (const std::string& = std::string ());
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
94
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
95 static void truncate_file (const std::string& = std::string (), int = -1);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
96
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
97 static string_vector list (int = -1, bool = false);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
98
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
99 static std::string get_entry (int);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
100
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
101 static void replace_entry (int, const std::string&);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
102
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
103 static void clean_up_and_save (const std::string& = std::string (), int = -1);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
104
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
105 private:
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
106
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
107 // No copying!
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
108
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
109 command_history (const command_history&);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
110
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
111 command_history& operator = (const command_history&);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
112
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
113 static bool instance_ok (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
114
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
115 static void make_command_history (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
116
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
117 // The real thing.
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
118 static command_history *instance;
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
119
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
120 protected:
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
121
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
122 // To use something other than the GNU history library, derive a new
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
123 // class from command_history, overload these functions as
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
124 // necessary, and make instance point to the new class.
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
125
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
126 virtual void do_set_file (const std::string&);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
127
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
128 virtual std::string do_file (void);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
129
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
130 virtual void do_set_size (int);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
131
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
132 virtual int do_size (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
133
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
134 virtual void do_ignore_entries (bool);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
135
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
136 virtual bool do_ignoring_entries (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
137
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
138 virtual void do_add (const std::string&);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
139
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
140 virtual void do_remove (int);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
141
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
142 virtual int do_where (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
143
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
144 virtual int do_length (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
145
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
146 virtual int do_max_input_history (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
147
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
148 virtual int do_base (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
149
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
150 virtual int do_current_number (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
151
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
152 virtual void do_stifle (int);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
153
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
154 virtual int do_unstifle (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
155
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
156 virtual int do_is_stifled (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
157
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
158 virtual void do_set_mark (int);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
159
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
160 virtual void do_goto_mark (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
161
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
162 virtual void do_read (const std::string&, bool);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
163
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
164 virtual void do_read_range (const std::string&, int, int, bool);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
165
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
166 virtual void do_write (const std::string&);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
167
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
168 virtual void do_append (const std::string&);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
169
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
170 virtual void do_truncate_file (const std::string&, int);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
171
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
172 virtual string_vector do_list (int, bool);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
173
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
174 virtual std::string do_get_entry (int);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
175
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
176 virtual void do_replace_entry (int, const std::string&);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
177
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
178 virtual void do_clean_up_and_save (const std::string&, int);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
179
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
180 void error (int);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
181
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
182 void error (const std::string&);
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
183
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
184 // TRUE means we are ignoring new additions.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
185 bool ignoring_additions;
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
186
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
187 // The number of hisory lines we read from the history file.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
188 int lines_in_file;
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
189
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
190 // The number of history lines we've saved so far.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
191 int lines_this_session;
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
192
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
193 // The default history file.
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2926
diff changeset
194 std::string xfile;
1797
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
195
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
196 // The number of lines of history to save.
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
197 int xsize;
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
198 };
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
199
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
200 #endif
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
201
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
202 /*
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
203 ;;; Local Variables: ***
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
204 ;;; mode: C++ ***
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
205 ;;; End: ***
28aefb5a7dec [project @ 1996-01-29 05:05:57 by jwe]
jwe
parents:
diff changeset
206 */