commit bash-20141031 snapshot

This commit is contained in:
Chet Ramey
2014-11-03 14:32:12 -05:00
parent e0722a04ec
commit f3aad56dce
52 changed files with 55059 additions and 2492 deletions
+9 -5
View File
@@ -357,6 +357,7 @@ initialize_shell_variables (env, privmode)
temp_var = (SHELL_VAR *)NULL;
#if defined (FUNCTION_IMPORT)
/* If exported function, define it now. Don't import functions from
the environment in privileged mode. */
if (privmode == 0 && read_but_dont_execute == 0 &&
@@ -406,6 +407,7 @@ initialize_shell_variables (env, privmode)
/* Restore original suffix */
tname[namelen] = BASHFUNC_SUFFIX[0];
}
#endif /* FUNCTION_IMPORT */
#if defined (ARRAY_VARS)
# if ARRAY_EXPORT
/* Array variables may not yet be exported. */
@@ -420,11 +422,7 @@ initialize_shell_variables (env, privmode)
}
# endif /* ARRAY_EXPORT */
#endif
#if 0
else if (legal_identifier (name))
#else
else
#endif
{
ro = 0;
if (posixly_correct && STREQ (name, "SHELLOPTS"))
@@ -5158,10 +5156,16 @@ void
sv_optind (name)
char *name;
{
SHELL_VAR *var;
char *tt;
int s;
tt = get_string_value ("OPTIND");
var = find_variable ("OPTIND");
tt = var ? get_variable_value (var) : (char *)NULL;
/* Assume that if var->context < variable_context and variable_context > 0
then we are restoring the variables's previous state while returning
from a function. */
if (tt && *tt)
{
s = atoi (tt);