]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
fixed gcc printf warning; fixed typos in comments and support files
authorChet Ramey <chet.ramey@case.edu>
Tue, 26 Jul 2022 15:44:09 +0000 (11:44 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 26 Jul 2022 15:44:09 +0000 (11:44 -0400)
22 files changed:
CHANGES
CHANGES-5.2
CWRU/CWRU.chlog
MANIFEST
NEWS
NEWS-5.2
builtins/setattr.def
doc/FAQ
doc/article.txt
doc/bashref.texi
examples/functions/autoload.v4
examples/functions/csh-compat
examples/loadables/fdflags.c
examples/loadables/mkdir.c
findcmd.c
lib/readline/doc/rltech.texi
lib/readline/examples/rlptytest.c
print_cmd.c
subst.c
support/signames.c
tests/RUN-ONE-TEST
tests/printf1.sub

diff --git a/CHANGES b/CHANGES
index e9f9b2c97fd7af448def679aef1eae527d337b31..ef6806433881198ffbd8c3fc97746084f4e41d53 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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.
index cf8b9dc96b574dd360d2486e567372a62d97ae00..262cd6f50e6072c20946203e5e555d045dae286f 100644 (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.
 
index 1c1cfed518e082a838bab84ca830a7ef7cbe7c00..8d6e8f9d90549890a4c297ea6b4a8b9f28deb9a2 100644 (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]
index cbe97c648f35f8b51c6af80e6d5e518f2e8cc110..ee8b0c7eb433ba831bf2a247ce56902cd0941f7a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -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
diff --git a/NEWS b/NEWS
index 95234c5bbedfcbc691eb47ca0fef60de142209c6..31bb6616d389d4d2493f51f93da50b18a1835fb2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index 567a9f3b4fbc2e2e5415d8b73ab75c8016bc9fba..e685e0afc73851748e9db4d27fa0c80420397694 100644 (file)
--- a/NEWS-5.2
+++ b/NEWS-5.2
@@ -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
index f2df3a6e74d3b7857cac7f7ae73adc5f8423639c..50c8edf6834fd3c80f92b638034de7aa88412c9b 100644 (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;
diff --git a/doc/FAQ b/doc/FAQ
index 06c6fffd99936e2091bc34b1210596ea68eddeff..44be0a6d9d1463854517cf45d56243aae9b508c6 100644 (file)
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -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
index c19ff924856b4b4838a37a5b35aa294f76e8d6b3..e43ca9f3918c865b4131e804faa71dcc389642b5 100644 (file)
@@ -531,7 +531,7 @@ _\bc_\bo_\bm_\bm_\ba_\bn_\bd  _\bh_\bi_\bs_\bt_\bo_\br_\by)  is  provided  jointly  by  Bash
 readline  library.   Bash  provides  variables   ($HISTFILE,
 $HISTSIZE, and $HISTCONTROL) and the _\bh_\bi_\bs_\bt_\bo_\br_\by and _\bf_\bc builtins
 to manipulate the history  list.   The  value  of  $_\bH_\bI_\bS_\bT_\bF_\bI_\bL_\bE
-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.  $_\bH_\bI_\bS_\bT_\bS_\bI_\bZ_\bE is  used  to  limit
 the  number  of commands saved in the history.  $_\bH_\bI_\bS_\bT_\bC_\bO_\bN_\bT_\bR_\bO_\bL
 provides a crude form of control  over  which  commands  are
@@ -1107,5 +1107,3 @@ Inc.
 
 
                       October 28, 1994
-
-
index e7a92d5adffd8a4ac92f99f35658167f2ce9c2ae..661ce81dd1783527f174c7c69510a0bce0867fde 100644 (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
index 7f60563bd80ed15137883d86b203008eec7144dc..850c614857ac6f1d9c2cea93752369257ab95b62 100644 (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.
index 54c8488c9e18a5901d7e899c477f0ffc2278ae2f..6671ca85005f7a956e7745507d53f540dbbf09d7 100644 (file)
@@ -1,4 +1,4 @@
-# C-shell compatibilty package.
+# C-shell compatibility package.
 # setenv VAR VALUE
 function setenv ()
 {
index fbe52304c96463400476997230e14a111ad365cb..9f2d089f9512e0cf114f9b9afc53d3c99c0d310a 100644 (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
index d5d395510b7c224116960fee1892a3d6b7c4c19b..a5b49309e3d57bf2af1c7552a1344b59a314d1f8 100644 (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.",
index 0bf20796ea2045ac1b74d37ed19de69dbf84624e..95f231e5cd5741ebea68e5e505fee7272d3f6059 100644 (file)
--- a/findcmd.c
+++ b/findcmd.c
@@ -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)
index fe64a42cbfd1bc76d22fa615ac809b79655cb4b1..95a57b6d7a448c59aabf4ab0c805332ed079bc79 100644 (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
index 0008dd1fca9331ed07952aceca0d5f770777e2dd..d170f62ff822cc12d66319e6dec2af2633d37bb4 100644 (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;
index 6e84d0ce337e249860f1b6f83e23ac044684c6bb..eef9bb6a051798480205770662074cfce789cb71 100644 (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;
                  }
diff --git a/subst.c b/subst.c
index f3980166beea5035f9470cf2c630a8d77cf65a73..f2987a51cbb35aa0603434de9a7aa8433e1765b9 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -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:
index 35ecf4416ee1811e8ff34047917b1b16cfd5c2d5..84864fd7966c2cc00d9fdc856f5d1cb5408dedbe 100644 (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, ...,
index c8bef8dd12533217b1b65fc20d00f3d1cc1b81e7..0b06381072414283266cf5d055a42ac14b9b6da6 100755 (executable)
@@ -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
 
index e4fb54b8be30ec6fa3fc7eb2815296ea06db9c5a..2cbbc6a6a6c55d80f7bd61af3dd2028103b4fd62 100644 (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"