]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20060831 snapshot
authorChet Ramey <chet.ramey@case.edu>
Sun, 4 Dec 2011 03:52:10 +0000 (22:52 -0500)
committerChet Ramey <chet.ramey@case.edu>
Sun, 4 Dec 2011 03:52:10 +0000 (22:52 -0500)
CHANGES
COMPAT
CWRU/CWRU.chlog
variables.c

diff --git a/CHANGES b/CHANGES
index 1fb74a7a7a35fc9e01b2a069407bc044e2fd7833..8385acdf8df20c6685874f7c0bc57292e6c67c60 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,39 @@
+This document details the changes between this version, bash-3.2-beta,
+and the previous version, bash-3.2-alpha.
+
+1.  Changes to Bash
+
+a.  Changed the lexical analyzer to treat locale-specific blank characters as
+    white space.
+
+b.  Fixed a bug in command printing to avoid confusion between redirections and
+    process substitution.
+
+c.  Fixed problems with cross-compiling originating from inherited environment
+    variables.
+
+d.  Added write error reporting to printf builtin.
+
+e.  Fixed a bug in the variable expansion code that could cause a core dump in
+    a multi-byte locale.
+
+f.  Fixed a bug that caused substring expansion of a null string to return
+    incorrect results.
+
+g.  BASH_COMMAND now retains its previous value while executing commands as the
+    result of a trap, as the documentation states.
+
+2.  Changes to Readline
+
+a.  Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
+    the prompt and input line multiple times.
+
+b.  Fixed history expansion to not be confused by here-string redirection.
+
+c.  Readline no longer treats read errors by converting them to newlines, as
+    it does with EOF.  This caused partial lines to be returned from readline().
+
+------------------------------------------------------------------------------
 This document details the changes between this version, bash-3.2-alpha,
 and the previous version, bash-3.1-release.
 
diff --git a/COMPAT b/COMPAT
index 8ea9339b0d9c10ef24f112b029d34702a0c353ad..c591ede5f1fcd9a1289767bc8a5b4eec297806e9 100644 (file)
--- a/COMPAT
+++ b/COMPAT
@@ -201,7 +201,9 @@ bash-2.0 were significant.)
     Bash-2.x does not support it.
 
 15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME,
-    HOSTTYPE, MACHTYPE, or OSTYPE variables.
+    HOSTTYPE, MACHTYPE, or OSTYPE variables.  If they appear in the initial
+    environment, the export attribute will be set, but if bash provides a
+    default value, they will remain local to the current shell.
 
 16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables
     to have special behavior if they appear in the initial environment.
index 0f27170e6f155db26dfd324543227ee047d902a0..06337728093f23f7dfa572d36e385a9a38a61869 100644 (file)
@@ -13629,3 +13629,12 @@ execute_cmd.c
          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]
index fd228b5ee51818f2a52af2499a245d02ff864e55..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++]; )
     {
@@ -362,11 +370,7 @@ initialize_shell_variables (env, privmode)
   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 ();
@@ -1626,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);
@@ -1768,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;
@@ -1940,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