summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libreadline/funmap.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-12-06 03:16:45 +0000
committerache <ache@FreeBSD.org>1994-12-06 03:16:45 +0000
commita4fe90a250b63d3a1a94d716e876451fe786d866 (patch)
tree351a5738e9c046d7f2d71dd3c2ab7c759d21efa7 /gnu/lib/libreadline/funmap.c
parent46ecb27be87b8d41cc76e7f0ffa04d757de9db0b (diff)
downloadFreeBSD-src-a4fe90a250b63d3a1a94d716e876451fe786d866.zip
FreeBSD-src-a4fe90a250b63d3a1a94d716e876451fe786d866.tar.gz
Upgrade to version 2.0
Diffstat (limited to 'gnu/lib/libreadline/funmap.c')
-rw-r--r--gnu/lib/libreadline/funmap.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/gnu/lib/libreadline/funmap.c b/gnu/lib/libreadline/funmap.c
index 6e26b98..9255974 100644
--- a/gnu/lib/libreadline/funmap.c
+++ b/gnu/lib/libreadline/funmap.c
@@ -19,6 +19,7 @@
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. */
+#define READLINE_LIBRARY
#if defined (STATIC_MALLOC)
static char *xmalloc (), *xrealloc ();
@@ -37,7 +38,9 @@ extern char *xmalloc (), *xrealloc ();
#endif /* HAVE_STDLIB_H */
#include "rlconf.h"
-#include <readline/readline.h>
+#include "readline.h"
+
+static int qsort_string_compare ();
FUNMAP **funmap = (FUNMAP **)NULL;
static int funmap_size = 0;
@@ -100,12 +103,14 @@ static FUNMAP default_funmap[] = {
{ "tilde-expand", rl_tilde_expand },
{ "transpose-chars", rl_transpose_chars },
{ "transpose-words", rl_transpose_words },
+ { "tty-status", rl_tty_status },
{ "undo", rl_undo_command },
{ "universal-argument", rl_universal_argument },
{ "unix-line-discard", rl_unix_line_discard },
{ "unix-word-rubout", rl_unix_word_rubout },
{ "upcase-word", rl_upcase_word },
{ "yank", rl_yank },
+ { "yank-last-arg", rl_yank_last_arg },
{ "yank-nth-arg", rl_yank_nth_arg },
{ "yank-pop", rl_yank_pop },
@@ -150,7 +155,6 @@ static FUNMAP default_funmap[] = {
{ "vi-tilde-expand", rl_vi_tilde_expand },
{ "vi-yank-arg", rl_vi_yank_arg },
{ "vi-yank-to", rl_vi_yank_to },
-
#endif /* VI_MODE */
{(char *)NULL, (Function *)NULL }
@@ -193,19 +197,6 @@ rl_initialize_funmap ()
funmap_program_specific_entry_start = i;
}
-/* Stupid comparison routine for qsort () ing strings. */
-static int
-qsort_string_compare (s1, s2)
- register char **s1, **s2;
-{
- int r;
-
- r = **s1 - **s2;
- if (r == 0)
- r = strcmp (*s1, *s2);
- return r;
-}
-
/* Produce a NULL terminated array of known function names. The array
is sorted. The array itself is allocated, but not the strings inside.
You should free () the array when you done, but not the pointrs. */
@@ -239,6 +230,19 @@ rl_funmap_names ()
return (result);
}
+/* Stupid comparison routine for qsort () ing strings. */
+static int
+qsort_string_compare (s1, s2)
+ register char **s1, **s2;
+{
+ int r;
+
+ r = **s1 - **s2;
+ if (r == 0)
+ r = strcmp (*s1, *s2);
+ return r;
+}
+
/* Things that mean `Control'. */
char *possible_control_prefixes[] = {
"Control-", "C-", "CTRL-", (char *)NULL
OpenPOWER on IntegriCloud