Lines Matching refs:vp

43 	tchar *vp, op;  in doset()  local
65 for (vp = p; alnum(*p); p++) in doset()
67 if (vp == p || !letter(*vp)) in doset()
69 if ((p - vp) > MAX_VAR_LEN) in doset()
102 set1(vp, vecp, &shvhed); in doset()
107 asx(vp, subscr, retp); in doset()
111 set(vp, savestr(p)); in doset()
112 if (eq(vp, S_path /* "path" */)) { in doset()
115 } else if (eq(vp, S_histchars /* "histchars" */)) { in doset()
119 } else if (eq(vp, S_user /* "user" */)) in doset()
120 local_setenv(S_USER /* "USER" */, value(vp)); in doset()
121 else if (eq(vp, S_term /* "term" */)) in doset()
122 local_setenv(S_TERM /* "TERM" */, value(vp)); in doset()
123 else if (eq(vp, S_home /* "home" */)) in doset()
124 local_setenv(S_HOME /* "HOME" */, value(vp)); in doset()
126 else if (eq(vp, S_filec /* "filec" */)) in doset()
128 else if (eq(vp, S_cdpath /* "cdpath" */)) in doset()
151 asx(tchar *vp, int subscr, tchar *p) in asx() argument
153 struct varent *v = getvx(vp, subscr); in asx()
163 getvx(tchar *vp, int subscr) in getvx() argument
165 struct varent *v = adrof(vp); in getvx()
171 udvar(vp); in getvx()
183 tchar *vp, c, op; in dolet() local
195 for (vp = p; alnum(*p); p++) in dolet()
197 if (vp == p || !letter(*vp)) in dolet()
209 vp = savestr(vp); in dolet()
236 asx(vp, subscr, p); in dolet()
238 set(vp, p); in dolet()
244 struct varent *gv = getvx(vp, subscr); in dolet()
246 asx(vp, subscr, operate(op, gv->vec[subscr - 1], p)); in dolet()
249 asx(vp, subscr, operate(op, getvx(vp, subscr)->vec[subscr - 1], p)); in dolet()
252 set(vp, operate(op, value(vp), p)); in dolet()
253 if (eq(vp, S_path /* "path" */)) { in dolet()
258 if (eq(vp, S_cdpath /* "cdpath" */)) in dolet()
261 xfree(vp); in dolet()
268 xset(tchar *cp, tchar ***vp) in xset() argument
277 --(*vp); in xset()
278 xfree(**vp); in xset()
279 **vp = dp; in xset()
281 return (putn(exp(vp))); in xset()
285 operate(tchar op, tchar *vp, tchar *p) in operate() argument
294 if (*vp) in operate()
295 *v++ = vp; in operate()
384 struct varent *vp; in value1() local
389 vp = adrof1(var, head); in value1()
390 return (vp == 0 || vp->vec[0] == 0 ? S_ /* "" */ : vp->vec[0]); in value1()
394 madrof(tchar *pat, struct varent *vp) in madrof() argument
401 for (; vp; vp = vp->v_right) { in madrof()
402 if (vp->v_left && (vp1 = madrof(pat, vp->v_left))) in madrof()
404 if (Gmatch(vp->v_name, pat)) in madrof()
405 return vp; in madrof()
407 return vp; in madrof()
525 struct varent *vp; in unset1() local
533 while (vp = madrof(*v, head->v_left)) in unset1()
534 unsetv1(vp), cnt++; in unset1()
543 struct varent *vp; in unsetv() local
548 if ((vp = adrof1(var, &shvhed)) == 0) in unsetv()
550 unsetv1(vp); in unsetv()