| 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-2009 Free Software Foundation, Inc. | | /* Copyright (C) 1987-2011 Free Software Foundation, Inc. | |
| | | | |
| This file is part of the GNU Readline Library (Readline), a library | | This file is part of the GNU Readline Library (Readline), a library | |
| for reading lines of text with interactive input and history editing. | | for reading lines of text with interactive input and history editing. | |
| | | | |
| Readline is free software: you can redistribute it and/or modify | | Readline is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation, either version 3 of the License, or | | the Free Software Foundation, either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| Readline is distributed in the hope that it will be useful, | | Readline is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| # 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 0x0600 /* Readline 6.0 */ | | #define RL_READLINE_VERSION 0x0602 /* Readline 6.2 */ | |
| #define RL_VERSION_MAJOR 6 | | #define RL_VERSION_MAJOR 6 | |
|
| #define RL_VERSION_MINOR 0 | | #define RL_VERSION_MINOR 2 | |
| | | | |
| /* 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 669 | | skipping to change at line 669 | |
| | | | |
| /* List of characters that are word break characters, but should be left | | /* List of characters that are word break characters, but should be left | |
| in TEXT when it is passed to the completion function. The shell uses | | in TEXT when it is passed to the completion function. The shell uses | |
| this to help determine what kind of completing to do. */ | | this to help determine what kind of completing to do. */ | |
| extern const char *rl_special_prefixes; | | extern const char *rl_special_prefixes; | |
| | | | |
| /* If non-zero, then this is the address of a function to call when | | /* If non-zero, then this is the address of a function to call when | |
| completing on a directory name. The function is called with | | completing on a directory name. The function is called with | |
| the address of a string (the current directory name) as an arg. It | | the address of a string (the current directory name) as an arg. It | |
| changes what is displayed when the possible completions are printed | | changes what is displayed when the possible completions are printed | |
|
| or inserted. */ | | or inserted. The directory completion hook should perform | |
| | | any necessary dequoting. This function should return 1 if it modifies | |
| | | the directory name pointer passed as an argument. If the directory | |
| | | completion hook returns 0, it should not modify the directory name | |
| | | pointer passed as an argument. */ | |
| extern rl_icppfunc_t *rl_directory_completion_hook; | | extern rl_icppfunc_t *rl_directory_completion_hook; | |
| | | | |
| /* If non-zero, this is the address of a function to call when completing | | /* If non-zero, this is the address of a function to call when completing | |
| a directory name. This function takes the address of the directory name | | a directory name. This function takes the address of the directory name | |
| to be modified as an argument. Unlike rl_directory_completion_hook, it | | to be modified as an argument. Unlike rl_directory_completion_hook, it | |
| only modifies the directory name used in opendir(2), not what is display
ed | | only modifies the directory name used in opendir(2), not what is display
ed | |
|
| when the possible completions are printed or inserted. It is called | | when the possible completions are printed or inserted. If set, it takes | |
| before rl_directory_completion_hook. I'm not happy with how this works | | precedence over rl_directory_completion_hook. The directory rewrite | |
| yet, so it's undocumented. */ | | hook should perform any necessary dequoting. This function has the same | |
| | | return value properties as the directory_completion_hook. | |
| | | | |
| | | I'm not happy with how this works yet, so it's undocumented. I'm trying | |
| | | it in bash to see how well it goes. */ | |
| extern rl_icppfunc_t *rl_directory_rewrite_hook; | | extern rl_icppfunc_t *rl_directory_rewrite_hook; | |
| | | | |
| /* If non-zero, this is the address of a function to call when reading | | /* If non-zero, this is the address of a function to call when reading | |
| directory entries from the filesystem for completion and comparing | | directory entries from the filesystem for completion and comparing | |
| them to the partial word to be completed. The function should | | them to the partial word to be completed. The function should | |
| either return its first argument (if no conversion takes place) or | | either return its first argument (if no conversion takes place) or | |
| newly-allocated memory. This can, for instance, convert filenames | | newly-allocated memory. This can, for instance, convert filenames | |
| between character sets for comparison against what's typed at the | | between character sets for comparison against what's typed at the | |
| keyboard. The returned value is what is added to the list of | | keyboard. The returned value is what is added to the list of | |
| matches. The second argument is the length of the filename to be | | matches. The second argument is the length of the filename to be | |
| | | | |
| skipping to change at line 808 | | skipping to change at line 816 | |
| | | | |
| /* 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 0x000000 /* no state; before
first call */ | | #define RL_STATE_NONE 0x000000 /* no state; before
first call */ | |
| | | | |
|
| #define RL_STATE_INITIALIZING 0x000001 /* initializing */ | | #define RL_STATE_INITIALIZING 0x0000001 /* initializing */ | |
| #define RL_STATE_INITIALIZED 0x000002 /* initialization done */ | | #define RL_STATE_INITIALIZED 0x0000002 /* initialization done */ | |
| #define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */ | | #define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */ | |
| #define RL_STATE_READCMD 0x000008 /* reading a command key */ | | #define RL_STATE_READCMD 0x0000008 /* reading a command key */ | |
| #define RL_STATE_METANEXT 0x000010 /* reading input after ESC * | | #define RL_STATE_METANEXT 0x0000010 /* reading input after ESC * | |
| / | | / | |
| #define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command | | #define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command | |
| */ | | */ | |
| #define RL_STATE_MOREINPUT 0x000040 /* reading more input in a c | | #define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a c | |
| ommand function */ | | ommand function */ | |
| #define RL_STATE_ISEARCH 0x000080 /* doing incremental search | | #define RL_STATE_ISEARCH 0x0000080 /* doing incremental search | |
| */ | | */ | |
| #define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */ | | #define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */ | |
| #define RL_STATE_SEARCH 0x000200 /* doing a history s | | #define RL_STATE_SEARCH 0x0000200 /* doing a history s | |
| earch */ | | earch */ | |
| #define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument | | #define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument | |
| */ | | */ | |
| #define RL_STATE_MACROINPUT 0x000800 /* getting input from a macr | | #define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macr | |
| o */ | | o */ | |
| #define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro * | | #define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro * | |
| / | | / | |
| #define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */ | | #define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */ | |
| #define RL_STATE_COMPLETING 0x004000 /* doing completion */ | | #define RL_STATE_COMPLETING 0x0004000 /* doing completion */ | |
| #define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */ | | #define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */ | |
| #define RL_STATE_UNDOING 0x010000 /* doing an undo */ | | #define RL_STATE_UNDOING 0x0010000 /* doing an undo */ | |
| #define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */ | | #define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */ | |
| #define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved * | | #define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved * | |
| / | | / | |
| #define RL_STATE_CALLBACK 0x080000 /* using the callback interf | | #define RL_STATE_CALLBACK 0x0080000 /* using the callback interf | |
| ace */ | | ace */ | |
| #define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */ | | #define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */ | |
| #define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key comm | | #define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key comm | |
| and */ | | and */ | |
| #define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode a | | #define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode a | |
| t least once */ | | t least once */ | |
| #define RL_STATE_REDISPLAYING 0x800000 /* updating terminal display | | #define RL_STATE_REDISPLAYING 0x0800000 /* updating terminal display | |
| */ | | */ | |
| | | | |
| #define RL_STATE_DONE 0x1000000 /* done; accepted line */ | | #define RL_STATE_DONE 0x1000000 /* 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; | |
| | | | |
End of changes. 6 change blocks. |
| 44 lines changed or deleted | | 52 lines changed or added | |
|