Lines Matching refs:shp

66 	logdata.sh = ((Shbltin_t*)extra)->shp;  in b_exec()
102 register Shell_t *shp; in B_login() local
105 shp = ((Shbltin_t*)extra)->shp; in B_login()
109 shp = logp->sh; in B_login()
111 pp = (struct checkpt*)shp->jmplist; in B_login()
116 register struct argnod *arg=shp->envlist; in B_login()
119 if(shp->subshell && !shp->subshare) in B_login()
124 env_close(shp->env); in B_login()
125 shp->env = env_open((char**)0,3); in B_login()
127 nv_scan(shp->var_tree,noexport,0,NV_EXPORT,NV_EXPORT); in B_login()
133 (*cp=0,np=nv_search(arg->argval,shp->var_tree,0))) in B_login()
136 sh_envput(shp->env,np); in B_login()
146 if(job_close(shp) < 0) in B_login()
152 sh_freeup(shp); in B_login()
154 sh_done(shp,0); in B_login()
185 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_eval() local
204 return(shp->exitval); in b_eval()
212 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_dot_cmd() local
213 struct sh_scoped savst, *prevscope = shp->st.self; in b_dot_cmd()
233 if(shp->dot_depth+1 > DOTMAX) in b_dot_cmd()
235 if(!(np=shp->posix_fun)) in b_dot_cmd()
238 np = nv_search(script,shp->fun_tree,0); in b_dot_cmd()
259 filename = path_fullname(stkptr(shp->stk,PATH_OFFSET)); in b_dot_cmd()
262 *prevscope = shp->st; in b_dot_cmd()
263 shp->st.lineno = np?((struct functnod*)nv_funtree(np))->functline:1; in b_dot_cmd()
264 shp->st.var_local = shp->st.save_tree = shp->var_tree; in b_dot_cmd()
267 shp->st.filename = filename; in b_dot_cmd()
268 shp->st.lineno = 1; in b_dot_cmd()
270 level = shp->fn_depth+shp->dot_depth+1; in b_dot_cmd()
272 shp->st.prevst = prevscope; in b_dot_cmd()
273 shp->st.self = &savst; in b_dot_cmd()
274 shp->topscope = (Shscope_t*)shp->st.self; in b_dot_cmd()
275 prevscope->save_tree = shp->var_tree; in b_dot_cmd()
276 shp->st.cmdname = argv[0]; in b_dot_cmd()
278 shp->st.filename = np->nvalue.rp->fname; in b_dot_cmd()
279 nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE); in b_dot_cmd()
280 shp->posix_fun = 0; in b_dot_cmd()
282 argsave = sh_argnew(shp,argv,&saveargfor); in b_dot_cmd()
287 shp->dot_depth++; in b_dot_cmd()
299 free((void*)shp->st.filename); in b_dot_cmd()
300 shp->dot_depth--; in b_dot_cmd()
302 sh_argreset(shp,argsave,saveargfor); in b_dot_cmd()
305 prevscope->dolc = shp->st.dolc; in b_dot_cmd()
306 prevscope->dolv = shp->st.dolv; in b_dot_cmd()
308 if (shp->st.self != &savst) in b_dot_cmd()
309 *shp->st.self = shp->st; in b_dot_cmd()
311 memcpy((void*)&shp->st, (void*)prevscope, sizeof(Shscope_t)); in b_dot_cmd()
312 shp->topscope = (Shscope_t*)prevscope; in b_dot_cmd()
313 nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE); in b_dot_cmd()
314 if(shp->exitval > SH_EXITSIG) in b_dot_cmd()
315 sh_fault(shp->exitval&SH_EXITMASK); in b_dot_cmd()
317 siglongjmp(*shp->jmplist,jmpval); in b_dot_cmd()
318 return(shp->exitval); in b_dot_cmd()
346 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_shift() local
360 if(n<0 || shp->st.dolc<n) in b_shift()
364 shp->st.dolv += n; in b_shift()
365 shp->st.dolc -= n; in b_shift()
372 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_wait() local
386 return(shp->exitval); in b_wait()
398 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_bg() local
426 return(shp->exitval); in b_bg()
432 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_jobs() local
459 return(shp->exitval); in b_jobs()
512 register Shell_t *shp = ((Shbltin_t*)extra)->shp; in b_vpath() local
534 if(!shp->lim.fs3d) in b_vpath()
545 vend = stkalloc(shp->stk,++n); in b_vpath()
573 if(!shp->lim.fs3d) in b_vpath()
575 if(shp->subshell && !shp->subshare) in b_vpath()