Bash-5.3-alpha release

This commit is contained in:
Chet Ramey
2024-04-22 10:33:38 -04:00
parent f3b6bd1945
commit 622d318652
700 changed files with 136534 additions and 96420 deletions
+41 -24
View File
@@ -1,7 +1,7 @@
This file is bind.def, from which is created bind.c.
It implements the builtin "bind" in Bash.
Copyright (C) 1987-2021 Free Software Foundation, Inc.
Copyright (C) 1987-2023 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -86,9 +86,9 @@ extern int errno;
#include "bashgetopt.h"
#include "common.h"
static int query_bindings PARAMS((char *));
static int unbind_command PARAMS((char *));
static int unbind_keyseq PARAMS((char *));
static int query_bindings (char *);
static int unbind_command (char *);
static int unbind_keyseq (char *);
#define BIND_RETURN(x) do { return_code = x; goto bind_exit; } while (0)
@@ -108,8 +108,7 @@ static int unbind_keyseq PARAMS((char *));
#define XXFLAG 0x2000
int
bind_builtin (list)
WORD_LIST *list;
bind_builtin (WORD_LIST *list)
{
int return_code;
Keymap kmap, saved_keymap;
@@ -117,14 +116,7 @@ bind_builtin (list)
char *initfile, *map_name, *fun_name, *unbind_name, *remove_seq, *cmd_seq, *t;
if (no_line_editing)
{
#if 0
builtin_error (_("line editing not enabled"));
return (EXECUTION_FAILURE);
#else
builtin_warning (_("line editing not enabled"));
#endif
}
builtin_warning (_("line editing not enabled"));
kmap = saved_keymap = (Keymap) NULL;
flags = 0;
@@ -192,7 +184,7 @@ bind_builtin (list)
case 'X':
flags |= XXFLAG;
break;
case GETOPT_HELP:
CASE_HELPOPT;
default:
builtin_usage ();
BIND_RETURN (EX_USAGE);
@@ -227,10 +219,37 @@ bind_builtin (list)
rl_list_funmap_names ();
if (flags & PFLAG)
rl_function_dumper (1);
{
#if 0 /* TAG:bash-5.3 */
if (list == 0)
rl_function_dumper (1);
else
while (list)
{
rl_print_keybinding (list->word->word, kmap, 1);
list = list->next;
}
#else
rl_function_dumper (1);
#endif
}
if (flags & PPFLAG)
rl_function_dumper (0);
{
#if 0 /* TAG:bash-5.3 */
if (list == 0)
rl_function_dumper (0);
else
while (list)
{
rl_print_keybinding (list->word->word, kmap, 0);
list = list->next;
}
#else
rl_function_dumper (0);
#endif
}
if (flags & SFLAG)
rl_macro_dumper (1);
@@ -277,7 +296,8 @@ bind_builtin (list)
/* Process the rest of the arguments as binding specifications. */
while (list)
{
int olen, nlen, d, i;
size_t olen, nlen;
int d, i;
char **obindings, **nbindings;
obindings = rl_invoking_keyseqs (bash_execute_unix_command);
@@ -315,8 +335,7 @@ bind_builtin (list)
}
static int
query_bindings (name)
char *name;
query_bindings (char *name)
{
rl_command_func_t *function;
char **keyseqs;
@@ -347,8 +366,7 @@ query_bindings (name)
}
static int
unbind_command (name)
char *name;
unbind_command (char *name)
{
rl_command_func_t *function;
@@ -364,8 +382,7 @@ unbind_command (name)
}
static int
unbind_keyseq (seq)
char *seq;
unbind_keyseq (char *seq)
{
char *kseq;
int kslen, type;