diff options
author | Per Bothner <per@bothner.com> | 1994-01-16 03:39:57 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1994-01-16 03:39:57 +0000 |
commit | 5e98bbab1738932aeeb251684bba6aa550f5885a (patch) | |
tree | e51fd93e8d56b82ea1e55ab8cece5ecb2c0af014 /readline/keymaps.h | |
parent | 8b564df836ca7baffe636c1a16658cdcb6388080 (diff) | |
download | gdb-5e98bbab1738932aeeb251684bba6aa550f5885a.zip gdb-5e98bbab1738932aeeb251684bba6aa550f5885a.tar.gz gdb-5e98bbab1738932aeeb251684bba6aa550f5885a.tar.bz2 |
Merge in changes from bash-1.13. The most obvious one is
that the file readline.c has been split into multiple files.
* bind.c, complete.c, dispay.c, isearch.c, parens.c, rldefs.h,
rltty.c, search.c signals.c, tilde.c, tilde.h, xmalloc.c: New files.
Diffstat (limited to 'readline/keymaps.h')
-rw-r--r-- | readline/keymaps.h | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/readline/keymaps.h b/readline/keymaps.h index 3c577b3..5fd0cba 100644 --- a/readline/keymaps.h +++ b/readline/keymaps.h @@ -1,5 +1,25 @@ /* keymaps.h -- Manipulation of readline keymaps. */ +/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 1, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 675 Mass Ave, Cambridge, MA 02139, USA. */ + #ifndef _KEYMAPS_H_ #define _KEYMAPS_H_ @@ -20,12 +40,17 @@ typedef struct _keymap_entry { Function *function; } KEYMAP_ENTRY; +/* This must be large enough to hold bindings for all of the characters + in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, + and so on). */ +#define KEYMAP_SIZE 256 + /* I wanted to make the above structure contain a union of: union { Function *function; struct _keymap_entry *keymap; } value; but this made it impossible for me to create a static array. Maybe I need C lessons. */ -typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[128]; +typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[KEYMAP_SIZE]; typedef KEYMAP_ENTRY *Keymap; /* The values that TYPE can have in a keymap entry. */ @@ -48,6 +73,14 @@ Keymap rl_copy_keymap (); the Meta digits bound to produce numeric arguments. */ Keymap rl_make_keymap (); -#endif /* _KEYMAPS_H_ */ +/* Return the keymap corresponding to a given name. Names look like + `emacs' or `emacs-meta' or `vi-insert'. */ +Keymap rl_get_keymap_by_name (); +/* Return the current keymap. */ +Keymap rl_get_keymap (); +/* Set the current keymap to MAP. */ +void rl_set_keymap (); + +#endif /* _KEYMAPS_H_ */ |