mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 00:19:51 +02:00
commit bash-20060831 snapshot
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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]
|
||||
|
||||
+25
-26
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user