Browse Source

struct variable, #16/18, drop intermediate variable

pre-master-46
rlar 10 years ago
parent
commit
af81e6810e
  1. 8
      src/frontend/options.c
  2. 4
      src/frontend/spiceif.c

8
src/frontend/options.c

@ -60,9 +60,7 @@ cp_enqvar(char *word)
double value = isreal(d)
? d->v_realdata[i]
: realpart(d->v_compdata[i]);
struct variable *tv;
tv = var_alloc_real(NULL, value, list);
list = tv;
list = var_alloc_real(NULL, value, list);
}
vv = var_alloc_vlist(copy(word), list, NULL);
}
@ -90,9 +88,7 @@ cp_enqvar(char *word)
struct variable *list = NULL;
struct plot *pl;
for (pl = plot_list; pl; pl = pl->pl_next) {
struct variable *tv;
tv = var_alloc_string(NULL, copy(pl->pl_typename), list);
list = tv;
list = var_alloc_string(NULL, copy(pl->pl_typename), list);
}
vv = var_alloc_vlist(copy(word), list, NULL);
}

4
src/frontend/spiceif.c

@ -980,9 +980,7 @@ parmtovar(IFvalue *pv, IFparm *opt)
struct variable *list = NULL;
int i;
for (i = pv->v.numValue; --i >= 0;) {
struct variable *nv;
nv = var_alloc_real(NULL, pv->v.vec.rVec[i], list);
list = nv;
list = var_alloc_real(NULL, pv->v.vec.rVec[i], list);
}
vv = var_alloc_vlist(copy(opt->description), list, NULL);
return vv;

Loading…
Cancel
Save