• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/shell/

Lines Matching defs:vp

1083 	struct var *vp;
1097 for (vp = vlist; vp; vp = vp->next)
1098 if (eqname(vp->name, n))
1099 return vp;
1102 vp = (struct var *) space(sizeof(*vp));
1103 if (vp == 0 || (vp->name = space((int) (cp - n) + 2)) == 0) {
1108 xp = vp->name;
1113 setarea((char *) vp, 0);
1114 setarea((char *) vp->name, 0);
1115 vp->value = null;
1116 vp->next = vlist;
1117 vp->status = GETCELL;
1118 vlist = vp;
1119 return vp;
1129 static void nameval(struct var *vp, const char *val, const char *name)
1135 if (vp->status & RONLY) {
1136 xp = vp->name;
1144 xp = space(strlen(vp->name) + strlen(val) + 2);
1150 cp = vp->name;
1158 if (vp->status & GETCELL)
1159 freecell(vp->name); /* form new string `name=value' */
1160 vp->name = (char*)name;
1161 vp->value = (char*)val;
1162 vp->status |= fl;
1166 * give variable at `vp' the value `val'.
1168 static void setval(struct var *vp, const char *val)
1170 nameval(vp, val, NULL);
1173 static void export(struct var *vp)
1175 vp->status |= EXPORT;
1178 static void ronly(struct var *vp)
1180 if (isalpha(vp->name[0]) || vp->name[0] == '_') /* not an internal symbol */
1181 vp->status |= RONLY;
1214 struct var *vp;
1223 vp = lookup(s);
1224 nameval(vp, ++cp, cf == COPYV ? NULL : s);
1226 vp->status &= ~GETCELL;
1244 struct var *vp;
1246 for (vp = vlist; vp; vp = vp->next) {
1247 if (vp->status & f && (isalpha(*vp->name) || *vp->name == '_')) {
1248 if (vp->status & EXPORT)
1250 if (vp->status & RONLY)
1252 write(out, vp->name, (int) (findeq(vp->name) - vp->name));
2461 struct var *vp;
2583 vp = lookup(t->str);
2589 setval(vp, *wp++);
3580 struct var *vp;
3586 for (vp = vlist; vp; vp = vp->next)
3587 varput(vp->name, 1);
3715 struct var *vp;
3719 for (vp = vlist; vp; vp = vp->next)
3720 if (all || vp->status & EXPORT)
3721 wb = addword(vp->name, wb);
3903 struct var *vp;
3959 vp = lookup(s);
3960 dolp = vp->value;
3969 setval(vp, cp);
3970 dolp = vp->value;
4042 struct var *vp;
4113 vp = lookup(var_name);
4114 if (vp->value != null)
4116 alt_value : vp->value;
4123 setval(vp, value);