Lines Matching refs:ep
62 #define roundptr(ep,cp,type) (((unsigned char*)(ep))+round(cp-((unsigned char*)(ep)),pow2size(sizeof(type))))
155 Sfdouble_t arith_exec(Arith_t *ep)
158 register unsigned char *cp = ep->code;
167 Shell_t *shp = ep->shp;
169 node.emode = ep->emode;
170 node.expr = ep->expr;
171 node.elen = ep->elen;
178 arith_error(e_recursive,ep->expr,ep->emode);
181 if(ep->staksize < SMALL_STACK)
184 sp = (Sfdouble_t*)stakalloc(ep->staksize*(sizeof(Sfdouble_t)+1));
185 tp = (char*)(sp+ep->staksize);
192 arith_error(e_incompatible,ep->expr,ep->emode);
198 cp = roundptr(ep,cp,short);
202 cp = (unsigned char*)ep + *((short*)cp);
210 (*ep->fun)(&ptr,&node,ASSIGN,num+1);
214 (*ep->fun)(&ptr,&node,ASSIGN,num-1);
219 num = (*ep->fun)(&ptr,&node,ASSIGN,num);
224 num = (*ep->fun)(&ptr,&node,ASSIGN,num);
238 cp = roundptr(ep,cp,Sfdouble_t*);
249 num = (*ep->fun)(&ptr,&node,VALUE,num);
257 arith_error(node.value,ptr,ep->emode);
282 cp = roundptr(ep,cp,Sfdouble_t*);
294 num = (*ep->fun)(&ptr,&node,ASSIGN,num);
300 r = (*ep->fun)(&ptr,&node,VALUE,num);
305 num = (*ep->fun)(&ptr,&node,ASSIGN,r);
313 cp = roundptr(ep,cp,Math_f);
314 *++sp = (Sfdouble_t)(cp-ep->code);
319 cp = roundptr(ep,cp,Sfdouble_t);
349 arith_error(e_divzero,ep->expr,ep->emode);
362 arith_error(e_divzero,ep->expr,ep->emode);
424 fun = *((Math_f*)(ep->code+(int)(*sp)));
438 fun = *((Math_f*)(ep->code+(int)(*sp)));
444 fun = *((Math_f*)(ep->code+(int)(*sp)));
462 fun = *((Math_f*)(ep->code+(int)(*sp)));
468 fun = *((Math_f*)(ep->code+(int)(*sp)));
903 register Arith_t *ep;
927 ep = (Arith_t*)stakfreeze(0);
928 ep->shp = shp;
929 ep->expr = string;
930 ep->elen = strlen(string);
931 ep->code = (unsigned char*)(ep+1);
932 ep->fun = fun;
933 ep->emode = emode;
934 ep->size = offset - sizeof(Arith_t);
935 ep->staksize = cur.stakmaxsize+1;
938 return(ep);
956 Arith_t *ep;
962 ep = arith_compile(shp,s,end,conv,emode);
963 ep->emode = emode;
964 d = arith_exec(ep);
965 stakset(sp?sp:(char*)ep,offset);
995 extern int matherr(struct exception *ep)
998 switch(ep->type)
1019 errormsg(SH_DICT,ERROR_exit(1),message,ep->name);