Mercurial > octave
annotate liboctave/util/oct-rl-edit.h @ 27919:1891570abac8
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2020.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Jan 2020 22:29:51 -0500 |
parents | b442ec6dda5c |
children | bd51beb6205e |
rev | line source |
---|---|
3519 | 1 /* |
2 | |
27919
1891570abac8
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27918
diff
changeset
|
3 Copyright (C) 2000-2020 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
27339
diff
changeset
|
4 |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
27339
diff
changeset
|
5 See the file COPYRIGHT.md in the top-level directory of this distribution |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
27339
diff
changeset
|
6 or <https://octave.org/COPYRIGHT.html/>. |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
27339
diff
changeset
|
7 |
3519 | 8 |
9 This file is part of Octave. | |
10 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24520
diff
changeset
|
11 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
12 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24520
diff
changeset
|
13 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
14 (at your option) any later version. |
3519 | 15 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
16 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
17 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22402
diff
changeset
|
19 GNU General Public License for more details. |
3519 | 20 |
21 You should have received a copy of the GNU General Public License | |
7016 | 22 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24520
diff
changeset
|
23 <https://www.gnu.org/licenses/>. |
3519 | 24 |
25 */ | |
26 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19702
diff
changeset
|
27 #if ! defined (octave_oct_rl_edit_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
28 #define octave_oct_rl_edit_h 1 |
3519 | 29 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20919
diff
changeset
|
30 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20919
diff
changeset
|
31 |
23442
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
32 #if defined (__cplusplus) |
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
33 # include <cstdio> |
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
34 #else |
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
35 # include <stdio.h> |
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
36 #endif |
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
37 |
4802 | 38 typedef int (*rl_startup_hook_fcn_ptr) (void); |
3519 | 39 |
16570
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
40 typedef int (*rl_pre_input_hook_fcn_ptr) (void); |
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
41 |
4802 | 42 typedef int (*rl_event_hook_fcn_ptr) (void); |
3519 | 43 |
44 typedef int (*rl_fcn_ptr) (int, int); | |
45 | |
46 typedef char ** (*rl_attempted_completion_fcn_ptr) (const char *, int, int); | |
47 | |
48 typedef char * (*rl_completer_fcn_ptr) (const char *, int); | |
49 | |
21798
12e7456f7619
Tab completion of multiple directory levels. (bug #44095)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21724
diff
changeset
|
50 typedef char * (*rl_completion_hook_fcn_ptr) (void); |
12e7456f7619
Tab completion of multiple directory levels. (bug #44095)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21724
diff
changeset
|
51 |
6979 | 52 typedef char * (*rl_quoting_fcn_ptr) (char *, int, char *); |
53 | |
54 typedef char * (*rl_dequoting_fcn_ptr) (char *, int); | |
55 | |
56 typedef int (*rl_char_is_quoted_fcn_ptr) (char *, int); | |
57 | |
58 typedef int (*rl_command_fcn_ptr) (int, int); | |
59 | |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
60 #if defined (__cplusplus) |
3519 | 61 extern "C" |
62 { | |
63 #endif | |
64 | |
16539
8ea8df0747e9
make undo button and menu item work for command window
John W. Eaton <jwe@octave.org>
parents:
16537
diff
changeset
|
65 extern void octave_rl_redisplay (void); |
6979 | 66 |
3519 | 67 extern int octave_rl_screen_height (void); |
68 | |
69 extern int octave_rl_screen_width (void); | |
70 | |
3779 | 71 extern void octave_rl_enable_paren_matching (int); |
3519 | 72 |
19378
f7ccd02bc060
provide access to the readline variable rl_erase_empty_line
John W. Eaton <jwe@octave.org>
parents:
19309
diff
changeset
|
73 extern int octave_rl_erase_empty_line (int); |
f7ccd02bc060
provide access to the readline variable rl_erase_empty_line
John W. Eaton <jwe@octave.org>
parents:
19309
diff
changeset
|
74 |
16537
106a38d7b396
optionall disable redisplay in command editor clear screen function
John W. Eaton <jwe@octave.org>
parents:
16534
diff
changeset
|
75 extern void octave_rl_clear_screen (int skip_redisplay); |
3519 | 76 |
77 extern void octave_rl_resize_terminal (void); | |
78 | |
19309
735bc47d18af
command_editor: provide access to rl_set_screen_size
John W. Eaton <jwe@octave.org>
parents:
19304
diff
changeset
|
79 extern void octave_rl_resize_terminal (void); |
735bc47d18af
command_editor: provide access to rl_set_screen_size
John W. Eaton <jwe@octave.org>
parents:
19304
diff
changeset
|
80 |
735bc47d18af
command_editor: provide access to rl_set_screen_size
John W. Eaton <jwe@octave.org>
parents:
19304
diff
changeset
|
81 extern void octave_rl_set_screen_size (int ht, int wd); |
735bc47d18af
command_editor: provide access to rl_set_screen_size
John W. Eaton <jwe@octave.org>
parents:
19304
diff
changeset
|
82 |
3519 | 83 extern void octave_rl_restore_terminal_state (void); |
84 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
85 extern char * octave_rl_copy_line (void); |
16570
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
86 |
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
87 extern void octave_rl_replace_line (const char *s, int clear_undo); |
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
88 |
19702
c048358da712
also kill pending input line when gui command window is cleared (bug #44015)
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
89 extern void octave_rl_kill_full_line (void); |
c048358da712
also kill pending input line when gui command window is cleared (bug #44015)
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
90 |
3519 | 91 extern void octave_rl_insert_text (const char *); |
92 | |
6979 | 93 extern int octave_rl_newline (int, int); |
94 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
95 extern const char * octave_rl_line_buffer (void); |
3519 | 96 |
22171
0a4c5a90f286
Allow tab completion of arrays of structures.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21798
diff
changeset
|
97 extern int octave_rl_point (void); |
0a4c5a90f286
Allow tab completion of arrays of structures.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21798
diff
changeset
|
98 |
16539
8ea8df0747e9
make undo button and menu item work for command window
John W. Eaton <jwe@octave.org>
parents:
16537
diff
changeset
|
99 extern int octave_rl_do_undo (void); |
8ea8df0747e9
make undo button and menu item work for command window
John W. Eaton <jwe@octave.org>
parents:
16537
diff
changeset
|
100 |
3519 | 101 extern void octave_rl_clear_undo_list (void); |
102 | |
103 extern void octave_rl_set_name (const char *); | |
104 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
105 extern char * octave_rl_readline (const char *); |
3519 | 106 |
107 extern void octave_rl_set_input_stream (FILE *); | |
108 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
109 extern FILE * octave_rl_get_input_stream (void); |
3519 | 110 |
111 extern void octave_rl_set_output_stream (FILE *); | |
112 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
113 extern FILE * octave_rl_get_output_stream (void); |
3519 | 114 |
115 extern void octave_rl_read_init_file (const char *); | |
116 | |
7758
8e14a01ffe9f
input.cc (Fre_read_readline_init_file): new function
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
117 extern void octave_rl_re_read_init_file (void); |
8e14a01ffe9f
input.cc (Fre_read_readline_init_file): new function
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
118 |
4143 | 119 extern int octave_rl_filename_completion_desired (int); |
120 | |
6979 | 121 extern int octave_rl_filename_quoting_desired (int); |
122 | |
19304
ad93e9be78ee
command_editor: provide access to rl_prefer_env_winsize
John W. Eaton <jwe@octave.org>
parents:
17822
diff
changeset
|
123 extern int octave_rl_prefer_env_winsize (int); |
ad93e9be78ee
command_editor: provide access to rl_prefer_env_winsize
John W. Eaton <jwe@octave.org>
parents:
17822
diff
changeset
|
124 |
16382
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
125 extern void octave_rl_done (int); |
389b09a914e2
allow gui to force readline to return from its idle/read loop
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
126 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
127 extern char * octave_rl_filename_completion_function (const char *, int); |
4604 | 128 |
3933 | 129 extern void octave_rl_set_basic_word_break_characters (const char *); |
130 | |
131 extern void octave_rl_set_completer_word_break_characters (const char *); | |
132 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23442
diff
changeset
|
133 extern char * octave_rl_get_completer_word_break_characters (void); |
21798
12e7456f7619
Tab completion of multiple directory levels. (bug #44095)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21724
diff
changeset
|
134 |
12e7456f7619
Tab completion of multiple directory levels. (bug #44095)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21724
diff
changeset
|
135 extern void octave_rl_set_completion_word_break_hook (rl_completion_hook_fcn_ptr); |
12e7456f7619
Tab completion of multiple directory levels. (bug #44095)
Lachlan Andrew <lachlanbis@gmail.com>
parents:
21724
diff
changeset
|
136 |
3519 | 137 extern void octave_rl_set_basic_quote_characters (const char *); |
138 | |
6979 | 139 extern void octave_rl_set_filename_quote_characters (const char *); |
140 | |
141 extern void octave_rl_set_completer_quote_characters (const char *); | |
142 | |
3519 | 143 extern void octave_rl_set_completion_append_character (char); |
144 | |
145 extern void | |
146 octave_rl_set_completion_function (rl_attempted_completion_fcn_ptr); | |
147 | |
6979 | 148 extern void |
149 octave_rl_set_quoting_function (rl_quoting_fcn_ptr); | |
150 | |
151 extern void | |
152 octave_rl_set_dequoting_function (rl_dequoting_fcn_ptr); | |
153 | |
154 extern void octave_rl_set_char_is_quoted_function (rl_char_is_quoted_fcn_ptr); | |
155 | |
3519 | 156 extern void octave_rl_set_startup_hook (rl_startup_hook_fcn_ptr); |
157 | |
158 extern rl_startup_hook_fcn_ptr octave_rl_get_startup_hook (void); | |
159 | |
16570
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
160 extern void octave_rl_set_pre_input_hook (rl_startup_hook_fcn_ptr); |
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
161 |
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
162 extern rl_pre_input_hook_fcn_ptr octave_rl_get_pre_input_hook (void); |
d5ae5aa80d42
preserve pending command line input when running commands from GUI actions
John W. Eaton <jwe@octave.org>
parents:
16539
diff
changeset
|
163 |
3519 | 164 extern void octave_rl_set_event_hook (rl_event_hook_fcn_ptr f); |
165 | |
166 extern rl_event_hook_fcn_ptr octave_rl_get_event_hook (void); | |
167 | |
168 extern char ** | |
169 octave_rl_completion_matches (const char *, rl_completer_fcn_ptr); | |
170 | |
171 extern char octave_rl_prompt_start_ignore (void); | |
172 | |
173 extern char octave_rl_prompt_end_ignore (void); | |
174 | |
20919
cfb58d9805fa
eliminate some type conversion warnings
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
175 extern void octave_rl_add_defun (const char *, rl_fcn_ptr, int); |
3519 | 176 |
177 extern void octave_rl_set_terminal_name (const char *); | |
178 | |
179 extern void octave_rl_initialize (void); | |
180 | |
181 extern int octave_rl_history_search_forward (int, int); | |
182 | |
183 extern int octave_rl_history_search_backward (int, int); | |
184 | |
20919
cfb58d9805fa
eliminate some type conversion warnings
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
185 extern int octave_rl_ctrl (char); |
3519 | 186 |
20919
cfb58d9805fa
eliminate some type conversion warnings
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
187 extern int octave_rl_meta (char); |
3519 | 188 |
24520
c5c11b07598a
refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents:
24131
diff
changeset
|
189 extern void octave_rl_recover_from_interrupt (void); |
c5c11b07598a
refactor signal handling (bug #52757)
John W. Eaton <jwe@octave.org>
parents:
24131
diff
changeset
|
190 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
191 #if defined (__cplusplus) |
3519 | 192 } |
193 #endif | |
194 | |
195 #endif |