• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/router/busybox/

Lines Matching refs:vp

361 static void setval (struct var *vp, char *val );
362 static void nameval (struct var *vp, char *val, char *name );
363 static void export (struct var *vp );
364 static void ronly (struct var *vp );
1159 register struct var *vp;
1172 for (vp = vlist; vp; vp = vp->next)
1173 if (eqname(vp->name, n))
1174 return(vp);
1176 vp = (struct var *)space(sizeof(*vp));
1177 if (vp == 0 || (vp->name = space((int)(cp-n)+2)) == 0) {
1181 for (cp = vp->name; (*cp = *n++) && *cp != '='; cp++)
1186 setarea((char *)vp, 0);
1187 setarea((char *)vp->name, 0);
1188 vp->value = null;
1189 vp->next = vlist;
1190 vp->status = GETCELL;
1191 vlist = vp;
1192 return(vp);
1196 * give variable at `vp' the value `val'.
1199 setval(vp, val)
1200 struct var *vp;
1203 nameval(vp, val, (char *)NULL);
1214 nameval(vp, val, name)
1215 register struct var *vp;
1222 if (vp->status & RONLY) {
1223 for (xp = vp->name; *xp && *xp != '=';)
1230 xp = space(strlen(vp->name)+strlen(val)+2);
1236 for (cp = vp->name; (*xp = *cp++) && *xp!='='; xp++)
1246 if (vp->status & GETCELL)
1247 freecell(vp->name); /* form new string `name=value' */
1248 vp->name = name;
1249 vp->value = val;
1250 vp->status |= fl;
1254 export(vp)
1255 struct var *vp;
1257 vp->status |= EXPORT;
1261 ronly(vp)
1262 struct var *vp;
1264 if (isalpha(vp->name[0]) || vp->name[0] == '_') /* not an internal symbol ($# etc) */
1265 vp->status |= RONLY;
1286 struct var *vp;
1293 vp = lookup(s);
1294 nameval(vp, ++cp, cf == COPYV? (char *)NULL: s);
1296 vp->status &= ~GETCELL;
1316 register struct var *vp;
1318 for (vp = vlist; vp; vp = vp->next)
1319 if (vp->status & f && (isalpha(*vp->name) || *vp->name == '_')) {
1320 if (vp->status & EXPORT)
1322 if (vp->status & RONLY)
1324 write(out, vp->name, (int)(findeq(vp->name) - vp->name));
2305 struct var *vp;
2402 vp = lookup(t->str);
2408 setval(vp, *wp++);
3362 register struct var *vp;
3367 for (vp = vlist; vp; vp = vp->next)
3368 varput(vp->name, 1);
3506 register struct var *vp;
3509 for (vp = vlist; vp; vp = vp->next)
3510 if (vp->status & EXPORT)
3511 wb = addword(vp->name, wb);
3681 struct var *vp;
3734 vp = lookup(s);
3735 if ((dolp = vp->value) == null) {
3743 setval(vp, cp);
3744 dolp = vp->value;