Lines Matching refs:fp
204 static void put_ed(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
229 nv_putv(np, val, flags, fp);
233 static void put_history(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
246 nv_putv(np, val, flags, fp);
257 static void put_optindex(Namval_t* np,const char *val,int flags,Namfun_t *fp)
261 nv_putv(np, val, flags, fp);
263 nv_disc(np,fp,NV_POP);
266 static Sfdouble_t nget_optindex(register Namval_t* np, Namfun_t *fp)
271 static Namfun_t *clone_optindex(Namval_t* np, Namval_t *mp, int flags, Namfun_t *fp)
274 memcpy((void*)dp,(void*)fp,sizeof(Namfun_t));
282 static void put_restricted(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
300 nv_putv(np, val, flags, fp);
326 static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
330 nv_putv(np, val, flags, fp);
359 static void put_lang(Namval_t* np,const char *val,int flags,Namfun_t *fp)
404 nv_putv(np, val, flags, fp);
460 static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
462 register struct ifs *ip = (struct ifs*)fp;
467 fp = nv_stack(np, NIL(Namfun_t*));
468 if(fp && !fp->nofree)
469 free((void*)fp);
472 nv_putv(np, val, flags, fp);
473 if(!val && !(flags&NV_CLONE) && (fp=np->nvfun) && !fp->disc && (shp=(Shell_t*)(fp->last)))
481 static char* get_ifs(register Namval_t* np, Namfun_t *fp)
483 register struct ifs *ip = (struct ifs*)fp;
487 value = nv_getv(np,fp);
539 static void put_seconds(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
545 fp = nv_stack(np, NIL(Namfun_t*));
546 if(fp && !fp->nofree)
547 free((void*)fp);
548 nv_putv(np, val, flags, fp);
557 nv_putv(np, val, flags, fp);
563 static char* get_seconds(register Namval_t* np, Namfun_t *fp)
569 NOT_USED(fp);
576 static Sfdouble_t nget_seconds(register Namval_t* np, Namfun_t *fp)
580 NOT_USED(fp);
588 static void put_rand(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
590 struct rand *rp = (struct rand*)fp;
594 fp = nv_stack(np, NIL(Namfun_t*));
595 if(fp && !fp->nofree)
596 free((void*)fp);
614 static Sfdouble_t nget_rand(register Namval_t* np, Namfun_t *fp)
617 NOT_USED(fp);
625 static char* get_rand(register Namval_t* np, Namfun_t *fp)
627 register long n = nget_rand(np,fp);
634 static Sfdouble_t nget_lineno(Namval_t* np, Namfun_t *fp)
642 NOT_USED(fp);
646 static void put_lineno(Namval_t* np,const char *val,int flags,Namfun_t *fp)
652 fp = nv_stack(np, NIL(Namfun_t*));
653 if(fp && !fp->nofree)
654 free((void*)fp);
662 shp->st.firstline += nget_lineno(np,fp)+1-n;
665 static char* get_lineno(register Namval_t* np, Namfun_t *fp)
667 register long n = nget_lineno(np,fp);
671 static char* get_lastarg(Namval_t* np, Namfun_t *fp)
681 static void put_lastarg(Namval_t* np,const char *val,int flags,Namfun_t *fp)
700 static int hasgetdisc(register Namfun_t *fp)
702 while(fp && !fp->disc->getnum && !fp->disc->getval)
703 fp = fp->next;
704 return(fp!=0);
745 static char* get_match(register Namval_t* np, Namfun_t *fp)
747 struct match *mp = (struct match*)fp;
775 static char* get_version(register Namval_t* np, Namfun_t *fp)
777 return(nv_getv(np,fp));
780 static Sfdouble_t nget_version(register Namval_t* np, Namfun_t *fp)
785 NOT_USED(fp);
820 static void put_vpath(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
827 nv_putv(np,val,flags,fp);
846 static char* get_nspace(Namval_t* np, Namfun_t *fp)
1440 static Namval_t *next_stat(register Namval_t* np, Dt_t *root,Namfun_t *fp)
1442 struct Stats *sp = (struct Stats*)fp;
1450 static Namval_t *create_stat(Namval_t *np,const char *name,int flag,Namfun_t *fp)
1452 struct Stats *sp = (struct Stats*)fp;
1471 fp->last = (char*)&name[n];
1487 static char *name_stat(Namval_t *np, Namfun_t *fp)