]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20060907 snapshot bash-3.2-beta
authorChet Ramey <chet.ramey@case.edu>
Sun, 4 Dec 2011 03:52:26 +0000 (22:52 -0500)
committerChet Ramey <chet.ramey@case.edu>
Sun, 4 Dec 2011 03:52:26 +0000 (22:52 -0500)
23 files changed:
CWRU/CWRU.chlog
CWRU/CWRU.chlog~
autom4te.cache/output.1
autom4te.cache/requests
braces.c
braces.c~
builtins/echo.def
builtins/echo.def~
configure
configure.in
configure.in~
doc/bash.1
doc/bash.1~
doc/bashref.texi
doc/bashref.texi~
doc/version.texi
doc/version.texi~
tests/RUN-ONE-TEST
tests/func.right
tests/func.tests
tests/func.tests~
variables.c
variables.c~

index 06337728093f23f7dfa572d36e385a9a38a61869..f74af9352670b2b87c20d732337401b2b6692eaf 100644 (file)
@@ -13638,3 +13638,18 @@ variables.c
          environment is scanned
 
 [bash-3.2-beta frozen]
+
+                                   9/5
+                                   ---
+variables.c
+       - change dispose_used_env_vars to call maybe_make_export_env
+         immediately if we're disposing a temporary environment, since
+         `environ' points to the export environment and getenv() will use
+         that on systems that don't allow getenv() to be replaced.  This
+         could cause the temporary environment to affect the shell.  Bug
+         reported by Vasco Pedro <vp@di.uevora.pt>
+
+builtins/echo.def,doc/{bash.1,bashref.texi}
+       - clarify that `echo -e' and echo when the `xpg_echo' shell option is
+         enabled require the \0 to precede any octal constant to be expanded.
+         Reported by Vasco Pedro <vp@di.uevora.pt>
index a5f61fbd93bd0571f3341e9da992a998094557b1..17091008804db100b7cec2cb2ed38fe8198473d2 100644 (file)
@@ -13621,3 +13621,30 @@ aclocal.m4
 Makefile.in
        - switch the TAGS and tags targets so TAGS is the output of `etags' and
          tags is the output of `ctags'.  Suggested by Masatake YAMATO
+
+                                  8/25
+                                  ----
+execute_cmd.c
+       - change code to match documentation: set BASH_COMMAND (which takes its
+         value from the_printed_command_except_trap) only when not running a
+         trap.  Rocky says the debugger is ok with this, and this is what his
+         original diffs did
+
+                                  8/29
+                                  ----
+variables.c
+       - change set_if_not to create shell_variables if it is NULL, since
+         -o invocation options can cause variables to be set before the
+         environment is scanned
+
+[bash-3.2-beta frozen]
+
+                                   9/5
+                                   ---
+variables.c
+       - change dispose_used_env_vars to call maybe_make_export_env
+         immediately if we're disposing a temporary environment, since
+         `environ' points to the export environment and getenv() will use
+         that on systems that don't allow getenv() to be replaced.  This
+         could cause the temporary environment to affect the shell.  Bug
+         reported by Vasco Pedro <vp@di.uevora.pt>
index f81a663322ba1b453d364218a47dbf0b3264fa0a..7211abf467627751b1214177f0f07a3bb5eaa1f1 100644 (file)
@@ -1693,7 +1693,7 @@ if test "$opt_curses" = yes; then
 fi
 
 if test -z "${DEBUGGER_START_FILE}"; then
-       DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
+       DEBUGGER_START_FILE=${datadir}/bashdb/bashdb-main.inc
 fi
 
 opt_minimal_config=no
index 84e4075e3c65875aa1f7dcc2ad2003258d75c6bc..1175d795fb23762565fa8dfdcb651ceab89c10db 100644 (file)
                       {
                         'm4_pattern_forbid' => 1,
                         'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AC_TYPE_OFF_T' => 1,
                         'AC_C_VOLATILE' => 1,
+                        'AC_FUNC_CLOSEDIR_VOID' => 1,
+                        'AC_REPLACE_FNMATCH' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'AC_FUNC_STAT' => 1,
+                        'AC_FUNC_WAIT3' => 1,
+                        'AC_HEADER_TIME' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'AC_STRUCT_TM' => 1,
+                        'AC_FUNC_LSTAT' => 1,
+                        'AC_FUNC_GETMNTENT' => 1,
+                        'AC_TYPE_MODE_T' => 1,
+                        'AC_FUNC_STRTOD' => 1,
+                        'AC_CHECK_HEADERS' => 1,
+                        'AC_FUNC_STRNLEN' => 1,
+                        'm4_sinclude' => 1,
+                        'AC_PROG_CXX' => 1,
+                        'AC_PATH_X' => 1,
+                        'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+                        'AC_PROG_AWK' => 1,
+                        '_m4_warn' => 1,
+                        'AC_HEADER_STDC' => 1,
+                        'AC_HEADER_MAJOR' => 1,
+                        'AC_FUNC_ERROR_AT_LINE' => 1,
+                        'AC_PROG_GCC_TRADITIONAL' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AC_FUNC_MBRTOWC' => 1,
+                        'AC_STRUCT_ST_BLOCKS' => 1,
+                        'AC_TYPE_SIGNAL' => 1,
+                        'AC_TYPE_UID_T' => 1,
+                        'AC_PROG_MAKE_SET' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
+                        'm4_pattern_allow' => 1,
+                        'sinclude' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AC_FUNC_STRERROR_R' => 1,
+                        'AC_PROG_CC' => 1,
+                        'AC_DECL_SYS_SIGLIST' => 1,
+                        'AC_FUNC_FORK' => 1,
+                        'AC_FUNC_STRCOLL' => 1,
+                        'AC_FUNC_VPRINTF' => 1,
+                        'AC_PROG_YACC' => 1,
+                        'AC_INIT' => 1,
+                        'AC_STRUCT_TIMEZONE' => 1,
+                        'AC_FUNC_CHOWN' => 1,
+                        'AC_SUBST' => 1,
+                        'AC_FUNC_ALLOCA' => 1,
+                        'AC_FUNC_GETPGRP' => 1,
+                        'AC_CANONICAL_HOST' => 1,
+                        'AC_PROG_RANLIB' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_FUNC_SETPGRP' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AC_FUNC_MMAP' => 1,
+                        'AC_FUNC_REALLOC' => 1,
+                        'AC_TYPE_SIZE_T' => 1,
+                        'AC_CHECK_TYPES' => 1,
+                        'AC_CONFIG_LINKS' => 1,
+                        'AC_CHECK_MEMBERS' => 1,
+                        'AM_MAINTAINER_MODE' => 1,
+                        'AC_FUNC_UTIME_NULL' => 1,
+                        'AC_FUNC_SELECT_ARGTYPES' => 1,
+                        'AC_HEADER_STAT' => 1,
+                        'AC_FUNC_STRFTIME' => 1,
+                        'AC_C_INLINE' => 1,
+                        'AC_PROG_CPP' => 1,
+                        'AC_C_CONST' => 1,
+                        'AC_PROG_LEX' => 1,
+                        'AC_TYPE_PID_T' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'include' => 1,
+                        'AC_FUNC_SETVBUF_REVERSED' => 1,
+                        'AC_PROG_INSTALL' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        'AC_FUNC_OBSTACK' => 1,
+                        'AC_CHECK_LIB' => 1,
+                        'AC_FUNC_MALLOC' => 1,
+                        'AC_FUNC_GETGROUPS' => 1,
+                        'AC_FUNC_GETLOADAVG' => 1,
+                        'AH_OUTPUT' => 1,
+                        'AC_FUNC_FSEEKO' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AC_FUNC_MKTIME' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'AC_HEADER_SYS_WAIT' => 1,
+                        'AC_PROG_LN_S' => 1,
+                        'AC_FUNC_MEMCMP' => 1,
+                        'm4_include' => 1,
+                        'AC_HEADER_DIRENT' => 1,
+                        'AC_CHECK_FUNCS' => 1
+                      }
+                    ], 'Autom4te::Request' ),
+             bless( [
+                      '1',
+                      1,
+                      [
+                        '/usr/share/autoconf'
+                      ],
+                      [
+                        '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        'aclocal.m4',
+                        'configure.in'
+                      ],
+                      {
+                        'm4_pattern_forbid' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
                         'AC_TYPE_OFF_T' => 1,
+                        'AC_C_VOLATILE' => 1,
                         'AC_FUNC_CLOSEDIR_VOID' => 1,
                         'AC_REPLACE_FNMATCH' => 1,
                         'AC_PROG_LIBTOOL' => 1,
                         'AC_FUNC_STAT' => 1,
                         'AC_HEADER_TIME' => 1,
                         'AC_FUNC_WAIT3' => 1,
-                        'AC_FUNC_LSTAT' => 1,
-                        'AC_STRUCT_TM' => 1,
                         'AM_AUTOMAKE_VERSION' => 1,
+                        'AC_STRUCT_TM' => 1,
+                        'AC_FUNC_LSTAT' => 1,
                         'AC_TYPE_MODE_T' => 1,
                         'AC_FUNC_GETMNTENT' => 1,
                         'AC_FUNC_STRTOD' => 1,
                         'AC_FUNC_CHOWN' => 1,
                         'AC_SUBST' => 1,
                         'AC_FUNC_ALLOCA' => 1,
-                        'AC_FUNC_GETPGRP' => 1,
                         'AC_CANONICAL_HOST' => 1,
+                        'AC_FUNC_GETPGRP' => 1,
                         'AC_PROG_RANLIB' => 1,
                         'AM_INIT_AUTOMAKE' => 1,
                         'AC_FUNC_SETPGRP' => 1,
                         'AC_FUNC_MMAP' => 1,
                         'AC_FUNC_REALLOC' => 1,
                         'AC_TYPE_SIZE_T' => 1,
-                        'AC_CHECK_TYPES' => 1,
                         'AC_CONFIG_LINKS' => 1,
+                        'AC_CHECK_TYPES' => 1,
                         'AC_CHECK_MEMBERS' => 1,
                         'AM_MAINTAINER_MODE' => 1,
                         'AC_FUNC_UTIME_NULL' => 1,
                         'AC_FUNC_SELECT_ARGTYPES' => 1,
                         'AC_FUNC_STRFTIME' => 1,
                         'AC_HEADER_STAT' => 1,
-                        'AC_PROG_CPP' => 1,
                         'AC_C_INLINE' => 1,
+                        'AC_PROG_CPP' => 1,
                         'AC_TYPE_PID_T' => 1,
-                        'AC_PROG_LEX' => 1,
                         'AC_C_CONST' => 1,
+                        'AC_PROG_LEX' => 1,
                         'AC_CONFIG_FILES' => 1,
                         'include' => 1,
                         'AC_FUNC_SETVBUF_REVERSED' => 1,
                         'AC_PROG_INSTALL' => 1,
                         'AM_GNU_GETTEXT' => 1,
-                        'AC_CHECK_LIB' => 1,
                         'AC_FUNC_OBSTACK' => 1,
+                        'AC_CHECK_LIB' => 1,
                         'AC_FUNC_MALLOC' => 1,
                         'AC_FUNC_GETGROUPS' => 1,
                         'AC_FUNC_GETLOADAVG' => 1,
                         'AH_OUTPUT' => 1,
                         'AC_FUNC_FSEEKO' => 1,
                         'AM_PROG_CC_C_O' => 1,
-                        'AC_FUNC_MKTIME' => 1,
-                        'AC_CANONICAL_SYSTEM' => 1,
                         'AM_CONDITIONAL' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AC_FUNC_MKTIME' => 1,
                         'AC_CONFIG_HEADERS' => 1,
                         'AC_HEADER_SYS_WAIT' => 1,
                         'AC_FUNC_MEMCMP' => 1,
index 3f5c5e85ff6c53fd601f358aa36e620e8b7fac63..25373974167d43d3b4144afc194cb54382f8f1ec 100644 (file)
--- a/braces.c
+++ b/braces.c
@@ -71,6 +71,18 @@ static char **mkseq();
 static char **array_concat ();
 #endif
 
+#if 0
+static void
+dump_result (a)
+     char **a;
+{
+  int i;
+
+  for (i = 0; a[i]; i++)
+    printf ("dump_result: a[%d] = -%s-\n", i, a[i]);
+}
+#endif
+
 /* Return an array of strings; the brace expansion of TEXT. */
 char **
 brace_expand (text)
index 30c3e385a5e5c5f7a5454d7e81606548b93ba55c..c7a2d72e57d4036348045585581c3b5fe6b27361 100644 (file)
--- a/braces.c~
+++ b/braces.c~
@@ -61,7 +61,7 @@ int brace_arg_separator = ',';
 static int brace_gobbler __P((char *, size_t, int *, int));
 static char **expand_amble __P((char *, size_t, int));
 static char **expand_seqterm __P((char *, size_t));
-static char **mkseq __P((int, int, int));
+static char **mkseq __P((int, int, int, int));
 static char **array_concat __P((char **, char **));
 #else
 static int brace_gobbler ();
@@ -71,6 +71,16 @@ static char **mkseq();
 static char **array_concat ();
 #endif
 
+static void
+dump_result (a)
+     char **a;
+{
+  int i;
+
+  for (i = 0; a[i]; i++)
+    printf ("dump_result: a[%d] = -%s-\n", i, a[i]);
+}
+
 /* Return an array of strings; the brace expansion of TEXT. */
 char **
 brace_expand (text)
@@ -88,7 +98,7 @@ brace_expand (text)
   /* Find the text of the preamble. */
   tlen = strlen (text);
   i = 0;
-#if 1
+#if defined (CSH_BRACE_COMPAT)
   c = brace_gobbler (text, tlen, &i, '{');     /* } */
 #else
   /* Make sure that when we exit this loop, c == 0 or text[i] begins a
@@ -119,8 +129,7 @@ brace_expand (text)
        break;
     }
   while (c);
-#endif
-  
+#endif /* !CSH_BRACE_COMPAT */
 
   preamble = (char *)xmalloc (i + 1);
   strncpy (preamble, text, i);
@@ -227,6 +236,8 @@ add_tack:
   result = array_concat (result, tack);
   strvec_dispose (tack);
 
+dump_result (result);
+
   return (result);
 }
 
@@ -292,22 +303,31 @@ expand_amble (text, tlen, flags)
 #define ST_CHAR        2
 
 static char **
-mkseq (start, end, type)
-     int start, end, type;
+mkseq (start, end, incr, type)
+     int start, end, incr, type;
 {
-  int n, incr, i;
+  int n, i;
   char **result, *t;
 
   n = abs (end - start) + 1;
   result = strvec_create (n + 1);
 
-  incr = (start < end) ? 1 : -1;
+  if (incr == 0)
+    incr = 1;
+  
+  if (start > end && incr > 0)
+    incr = -incr;
+  else if (start < end && incr < 0)
+    incr = -incr;
 
   /* Make sure we go through the loop at least once, so {3..3} prints `3' */
   i = 0;
   n = start;
   do
     {
+#if defined (SHELL)
+      QUIT;            /* XXX - memory leak here */
+#endif
       if (type == ST_INT)
        result[i++] = itos (n);
       else
@@ -381,7 +401,7 @@ expand_seqterm (text, tlen)
       rhs_v = tr;
     }
 
-  result = mkseq (lhs_v, rhs_v, lhs_t);
+  result = mkseq (lhs_v, rhs_v, 1, lhs_t);
 
   free (lhs);
   free (rhs);
@@ -413,7 +433,7 @@ brace_gobbler (text, tlen, indx, satisfy)
   DECLARE_MBSTATE;
 
   level = quoted = pass_next = 0;
-#if 1
+#if defined (CSH_BRACE_COMPAT)
   commas = 1;
 #else
   commas = (satisfy == '}') ? 0 : 1;
@@ -498,7 +518,7 @@ brace_gobbler (text, tlen, indx, satisfy)
        level++;
       else if (c == '}' && level)
        level--;
-#if 0
+#if !defined (CSH_BRACE_COMPAT)
       else if (satisfy == '}' && c == brace_arg_separator && level == 0)
        commas++;
       else if (satisfy == '}' && STREQN (text+i, BRACE_SEQ_SPECIFIER, 2) &&
index 0effc89454433248086c79e455eecca370b845ec..923c43a245bc54d2c58498df160448addf466703 100644 (file)
@@ -50,7 +50,8 @@ following backslash-escaped characters is turned on:
        \t      horizontal tab
        \v      vertical tab
        \\      backslash
-       \num    the character whose ASCII code is NUM (octal).
+       \0nnn   the character whose ASCII code is NNN (octal).  NNN can be
+               0 to 3 octal digits
 
 You can explicitly turn off the interpretation of the above characters
 with the -E option.
index 6792659a7d214b34e562cbaa3021dc8a41a06fa1..0effc89454433248086c79e455eecca370b845ec 100644 (file)
@@ -31,6 +31,8 @@ $PRODUCES echo.c
 #include <stdio.h>
 #include "../shell.h"
 
+#include "common.h"
+
 $BUILTIN echo
 $FUNCTION echo_builtin
 $DEPENDS_ON V9_ECHO
index de545e10eb43b06ee23ca314a8c8536075f8ff79..ac98f2c4ac36b0117d0b6a839e0b5ce7cd214d8e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1693,7 +1693,7 @@ if test "$opt_curses" = yes; then
 fi
 
 if test -z "${DEBUGGER_START_FILE}"; then
-       DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
+       DEBUGGER_START_FILE=${datadir}/bashdb/bashdb-main.inc
 fi
 
 opt_minimal_config=no
index c3681653b2a93b6a1ba513a6f359ab3048ea0df5..71d85808b9db448cb04760b6d705882acbc73dd1 100644 (file)
@@ -149,7 +149,7 @@ if test "$opt_curses" = yes; then
 fi
 
 if test -z "${DEBUGGER_START_FILE}"; then
-       DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
+       DEBUGGER_START_FILE=${datadir}/bashdb/bashdb-main.inc
 fi
 
 dnl optional shell features in config.h.in
index cc862da223798b991f0bbd9fd7e481e6281dd634..c3681653b2a93b6a1ba513a6f359ab3048ea0df5 100644 (file)
@@ -22,10 +22,10 @@ dnl Process this file with autoconf to produce a configure script.
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-AC_REVISION([for Bash 3.2, version 3.188])dnl
+AC_REVISION([for Bash 3.2, version 3.190])dnl
 
 define(bashvers, 3.2)
-define(relstatus, devel)
+define(relstatus, beta)
 
 AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
 
@@ -383,6 +383,7 @@ dnl Note that host and target machine are the same, and different than the
 dnl build machine.
 dnl Set SIGNAMES_H based on whether or not we're cross-compiling.
 
+CROSS_COMPILE=
 if test "x$cross_compiling" = "xyes"; then
     case "${host}" in
     *-cygwin*)
index 1dcf497eeae44242972a3c587b2337bb5fb00b22..105aa6d73b0aa2c34532620c6a811484e64080be 100644 (file)
@@ -6,12 +6,12 @@
 .\"    Case Western Reserve University
 .\"    chet@po.cwru.edu
 .\"
-.\"    Last Change: Thu May 11 14:25:48 EDT 2006
+.\"    Last Change: Fri Sep  8 13:43:16 EDT 2006
 .\"
 .\" bash_builtins, strip all but Built-Ins section
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH BASH 1 "2006 May 11" "GNU Bash-3.2"
+.TH BASH 1 "2006 September 8" "GNU Bash-3.2"
 .\"
 .\" There's some problem with having a `@'
 .\" in a tagged paragraph with the BSD man macros.
@@ -6642,10 +6642,6 @@ backslash
 the eight-bit character whose value is the octal value \fInnn\fP
 (zero to three octal digits)
 .TP
-.B \e\fInnn\fP
-the eight-bit character whose value is the octal value \fInnn\fP
-(one to three octal digits)
-.TP
 .B \ex\fIHH\fP
 the eight-bit character whose value is the hexadecimal value \fIHH\fP
 (one or two hex digits)
index baab3772c1e622a6671a837b5e8be0c1437b3a7c..1dcf497eeae44242972a3c587b2337bb5fb00b22 100644 (file)
@@ -6,12 +6,12 @@
 .\"    Case Western Reserve University
 .\"    chet@po.cwru.edu
 .\"
-.\"    Last Change: Thu Jan 26 09:04:43 EST 2006
+.\"    Last Change: Thu May 11 14:25:48 EDT 2006
 .\"
 .\" bash_builtins, strip all but Built-Ins section
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH BASH 1 "2006 Jan 26" "GNU Bash-3.2"
+.TH BASH 1 "2006 May 11" "GNU Bash-3.2"
 .\"
 .\" There's some problem with having a `@'
 .\" in a tagged paragraph with the BSD man macros.
@@ -809,10 +809,10 @@ as for pathname expansion (see
 .B Pathname Expansion
 below).
 The \fIword\fP is expanded using tilde
-expansion, parameter and variable expansion, arithmetic substituion,
+expansion, parameter and variable expansion, arithmetic substitution,
 command substitution, process substitution and quote removal.
 Each \fIpattern\fP examined is expanded using tilde
-expansion, parameter and variable expansion, arithmetic substituion,
+expansion, parameter and variable expansion, arithmetic substitution,
 command substitution, and process substitution.
 If the shell option
 .B nocasematch
@@ -1693,7 +1693,8 @@ command history is not saved when an interactive shell exits.
 .B HISTFILESIZE
 The maximum number of lines contained in the history file.  When this
 variable is assigned a value, the history file is truncated, if
-necessary, to contain no more than that number of lines.  The default
+necessary, by removing the oldest entries,
+to contain no more than that number of lines.  The default
 value is 500.  The history file is also truncated to this size after
 writing it when an interactive shell exits.
 .TP
@@ -8406,8 +8407,8 @@ the command
 is executed each time a shell function or a script executed with the
 \fB.\fP or \fBsource\fP builtins finishes executing.
 Signals ignored upon entry to the shell cannot be trapped or reset.
-Trapped signals are reset to their original values in a child
-process when it is created.
+Trapped signals that are not being ignored are reset to their original
+values in a child process when it is created.
 The return status is false if any
 .I sigspec
 is invalid; otherwise
@@ -8530,7 +8531,7 @@ The maximum size of a process's data segment
 The maximum scheduling priority ("nice")
 .TP
 .B \-f
-The maximum size of files created by the shell
+The maximum size of files written by the shell and its children
 .TP
 .B \-i
 The maximum number of pending signals
index b9a0b66421d994f54aadd0be9ee9a4dfa659e378..e7818a83bc0821fa32577b61bf8310734ceb7f13 100644 (file)
@@ -3341,9 +3341,6 @@ backslash
 @item \0@var{nnn}
 the eight-bit character whose value is the octal value @var{nnn}
 (zero to three octal digits)
-@item \@var{nnn}
-the eight-bit character whose value is the octal value @var{nnn}
-(one to three octal digits)
 @item \x@var{HH}
 the eight-bit character whose value is the hexadecimal value @var{HH}
 (one or two hex digits)
index 25a5d5302adce80b225ac35a226d7f713b860865..b9a0b66421d994f54aadd0be9ee9a4dfa659e378 100644 (file)
@@ -3030,8 +3030,8 @@ each time a shell function or a script executed with the @code{.} or
 @code{source} builtins finishes executing.
 
 Signals ignored upon entry to the shell cannot be trapped or reset.
-Trapped signals are reset to their original values in a child  
-process when it is created.
+Trapped signals that are not being ignored are reset to their original
+values in a child process when it is created.
 
 The return status is zero unless a @var{sigspec} does not specify a
 valid signal.
@@ -3861,7 +3861,7 @@ The maximum size of a process's data segment.
 The maximum scheduling priority ("nice").
 
 @item -f
-The maximum size of files created by the shell.
+The maximum size of files written by the shell and its children.
 
 @item -i
 The maximum number of pending signals.
@@ -4543,7 +4543,8 @@ default value is @file{~/.bash_history}.
 @item HISTFILESIZE
 The maximum number of lines contained in the history file.  When this
 variable is assigned a value, the history file is truncated, if
-necessary, to contain no more than that number of lines.
+necessary, by removing the oldest entries,
+to contain no more than that number of lines.
 The history file is also truncated to this size after
 writing it when an interactive shell exits.
 The default value is 500.
index 3645f44827fb025d1ad4df6d690938625c7cbe70..f77c0b605d4d6bc529b03d3b1ed68da17d2cd098 100644 (file)
@@ -2,9 +2,9 @@
 Copyright (C) 1988-2006 Free Software Foundation, Inc.
 @end ignore
 
-@set LASTCHANGE Thu May 11 14:25:33 EDT 2006
+@set LASTCHANGE Fri Sep  8 13:45:21 EDT 2006
 
 @set EDITION 3.2
 @set VERSION 3.2
-@set UPDATED 11 May 2006
-@set UPDATED-MONTH May 2006
+@set UPDATED 8 September 2006
+@set UPDATED-MONTH September 2006
index 6ee00d428381b096953edf1964ca31cc1d0d3e8a..3645f44827fb025d1ad4df6d690938625c7cbe70 100644 (file)
@@ -1,10 +1,10 @@
 @ignore
-Copyright (C) 1988-2005 Free Software Foundation, Inc.
+Copyright (C) 1988-2006 Free Software Foundation, Inc.
 @end ignore
 
-@set LASTCHANGE Fri Dec 30 10:50:51 EST 2005
+@set LASTCHANGE Thu May 11 14:25:33 EDT 2006
 
-@set EDITION 3.1
-@set VERSION 3.1
-@set UPDATED 30 December 2005
-@set UPDATED-MONTH December 2005
+@set EDITION 3.2
+@set VERSION 3.2
+@set UPDATED 11 May 2006
+@set UPDATED-MONTH May 2006
index 3efcf32d68e9722024b6ca9d67f9e81b2aa5ac04..72ec06a2c1fd8dde92acea5e8ac773e35f1d061b 100755 (executable)
@@ -1,4 +1,4 @@
-BUILD_DIR=/usr/local/build/chet/bash/bash-current
+BUILD_DIR=/usr/local/build/bash/bash-current
 THIS_SH=$BUILD_DIR/bash
 PATH=$PATH:$BUILD_DIR
 
index 1bd12e1217db7f4a0d5febc2dca736a63b99129f..e97a4865bd1f129dc78fbf1cbd26f03123b34967 100644 (file)
@@ -27,7 +27,7 @@ f1 ()
     return $status
 }
 before: try to assign to FUNCNAME
-outside: FUNCNAME =
+outside: FUNCNAME = main
 before: FUNCNAME = func
 FUNCNAME = func2
 after: FUNCNAME = func
index cbbbdb0357df15c0b308fe536315764f6b569c92..23dff44bed4378f523ffe8e109dee00f54e6425e 100644 (file)
@@ -132,7 +132,7 @@ func()
 }
 
 echo before: try to assign to FUNCNAME
-FUCNAME=7
+FUNCNAME=7
 
 echo outside: FUNCNAME = $FUNCNAME
 func
index 063f4e0b89fe4e46d9f23a770b3e72d9228bd889..cbbbdb0357df15c0b308fe536315764f6b569c92 100644 (file)
@@ -165,4 +165,12 @@ myfunction() {
 myfunction
 myfunction | cat
 
+segv()
+{
+       echo foo | return 5
+}
+
+segv
+echo $?
+
 exit 0
index c237326501949c0f72478e9d9b8747f8b7de6f84..5fd9d0e992e30ff419df63af981d1081770f732e 100644 (file)
@@ -2976,7 +2976,10 @@ void
 dispose_used_env_vars ()
 {
   if (temporary_env)
-    dispose_temporary_env (propagate_temp_var);
+    {
+      dispose_temporary_env (propagate_temp_var);
+      maybe_make_export_env ();
+    }
 }
 
 /* Take all of the shell variables in the temporary environment HASH_TABLE
index 449975e060b92e07f5a8561707e261163f4b526e..c237326501949c0f72478e9d9b8747f8b7de6f84 100644 (file)
@@ -155,6 +155,8 @@ int array_needs_making = 1;
 int shell_level = 0;
 
 /* Some forward declarations. */
+static void create_variable_tables __P((void));
+
 static void set_machine_vars __P((void));
 static void set_home_var __P((void));
 static void set_shell_var __P((void));
@@ -252,19 +254,10 @@ static void push_func_var __P((PTR_T));
 static void push_exported_var __P((PTR_T));
 
 static inline int find_special_var __P((const char *));
-              
-/* Initialize the shell variables from the current environment.
-   If PRIVMODE is nonzero, don't import functions from ENV or
-   parse $SHELLOPTS. */
-void
-initialize_shell_variables (env, privmode)
-     char **env;
-     int privmode;
-{
-  char *name, *string, *temp_string;
-  int c, char_index, string_index, string_length;
-  SHELL_VAR *temp_var;
 
+static void
+create_variable_tables ()
+{
   if (shell_variables == 0)
     {
       shell_variables = global_variables = new_var_context ((char *)NULL, 0);
@@ -279,6 +272,21 @@ initialize_shell_variables (env, privmode)
   if (shell_function_defs == 0)
     shell_function_defs = hash_create (0);
 #endif
+}
+
+/* Initialize the shell variables from the current environment.
+   If PRIVMODE is nonzero, don't import functions from ENV or
+   parse $SHELLOPTS. */
+void
+initialize_shell_variables (env, privmode)
+     char **env;
+     int privmode;
+{
+  char *name, *string, *temp_string;
+  int c, char_index, string_index, string_length;
+  SHELL_VAR *temp_var;
+
+  create_variable_tables ();
 
   for (string_index = 0; string = env[string_index++]; )
     {
@@ -346,8 +354,6 @@ initialize_shell_variables (env, privmode)
       else
        {
          temp_var = bind_variable (name, string, 0);
-if (strcmp(name,"LANG") == 0)
-  itrace("bound LANG to %s", string);
          VSETATTR (temp_var, (att_exported | att_imported));
          array_needs_making = 1;
        }
@@ -364,11 +370,7 @@ if (strcmp(name,"LANG") == 0)
   set_pwd ();
 
   /* Set up initial value of $_ */
-#if 0
-  temp_var = bind_variable ("_", dollar_vars[0], 0);
-#else
   temp_var = set_if_not ("_", dollar_vars[0]);
-#endif
 
   /* Remember this pid. */
   dollar_dollar_pid = getpid ();
@@ -1308,20 +1310,11 @@ static SHELL_VAR *
 get_comp_wordbreaks (var)
      SHELL_VAR *var;
 {
-  char *p;
-
   /* If we don't have anything yet, assign a default value. */
   if (rl_completer_word_break_characters == 0 && bash_readline_initialized == 0)
     enable_hostname_completion (perform_hostname_completion);
 
-#if 0
-  FREE (value_cell (var));
-  p = savestring (rl_completer_word_break_characters);
-  
-  var_setvalue (var, p);
-#else
   var_setvalue (var, rl_completer_word_break_characters);
-#endif
 
   return (var);
 }
@@ -1637,6 +1630,9 @@ set_if_not (name, value)
 {
   SHELL_VAR *v;
 
+  if (shell_variables == 0)
+    create_variable_tables ();
+
   v = find_variable (name);
   if (v == 0)
     v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH, 0);
@@ -1779,11 +1775,7 @@ make_new_variable (name, table)
 
   /* Make sure we have a shell_variables hash table to add to. */
   if (shell_variables == 0)
-    {
-      shell_variables = global_variables = new_var_context ((char *)NULL, 0);
-      shell_variables->scope = 0;
-      shell_variables->table = hash_create (0);
-    }
+    create_variable_tables ();
 
   elt = hash_insert (savestring (name), table, HASH_NOSRCH);
   elt->data = (PTR_T)entry;
@@ -1951,11 +1943,7 @@ bind_variable (name, value, flags)
   VAR_CONTEXT *vc;
 
   if (shell_variables == 0)
-    {
-      shell_variables = global_variables = new_var_context ((char *)NULL, 0);
-      shell_variables->scope = 0;
-      shell_variables->table = hash_create (0);
-    }
+    create_variable_tables ();
 
   /* If we have a temporary environment, look there first for the variable,
      and, if found, modify the value there before modifying it in the
@@ -2035,16 +2023,11 @@ bind_int_variable (lhs, rhs)
      char *lhs, *rhs;
 {
   register SHELL_VAR *v;
-  char *t;
   int isint, isarr;
 
   isint = isarr = 0;
 #if defined (ARRAY_VARS)
-#  if 0
-  if (t = xstrchr (lhs, '['))  /*]*/
-#  else
   if (valid_array_reference (lhs))
-#  endif
     {
       isarr = 1;
       v = array_variable_part (lhs, (char **)0, (int *)0);