Deleted Added
sdiff udiff text old ( 136652 ) new ( 157188 )
full compact
1/* Readline.h -- the names of functions callable from within readline. */
2
3/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
4
5 This file is part of the GNU Readline Library, a library for
6 reading lines of text with interactive input and history editing.
7
8 The GNU Readline Library is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2, or
11 (at your option) any later version.
12
13 The GNU Readline Library is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 The GNU General Public License is often shipped with GNU software, and
19 is generally kept in a file called COPYING or LICENSE. If you do not
20 have a copy of the license, write to the Free Software Foundation,
21 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
22
23/* $FreeBSD: head/contrib/libreadline/readline.h 136652 2004-10-18 07:25:32Z ache $ */
24#if !defined (_READLINE_H_)
25#define _READLINE_H_
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#if defined (READLINE_LIBRARY)

--- 4 unchanged lines hidden (view full) ---

36#else
37# include <readline/rlstdc.h>
38# include <readline/rltypedefs.h>
39# include <readline/keymaps.h>
40# include <readline/tilde.h>
41#endif
42
43/* Hex-encoded Readline version number. */
44#define RL_READLINE_VERSION 0x0500 /* Readline 5.0 */
45#define RL_VERSION_MAJOR 5
46#define RL_VERSION_MINOR 0
47
48/* Readline data structures. */
49
50/* Maintaining the state of undo. We remember individual deletes and inserts
51 on a chain of things to do. */
52
53/* The actions that undo knows how to undo. Notice that UNDO_DELETE means
54 to insert some text, and UNDO_INSERT means to delete some text. I.e.,

--- 182 unchanged lines hidden (view full) ---

237extern int rl_vi_movement_mode PARAMS((int, int));
238extern int rl_vi_arg_digit PARAMS((int, int));
239extern int rl_vi_change_case PARAMS((int, int));
240extern int rl_vi_put PARAMS((int, int));
241extern int rl_vi_column PARAMS((int, int));
242extern int rl_vi_delete_to PARAMS((int, int));
243extern int rl_vi_change_to PARAMS((int, int));
244extern int rl_vi_yank_to PARAMS((int, int));
245extern int rl_vi_delete PARAMS((int, int));
246extern int rl_vi_back_to_indent PARAMS((int, int));
247extern int rl_vi_first_print PARAMS((int, int));
248extern int rl_vi_char_search PARAMS((int, int));
249extern int rl_vi_match PARAMS((int, int));
250extern int rl_vi_change_char PARAMS((int, int));
251extern int rl_vi_subst PARAMS((int, int));
252extern int rl_vi_overstrike PARAMS((int, int));

--- 45 unchanged lines hidden (view full) ---

298extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap));
299extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap));
300extern int rl_unbind_command_in_map PARAMS((const char *, Keymap));
301extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *));
302extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
303extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *));
304extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
305extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap));
306extern int rl_variable_bind PARAMS((const char *, const char *));
307
308/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */
309extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap));
310
311/* Backwards compatibility, use rl_generic_bind instead. */
312extern int rl_macro_bind PARAMS((const char *, const char *, Keymap));
313

--- 83 unchanged lines hidden (view full) ---

397extern void rl_deprep_terminal PARAMS((void));
398extern void rl_tty_set_default_bindings PARAMS((Keymap));
399extern void rl_tty_unset_default_bindings PARAMS((Keymap));
400
401extern int rl_reset_terminal PARAMS((const char *));
402extern void rl_resize_terminal PARAMS((void));
403extern void rl_set_screen_size PARAMS((int, int));
404extern void rl_get_screen_size PARAMS((int *, int *));
405
406extern char *rl_get_termcap PARAMS((const char *));
407
408/* Functions for character input. */
409extern int rl_stuff_char PARAMS((int));
410extern int rl_execute_next PARAMS((int));
411extern int rl_clear_pending_input PARAMS((void));
412extern int rl_read_key PARAMS((void));

--- 111 unchanged lines hidden (view full) ---

524
525/* The name of the terminal to use. */
526extern const char *rl_terminal_name;
527
528/* The input and output streams. */
529extern FILE *rl_instream;
530extern FILE *rl_outstream;
531
532/* If non-zero, then this is the address of a function to call just
533 before readline_internal () prints the first prompt. */
534extern rl_hook_func_t *rl_startup_hook;
535
536/* If non-zero, this is the address of a function to call just before
537 readline_internal_setup () returns and readline_internal starts
538 reading input characters. */
539extern rl_hook_func_t *rl_pre_input_hook;

--- 215 unchanged lines hidden (view full) ---

755
756/* Possible values for do_replace argument to rl_filename_quoting_function,
757 called by rl_complete_internal. */
758#define NO_MATCH 0
759#define SINGLE_MATCH 1
760#define MULT_MATCH 2
761
762/* Possible state values for rl_readline_state */
763#define RL_STATE_NONE 0x00000 /* no state; before first call */
764
765#define RL_STATE_INITIALIZING 0x00001 /* initializing */
766#define RL_STATE_INITIALIZED 0x00002 /* initialization done */
767#define RL_STATE_TERMPREPPED 0x00004 /* terminal is prepped */
768#define RL_STATE_READCMD 0x00008 /* reading a command key */
769#define RL_STATE_METANEXT 0x00010 /* reading input after ESC */
770#define RL_STATE_DISPATCHING 0x00020 /* dispatching to a command */
771#define RL_STATE_MOREINPUT 0x00040 /* reading more input in a command function */
772#define RL_STATE_ISEARCH 0x00080 /* doing incremental search */
773#define RL_STATE_NSEARCH 0x00100 /* doing non-inc search */
774#define RL_STATE_SEARCH 0x00200 /* doing a history search */
775#define RL_STATE_NUMERICARG 0x00400 /* reading numeric argument */
776#define RL_STATE_MACROINPUT 0x00800 /* getting input from a macro */
777#define RL_STATE_MACRODEF 0x01000 /* defining keyboard macro */
778#define RL_STATE_OVERWRITE 0x02000 /* overwrite mode */
779#define RL_STATE_COMPLETING 0x04000 /* doing completion */
780#define RL_STATE_SIGHANDLER 0x08000 /* in readline sighandler */
781#define RL_STATE_UNDOING 0x10000 /* doing an undo */
782#define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */
783#define RL_STATE_TTYCSAVED 0x40000 /* tty special chars saved */
784
785#define RL_STATE_DONE 0x80000 /* done; accepted line */
786
787#define RL_SETSTATE(x) (rl_readline_state |= (x))
788#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
789#define RL_ISSTATE(x) (rl_readline_state & (x))
790
791struct readline_state {
792 /* line state */
793 int point;

--- 51 unchanged lines hidden ---