807 |
struct variable makelevel_key; |
struct variable makelevel_key; |
808 |
char **result_0; |
char **result_0; |
809 |
char **result; |
char **result; |
|
struct variable ev; |
|
|
|
|
|
/* Set up a fake variable struct for the original SHELL value. */ |
|
|
ev.name = "SHELL"; |
|
|
ev.value = env_shell; |
|
810 |
|
|
811 |
if (file == 0) |
if (file == 0) |
812 |
set_list = current_variable_set_list; |
set_list = current_variable_set_list; |
863 |
break; |
break; |
864 |
|
|
865 |
case v_noexport: |
case v_noexport: |
|
if (!streq (v->name, "SHELL")) |
|
|
continue; |
|
866 |
/* If this is the SHELL variable and it's not exported, then |
/* If this is the SHELL variable and it's not exported, then |
867 |
add the value from our original environment. */ |
add the value from our original environment. */ |
868 |
v = &ev; |
if (streq (v->name, "SHELL")) |
869 |
break; |
{ |
870 |
|
extern struct variable shell_var; |
871 |
|
v = &shell_var; |
872 |
|
break; |
873 |
|
} |
874 |
|
continue; |
875 |
|
|
876 |
case v_ifset: |
case v_ifset: |
877 |
if (v->origin == o_default) |
if (v->origin == o_default) |