Imported from ../bash-2.02.tar.gz.

This commit is contained in:
Jari Aalto 1998-04-17 19:52:44 +00:00
commit cce855bc5b
323 changed files with 33916 additions and 12321 deletions

View file

@ -57,6 +57,9 @@ $END
#include <config.h>
#if defined (HAVE_UNISTD_H)
# ifdef _MINIX
# include <sys/types.h>
# endif
# include <unistd.h>
#endif
@ -377,6 +380,18 @@ declare_internal (list, local_var)
FREE (var->value);
var->value = t;
}
/* If we found this variable in the temporary environment, as with
`var=value declare -x var', make sure it is treated identically
to `var=value export var'. Do the same for `declare -r' and
`readonly'. Preserve the attributes, except for att_tempvar. */
if ((flags_on & (att_exported|att_readonly)) && tempvar_p (var))
{
SHELL_VAR *tv;
tv = bind_variable (var->name, var->value ? var->value : "");
tv->attributes = var->attributes & ~att_tempvar;
dispose_variable (var);
}
}
stupidly_hack_special_variables (name);