frontend/interp.c, cleanup `lincopy()'
and set v_plot before the vec_new() invocation
This commit is contained in:
parent
5972de0bb1
commit
8617ee754d
|
|
@ -15,8 +15,11 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
lincopy(struct dvec *ov, double *newscale, int newlen, struct dvec *oldscale)
|
lincopy(struct plot *new, struct dvec *ov, struct dvec *oldscale)
|
||||||
{
|
{
|
||||||
|
int newlen = new->pl_scale->v_length;
|
||||||
|
double *newscale = new->pl_scale->v_realdata;
|
||||||
|
|
||||||
struct dvec *v;
|
struct dvec *v;
|
||||||
double *nd;
|
double *nd;
|
||||||
|
|
||||||
|
|
@ -43,6 +46,7 @@ lincopy(struct dvec *ov, double *newscale, int newlen, struct dvec *oldscale)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v->v_plot = new;
|
||||||
vec_new(v);
|
vec_new(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#ifndef ngspice_INTERP_H
|
#ifndef ngspice_INTERP_H
|
||||||
#define ngspice_INTERP_H
|
#define ngspice_INTERP_H
|
||||||
|
|
||||||
void lincopy(struct dvec *ov, double *newscale, int newlen, struct dvec *oldscale);
|
void lincopy(struct plot *new, struct dvec *ov, struct dvec *oldscale);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -81,14 +81,14 @@ com_linearize(wordlist *wl)
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
lincopy(v, newtime->v_realdata, len, oldtime);
|
lincopy(new, v, oldtime);
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (v = old->pl_dvecs; v; v = v->v_next) {
|
for (v = old->pl_dvecs; v; v = v->v_next) {
|
||||||
if (v == old->pl_scale)
|
if (v == old->pl_scale)
|
||||||
continue;
|
continue;
|
||||||
lincopy(v, newtime->v_realdata, len, oldtime);
|
lincopy(new, v, oldtime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue