Three minor code improvements. Remove a redundant test in com_measure2.c.
In vectors.c, always initialise a newly-created plot exactly once. Improve an error message in spiceif.c.
This commit is contained in:
parent
fb63573b6b
commit
562466a3c5
|
|
@ -1107,7 +1107,7 @@ measure_rms_integral(
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
// Trapezoidal Rule
|
// Trapezoidal Rule
|
||||||
else if (!AlmostEqualUlps(width[i], width[i+1], 100)) {
|
else {
|
||||||
sum3 += width[i] * (y[i] + y[i+1]) / 2;
|
sum3 += width[i] * (y[i] + y[i+1]) / 2;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1360,8 +1360,11 @@ if_getstat(CKTcircuit *ckt, char *name)
|
||||||
if_parm->id, &parm,
|
if_parm->id, &parm,
|
||||||
NULL) == -1)
|
NULL) == -1)
|
||||||
{
|
{
|
||||||
fprintf(cp_err, "if_getstat: Internal Error: can't get a name\n");
|
fprintf(cp_err,
|
||||||
return (NULL);
|
"if_getstat: Internal Error: can't get a name for "
|
||||||
|
"analysis parameter %d\n",
|
||||||
|
if_parm->id);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
*v = parmtovar(&parm, if_parm, 1);
|
*v = parmtovar(&parm, if_parm, 1);
|
||||||
|
|
|
||||||
|
|
@ -284,6 +284,7 @@ static struct dvec* findvec_alle(void) {
|
||||||
pl->pl_title = copy("DigitalData");
|
pl->pl_title = copy("DigitalData");
|
||||||
pl->pl_name = copy("digital");
|
pl->pl_name = copy("digital");
|
||||||
pl->pl_date = copy(datestring());
|
pl->pl_date = copy(datestring());
|
||||||
|
pl->pl_typename = copy("dig1");
|
||||||
plot_new(pl);
|
plot_new(pl);
|
||||||
|
|
||||||
/* find all event data, create vectors, link them to v_link2 */
|
/* find all event data, create vectors, link them to v_link2 */
|
||||||
|
|
@ -296,7 +297,6 @@ static struct dvec* findvec_alle(void) {
|
||||||
if (d->v_length == 1)
|
if (d->v_length == 1)
|
||||||
continue;
|
continue;
|
||||||
d->v_plot = pl;
|
d->v_plot = pl;
|
||||||
d->v_plot->pl_typename = copy("dig1");
|
|
||||||
if (d->v_link2) {
|
if (d->v_link2) {
|
||||||
v = vec_copy(d);
|
v = vec_copy(d);
|
||||||
vec_new(v);
|
vec_new(v);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue