summaryrefslogtreecommitdiff
path: root/lib/readline/funmap.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2001-04-06 19:14:31 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:53 +0000
commit28ef6c316f1aff914bb95ac09787a3c83c1815fd (patch)
tree2812fe7ffc9beec4f99856906ddfcafda54cf16a /lib/readline/funmap.c
parentbb70624e964126b7ac4ff085ba163a9c35ffa18f (diff)
downloadbash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.gz
Imported from ../bash-2.05.tar.gz.
Diffstat (limited to 'lib/readline/funmap.c')
-rw-r--r--lib/readline/funmap.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/lib/readline/funmap.c b/lib/readline/funmap.c
index 1f7ba871..e09faf58 100644
--- a/lib/readline/funmap.c
+++ b/lib/readline/funmap.c
@@ -46,7 +46,7 @@ typedef int QSFUNC (const void *, const void *);
typedef int QSFUNC ();
#endif
-extern int _rl_qsort_string_compare ();
+extern int _rl_qsort_string_compare __P((char **, char **));
FUNMAP **funmap;
static int funmap_size;
@@ -108,7 +108,7 @@ static FUNMAP default_funmap[] = {
{ "non-incremental-reverse-search-history", rl_noninc_reverse_search },
{ "non-incremental-forward-search-history-again", rl_noninc_forward_search_again },
{ "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again },
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
{ "paste-from-clipboard", rl_paste_from_clipboard },
#endif
{ "possible-completions", rl_possible_completions },
@@ -142,7 +142,6 @@ static FUNMAP default_funmap[] = {
{ "vi-arg-digit", rl_vi_arg_digit },
{ "vi-back-to-indent", rl_vi_back_to_indent },
{ "vi-bWord", rl_vi_bWord },
- { "vi-bracktype", rl_vi_bracktype },
{ "vi-bword", rl_vi_bword },
{ "vi-change-case", rl_vi_change_case },
{ "vi-change-char", rl_vi_change_char },
@@ -182,13 +181,13 @@ static FUNMAP default_funmap[] = {
{ "vi-yank-to", rl_vi_yank_to },
#endif /* VI_MODE */
- {(char *)NULL, (Function *)NULL }
+ {(char *)NULL, (rl_command_func_t *)NULL }
};
int
rl_add_funmap_entry (name, function)
- char *name;
- Function *function;
+ const char *name;
+ rl_command_func_t *function;
{
if (funmap_entry + 2 >= funmap_size)
{
@@ -225,21 +224,21 @@ rl_initialize_funmap ()
/* 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. */
-char **
+const char **
rl_funmap_names ()
{
- char **result;
+ const char **result;
int result_size, result_index;
/* Make sure that the function map has been initialized. */
rl_initialize_funmap ();
- for (result_index = result_size = 0, result = (char **)NULL; funmap[result_index]; result_index++)
+ for (result_index = result_size = 0, result = (const char **)NULL; funmap[result_index]; result_index++)
{
if (result_index + 2 > result_size)
{
result_size += 20;
- result = (char **)xrealloc (result, result_size * sizeof (char *));
+ result = (const char **)xrealloc (result, result_size * sizeof (char *));
}
result[result_index] = funmap[result_index]->name;
@@ -249,12 +248,3 @@ rl_funmap_names ()
qsort (result, result_index, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
return (result);
}
-
-/* Things that mean `Control'. */
-char *possible_control_prefixes[] = {
- "Control-", "C-", "CTRL-", (char *)NULL
-};
-
-char *possible_meta_prefixes[] = {
- "Meta", "M-", (char *)NULL
-};