Lines Matching defs:lvalue

60 static Namval_t *scope(register Namval_t *np,register struct lval *lvalue,int assign)
62 register int flag = lvalue->flag;
65 Shell_t *shp = lvalue->shp;
67 int c=0,nosub = lvalue->nosub;
71 lvalue->nosub = 0;
72 if(cp>=lvalue->expr && cp < lvalue->expr+lvalue->elen)
99 if((lvalue->emode&ARITH_COMP) && dtvnext(root) && ((sdict && (mp=nv_search(cp,sdict,flags&~NV_ADD))) || (mp=nv_search(cp,root,flags&~(NV_ADD|HASH_NOSCOPE)))))
124 cp = (char*)&lvalue->expr[flag];
190 static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdouble_t n)
192 Shell_t *shp = lvalue->shp;
200 register Namval_t *np = (Namval_t*)(lvalue->value);
201 np = scope(np,lvalue,1);
203 if(lvalue->eflag)
204 lvalue->ptr = (void*)nv_hasdisc(np,&ENUM_disc);
205 lvalue->eflag = 0;
207 lvalue->value = (char*)np;
214 lvalue->value = (char*)0;
247 lvalue->fun = 0;
252 lvalue->nargs = -np->nvalue.rp->argc;
253 lvalue->fun = (Sfdouble_t(*)(Sfdouble_t,...))np;
262 lvalue->fun = tp->fnptr;
263 lvalue->nargs = *tp->fname;
267 if(lvalue->fun)
269 if(lvalue->emode&ARITH_COMP)
270 lvalue->value = (char*)e_function;
272 lvalue->value = (char*)ERROR_dictionary(e_function);
275 if((lvalue->emode&ARITH_COMP) && dot)
277 lvalue->value = (char*)*ptr;
278 lvalue->flag = str-lvalue->value;
288 Dt_t *root = (lvalue->emode&ARITH_COMP)?shp->var_base:shp->var_tree;
327 lvalue->value = (char*)*ptr;
328 lvalue->flag = str-lvalue->value;
336 if(!np && lvalue->value)
338 lvalue->value = (char*)np;
341 lvalue->isfloat=1;
342 lvalue->flag = 0;
345 lvalue->flag = (str-lvalue->expr);
364 lvalue->eflag = 0;
389 lvalue->isfloat=1;
403 lvalue->isfloat=1;
413 register Namval_t *np = (Namval_t*)(lvalue->value);
416 np = scope(np,lvalue,0);
421 *ptr = lvalue->value;
426 if(lvalue->eflag)
427 lvalue->ptr = (void*)nv_hasdisc(np,&ENUM_disc);
428 else if((Namfun_t*)lvalue->ptr && !nv_hasdisc(np,&ENUM_disc) && !nv_isattr(np,NV_INTEGER))
431 mp = ((Namfun_t*)lvalue->ptr)->type;
439 lvalue->eflag = 0;
440 if(((lvalue->emode&2) || lvalue->level>1 || sh_isoption(SH_NOUNSET)) && nv_isnull(np) && !nv_isattr(np,NV_INTEGER))
444 lvalue->value = (char*)ERROR_dictionary(e_notset);
445 lvalue->emode |= 010;
450 lvalue->isfloat= (r!=(Sflong_t)r);
452 lvalue->isfloat=1;
453 if((lvalue->emode&ARITH_ASSIGNOP) && nv_isarray(np))
454 lvalue->nosub = nv_aindex(np)+1;
462 errormsg(SH_DICT,ERROR_warn(0),lvalue->value,*ptr);
465 if(lvalue->emode&ARITH_COMP)
468 errormsg(SH_DICT,ERROR_exit((lvalue->emode&3)!=0),lvalue->value,*ptr);