summaryrefslogtreecommitdiff
path: root/variables.c~
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-07 09:23:30 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-07 09:23:30 -0500
commitf13513ff9ecac9ed83d930fab26329cd7aba4885 (patch)
tree5032572695f5e753cef216f457fd7d890bfbf84f /variables.c~
parent4ac1ff9885b94a76a1cb4283d66cb422fc1f8cc5 (diff)
downloadbash-f13513ff9ecac9ed83d930fab26329cd7aba4885.tar.gz
commit bash-20080507 snapshot
Diffstat (limited to 'variables.c~')
-rw-r--r--variables.c~9
1 files changed, 7 insertions, 2 deletions
diff --git a/variables.c~ b/variables.c~
index 11f074da..79004210 100644
--- a/variables.c~
+++ b/variables.c~
@@ -356,12 +356,14 @@ initialize_shell_variables (env, privmode)
}
# endif
#endif
- else
+ else if (legal_identifier (name))
{
temp_var = bind_variable (name, string, 0);
VSETATTR (temp_var, (att_exported | att_imported));
array_needs_making = 1;
}
+else
+ internal_error (_("`%s': not a valid identifier"), name);
name[char_index] = '=';
/* temp_var can be NULL if it was an exported function with a syntax
@@ -1329,7 +1331,6 @@ get_bash_command (var)
SHELL_VAR *var;
{
char *p;
-
if (the_printed_command_except_trap)
p = savestring (the_printed_command_except_trap);
@@ -3519,6 +3520,8 @@ push_func_var (data)
shell_variables->flags |= VC_HASTMPVAR;
v->attributes |= var->attributes;
}
+ else
+ stupidly_hack_special_variables (var->name); /* XXX */
dispose_variable (var);
}
@@ -3605,6 +3608,8 @@ push_exported_var (data)
var->attributes &= ~att_propagate;
v->attributes |= var->attributes;
}
+ else
+ stupidly_hack_special_variables (var->name); /* XXX */
dispose_variable (var);
}