Browse Source

frontend/device.c, com_alter_common(), #4/11 rewrite while() loop

pre-master-46
rlar 10 years ago
parent
commit
247767e3bf
  1. 3
      src/frontend/device.c

3
src/frontend/device.c

@ -1330,15 +1330,14 @@ com_alter_common(wordlist *wl, int do_model)
type &= IF_VARTYPES; type &= IF_VARTYPES;
if (type == IF_REALVEC) { if (type == IF_REALVEC) {
list = TMALLOC(double, 1); list = TMALLOC(double, 1);
tmp = INPevaluate(&xsbuf, &error, 1);
for (;;) { for (;;) {
tmp = INPevaluate(&xsbuf, &error, 1);
if (error) if (error)
break; break;
/*printf(" returning vector value %g\n", tmp); */ /*printf(" returning vector value %g\n", tmp); */
i++; i++;
list = TREALLOC(double, list, i); list = TREALLOC(double, list, i);
list[i-1] = tmp; list[i-1] = tmp;
tmp = INPevaluate(&xsbuf, &error, 1);
} }
dv->v_realdata = list; dv->v_realdata = list;
} }

Loading…
Cancel
Save