rlprivate.h (136644) | rlprivate.h (157184) |
---|---|
1/* rlprivate.h -- functions and variables global to the readline library, 2 but not intended for use by applications. */ 3 | 1/* rlprivate.h -- functions and variables global to the readline library, 2 but not intended for use by applications. */ 3 |
4/* Copyright (C) 1999-2004 Free Software Foundation, Inc. | 4/* Copyright (C) 1999-2005 Free Software Foundation, Inc. |
5 6 This file is part of the GNU Readline Library, a library for 7 reading lines of text with interactive input and history editing. 8 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. --- 12 unchanged lines hidden (view full) --- 25#define _RL_PRIVATE_H_ 26 27#include "rlconf.h" /* for VISIBLE_STATS */ 28#include "rlstdc.h" 29#include "posixjmp.h" /* defines procenv_t */ 30 31/************************************************************************* 32 * * | 5 6 This file is part of the GNU Readline Library, a library for 7 reading lines of text with interactive input and history editing. 8 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. --- 12 unchanged lines hidden (view full) --- 25#define _RL_PRIVATE_H_ 26 27#include "rlconf.h" /* for VISIBLE_STATS */ 28#include "rlstdc.h" 29#include "posixjmp.h" /* defines procenv_t */ 30 31/************************************************************************* 32 * * |
33 * Global structs undocumented in texinfo manual and not in readline.h * 34 * * 35 *************************************************************************/ 36/* search types */ 37#define RL_SEARCH_ISEARCH 0x01 /* incremental search */ 38#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */ 39#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */ 40 41/* search flags */ 42#define SF_REVERSE 0x01 43#define SF_FOUND 0x02 44#define SF_FAILED 0x04 45 46typedef struct __rl_search_context 47{ 48 int type; 49 int sflags; 50 51 char *search_string; 52 int search_string_index; 53 int search_string_size; 54 55 char **lines; 56 char *allocated_line; 57 int hlen; 58 int hindex; 59 60 int save_point; 61 int save_mark; 62 int save_line; 63 int last_found_line; 64 char *prev_line_found; 65 66 UNDO_LIST *save_undo_list; 67 68 int history_pos; 69 int direction; 70 71 int lastc; 72#if defined (HANDLE_MULTIBYTE) 73 char mb[MB_LEN_MAX]; 74#endif 75 76 char *sline; 77 int sline_len; 78 int sline_index; 79 80 char *search_terminators; 81} _rl_search_cxt; 82 83/* Callback data for reading numeric arguments */ 84#define NUM_SAWMINUS 0x01 85#define NUM_SAWDIGITS 0x02 86#define NUM_READONE 0x04 87 88typedef int _rl_arg_cxt; 89 90/* A context for reading key sequences longer than a single character when 91 using the callback interface. */ 92#define KSEQ_DISPATCHED 0x01 93#define KSEQ_SUBSEQ 0x02 94#define KSEQ_RECURSIVE 0x04 95 96typedef struct __rl_keyseq_context 97{ 98 int flags; 99 int subseq_arg; 100 int subseq_retval; /* XXX */ 101 Keymap dmap; 102 103 Keymap oldmap; 104 int okey; 105 struct __rl_keyseq_context *ocxt; 106 int childval; 107} _rl_keyseq_cxt; 108 109 /* fill in more as needed */ 110/* `Generic' callback data and functions */ 111typedef struct __rl_callback_generic_arg 112{ 113 int count; 114 int i1, i2; 115 /* add here as needed */ 116} _rl_callback_generic_arg; 117 118typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *)); 119 120/************************************************************************* 121 * * |
|
33 * Global functions undocumented in texinfo manual and not in readline.h * 34 * * 35 *************************************************************************/ 36 37/************************************************************************* 38 * * 39 * Global variables undocumented in texinfo manual and not in readline.h * 40 * * --- 8 unchanged lines hidden (view full) --- 49/* readline.c */ 50extern int rl_line_buffer_len; 51extern int rl_arg_sign; 52extern int rl_visible_prompt_length; 53extern int readline_echoing_p; 54extern int rl_key_sequence_length; 55extern int rl_byte_oriented; 56 | 122 * Global functions undocumented in texinfo manual and not in readline.h * 123 * * 124 *************************************************************************/ 125 126/************************************************************************* 127 * * 128 * Global variables undocumented in texinfo manual and not in readline.h * 129 * * --- 8 unchanged lines hidden (view full) --- 138/* readline.c */ 139extern int rl_line_buffer_len; 140extern int rl_arg_sign; 141extern int rl_visible_prompt_length; 142extern int readline_echoing_p; 143extern int rl_key_sequence_length; 144extern int rl_byte_oriented; 145 |
146extern _rl_keyseq_cxt *_rl_kscxt; 147 |
|
57/* display.c */ 58extern int rl_display_fixed; 59 60/* parens.c */ 61extern int rl_blink_matching_paren; 62 63/************************************************************************* 64 * * --- 30 unchanged lines hidden (view full) --- 95 96#if defined(READLINE_CALLBACKS) 97 98/* readline.c */ 99extern void readline_internal_setup PARAMS((void)); 100extern char *readline_internal_teardown PARAMS((int)); 101extern int readline_internal_char PARAMS((void)); 102 | 148/* display.c */ 149extern int rl_display_fixed; 150 151/* parens.c */ 152extern int rl_blink_matching_paren; 153 154/************************************************************************* 155 * * --- 30 unchanged lines hidden (view full) --- 186 187#if defined(READLINE_CALLBACKS) 188 189/* readline.c */ 190extern void readline_internal_setup PARAMS((void)); 191extern char *readline_internal_teardown PARAMS((int)); 192extern int readline_internal_char PARAMS((void)); 193 |
194extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void)); 195extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *)); 196extern void _rl_keyseq_chain_dispose PARAMS((void)); 197 198extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *)); 199 200/* callback.c */ 201extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int)); 202extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *)); 203 |
|
103#endif /* READLINE_CALLBACKS */ 104 105/* bind.c */ 106 107/* complete.c */ 108extern char _rl_find_completion_word PARAMS((int *, int *)); 109extern void _rl_free_match_list PARAMS((char **)); 110 --- 16 unchanged lines hidden (view full) --- 127/* input.c */ 128extern int _rl_any_typein PARAMS((void)); 129extern int _rl_input_available PARAMS((void)); 130extern int _rl_input_queued PARAMS((int)); 131extern void _rl_insert_typein PARAMS((int)); 132extern int _rl_unget_char PARAMS((int)); 133extern int _rl_pushed_input_available PARAMS((void)); 134 | 204#endif /* READLINE_CALLBACKS */ 205 206/* bind.c */ 207 208/* complete.c */ 209extern char _rl_find_completion_word PARAMS((int *, int *)); 210extern void _rl_free_match_list PARAMS((char **)); 211 --- 16 unchanged lines hidden (view full) --- 228/* input.c */ 229extern int _rl_any_typein PARAMS((void)); 230extern int _rl_input_available PARAMS((void)); 231extern int _rl_input_queued PARAMS((int)); 232extern void _rl_insert_typein PARAMS((int)); 233extern int _rl_unget_char PARAMS((int)); 234extern int _rl_pushed_input_available PARAMS((void)); 235 |
236/* isearch.c */ 237extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int)); 238extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int)); 239 240extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int)); 241extern int _rl_isearch_callback PARAMS((_rl_search_cxt *)); 242 243extern int _rl_search_getchar PARAMS((_rl_search_cxt *)); 244 |
|
135/* macro.c */ 136extern void _rl_with_macro_input PARAMS((char *)); 137extern int _rl_next_macro_key PARAMS((void)); 138extern void _rl_push_executing_macro PARAMS((void)); 139extern void _rl_pop_executing_macro PARAMS((void)); 140extern void _rl_add_macro_char PARAMS((int)); 141extern void _rl_kill_kbd_macro PARAMS((void)); 142 143/* misc.c */ | 245/* macro.c */ 246extern void _rl_with_macro_input PARAMS((char *)); 247extern int _rl_next_macro_key PARAMS((void)); 248extern void _rl_push_executing_macro PARAMS((void)); 249extern void _rl_pop_executing_macro PARAMS((void)); 250extern void _rl_add_macro_char PARAMS((int)); 251extern void _rl_kill_kbd_macro PARAMS((void)); 252 253/* misc.c */ |
144extern int _rl_init_argument PARAMS((void)); | 254extern int _rl_arg_overflow PARAMS((void)); 255extern void _rl_arg_init PARAMS((void)); 256extern int _rl_arg_getchar PARAMS((void)); 257extern int _rl_arg_callback PARAMS((_rl_arg_cxt)); 258extern void _rl_reset_argument PARAMS((void)); 259 |
145extern void _rl_start_using_history PARAMS((void)); 146extern int _rl_free_saved_history_line PARAMS((void)); 147extern void _rl_set_insert_mode PARAMS((int, int)); 148 149/* nls.c */ 150extern int _rl_init_eightbit PARAMS((void)); 151 152/* parens.c */ 153extern void _rl_enable_paren_matching PARAMS((int)); 154 155/* readline.c */ 156extern void _rl_init_line_state PARAMS((void)); 157extern void _rl_set_the_line PARAMS((void)); 158extern int _rl_dispatch PARAMS((int, Keymap)); 159extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); | 260extern void _rl_start_using_history PARAMS((void)); 261extern int _rl_free_saved_history_line PARAMS((void)); 262extern void _rl_set_insert_mode PARAMS((int, int)); 263 264/* nls.c */ 265extern int _rl_init_eightbit PARAMS((void)); 266 267/* parens.c */ 268extern void _rl_enable_paren_matching PARAMS((int)); 269 270/* readline.c */ 271extern void _rl_init_line_state PARAMS((void)); 272extern void _rl_set_the_line PARAMS((void)); 273extern int _rl_dispatch PARAMS((int, Keymap)); 274extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); |
275extern void _rl_internal_char_cleanup PARAMS((void)); |
|
160 161/* rltty.c */ 162extern int _rl_disable_tty_signals PARAMS((void)); 163extern int _rl_restore_tty_signals PARAMS((void)); 164 | 276 277/* rltty.c */ 278extern int _rl_disable_tty_signals PARAMS((void)); 279extern int _rl_restore_tty_signals PARAMS((void)); 280 |
281/* search.c */ 282extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *)); 283 |
|
165/* terminal.c */ 166extern void _rl_get_screen_size PARAMS((int, int)); 167extern int _rl_init_terminal_io PARAMS((const char *)); 168#ifdef _MINIX 169extern void _rl_output_character_function PARAMS((int)); 170#else 171extern int _rl_output_character_function PARAMS((int)); 172#endif --- 39 unchanged lines hidden (view full) --- 212/************************************************************************* 213 * Undocumented private variables * 214 *************************************************************************/ 215 216/* bind.c */ 217extern const char *_rl_possible_control_prefixes[]; 218extern const char *_rl_possible_meta_prefixes[]; 219 | 284/* terminal.c */ 285extern void _rl_get_screen_size PARAMS((int, int)); 286extern int _rl_init_terminal_io PARAMS((const char *)); 287#ifdef _MINIX 288extern void _rl_output_character_function PARAMS((int)); 289#else 290extern int _rl_output_character_function PARAMS((int)); 291#endif --- 39 unchanged lines hidden (view full) --- 331/************************************************************************* 332 * Undocumented private variables * 333 *************************************************************************/ 334 335/* bind.c */ 336extern const char *_rl_possible_control_prefixes[]; 337extern const char *_rl_possible_meta_prefixes[]; 338 |
339/* callback.c */ 340extern _rl_callback_func_t *_rl_callback_func; 341extern _rl_callback_generic_arg *_rl_callback_data; 342 |
|
220/* complete.c */ 221extern int _rl_complete_show_all; 222extern int _rl_complete_show_unmodified; 223extern int _rl_complete_mark_directories; 224extern int _rl_complete_mark_symlink_dirs; 225extern int _rl_print_completions_horizontally; 226extern int _rl_completion_case_fold; 227extern int _rl_match_hidden_files; 228extern int _rl_page_completions; 229 230/* display.c */ 231extern int _rl_vis_botlin; 232extern int _rl_last_c_pos; 233extern int _rl_suppress_redisplay; | 343/* complete.c */ 344extern int _rl_complete_show_all; 345extern int _rl_complete_show_unmodified; 346extern int _rl_complete_mark_directories; 347extern int _rl_complete_mark_symlink_dirs; 348extern int _rl_print_completions_horizontally; 349extern int _rl_completion_case_fold; 350extern int _rl_match_hidden_files; 351extern int _rl_page_completions; 352 353/* display.c */ 354extern int _rl_vis_botlin; 355extern int _rl_last_c_pos; 356extern int _rl_suppress_redisplay; |
357extern int _rl_want_redisplay; |
|
234extern char *rl_display_prompt; 235 236/* isearch.c */ 237extern char *_rl_isearch_terminators; 238 | 358extern char *rl_display_prompt; 359 360/* isearch.c */ 361extern char *_rl_isearch_terminators; 362 |
363extern _rl_search_cxt *_rl_iscxt; 364 |
|
239/* macro.c */ 240extern char *_rl_executing_macro; 241 242/* misc.c */ 243extern int _rl_history_preserve_point; 244extern int _rl_history_saved_point; 245 | 365/* macro.c */ 366extern char *_rl_executing_macro; 367 368/* misc.c */ 369extern int _rl_history_preserve_point; 370extern int _rl_history_saved_point; 371 |
372extern _rl_arg_cxt _rl_argcxt; 373 |
|
246/* readline.c */ 247extern int _rl_horizontal_scroll_mode; 248extern int _rl_mark_modified_lines; 249extern int _rl_bell_preference; 250extern int _rl_meta_flag; 251extern int _rl_convert_meta_chars_to_ascii; 252extern int _rl_output_meta_chars; | 374/* readline.c */ 375extern int _rl_horizontal_scroll_mode; 376extern int _rl_mark_modified_lines; 377extern int _rl_bell_preference; 378extern int _rl_meta_flag; 379extern int _rl_convert_meta_chars_to_ascii; 380extern int _rl_output_meta_chars; |
381extern int _rl_bind_stty_chars; |
|
253extern char *_rl_comment_begin; 254extern unsigned char _rl_parsing_conditionalized_out; 255extern Keymap _rl_keymap; 256extern FILE *_rl_in_stream; 257extern FILE *_rl_out_stream; 258extern int _rl_last_command_was_kill; 259extern int _rl_eof_char; 260extern procenv_t readline_top_level; 261 | 382extern char *_rl_comment_begin; 383extern unsigned char _rl_parsing_conditionalized_out; 384extern Keymap _rl_keymap; 385extern FILE *_rl_in_stream; 386extern FILE *_rl_out_stream; 387extern int _rl_last_command_was_kill; 388extern int _rl_eof_char; 389extern procenv_t readline_top_level; 390 |
391/* search.c */ 392extern _rl_search_cxt *_rl_nscxt; 393 |
|
262/* terminal.c */ 263extern int _rl_enable_keypad; 264extern int _rl_enable_meta; 265extern char *_rl_term_clreol; 266extern char *_rl_term_clrpag; 267extern char *_rl_term_im; 268extern char *_rl_term_ic; 269extern char *_rl_term_ei; --- 19 unchanged lines hidden --- | 394/* terminal.c */ 395extern int _rl_enable_keypad; 396extern int _rl_enable_meta; 397extern char *_rl_term_clreol; 398extern char *_rl_term_clrpag; 399extern char *_rl_term_im; 400extern char *_rl_term_ic; 401extern char *_rl_term_ei; --- 19 unchanged lines hidden --- |