fixed gcc printf warning; fixed typos in comments and support files

This commit is contained in:
Chet Ramey
2022-07-26 11:44:09 -04:00
parent 52ae6c3f5d
commit e9e3e4fea5
22 changed files with 120 additions and 30 deletions
+43 -4
View File
@@ -1,3 +1,42 @@
This document details the changes between this version, bash-5.2-rc2, and
the previous version, bash-5.2-rc1.
1. Changes to Bash
a. Fixed a bug that could disable history saving after a compound array
assignment in an interactive shell.
b. Fixed a bug that could cause incorrect error messages when running a DEBUG
trap during a conditional or arithmetic command.
c. Fixed a bug that caused test to print an error message when given ! ! arg
as arguments.
d. Fixed a bug that resulted in incorrect error messages when completing a
backquoted command substitution.
e. Changed command substitution parsing to reproduce the original text more
closely when reconsituting the command string from the parsed command.
f. Fixed a bug that could cause an EXIT trap to use the wrong variable context
when the errexit option is set.
g. Fixed a bug that could cause the parser to incorrectly delimit a token when
an alias expansion ended with a multibyte character.
2. Changes to Readline
3. New Features in Bash
a. Since there is no `declare -' equivalent of `local -', make sure to use
`local -' in the output of `local -p'.
b. Null anchored matches in pattern substitution now process `&' in the
replacement string, like sed.
4. New Features in Readline
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.2-rc1, and
the previous version, bash-5.2-beta.
@@ -4474,7 +4513,7 @@ l. There is a new configuration option (in config-top.h) that forces bash to
m. A new variable $BASHOPTS to export shell options settable using `shopt' to
child processes.
n. There is a new confgure option that forces the extglob option to be
n. There is a new configure option that forces the extglob option to be
enabled by default.
o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
@@ -4515,7 +4554,7 @@ d. New bindable function: skip-csi-sequence. Can be used as a default to
to bind all keys.
e. New application-settable function: rl_filename_rewrite_hook. Can be used
to rewite or modify filenames read from the file system before they are
to rewrite or modify filenames read from the file system before they are
compared to the word to be completed.
f. New bindable variable: skip-completed-text, active when completing in the
@@ -4597,7 +4636,7 @@ and the previous version, bash-4.0-beta2.
1. Changes to Bash
a. Fixed a bug that caused parsing errors when a $()-style command
substitution was follwed immediately by a quoted newline.
substitution was followed immediately by a quoted newline.
b. Fixed a bug that caused extended shell globbing patterns beginning with
`*(' to not work when used with pattern substitution word expansions.
@@ -9533,7 +9572,7 @@ gg. `alias' and `unalias' now print error messages when passed an argument
not interactive, as POSIX.2 specifies.
hh. `alias' and `alias -p' now return a status of 0 when no aliases are
defined, as POSIX.2 specifes.
defined, as POSIX.2 specifies.
ii. `cd -' now prints the pathname of the new working directory if the shell
is interactive.
+39
View File
@@ -1,3 +1,42 @@
This document details the changes between this version, bash-5.2-rc2, and
the previous version, bash-5.2-rc1.
1. Changes to Bash
a. Fixed a bug that could disable history saving after a compound array
assignment in an interactive shell.
b. Fixed a bug that could cause incorrect error messages when running a DEBUG
trap during a conditional or arithmetic command.
c. Fixed a bug that caused test to print an error message when given ! ! arg
as arguments.
d. Fixed a bug that resulted in incorrect error messages when completing a
backquoted command substitution.
e. Changed command substitution parsing to reproduce the original text more
closely when reconsituting the command string from the parsed command.
f. Fixed a bug that could cause an EXIT trap to use the wrong variable context
when the errexit option is set.
g. Fixed a bug that could cause the parser to incorrectly delimit a token when
an alias expansion ended with a multibyte character.
2. Changes to Readline
3. New Features in Bash
a. Since there is no `declare -' equivalent of `local -', make sure to use
`local -' in the output of `local -p'.
b. Null anchored matches in pattern substitution now process `&' in the
replacement string, like sed.
4. New Features in Readline
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.2-rc1, and
the previous version, bash-5.2-beta.
+8
View File
@@ -3687,6 +3687,8 @@ print_cmd.c
configure.ac
- bumped version to bash-5.2-rc1
[bash-5.2-rc1 released]
6/15
----
parse.y
@@ -3742,6 +3744,7 @@ print_cmd.c
command substitution and calls make_command_string
- make_command_string_internal: add '\n' to the ';' case; print command
list with newline connector appropriately
parse.y
- parse_comsub: call print_comsub instead of make_command_string
- list1 production (part of compound_list): if a list is separated by
@@ -3813,3 +3816,8 @@ subst.c
presented with a null string: process the replacement string for `&'
and `\&' and substitute in the result as before. Patch from
Koichi Murase <myoga.murase@gmail.com>
7/20
----
[bash-5.2-rc2 frozen]
+1 -1
View File
@@ -210,7 +210,7 @@ builtins/psize.sh f
builtins/bashgetopt.c f
builtins/common.h f
builtins/bashgetopt.h f
cross-build/cygwin32.cache f
#cross-build/cygwin32.cache f
cross-build/x86-beos.cache f
cross-build/opennt.cache f
cross-build/qnx.cache f
+5 -2
View File
@@ -112,6 +112,9 @@ ee. The `globbing' completion code now takes the `globstar' option into account.
ff. `suspend -f' now forces the shell to suspend even if job control is not
currently enabled.
gg. Since there is no `declare -' equivalent of `local -', make sure to use
`local -' in the output of `local -p'.
2. New Features in Readline
a. There is now an HS_HISTORY_VERSION containing the version number of the
@@ -1080,7 +1083,7 @@ l. There is a new configuration option (in config-top.h) that forces bash to
m. A new variable $BASHOPTS to export shell options settable using `shopt' to
child processes.
n. There is a new confgure option that forces the extglob option to be
n. There is a new configure option that forces the extglob option to be
enabled by default.
o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
@@ -1127,7 +1130,7 @@ d. New bindable function: skip-csi-sequence. Can be used as a default to
to bind all keys.
e. New application-settable function: rl_filename_rewrite_hook. Can be used
to rewite or modify filenames read from the file system before they are
to rewrite or modify filenames read from the file system before they are
compared to the word to be completed.
f. New bindable variable: skip-completed-text, active when completing in the
+3
View File
@@ -112,6 +112,9 @@ ee. The `globbing' completion code now takes the `globstar' option into account.
ff. `suspend -f' now forces the shell to suspend even if job control is not
currently enabled.
gg. Since there is no `declare -' equivalent of `local -', make sure to use
`local -' in the output of `local -p'.
2. New Features in Readline
a. There is now an HS_HISTORY_VERSION containing the version number of the
+1 -1
View File
@@ -376,7 +376,7 @@ show_all_var_attributes (v, nodefs)
}
/* Show all local variable variables with their attributes. This shows unset
local variables (all_local_variables called with 0 argment). */
local variables (all_local_variables called with 0 argument). */
int
show_local_var_attributes (v, nodefs)
int v, nodefs;
+1 -1
View File
@@ -633,7 +633,7 @@ o There is a new configuration option (in config-top.h) that forces bash to
o A new variable $BASHOPTS to export shell options settable using `shopt' to
child processes.
o There is a new confgure option that forces the extglob option to be
o There is a new configure option that forces the extglob option to be
enabled by default.
o New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
+1 -3
View File
@@ -531,7 +531,7 @@ _c_o_m_m_a_n_d _h_i_s_t_o_r_y) is provided jointly by Bash
readline library. Bash provides variables ($HISTFILE,
$HISTSIZE, and $HISTCONTROL) and the _h_i_s_t_o_r_y and _f_c builtins
to manipulate the history list. The value of $_H_I_S_T_F_I_L_E
specifes the file where Bash writes the command history on
specifies the file where Bash writes the command history on
exit and reads it on startup. $_H_I_S_T_S_I_Z_E is used to limit
the number of commands saved in the history. $_H_I_S_T_C_O_N_T_R_O_L
provides a crude form of control over which commands are
@@ -1107,5 +1107,3 @@ Inc.
October 28, 1994
+3 -3
View File
@@ -8410,7 +8410,7 @@ If Bash receives a trapped signal while executing @code{read}, the trap
handler executes and @code{read} returns an exit status greater than 128.
@item
The @code{printf} builting uses @code{double} (via @code{strtod}) to convert
The @code{printf} builtin uses @code{double} (via @code{strtod}) to convert
arguments corresponding to floating point conversion specifiers, instead of
@code{long double} if it's available. The @samp{L} length modifier forces
@code{printf} to use @code{long double} if it's available.
@@ -8892,7 +8892,7 @@ The variable will be unset initially, before any assignment.
This is useful only when the @option{-n} option is supplied.
Supplying the @option{-f} option, when job control is enabled,
forces @code{wait} to wait for each @var{pid} or @var{jobspec} to
terminate before returning its status, intead of returning when it changes
terminate before returning its status, instead of returning when it changes
status.
If neither @var{jobspec} nor @var{pid} specifies an active child process
of the shell, the return status is 127.
@@ -9329,7 +9329,7 @@ the installed version of Readline in subdirectories of that directory
@item --with-libintl-prefix[=@var{PREFIX}]
Define this to make Bash link with a locally-installed version of the
libintl library instead ofthe version in @file{lib/intl}.
libintl library instead of the version in @file{lib/intl}.
@item --with-libiconv-prefix[=@var{PREFIX}]
Define this to make Bash look for libiconv in @var{PREFIX} instead of the
+2 -2
View File
@@ -427,7 +427,7 @@ NOTES
bypass the shim creation and just source in the function's file
directly. For a few calls, the overhead of repeatedly running the
shim is not expensive, but in a tight loop, it might be. Caveat
Programer.
Programmer.
o Although the number of functions in the environment does not change
by using 'autoload', the amount of memory they take up can be greatly
@@ -453,7 +453,7 @@ NOTES
the simplest to implement for -p and -s operations that are not
heavily used.
As a consquence of this (and other reasons), the AUTOLOAD* namespace
As a consequence of this (and other reasons), the AUTOLOAD* namespace
is reserved for autoloading. Make sure you check any functions that
you bring under autoload for use of variables or functions that start
with AUTOLOAD and change them.
+1 -1
View File
@@ -1,4 +1,4 @@
# C-shell compatibilty package.
# C-shell compatibility package.
# setenv VAR VALUE
function setenv ()
{
+2 -2
View File
@@ -3,7 +3,7 @@
/* See Makefile for compilation details. */
/*
Copyright (C) 2017,2018,2019 Free Software Foundation, Inc.
Copyright (C) 2017-2022 Free Software Foundation, Inc.
This file is part of GNU Bash.
Bash is free software: you can redistribute it and/or modify
@@ -102,7 +102,7 @@ static const struct
# define ALLFLAGS (O_APPEND|O_ASYNC|O_SYNC|O_NONBLOCK|O_FSYNC|O_DSYNC|\
O_RSYNC|O_ALT_IO|O_DIRECT|O_NOATIME|O_NOSIGPIPE)
/* An unsed bit in the file status flags word we can use to pass around the
/* An unused bit in the file status flags word we can use to pass around the
state of close-on-exec. */
# define O_CLOEXEC ((~ALLFLAGS) ^ ((~ALLFLAGS) & ((~ALLFLAGS) - 1)))
#endif
+1 -1
View File
@@ -228,7 +228,7 @@ char *mkdir_doc[] = {
"a symbolic mode is used, the operations are interpreted relative to",
"an initial mode of \"a=rwx\". The -p option causes any required",
"intermediate directories in PATH to be created. The directories",
"are created with permssion bits of rwxrwxrwx as modified by the current",
"are created with permission bits of rwxrwxrwx as modified by the current",
"umask, plus write and search permissions for the owner. mkdir",
"returns 0 if the directories are created successfully, and non-zero",
"if an error occurs.",
+1 -1
View File
@@ -109,7 +109,7 @@ exec_name_should_ignore (name)
/* Return some flags based on information about this file.
The EXISTS bit is non-zero if the file is found.
The EXECABLE bit is non-zero the file is executble.
The EXECABLE bit is non-zero the file is executable.
Zero is returned if the file is not found. */
int
file_status (name)
+1 -1
View File
@@ -1184,7 +1184,7 @@ Returns the old timeout value.
@deftypefun int rl_set_timeout (unsigned int secs, unsigned int usecs)
Set a timeout for subsequent calls to @code{readline()}. If Readline does
not read a complete line, or the number of characters specified by
@code{rl_num_chars_to_read}, before the duration specfied by @var{secs}
@code{rl_num_chars_to_read}, before the duration specified by @var{secs}
(in seconds) and @var{usecs} (microseconds), it returns and sets
@code{RL_STATE_TIMEOUT} in @code{rl_readline_state}.
Passing 0 for @code{secs} and @code{usecs} cancels any previously set
+1 -1
View File
@@ -224,7 +224,7 @@ static enum { RESET, TCBREAK } ttystate = RESET;
*
* fd - The file descriptor of the terminal
*
* Returns: 0 on sucess, -1 on error
* Returns: 0 on success, -1 on error
*/
int tty_cbreak(int fd){
struct termios buf;
+1 -1
View File
@@ -304,7 +304,7 @@ make_command_string_internal (command)
if (deferred_heredocs == 0)
{
if (was_heredoc == 0)
cprintf (s); /* inside_function_def? */
cprintf ("%s", s); /* inside_function_def? */
else
was_heredoc = 0;
}
+1 -1
View File
@@ -8627,7 +8627,7 @@ valid_parameter_transform (xform)
case 'P': /* expand like prompt string */
case 'Q': /* quote reusably */
case 'U': /* transform to uppercase */
case 'u': /* tranform by capitalizing */
case 'u': /* transform by capitalizing */
case 'L': /* transform to lowercase */
return 1;
default:
+2 -2
View File
@@ -84,9 +84,9 @@ initialize_signames ()
names first. This allows (for example) SIGABRT to overwrite SIGLOST. */
/* POSIX 1003.1b-1993 real time signals, but take care of incomplete
implementations. Acoording to the standard, both, SIGRTMIN and
implementations. According to the standard, both SIGRTMIN and
SIGRTMAX must be defined, SIGRTMIN must be strictly less than
SIGRTMAX, and the difference must be at least 7, that is, there
SIGRTMAX, and the difference must be at least 7; that is, there
must be at least eight distinct real time signals. */
/* The generated signal names are SIGRTMIN, SIGRTMIN+1, ...,
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+1 -1
View File
@@ -24,7 +24,7 @@ printf "%s" "$vv"
printf -v vv "one\ctwo\n"
printf "%s" "$vv"
# and unrecognized backslash escapes should have the backslash preserverd
# and unrecognized backslash escapes should have the backslash preserved
printf -v vv "4\.2\n"
printf "%s" "$vv"