1
/* $NetBSD: readline.h,v 1.12 2004/09/08 18:15:37 christos Exp $ */
1
/* $NetBSD: readline.h,v 1.24 2009/02/05 19:15:26 christos Exp $ */
4
4
* Copyright (c) 1997 The NetBSD Foundation, Inc.
15
15
* 2. Redistributions in binary form must reproduce the above copyright
16
16
* notice, this list of conditions and the following disclaimer in the
17
17
* documentation and/or other materials provided with the distribution.
18
* 3. All advertising materials mentioning features or use of this software
19
* must display the following acknowledgement:
20
* This product includes software developed by the NetBSD
21
* Foundation, Inc. and its contributors.
22
* 4. Neither the name of The NetBSD Foundation nor the names of its
23
* contributors may be used to endorse or promote products derived
24
* from this software without specific prior written permission.
26
19
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27
20
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
46
39
typedef int Function(const char *, int);
47
40
typedef void VFunction(void);
41
typedef void VCPFunction(char *);
48
42
typedef char *CPFunction(const char *, int);
49
43
typedef char **CPPFunction(const char *, int, int);
51
typedef void *histdata_t;
44
typedef char *rl_compentry_func_t(const char *, int);
53
46
typedef struct _hist_entry {
58
51
typedef struct _keymap_entry {
102
95
extern char *rl_basic_word_break_characters;
103
96
extern char *rl_completer_word_break_characters;
104
97
extern char *rl_completer_quote_characters;
105
extern CPFunction *rl_completion_entry_function;
98
extern Function *rl_completion_entry_function;
106
99
extern CPPFunction *rl_attempted_completion_function;
100
extern int rl_attempted_completion_over;
107
101
extern int rl_completion_type;
108
102
extern int rl_completion_query_items;
109
103
extern char *rl_special_prefixes;
122
116
emacs_ctlx_keymap;
123
117
extern int rl_filename_completion_desired;
124
118
extern int rl_ignore_completion_duplicates;
125
extern Function *rl_getc_function;
119
extern int (*rl_getc_function)(FILE *);
126
120
extern VFunction *rl_redisplay_function;
127
121
extern VFunction *rl_completion_display_matches_hook;
128
122
extern VFunction *rl_prep_term_function;
129
123
extern VFunction *rl_deprep_term_function;
124
extern int readline_echoing_p;
125
extern int _rl_print_completions_horizontally;
131
127
/* supported functions */
132
128
char *readline(const char *);
141
137
int where_history(void);
142
138
HIST_ENTRY *current_history(void);
143
139
HIST_ENTRY *history_get(int);
140
HIST_ENTRY *remove_history(int);
144
141
int history_total_bytes(void);
145
142
int history_set_pos(int);
146
143
HIST_ENTRY *previous_history(void);
168
165
int rl_bind_key(int, int (*)(int, int));
169
166
int rl_newline(int, int);
170
167
void rl_callback_read_char(void);
171
void rl_callback_handler_install(const char *, VFunction *);
168
void rl_callback_handler_install(const char *, VCPFunction *);
172
169
void rl_callback_handler_remove(void);
173
170
void rl_redisplay(void);
174
171
int rl_get_previous_history(int, int);
176
173
void rl_deprep_terminal(void);
177
174
int rl_read_init_file(const char *);
178
175
int rl_parse_and_bind(const char *);
176
int rl_variable_bind(const char *, const char *);
179
177
void rl_stuff_char(int);
180
178
int rl_add_defun(const char *, Function *, int);
179
void rl_get_screen_size(int *, int *);
180
void rl_set_screen_size(int, int);
181
char *rl_filename_completion_function (const char *, int);
182
int _rl_abort_internal(void);
183
int _rl_qsort_string_compare(char **, char **);
184
char **rl_completion_matches(const char *, rl_compentry_func_t *);
185
void rl_forced_update_display(void);
186
int rl_set_prompt(const char *);
183
189
* The following are not implemented
191
int rl_kill_text(int, int);
185
192
Keymap rl_get_keymap(void);
193
void rl_set_keymap(Keymap);
186
194
Keymap rl_make_bare_keymap(void);
187
195
int rl_generic_bind(int, const char *, const char *, Keymap);
188
196
int rl_bind_key_in_map(int, Function *, Keymap);