annotate liboctave/util/oct-rl-hist.h @ 20651:e54ecb33727e

lo-array-gripes.cc: Remove FIXME's related to buffer size. * lo-array-gripes.cc: Remove FIXME's related to buffer size. Shorten sprintf buffers from 100 to 64 characters (still well more than 19 required). Use 'const' decorator on constant value for clarity. Remove extra space between variable and array bracket.
author Rik <rik@octave.org>
date Mon, 12 Oct 2015 21:13:47 -0700
parents 4197fc428c7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
1 /*
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
2
19731
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 17822
diff changeset
3 Copyright (C) 2000-2015 John W. Eaton
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
4
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
6
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
10 option) any later version.
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
11
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
15 for more details.
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
16
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
19 <http://www.gnu.org/licenses/>.
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
20
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
21 */
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
22
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17744
diff changeset
23 #if !defined (octave_oct_rl_hist_h)
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17744
diff changeset
24 #define octave_oct_rl_hist_h 1
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
25
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
26 #ifdef __cplusplus
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
27 extern "C"
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
28 {
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
29 #endif
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
30
11488
49368dbf0822 Replace history control macros with enum
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11486
diff changeset
31 enum {
49368dbf0822 Replace history control macros with enum
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11486
diff changeset
32 HC_IGNSPACE = 0x01,
49368dbf0822 Replace history control macros with enum
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11486
diff changeset
33 HC_IGNDUPS = 0x02,
49368dbf0822 Replace history control macros with enum
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11486
diff changeset
34 HC_ERASEDUPS = 0x04
49368dbf0822 Replace history control macros with enum
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11486
diff changeset
35 };
11486
a1deab9a6e71 bash-like history control
Pascal Dupuis <Pascal.Dupuis@worldonline.be> and John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
36
a1deab9a6e71 bash-like history control
Pascal Dupuis <Pascal.Dupuis@worldonline.be> and John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
37 extern int octave_add_history (const char *, int);
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
38
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
39 extern int octave_where_history (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
40
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
41 extern int octave_history_length (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
42
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
43 extern int octave_max_input_history (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
44
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
45 extern int octave_history_base (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
46
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
47 extern void octave_stifle_history (int);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
48
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
49 extern int octave_unstifle_history (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
50
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
51 extern int octave_history_is_stifled (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
52
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
53 extern int octave_history_set_pos (int);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
54
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
55 extern int octave_read_history (const char *);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
56
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
57 extern void octave_using_history (void);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
58
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
59 extern int octave_read_history_range (const char *, int, int);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
60
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
61 extern int octave_write_history (const char *);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
62
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
63 extern int octave_append_history (int, const char *);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
64
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
65 extern int octave_history_truncate_file (const char *, int);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
66
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
67 extern void octave_remove_history (int);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
68
15397
231d8d3b8225 provide command_hist::clear_history function
John W. Eaton <jwe@octave.org>
parents: 15271
diff changeset
69 extern void octave_clear_history (void);
231d8d3b8225 provide command_hist::clear_history function
John W. Eaton <jwe@octave.org>
parents: 15271
diff changeset
70
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
71 extern char *octave_history_goto_mark (int n);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
72
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
73 extern char *octave_history_get (int n);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
74
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
75 extern char **octave_history_list (int, int);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
76
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
77 extern void octave_replace_history_entry (int, const char *);
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
78
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
79 #ifdef __cplusplus
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
80 }
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
81 #endif
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
82
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents:
diff changeset
83 #endif