bash/backport-changes-to-documentation-to-reduce-gender-specific-l.patch

140 lines
5.4 KiB
Diff

From 8d3cecab33b1fd03dbb4a2c39a7d0309dca43fd3 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Thu, 17 Jun 2021 17:10:49 -0400
Subject: [PATCH] changes to documentation to reduce gender-specific language;
fix a seg fault in `fc'
Conflict:Delete modifications in changlog and test cases and doc and builtins/set.def and builtins/common.c and builtins/common.h; W_ARRAYREF macro definition extension; add function builtin_arrayref_flags
Reference:https://git.savannah.gnu.org/cgit/bash.git/commit/?id=8d3cecab33b1fd03dbb4a2c39a7d0309dca43fd3
---
builtins/fc.def | 7 +++++--
lib/readline/doc/rltech.texi | 9 +++++----
lib/readline/doc/rluser.texi | 8 +++++---
parse.y | 3 +--
shell.h | 3 +++
5 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/builtins/fc.def b/builtins/fc.def
index 467dbcb..9b8a997 100644
--- a/builtins/fc.def
+++ b/builtins/fc.def
@@ -1,7 +1,7 @@
This file is fc.def, from which is created fc.c.
It implements the builtin "fc" in Bash.
-Copyright (C) 1987-2020 Free Software Foundation, Inc.
+Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -450,6 +450,8 @@ fc_builtin (list)
for (i = reverse ? histend : histbeg; reverse ? i >= histbeg : i <= histend; reverse ? i-- : i++)
{
QUIT;
+ if (hlist[i] == 0)
+ continue;
if (numbering)
fprintf (stream, "%d", i + history_base);
if (listing)
@@ -459,7 +461,8 @@ fc_builtin (list)
else
fprintf (stream, "\t%c", histdata (i) ? '*' : ' ');
}
- fprintf (stream, "%s\n", histline (i));
+ if (histline (i))
+ fprintf (stream, "%s\n", histline (i));
}
if (listing)
diff --git a/lib/readline/doc/rltech.texi b/lib/readline/doc/rltech.texi
index 1a689f6..f60f9f3 100644
--- a/lib/readline/doc/rltech.texi
+++ b/lib/readline/doc/rltech.texi
@@ -1612,7 +1612,7 @@ main (int c, char **v)
Signals are asynchronous events sent to a process by the Unix kernel,
sometimes on behalf of another process. They are intended to indicate
-exceptional events, like a user pressing the interrupt key on his terminal,
+exceptional events, like a user pressing the terminal's interrupt key,
or a network connection being broken. There is a class of signals that can
be sent to the process currently reading input from the keyboard. Since
Readline changes the terminal attributes when it is called, it needs to
@@ -2160,9 +2160,10 @@ shell variables and hostnames.
@deftypevar int rl_completion_query_items
Up to this many items will be displayed in response to a
-possible-completions call. After that, readline asks the user if she is sure
-she wants to see them all. The default value is 100. A negative value
-indicates that Readline should never ask the user.
+possible-completions call. After that, readline asks the user for
+confirmation before displaying them.
+The default value is 100. A negative value
+indicates that Readline should never ask for confirmation.
@end deftypevar
@deftypevar {int} rl_completion_append_character
diff --git a/lib/readline/doc/rluser.texi b/lib/readline/doc/rluser.texi
index 26b0ff0..0780127 100644
--- a/lib/readline/doc/rluser.texi
+++ b/lib/readline/doc/rluser.texi
@@ -339,7 +339,8 @@ Although the Readline library comes with a set of Emacs-like
keybindings installed by default, it is possible to use a different set
of keybindings.
Any user can customize programs that use Readline by putting
-commands in an @dfn{inputrc} file, conventionally in his home directory.
+commands in an @dfn{inputrc} file,
+conventionally in their home directory.
The name of this
@ifset BashFeatures
file is taken from the value of the shell variable @env{INPUTRC}. If
@@ -496,8 +497,9 @@ asked whether the list of possibilities should be displayed.
If the number of possible completions is greater than or equal to this value,
Readline will ask whether or not the user wishes to view them;
otherwise, they are simply listed.
-This variable must be set to an integer value greater than or equal to 0.
-A negative value means Readline should never ask.
+This variable must be set to an integer value greater than or equal to zero.
+A zero value means Readline should never ask; negative values are
+treated as zero.
The default limit is @code{100}.
@item convert-meta
diff --git a/parse.y b/parse.y
index f4862ca..d545f14 100644
--- a/parse.y
+++ b/parse.y
@@ -144,7 +144,6 @@ static int yy_readline_unget PARAMS((int));
static int yy_string_get PARAMS((void));
static int yy_string_unget PARAMS((int));
-static void rewind_input_string PARAMS((void));
static int yy_stream_get PARAMS((void));
static int yy_stream_unget PARAMS((int));
@@ -1614,7 +1613,7 @@ with_input_from_string (string, name)
That is the true input location. Rewind bash_input.location.string by
that number of characters, so it points to the last character actually
consumed by the parser. */
-static void
+void
rewind_input_string ()
{
int xchars;
diff --git a/shell.h b/shell.h
index 8b41792..91b31ac 100644
--- a/shell.h
+++ b/shell.h
@@ -220,6 +220,9 @@ typedef struct _sh_input_line_state_t {
} sh_input_line_state_t;
/* Let's try declaring these here. */
+extern void shell_ungets PARAMS((char *));
+extern void rewind_input_string PARAMS((void));
+
extern char *parser_remaining_input PARAMS((void));
extern sh_parser_state_t *save_parser_state PARAMS((sh_parser_state_t *));
--
2.33.0