Lines Matching refs:vp

40 	tchar *vp, op;  in doset()  local
62 for (vp = p; alnum(*p); p++) in doset()
64 if (vp == p || !letter(*vp)) in doset()
66 if ((p - vp) > MAX_VAR_LEN) in doset()
99 set1(vp, vecp, &shvhed); in doset()
104 asx(vp, subscr, retp); in doset()
108 set(vp, savestr(p)); in doset()
109 if (eq(vp, S_path /* "path" */)) { in doset()
112 } else if (eq(vp, S_histchars /* "histchars" */)) { in doset()
116 } else if (eq(vp, S_user /* "user" */)) in doset()
117 local_setenv(S_USER /* "USER" */, value(vp)); in doset()
118 else if (eq(vp, S_term /* "term" */)) in doset()
119 local_setenv(S_TERM /* "TERM" */, value(vp)); in doset()
120 else if (eq(vp, S_home /* "home" */)) in doset()
121 local_setenv(S_HOME /* "HOME" */, value(vp)); in doset()
123 else if (eq(vp, S_filec /* "filec" */)) in doset()
125 else if (eq(vp, S_cdpath /* "cdpath" */)) in doset()
148 asx(tchar *vp, int subscr, tchar *p) in asx() argument
150 struct varent *v = getvx(vp, subscr); in asx()
160 getvx(tchar *vp, int subscr) in getvx() argument
162 struct varent *v = adrof(vp); in getvx()
168 udvar(vp); in getvx()
180 tchar *vp, c, op; in dolet() local
192 for (vp = p; alnum(*p); p++) in dolet()
194 if (vp == p || !letter(*vp)) in dolet()
206 vp = savestr(vp); in dolet()
233 asx(vp, subscr, p); in dolet()
235 set(vp, p); in dolet()
241 struct varent *gv = getvx(vp, subscr); in dolet()
243 asx(vp, subscr, operate(op, gv->vec[subscr - 1], p)); in dolet()
246 asx(vp, subscr, operate(op, getvx(vp, subscr)->vec[subscr - 1], p)); in dolet()
249 set(vp, operate(op, value(vp), p)); in dolet()
250 if (eq(vp, S_path /* "path" */)) { in dolet()
255 if (eq(vp, S_cdpath /* "cdpath" */)) in dolet()
258 xfree(vp); in dolet()
265 xset(tchar *cp, tchar ***vp) in xset() argument
274 --(*vp); in xset()
275 xfree(**vp); in xset()
276 **vp = dp; in xset()
278 return (putn(exp(vp))); in xset()
282 operate(tchar op, tchar *vp, tchar *p) in operate() argument
291 if (*vp) in operate()
292 *v++ = vp; in operate()
381 struct varent *vp; in value1() local
386 vp = adrof1(var, head); in value1()
387 return (vp == 0 || vp->vec[0] == 0 ? S_ /* "" */ : vp->vec[0]); in value1()
391 madrof(tchar *pat, struct varent *vp) in madrof() argument
398 for (; vp; vp = vp->v_right) { in madrof()
399 if (vp->v_left && (vp1 = madrof(pat, vp->v_left))) in madrof()
401 if (Gmatch(vp->v_name, pat)) in madrof()
402 return vp; in madrof()
404 return vp; in madrof()
522 struct varent *vp; in unset1() local
530 while (vp = madrof(*v, head->v_left)) in unset1()
531 unsetv1(vp), cnt++; in unset1()
540 struct varent *vp; in unsetv() local
545 if ((vp = adrof1(var, &shvhed)) == 0) in unsetv()
547 unsetv1(vp); in unsetv()