/* Readline.h -- the names of functions callable from within readline. */
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
#endif
/* Hex-encoded Readline version number. */
-#define RL_READLINE_VERSION 0x0600 /* Readline 6.0 */
+#define RL_READLINE_VERSION 0x0603 /* Readline 6.3 */
#define RL_VERSION_MAJOR 6
-#define RL_VERSION_MINOR 0
+#define RL_VERSION_MINOR 3
/* Readline data structures. */
extern int rl_backward_word PARAMS((int, int));
extern int rl_refresh_line PARAMS((int, int));
extern int rl_clear_screen PARAMS((int, int));
+extern int rl_skip_csi_sequence PARAMS((int, int));
extern int rl_arrow_keys PARAMS((int, int));
/* Bindable commands for inserting and deleting text. */
extern int rl_complete PARAMS((int, int));
extern int rl_possible_completions PARAMS((int, int));
extern int rl_insert_completions PARAMS((int, int));
+extern int rl_old_menu_complete PARAMS((int, int));
extern int rl_menu_complete PARAMS((int, int));
+extern int rl_backward_menu_complete PARAMS((int, int));
/* Bindable commands for killing and yanking text, and managing the kill ring. */
extern int rl_kill_word PARAMS((int, int));
extern int rl_start_kbd_macro PARAMS((int, int));
extern int rl_end_kbd_macro PARAMS((int, int));
extern int rl_call_last_kbd_macro PARAMS((int, int));
+extern int rl_print_last_kbd_macro PARAMS((int, int));
/* Bindable undo commands. */
extern int rl_revert_line PARAMS((int, int));
/* Bindable commands for incremental and non-incremental history searching. */
extern int rl_history_search_forward PARAMS((int, int));
extern int rl_history_search_backward PARAMS((int, int));
+extern int rl_history_substr_search_forward PARAMS((int, int));
+extern int rl_history_substr_search_backward PARAMS((int, int));
extern int rl_noninc_forward_search PARAMS((int, int));
extern int rl_noninc_reverse_search PARAMS((int, int));
extern int rl_noninc_forward_search_again PARAMS((int, int));
extern Keymap rl_copy_keymap PARAMS((Keymap));
extern Keymap rl_make_keymap PARAMS((void));
extern void rl_discard_keymap PARAMS((Keymap));
+extern void rl_free_keymap PARAMS((Keymap));
extern Keymap rl_get_keymap_by_name PARAMS((const char *));
extern char *rl_get_keymap_name PARAMS((Keymap));
extern int rl_set_paren_blink_timeout PARAMS((int));
+/* History management functions. */
+
+extern void rl_clear_history PARAMS((void));
+
/* Undocumented. */
extern int rl_maybe_save_line PARAMS((void));
extern int rl_maybe_unsave_line PARAMS((void));
awaiting character input, or NULL, for no event handling. */
extern rl_hook_func_t *rl_event_hook;
+/* The address of a function to call if a read is interrupted by a signal. */
+extern rl_hook_func_t *rl_signal_event_hook;
+
+/* The address of a function to call if Readline needs to know whether or not
+ there is data available from the current input source. */
+extern rl_hook_func_t *rl_input_available_hook;
+
/* The address of the function to call to fetch a character from the current
Readline input stream */
extern rl_getc_func_t *rl_getc_function;
extern Keymap rl_executing_keymap;
extern Keymap rl_binding_keymap;
+extern int rl_executing_key;
+extern char *rl_executing_keyseq;
+extern int rl_key_sequence_length;
+
/* Display variables. */
/* If non-zero, readline will erase the entire line, including any prompt,
if the only thing typed on an otherwise-blank line is something bound to
to do that. */
extern int rl_catch_sigwinch;
+/* If non-zero, the readline SIGWINCH handler will modify LINES and
+ COLUMNS in the environment. */
+extern int rl_change_environment;
+
/* Completion variables. */
/* Pointer to the generator function for completion_matches ().
NULL means to use rl_filename_completion_function (), the default
completing on a directory name. The function is called with
the address of a string (the current directory name) as an arg. It
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;
/* 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
to be modified as an argument. Unlike rl_directory_completion_hook, it
only modifies the directory name used in opendir(2), not what is displayed
- when the possible completions are printed or inserted. It is called
- before rl_directory_completion_hook. I'm not happy with how this works
- yet, so it's undocumented. */
+ when the possible completions are printed or inserted. If set, it takes
+ precedence over rl_directory_completion_hook. The directory rewrite
+ 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;
+/* If non-zero, this is the address of a function for the completer to call
+ before deciding which character to append to a completed name. It should
+ modify the directory name passed as an argument if appropriate, and return
+ non-zero if it modifies the name. This should not worry about dequoting
+ the filename; that has already happened by the time it gets here. */
+extern rl_icppfunc_t *rl_filename_stat_hook;
+
+/* If non-zero, this is the address of a function to call when reading
+ directory entries from the filesystem for completion and comparing
+ them to the partial word to be completed. The function should
+ either return its first argument (if no conversion takes place) or
+ newly-allocated memory. This can, for instance, convert filenames
+ between character sets for comparison against what's typed at the
+ keyboard. The returned value is what is added to the list of
+ matches. The second argument is the length of the filename to be
+ converted. */
+extern rl_dequote_func_t *rl_filename_rewrite_hook;
+
/* Backwards compatibility with previous versions of readline. */
#define rl_symbolic_link_hook rl_directory_completion_hook
/* Possible state values for rl_readline_state */
#define RL_STATE_NONE 0x000000 /* no state; before first call */
-#define RL_STATE_INITIALIZING 0x000001 /* initializing */
-#define RL_STATE_INITIALIZED 0x000002 /* initialization done */
-#define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */
-#define RL_STATE_READCMD 0x000008 /* reading a command key */
-#define RL_STATE_METANEXT 0x000010 /* reading input after ESC */
-#define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command */
-#define RL_STATE_MOREINPUT 0x000040 /* reading more input in a command function */
-#define RL_STATE_ISEARCH 0x000080 /* doing incremental search */
-#define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */
-#define RL_STATE_SEARCH 0x000200 /* doing a history search */
-#define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument */
-#define RL_STATE_MACROINPUT 0x000800 /* getting input from a macro */
-#define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro */
-#define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */
-#define RL_STATE_COMPLETING 0x004000 /* doing completion */
-#define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */
-#define RL_STATE_UNDOING 0x010000 /* doing an undo */
-#define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */
-#define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved */
-#define RL_STATE_CALLBACK 0x080000 /* using the callback interface */
-#define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */
-#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
-#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
-#define RL_STATE_REDISPLAYING 0x800000 /* updating terminal display */
+#define RL_STATE_INITIALIZING 0x0000001 /* initializing */
+#define RL_STATE_INITIALIZED 0x0000002 /* initialization done */
+#define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */
+#define RL_STATE_READCMD 0x0000008 /* reading a command key */
+#define RL_STATE_METANEXT 0x0000010 /* reading input after ESC */
+#define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command */
+#define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a command function */
+#define RL_STATE_ISEARCH 0x0000080 /* doing incremental search */
+#define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */
+#define RL_STATE_SEARCH 0x0000200 /* doing a history search */
+#define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument */
+#define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macro */
+#define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro */
+#define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */
+#define RL_STATE_COMPLETING 0x0004000 /* doing completion */
+#define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */
+#define RL_STATE_UNDOING 0x0010000 /* doing an undo */
+#define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */
+#define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved */
+#define RL_STATE_CALLBACK 0x0080000 /* using the callback interface */
+#define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */
+#define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key command */
+#define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode at least once */
+#define RL_STATE_REDISPLAYING 0x0800000 /* updating terminal display */
#define RL_STATE_DONE 0x1000000 /* done; accepted line */