| readline.h | | readline.h | |
| /* Readline.h -- the names of functions callable from within readline. */ | | /* Readline.h -- the names of functions callable from within readline. */ | |
| | | | |
|
| /* Copyright (C) 1987-2004 Free Software Foundation, Inc. | | /* Copyright (C) 1987-2005 Free Software Foundation, Inc. | |
| | | | |
| This file is part of the GNU Readline Library, a library for | | This file is part of the GNU Readline Library, a library for | |
| reading lines of text with interactive input and history editing. | | reading lines of text with interactive input and history editing. | |
| | | | |
| The GNU Readline Library is free software; you can redistribute it | | The GNU Readline Library is free software; you can redistribute it | |
| and/or modify it under the terms of the GNU General Public License | | and/or modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2, or | | as published by the Free Software Foundation; either version 2, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| The GNU Readline Library is distributed in the hope that it will be | | The GNU Readline Library is distributed in the hope that it will be | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| # include "keymaps.h" | | # include "keymaps.h" | |
| # include "tilde.h" | | # include "tilde.h" | |
| #else | | #else | |
| # include <readline/rlstdc.h> | | # include <readline/rlstdc.h> | |
| # include <readline/rltypedefs.h> | | # include <readline/rltypedefs.h> | |
| # include <readline/keymaps.h> | | # include <readline/keymaps.h> | |
| # include <readline/tilde.h> | | # include <readline/tilde.h> | |
| #endif | | #endif | |
| | | | |
| /* Hex-encoded Readline version number. */ | | /* Hex-encoded Readline version number. */ | |
|
| #define RL_READLINE_VERSION 0x0500 /* Readline 5.0 */ | | #define RL_READLINE_VERSION 0x0501 /* Readline 5.1 */ | |
| #define RL_VERSION_MAJOR 5 | | #define RL_VERSION_MAJOR 5 | |
|
| #define RL_VERSION_MINOR 0 | | #define RL_VERSION_MINOR 1 | |
| | | | |
| /* Readline data structures. */ | | /* Readline data structures. */ | |
| | | | |
| /* Maintaining the state of undo. We remember individual deletes and inser
ts | | /* Maintaining the state of undo. We remember individual deletes and inser
ts | |
| on a chain of things to do. */ | | on a chain of things to do. */ | |
| | | | |
| /* The actions that undo knows how to undo. Notice that UNDO_DELETE means | | /* The actions that undo knows how to undo. Notice that UNDO_DELETE means | |
| to insert some text, and UNDO_INSERT means to delete some text. I.e., | | to insert some text, and UNDO_INSERT means to delete some text. I.e., | |
| the code tells undo what to undo, not how to undo it. */ | | the code tells undo what to undo, not how to undo it. */ | |
| enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; | | enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; | |
| | | | |
| skipping to change at line 244 | | skipping to change at line 244 | |
| extern int rl_vi_eof_maybe PARAMS((int, int)); | | extern int rl_vi_eof_maybe PARAMS((int, int)); | |
| extern int rl_vi_insertion_mode PARAMS((int, int)); | | extern int rl_vi_insertion_mode PARAMS((int, int)); | |
| extern int rl_vi_movement_mode PARAMS((int, int)); | | extern int rl_vi_movement_mode PARAMS((int, int)); | |
| extern int rl_vi_arg_digit PARAMS((int, int)); | | extern int rl_vi_arg_digit PARAMS((int, int)); | |
| extern int rl_vi_change_case PARAMS((int, int)); | | extern int rl_vi_change_case PARAMS((int, int)); | |
| extern int rl_vi_put PARAMS((int, int)); | | extern int rl_vi_put PARAMS((int, int)); | |
| extern int rl_vi_column PARAMS((int, int)); | | extern int rl_vi_column PARAMS((int, int)); | |
| extern int rl_vi_delete_to PARAMS((int, int)); | | extern int rl_vi_delete_to PARAMS((int, int)); | |
| extern int rl_vi_change_to PARAMS((int, int)); | | extern int rl_vi_change_to PARAMS((int, int)); | |
| extern int rl_vi_yank_to PARAMS((int, int)); | | extern int rl_vi_yank_to PARAMS((int, int)); | |
|
| | | extern int rl_vi_rubout PARAMS((int, int)); | |
| extern int rl_vi_delete PARAMS((int, int)); | | extern int rl_vi_delete PARAMS((int, int)); | |
| extern int rl_vi_back_to_indent PARAMS((int, int)); | | extern int rl_vi_back_to_indent PARAMS((int, int)); | |
| extern int rl_vi_first_print PARAMS((int, int)); | | extern int rl_vi_first_print PARAMS((int, int)); | |
| extern int rl_vi_char_search PARAMS((int, int)); | | extern int rl_vi_char_search PARAMS((int, int)); | |
| extern int rl_vi_match PARAMS((int, int)); | | extern int rl_vi_match PARAMS((int, int)); | |
| extern int rl_vi_change_char PARAMS((int, int)); | | extern int rl_vi_change_char PARAMS((int, int)); | |
| extern int rl_vi_subst PARAMS((int, int)); | | extern int rl_vi_subst PARAMS((int, int)); | |
| extern int rl_vi_overstrike PARAMS((int, int)); | | extern int rl_vi_overstrike PARAMS((int, int)); | |
| extern int rl_vi_overstrike_delete PARAMS((int, int)); | | extern int rl_vi_overstrike_delete PARAMS((int, int)); | |
| extern int rl_vi_replace PARAMS((int, int)); | | extern int rl_vi_replace PARAMS((int, int)); | |
| | | | |
| skipping to change at line 305 | | skipping to change at line 306 | |
| extern int rl_unbind_key_in_map PARAMS((int, Keymap)); | | extern int rl_unbind_key_in_map PARAMS((int, Keymap)); | |
| extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *)); | | extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *)); | |
| extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *,
Keymap)); | | extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *,
Keymap)); | |
| extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); | | extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); | |
| extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); | | extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); | |
| extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *)); | | extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *)); | |
| extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *,
Keymap)); | | extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *,
Keymap)); | |
| extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_
t *)); | | extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_
t *)); | |
| extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_comman
d_func_t *, Keymap)); | | extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_comman
d_func_t *, Keymap)); | |
| extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); | | extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); | |
|
| | | | |
| | | extern char *rl_variable_value PARAMS((const char *)); | |
| extern int rl_variable_bind PARAMS((const char *, const char *)); | | extern int rl_variable_bind PARAMS((const char *, const char *)); | |
| | | | |
| /* Backwards compatibility, use rl_bind_keyseq_in_map instead. */ | | /* Backwards compatibility, use rl_bind_keyseq_in_map instead. */ | |
| extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); | | extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); | |
| | | | |
| /* Backwards compatibility, use rl_generic_bind instead. */ | | /* Backwards compatibility, use rl_generic_bind instead. */ | |
| extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); | | extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); | |
| | | | |
| /* Undocumented in the texinfo manual; not really useful to programs. */ | | /* Undocumented in the texinfo manual; not really useful to programs. */ | |
| extern int rl_translate_keyseq PARAMS((const char *, char *, int *)); | | extern int rl_translate_keyseq PARAMS((const char *, char *, int *)); | |
| | | | |
| skipping to change at line 404 | | skipping to change at line 407 | |
| /* Terminal and tty mode management. */ | | /* Terminal and tty mode management. */ | |
| extern void rl_prep_terminal PARAMS((int)); | | extern void rl_prep_terminal PARAMS((int)); | |
| extern void rl_deprep_terminal PARAMS((void)); | | extern void rl_deprep_terminal PARAMS((void)); | |
| extern void rl_tty_set_default_bindings PARAMS((Keymap)); | | extern void rl_tty_set_default_bindings PARAMS((Keymap)); | |
| extern void rl_tty_unset_default_bindings PARAMS((Keymap)); | | extern void rl_tty_unset_default_bindings PARAMS((Keymap)); | |
| | | | |
| extern int rl_reset_terminal PARAMS((const char *)); | | extern int rl_reset_terminal PARAMS((const char *)); | |
| extern void rl_resize_terminal PARAMS((void)); | | extern void rl_resize_terminal PARAMS((void)); | |
| extern void rl_set_screen_size PARAMS((int, int)); | | extern void rl_set_screen_size PARAMS((int, int)); | |
| extern void rl_get_screen_size PARAMS((int *, int *)); | | extern void rl_get_screen_size PARAMS((int *, int *)); | |
|
| | | extern void rl_reset_screen_size PARAMS((void)); | |
| | | | |
| extern char *rl_get_termcap PARAMS((const char *)); | | extern char *rl_get_termcap PARAMS((const char *)); | |
| | | | |
| /* Functions for character input. */ | | /* Functions for character input. */ | |
| extern int rl_stuff_char PARAMS((int)); | | extern int rl_stuff_char PARAMS((int)); | |
| extern int rl_execute_next PARAMS((int)); | | extern int rl_execute_next PARAMS((int)); | |
| extern int rl_clear_pending_input PARAMS((void)); | | extern int rl_clear_pending_input PARAMS((void)); | |
| extern int rl_read_key PARAMS((void)); | | extern int rl_read_key PARAMS((void)); | |
| extern int rl_getc PARAMS((FILE *)); | | extern int rl_getc PARAMS((FILE *)); | |
| extern int rl_set_keyboard_input_timeout PARAMS((int)); | | extern int rl_set_keyboard_input_timeout PARAMS((int)); | |
| | | | |
| skipping to change at line 531 | | skipping to change at line 535 | |
| /* The address of the last command function Readline executed. */ | | /* The address of the last command function Readline executed. */ | |
| extern rl_command_func_t *rl_last_func; | | extern rl_command_func_t *rl_last_func; | |
| | | | |
| /* The name of the terminal to use. */ | | /* The name of the terminal to use. */ | |
| extern const char *rl_terminal_name; | | extern const char *rl_terminal_name; | |
| | | | |
| /* The input and output streams. */ | | /* The input and output streams. */ | |
| extern FILE *rl_instream; | | extern FILE *rl_instream; | |
| extern FILE *rl_outstream; | | extern FILE *rl_outstream; | |
| | | | |
|
| | | /* If non-zero, Readline gives values of LINES and COLUMNS from the environ | |
| | | ment | |
| | | greater precedence than values fetched from the kernel when computing th | |
| | | e | |
| | | screen dimensions. */ | |
| | | extern int rl_prefer_env_winsize; | |
| | | | |
| /* If non-zero, then this is the address of a function to call just | | /* If non-zero, then this is the address of a function to call just | |
| before readline_internal () prints the first prompt. */ | | before readline_internal () prints the first prompt. */ | |
| extern rl_hook_func_t *rl_startup_hook; | | extern rl_hook_func_t *rl_startup_hook; | |
| | | | |
| /* If non-zero, this is the address of a function to call just before | | /* If non-zero, this is the address of a function to call just before | |
| readline_internal_setup () returns and readline_internal starts | | readline_internal_setup () returns and readline_internal starts | |
| reading input characters. */ | | reading input characters. */ | |
| extern rl_hook_func_t *rl_pre_input_hook; | | extern rl_hook_func_t *rl_pre_input_hook; | |
| | | | |
| /* The address of a function to call periodically while Readline is | | /* The address of a function to call periodically while Readline is | |
| | | | |
| skipping to change at line 762 | | skipping to change at line 771 | |
| #define RL_PROMPT_START_IGNORE '\001' | | #define RL_PROMPT_START_IGNORE '\001' | |
| #define RL_PROMPT_END_IGNORE '\002' | | #define RL_PROMPT_END_IGNORE '\002' | |
| | | | |
| /* Possible values for do_replace argument to rl_filename_quoting_function, | | /* Possible values for do_replace argument to rl_filename_quoting_function, | |
| called by rl_complete_internal. */ | | called by rl_complete_internal. */ | |
| #define NO_MATCH 0 | | #define NO_MATCH 0 | |
| #define SINGLE_MATCH 1 | | #define SINGLE_MATCH 1 | |
| #define MULT_MATCH 2 | | #define MULT_MATCH 2 | |
| | | | |
| /* Possible state values for rl_readline_state */ | | /* Possible state values for rl_readline_state */ | |
|
| #define RL_STATE_NONE 0x00000 /* no state; before first ca
ll */ | | #define RL_STATE_NONE 0x000000 /* no state; before
first call */ | |
| | | | |
|
| #define RL_STATE_INITIALIZING 0x00001 /* initializing */ | | #define RL_STATE_INITIALIZING 0x000001 /* initializing */ | |
| #define RL_STATE_INITIALIZED 0x00002 /* initialization done */ | | #define RL_STATE_INITIALIZED 0x000002 /* initialization done */ | |
| #define RL_STATE_TERMPREPPED 0x00004 /* terminal is prepped */ | | #define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */ | |
| #define RL_STATE_READCMD 0x00008 /* reading a command key */ | | #define RL_STATE_READCMD 0x000008 /* reading a command key */ | |
| #define RL_STATE_METANEXT 0x00010 /* reading input after ESC * | | #define RL_STATE_METANEXT 0x000010 /* reading input after ESC * | |
| / | | / | |
| #define RL_STATE_DISPATCHING 0x00020 /* dispatching to a command | | #define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command | |
| */ | | */ | |
| #define RL_STATE_MOREINPUT 0x00040 /* reading more input in a c | | #define RL_STATE_MOREINPUT 0x000040 /* reading more input in a c | |
| ommand function */ | | ommand function */ | |
| #define RL_STATE_ISEARCH 0x00080 /* doing incremental search | | #define RL_STATE_ISEARCH 0x000080 /* doing incremental search | |
| */ | | */ | |
| #define RL_STATE_NSEARCH 0x00100 /* doing non-inc search */ | | #define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */ | |
| #define RL_STATE_SEARCH 0x00200 /* doing a history s | | #define RL_STATE_SEARCH 0x000200 /* doing a history s | |
| earch */ | | earch */ | |
| #define RL_STATE_NUMERICARG 0x00400 /* reading numeric argument | | #define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument | |
| */ | | */ | |
| #define RL_STATE_MACROINPUT 0x00800 /* getting input from a macr | | #define RL_STATE_MACROINPUT 0x000800 /* getting input from a macr | |
| o */ | | o */ | |
| #define RL_STATE_MACRODEF 0x01000 /* defining keyboard macro * | | #define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro * | |
| / | | / | |
| #define RL_STATE_OVERWRITE 0x02000 /* overwrite mode */ | | #define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */ | |
| #define RL_STATE_COMPLETING 0x04000 /* doing completion */ | | #define RL_STATE_COMPLETING 0x004000 /* doing completion */ | |
| #define RL_STATE_SIGHANDLER 0x08000 /* in readline sighandler */ | | #define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */ | |
| #define RL_STATE_UNDOING 0x10000 /* doing an undo */ | | #define RL_STATE_UNDOING 0x010000 /* doing an undo */ | |
| #define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */ | | #define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */ | |
| #define RL_STATE_TTYCSAVED 0x40000 /* tty special chars saved * | | #define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved * | |
| / | | / | |
| | | #define RL_STATE_CALLBACK 0x080000 /* using the callback interf | |
| | | ace */ | |
| | | #define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */ | |
| | | #define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key comm | |
| | | and */ | |
| | | #define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode a | |
| | | t least once */ | |
| | | | |
|
| #define RL_STATE_DONE 0x80000 /* done; accepted line */ | | #define RL_STATE_DONE 0x800000 /* done; accepted line */ | |
| | | | |
| #define RL_SETSTATE(x) (rl_readline_state |= (x)) | | #define RL_SETSTATE(x) (rl_readline_state |= (x)) | |
| #define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) | | #define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) | |
| #define RL_ISSTATE(x) (rl_readline_state & (x)) | | #define RL_ISSTATE(x) (rl_readline_state & (x)) | |
| | | | |
| struct readline_state { | | struct readline_state { | |
| /* line state */ | | /* line state */ | |
| int point; | | int point; | |
| int end; | | int end; | |
| int mark; | | int mark; | |
| | | | |
End of changes. 10 change blocks. |
| 33 lines changed or deleted | | 51 lines changed or added | |
|