1 /* rlprivate.h -- functions and variables global to the readline library,
2 but not intended for use by applications. */
4 /* Copyright (C) 1999-2004 Free Software Foundation, Inc.
6 This file is part of the GNU Readline Library, a library for
7 reading lines of text with interactive input and history editing.
9 The GNU Readline Library is free software; you can redistribute it
10 and/or modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2, or
12 (at your option) any later version.
14 The GNU Readline Library is distributed in the hope that it will be
15 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
16 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 The GNU General Public License is often shipped with GNU software, and
20 is generally kept in a file called COPYING or LICENSE. If you do not
21 have a copy of the license, write to the Free Software Foundation,
22 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
24 #if !defined (_RL_PRIVATE_H_)
25 #define _RL_PRIVATE_H_
27 #include "rlconf.h" /* for VISIBLE_STATS */
29 #include "posixjmp.h" /* defines procenv_t */
31 /*************************************************************************
33 * Global functions undocumented in texinfo manual and not in readline.h *
35 *************************************************************************/
37 /*************************************************************************
39 * Global variables undocumented in texinfo manual and not in readline.h *
41 *************************************************************************/
44 extern int rl_complete_with_tilde_expansion
;
45 #if defined (VISIBLE_STATS)
46 extern int rl_visible_stats
;
47 #endif /* VISIBLE_STATS */
50 extern int rl_line_buffer_len
;
51 extern int rl_arg_sign
;
52 extern int rl_visible_prompt_length
;
53 extern int readline_echoing_p
;
54 extern int rl_key_sequence_length
;
55 extern int rl_byte_oriented
;
58 extern int rl_display_fixed
;
61 extern int rl_blink_matching_paren
;
63 /*************************************************************************
65 * Global functions and variables unsed and undocumented *
67 *************************************************************************/
70 extern int rl_set_retained_kills
PARAMS((int));
73 extern void _rl_set_screen_size
PARAMS((int, int));
76 extern int _rl_fix_last_undo_of_type
PARAMS((int, int, int));
79 extern char *_rl_savestring
PARAMS((const char *));
81 /*************************************************************************
83 * Functions and variables private to the readline library *
85 *************************************************************************/
87 /* NOTE: Functions and variables prefixed with `_rl_' are
88 pseudo-global: they are global so they can be shared
89 between files in the readline library, but are not intended
90 to be visible to readline callers. */
92 /*************************************************************************
93 * Undocumented private functions *
94 *************************************************************************/
96 #if defined(READLINE_CALLBACKS)
99 extern void readline_internal_setup
PARAMS((void));
100 extern char *readline_internal_teardown
PARAMS((int));
101 extern int readline_internal_char
PARAMS((void));
103 #endif /* READLINE_CALLBACKS */
108 extern char _rl_find_completion_word
PARAMS((int *, int *));
109 extern void _rl_free_match_list
PARAMS((char **));
112 extern char *_rl_strip_prompt
PARAMS((char *));
113 extern void _rl_move_cursor_relative
PARAMS((int, const char *));
114 extern void _rl_move_vert
PARAMS((int));
115 extern void _rl_save_prompt
PARAMS((void));
116 extern void _rl_restore_prompt
PARAMS((void));
117 extern char *_rl_make_prompt_for_search
PARAMS((int));
118 extern void _rl_erase_at_end_of_line
PARAMS((int));
119 extern void _rl_clear_to_eol
PARAMS((int));
120 extern void _rl_clear_screen
PARAMS((void));
121 extern void _rl_update_final
PARAMS((void));
122 extern void _rl_redisplay_after_sigwinch
PARAMS((void));
123 extern void _rl_clean_up_for_exit
PARAMS((void));
124 extern void _rl_erase_entire_line
PARAMS((void));
125 extern int _rl_current_display_line
PARAMS((void));
128 extern int _rl_any_typein
PARAMS((void));
129 extern int _rl_input_available
PARAMS((void));
130 extern int _rl_input_queued
PARAMS((int));
131 extern void _rl_insert_typein
PARAMS((int));
132 extern int _rl_unget_char
PARAMS((int));
133 extern int _rl_pushed_input_available
PARAMS((void));
136 extern void _rl_with_macro_input
PARAMS((char *));
137 extern int _rl_next_macro_key
PARAMS((void));
138 extern void _rl_push_executing_macro
PARAMS((void));
139 extern void _rl_pop_executing_macro
PARAMS((void));
140 extern void _rl_add_macro_char
PARAMS((int));
141 extern void _rl_kill_kbd_macro
PARAMS((void));
144 extern int _rl_init_argument
PARAMS((void));
145 extern void _rl_start_using_history
PARAMS((void));
146 extern int _rl_free_saved_history_line
PARAMS((void));
147 extern void _rl_set_insert_mode
PARAMS((int, int));
150 extern int _rl_init_eightbit
PARAMS((void));
153 extern void _rl_enable_paren_matching
PARAMS((int));
156 extern void _rl_init_line_state
PARAMS((void));
157 extern void _rl_set_the_line
PARAMS((void));
158 extern int _rl_dispatch
PARAMS((int, Keymap
));
159 extern int _rl_dispatch_subseq
PARAMS((int, Keymap
, int));
162 extern int _rl_disable_tty_signals
PARAMS((void));
163 extern int _rl_restore_tty_signals
PARAMS((void));
166 extern void _rl_get_screen_size
PARAMS((int, int));
167 extern int _rl_init_terminal_io
PARAMS((const char *));
169 extern void _rl_output_character_function
PARAMS((int));
171 extern int _rl_output_character_function
PARAMS((int));
173 extern void _rl_output_some_chars
PARAMS((const char *, int));
174 extern int _rl_backspace
PARAMS((int));
175 extern void _rl_enable_meta_key
PARAMS((void));
176 extern void _rl_control_keypad
PARAMS((int));
177 extern void _rl_set_cursor
PARAMS((int, int));
180 extern void _rl_fix_point
PARAMS((int));
181 extern int _rl_replace_text
PARAMS((const char *, int, int));
182 extern int _rl_insert_char
PARAMS((int, int));
183 extern int _rl_overwrite_char
PARAMS((int, int));
184 extern int _rl_overwrite_rubout
PARAMS((int, int));
185 extern int _rl_rubout_char
PARAMS((int, int));
186 #if defined (HANDLE_MULTIBYTE)
187 extern int _rl_char_search_internal
PARAMS((int, int, char *, int));
189 extern int _rl_char_search_internal
PARAMS((int, int, int));
191 extern int _rl_set_mark_at_pos
PARAMS((int));
194 extern int _rl_abort_internal
PARAMS((void));
195 extern char *_rl_strindex
PARAMS((const char *, const char *));
196 extern int _rl_qsort_string_compare
PARAMS((char **, char **));
197 extern int (_rl_uppercase_p
) PARAMS((int));
198 extern int (_rl_lowercase_p
) PARAMS((int));
199 extern int (_rl_pure_alphabetic
) PARAMS((int));
200 extern int (_rl_digit_p
) PARAMS((int));
201 extern int (_rl_to_lower
) PARAMS((int));
202 extern int (_rl_to_upper
) PARAMS((int));
203 extern int (_rl_digit_value
) PARAMS((int));
206 extern void _rl_vi_initialize_line
PARAMS((void));
207 extern void _rl_vi_reset_last
PARAMS((void));
208 extern void _rl_vi_set_last
PARAMS((int, int, int));
209 extern int _rl_vi_textmod_command
PARAMS((int));
210 extern void _rl_vi_done_inserting
PARAMS((void));
212 /*************************************************************************
213 * Undocumented private variables *
214 *************************************************************************/
217 extern const char *_rl_possible_control_prefixes
[];
218 extern const char *_rl_possible_meta_prefixes
[];
221 extern int _rl_complete_show_all
;
222 extern int _rl_complete_show_unmodified
;
223 extern int _rl_complete_mark_directories
;
224 extern int _rl_complete_mark_symlink_dirs
;
225 extern int _rl_print_completions_horizontally
;
226 extern int _rl_completion_case_fold
;
227 extern int _rl_match_hidden_files
;
228 extern int _rl_page_completions
;
231 extern int _rl_vis_botlin
;
232 extern int _rl_last_c_pos
;
233 extern int _rl_suppress_redisplay
;
234 extern char *rl_display_prompt
;
237 extern char *_rl_isearch_terminators
;
240 extern char *_rl_executing_macro
;
243 extern int _rl_history_preserve_point
;
244 extern int _rl_history_saved_point
;
247 extern int _rl_horizontal_scroll_mode
;
248 extern int _rl_mark_modified_lines
;
249 extern int _rl_bell_preference
;
250 extern int _rl_meta_flag
;
251 extern int _rl_convert_meta_chars_to_ascii
;
252 extern int _rl_output_meta_chars
;
253 extern char *_rl_comment_begin
;
254 extern unsigned char _rl_parsing_conditionalized_out
;
255 extern Keymap _rl_keymap
;
256 extern FILE *_rl_in_stream
;
257 extern FILE *_rl_out_stream
;
258 extern int _rl_last_command_was_kill
;
259 extern int _rl_eof_char
;
260 extern procenv_t readline_top_level
;
263 extern int _rl_enable_keypad
;
264 extern int _rl_enable_meta
;
265 extern char *_rl_term_clreol
;
266 extern char *_rl_term_clrpag
;
267 extern char *_rl_term_im
;
268 extern char *_rl_term_ic
;
269 extern char *_rl_term_ei
;
270 extern char *_rl_term_DC
;
271 extern char *_rl_term_up
;
272 extern char *_rl_term_dc
;
273 extern char *_rl_term_cr
;
274 extern char *_rl_term_IC
;
275 extern int _rl_screenheight
;
276 extern int _rl_screenwidth
;
277 extern int _rl_screenchars
;
278 extern int _rl_terminal_can_insert
;
279 extern int _rl_term_autowrap
;
282 extern int _rl_doing_an_undo
;
283 extern int _rl_undo_group_level
;
286 extern int _rl_vi_last_command
;
288 #endif /* _RL_PRIVATE_H_ */