equal
deleted
inserted
replaced
1 http://lists.research.att.com/pipermail/ast-developers/2014q1/003809.html |
1 # This has been submitted to the community but has not been accepted yet. |
2 --- |
2 # The details can be found at the following location. |
3 --- a/src/cmd/ksh93/sh/subshell.c |
3 # http://lists.research.att.com/pipermail/ast-developers/2014q1/003809.html |
4 +++ b/src/cmd/ksh93/sh/subshell.c |
4 --- INIT.2012-08-01.old/src/cmd/ksh93/sh/subshell.c 2015-02-24 13:25:19.363479570 -0800 |
5 @@ -234,15 +234,22 @@ Namval_t *sh_assignok(register Namval_t *np,int add) |
5 +++ INIT.2012-08-01/src/cmd/ksh93/sh/subshell.c 2015-03-05 13:02:10.389323525 -0800 |
|
6 @@ -242,15 +244,22 @@ Namval_t *sh_assignok(register Namval_t |
6 { |
7 { |
7 register Namval_t *mp; |
8 register Namval_t *mp; |
8 register struct Link *lp; |
9 register struct Link *lp; |
9 - register struct subshell *sp = (struct subshell*)subshell_data; |
10 - register struct subshell *sp = (struct subshell*)subshell_data; |
10 - Shell_t *shp = sp->shp; |
11 - Shell_t *shp = sp->shp; |
14 + Dt_t *dp; |
15 + Dt_t *dp; |
15 Namval_t *mpnext; |
16 Namval_t *mpnext; |
16 Namarr_t *ap; |
17 Namarr_t *ap; |
17 int save; |
18 int save; |
18 + |
19 + |
19 + sp = (struct subshell*)subshell_data; |
20 + sp = (struct subshell*)subshell_data; |
20 + |
21 + |
21 /* don't bother with this */ |
22 /* don't bother with this */ |
22 - if(!sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD) |
23 - if(!sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD) |
23 + if(!sp || !sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD) |
24 + if(!sp || !sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD) |
24 return(np); |
25 return(np); |
25 + |
26 + |
26 + shp = sp->shp; |
27 + shp = sp->shp; |
27 + dp = shp->var_tree; |
28 + dp = shp->var_tree; |
28 + |
29 + |
29 if((ap=nv_arrayptr(np)) && (mp=nv_opensub(np))) |
30 /* don't bother to save if in newer scope */ |
30 { |
31 if(sp->var!=shp->var_tree && sp->var!=shp->var_base && shp->last_root==shp->var_tree) |
31 shp->last_root = ap->table; |
32 return(np); |
32 |
|