/ast/src/cmd/ksh93/bltins/ |
H A D | cflow.c | 49 register Shell_t *shp = context->shp; local 50 struct checkpt *pp = (struct checkpt*)shp->jmplist; 67 n = (((arg= *argv)?(int)strtol(arg, (char**)0, 10):shp->oldexit)); 68 if(n<0 || n==256 || n > SH_EXITMASK+shp->gd->sigmax+1) 71 if(shp->fn_depth==0 && shp->dot_depth==0 && !sh_isstate(SH_PROFILE)) 73 sh_exit(shp->savexit=n); 89 register Shell_t *shp = context->shp; local [all...] |
H A D | cd_pwd.c | 57 register Shell_t *shp = context->shp; local 84 oldpwd = (char*)shp->pwd; 85 opwdnod = (shp->subshell?sh_assignok(OLDPWDNOD,1):OLDPWDNOD); 86 pwdnod = (shp->subshell?sh_assignok(PWDNOD,1):PWDNOD); 101 if(!(cdpath = (Pathcomp_t*)shp->cdpathlist) && (dp=sh_scoped(shp,CDPNOD)->nvalue.cp)) 103 if(cdpath=path_addpath(shp,(Pathcomp_t*)0,dp,PATH_CDPATH)) 105 shp->cdpathlist = (void*)cdpath; 106 cdpath->shp 235 register Shell_t *shp = context->shp; local [all...] |
H A D | ulimit.c | 73 Shell_t *shp = context->shp; local 135 if(shp->subshell && !shp->subshare)
|
H A D | whence.c | 55 register Shell_t *shp = context->shp; local 71 shp->xargexit = 1; 89 return(whence(shp,argv, flags)); 98 register Shell_t *shp = context->shp; local 130 return(whence(shp, argv, flags)); 133 static int whence(Shell_t *shp,char **argv, register int flags) argument 167 if((np=nv_search(name,shp->alias_tree,0)) 187 root = (flags&F_FLAG)?shp [all...] |
H A D | getopts.c | 38 Shell_t *shp = *(Shell_t**)(dp+1); local 39 Stk_t *stkp = shp->stk; 41 if((shp->namespace && sh_fsearch(shp,s,0)) || nv_search(s,shp->fun_tree,0)) 43 if(nv_search(s,shp->fun_tree,0)) 51 sfputr(sp,sh_mactry(shp,stkfreeze(stkp,1)),-1); 62 register Shell_t *shp = context->shp; local 74 disc.sh = shp; [all...] |
H A D | hist.c | 47 register Shell_t *shp = context->shp; local 59 if(!sh_histinit((void*)shp)) 61 hp = shp->gd->hist_ptr; 195 outfile= sfnew(NIL(Sfio_t*),shp->outbuff,IOBSIZE,fdo,SF_WRITE); 205 hist_list(shp->gd->hist_ptr,outfile,hist_tell(shp->gd->hist_ptr,range[flag]),0,arg); 207 sh_sigcheck(shp); 217 if(!arg && !(arg=nv_getval(sh_scoped(shp,HISTEDIT))) && !(arg=nv_getval(sh_scoped(shp,FCEDNO [all...] |
H A D | regress.c | 125 void sh_regress_init(Shell_t* shp) argument 129 shp->regress = &state; 264 register Shell_t* shp = context->shp; local
|
H A D | sleep.c | 49 register Shell_t *shp = context->shp; local 53 if(!(shp->sigflag[SIGALRM]&(SH_SIGFAULT|SH_SIGOFF))) 78 else if(*last=='.' && shp->decomma && d==(unsigned long)d) 116 shp->lastsig=0; 118 if(sflag || tloc==0 || errno!=EINTR || shp->lastsig) 120 sh_sigcheck(shp); 124 if(shp->sigflag[SIGALRM]&SH_SIGTRAP) 125 sh_timetraps(shp); 138 Shell_t *shp local 176 Shell_t *shp = sh_getinterp(); local [all...] |
H A D | trap.c | 48 register Shell_t *shp = context->shp; local 85 else if(*action=='+' && action[1]==0 && shp->st.self == &shp->global) 96 sig = sig_number(shp,arg); 105 char **trap = (shp->st.otrap?shp->st.otrap:shp->st.trap); 118 shp->st.otrap = 0; 119 if(shp 171 register Shell_t *shp = context->shp; local 240 sig_number(Shell_t *shp,const char *string) argument 318 sig_name(Shell_t *shp,int sig, char* buf, int pfx) argument 360 sig_list(register Shell_t *shp,register int flag) argument [all...] |
H A D | alarm.c | 129 void sh_timetraps(Shell_t *shp) argument 135 shp->sigflag[SIGALRM] &= ~SH_SIGALRM; 136 tptop= (struct tevent*)shp->st.timetrap; 153 if(!(shp->sigflag[SIGALRM]&SH_SIGALRM)) 187 Shell_t *shp = tp->sh; local 209 shp->st.timetrap = time_delete(tp,shp->st.timetrap); 211 shp->st.timetrap = time_add(tp,shp->st.timetrap); 216 shp 238 register Shell_t *shp = context->shp; local [all...] |
H A D | enum.c | 195 Shell_t *shp = context->shp; local 230 tp = nv_open(stakptr(n), shp->var_tree, NV_VARNAME); 276 Shell_t *shp = ((Shbltin_t*)context)->shp; local 281 mp = nv_search("typeset",shp->bltin_tree,0);
|
H A D | misc.c | 66 logdata.sh = context->shp; 102 register Shell_t *shp; local 105 shp = context->shp; 109 shp = logp->sh; 111 pp = (struct checkpt*)shp->jmplist; 116 register struct argnod *arg=shp->envlist; 119 if(shp->subshell && !shp->subshare) 124 env_close(shp 163 Shell_t *shp = context->shp; local 185 register Shell_t *shp = context->shp; local 212 register Shell_t *shp = context->shp; local 347 register Shell_t *shp = context->shp; local 373 register Shell_t *shp = context->shp; local 399 register Shell_t *shp = context->shp; local 433 register Shell_t *shp = context->shp; local 516 register Shell_t *shp = context->shp; local [all...] |
H A D | read.c | 67 register Shell_t *shp = context->shp; local 69 long timeout = 1000*shp->st.tmout; 111 if((fd = shp->cpipe[0])<=0) 131 if(sh_inuse(shp,fd)) 147 if(!((r=shp->fdstatus[fd])&IOREAD) || !(r&(IOSEEK|IONOSEEK))) 148 r = sh_iocheckfd(shp,fd); 168 shp->prompt = default_prompt; 169 if(r && (shp->prompt=(char*)sfreserve(sfstderr,r,SF_LOCKR))) 171 memcpy(shp 204 sh_readline(register Shell_t *shp,char **names, volatile int fd, int flags,ssize_t size,long timeout) argument [all...] |
H A D | test.c | 85 static int test_strmatch(Shell_t *shp,const char *str, const char *pat) argument 107 sh_setmatch(shp, str, -1, n, match, 0); 116 tdata.sh = context->shp; 313 int test_unop(Shell_t *shp,register int op,register const char *arg) argument 411 return(statb.st_uid==shp->gd->userid); 412 return(statb.st_gid==shp->gd->groupid); 436 if(!(np = nv_open(arg,shp->var_tree,NV_VARNAME|NV_NOFAIL|NV_NOADD|NV_NOREF))) 464 int test_binop(Shell_t *shp,register int op,const char *left,const char *right) argument 473 lnum = sh_arith(shp,left); 474 rnum = sh_arith(shp,righ 560 Shell_t *shp = sh_getinterp(); local [all...] |
/ast/src/cmd/tksh/ |
H A D | uinit.c | 28 static void tksh_userinit(Shell_t* shp, int subshell) argument 35 if(np = nv_open("source",shp->alias_tree,NV_NOADD)) 42 if(nv_open("tkloop",shp->fun_tree,NV_NOADD))
|
/ast/src/cmd/ksh93/sh/ |
H A D | shcomp.c | 73 Shell_t *shp; local 97 shp = sh_init(argc,argv,(Shinit_f)0); 98 shp->shcomp = 1; 131 shp->inlineno = 1; 138 if(t = (Shnode_t*)sh_parse(shp,in,0))
|
H A D | trestore.c | 47 Shnode_t *sh_trestore(Shell_t *shp,Sfio_t *in) argument 51 t = r_tree(shp); 57 static Shnode_t *r_tree(Shell_t *shp) argument 69 t = getnode(shp->stk,parnod); 70 t->par.partre = r_tree(shp); 73 t = getnode(shp->stk,comnod); 75 r_comarg(shp,(struct comnod*)t); 79 t = getnode(shp->stk,forknod); 81 t->fork.forktre = r_tree(shp); 82 t->fork.forkio = r_redirect(shp); 177 r_arg(Shell_t *shp) argument 232 r_redirect(Shell_t* shp) argument 269 r_comarg(Shell_t *shp,struct comnod *com) argument 300 r_comlist(Shell_t *shp) argument 316 r_switch(Shell_t *shp) argument [all...] |
H A D | arith.c | 65 Shell_t *shp = lvalue->shp; local 68 Dt_t *sdict = (shp->st.real_fun? shp->st.real_fun->sdict:0); 69 Dt_t *nsdict = (shp->namespace?nv_dict(shp->namespace):0); 70 Dt_t *root = shp->var_tree; 82 if((!(np = nv_open(cp,shp->var_tree,assign|NV_VARNAME|NV_NOADD|NV_NOFAIL)) || nv_isnull(np)) && sh_macfun(shp,cp, offset = staktell())) 84 Fun = sh_arith(shp,su 222 Shell_t *shp = lvalue->shp; local 511 Shell_t *shp = sh_getinterp(); local 536 sh_arith(Shell_t *shp,register const char *str) argument 541 sh_arithcomp(Shell_t *shp,register char *str) argument [all...] |
H A D | bash.c | 192 Shell_t *shp = (Shell_t*)extra; local 194 Shopt_t newflags=shp->options, opt; 289 sh_applyopts(shp,newflags); 290 shp->options = newflags; 292 sh_trace(shp,argv,1); 311 void bash_init(Shell_t *shp,int mode) argument 322 sh_source(shp, NiL, sh_mactry(shp,(char*)e_bash_logout)); 337 if(shp->login_sh==2) 356 if(np=nv_open("HOSTTYPE",shp [all...] |
H A D | expand.c | 80 Shell_t *shp = sh_getinterp(); local 83 pp = path_get(shp,""); 93 int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead) argument 123 extra += scantree(shp->alias_tree,pattern,arghead); 124 extra += scantree(shp->fun_tree,pattern,arghead); 145 cp=nv_getval(sh_scoped(shp,FIGNORENOD)); 150 GLOBIGNORENOD = nv_open("GLOBIGNORE",shp->var_tree,0); 151 cp=nv_getval(sh_scoped(shp,GLOBIGNORENOD)); 188 gp->gl_fignore = nv_getval(sh_scoped(shp,FIGNORENOD)); 191 gp->gl_intr = &shp 249 path_complete(Shell_t *shp,const char *name,register const char *suffix, struct argnod **arghead) argument 265 path_generate(Shell_t *shp,struct argnod *todo, struct argnod **arghead) argument [all...] |
H A D | fault.c | 65 register Shell_t *shp = sh_getinterp(); local 68 register struct checkpt *pp = (struct checkpt*)shp->jmplist; 84 shp->winch++; 87 trap = shp->st.trapcom[sig]; 88 if(shp->savesig) 91 if(!(shp->sigflag[sig]&SH_SIGIGNORE)) 92 shp->savesig = sig; 95 if(sig==SIGALRM && shp->bltinfun==b_sleep) 99 shp->trapnote |= SH_SIGTRAP; 100 shp 227 Shell_t *shp = (Shell_t*)ptr; local 387 sh_chktrap(Shell_t* shp) argument 448 Shell_t *shp = sh_getinterp(); local 512 Shell_t *shp = sh_getinterp(); local 605 Shell_t *shp = (Shell_t*)ptr; local [all...] |
H A D | main.c | 56 static void chkmail(Shell_t *shp, char*); 94 int sh_source(Shell_t *shp, Sfio_t *iop, const char *file) argument 100 if (!file || !*file || (fd = path_open(shp,file, PATHCOMP)) < 0) 107 shp->st.filename = path_fullname(shp,stakptr(PATH_OFFSET)); 109 exfile(shp, iop, fd); 126 register Shell_t *shp; local 141 shp = sh_init(ac,av,userinit); 145 if(sigsetjmp(*((sigjmp_buf*)shp->jmpbuffer),0)) 149 shp 364 exfile(register Shell_t *shp, register Sfio_t *iop,register int fno) argument 612 chkmail(Shell_t *shp, char *files) argument [all...] |
/ast/src/cmd/ksh93/include/ |
H A D | path.h | 66 Shell_t *shp; member in struct:pathcomp
|
/ast/src/lib/libast/include/ |
H A D | shcmd.h | 61 Shell_t* shp; member in struct:Shbltin_s
|
/ast/src/cmd/kshlib/dbm_t/ |
H A D | dbm_t.c | 56 Shell_t *shp; member in struct:dbm_array 310 if(ap->shp->subshell) 311 sfprintf(sfstderr,"subshell=%d subscript=%s will be modified, need to save \n",ap->shp->subshell,sp); 400 ap->shp = context->shp; 425 Shell_t *shp = ((Shbltin_t*)context)->shp; local 430 (mp = nv_search("typeset", shp->bltin_tree, 0)))
|