diff --git a/src/include/ngspice/sharedspice.h b/src/include/ngspice/sharedspice.h index f5852abe5..0dfcb94bd 100644 --- a/src/include/ngspice/sharedspice.h +++ b/src/include/ngspice/sharedspice.h @@ -123,16 +123,17 @@ typedef struct vector_info { } vector_info, *pvector_info; typedef struct vecvalues { - char* name; - double creal; - double cimag; - bool is_scale; - bool is_complex; + char* name; /* name of a specific vector */ + double creal; /* actual data value */ + double cimag; /* actual data value */ + bool is_scale;/* if 'name' is the scale vector */ + bool is_complex;/* if the data are complex numbers */ } vecvalues, *pvecvalues; typedef struct vecvaluesall { - int veccount; - pvecvalues *vecsa; + int veccount; /* number of vectors in plot */ + int vecindex; /* index of actual set of vectors */ + pvecvalues *vecsa; /* values of actual set of vectors */ } vecvaluesall, *pvecvaluesall; /* info for a specific vector */ diff --git a/src/sharedspice.c b/src/sharedspice.c index bb6210fd4..cfb856886 100644 --- a/src/sharedspice.c +++ b/src/sharedspice.c @@ -389,7 +389,9 @@ runc(char* command) char buf[1024] = ""; sighandler oldHandler; #ifdef THREADS +#ifndef low_latency int timeout = 0; +#endif char *string; bool fl_bg = FALSE; command_id = threadid_self(); @@ -1477,7 +1479,7 @@ int sh_ExecutePerLoop(void) { struct dvec *d; int i, veclen; - double testval; +// double testval; struct plot *pl = plot_cur; /* return immediately if callback not wanted */ if (nodatawanted) @@ -1485,11 +1487,12 @@ int sh_ExecutePerLoop(void) /* get the data of the last entry to the plot vector */ veclen = pl->pl_dvecs->v_length - 1; + curvecvalsall->vecindex = veclen; for (d = pl->pl_dvecs, i = 0; d; d = d->v_next, i++) { /* test if real */ if (d->v_flags & VF_REAL) { curvecvalsall->vecsa[i]->is_complex = FALSE; - testval = d->v_realdata[veclen]; +// testval = d->v_realdata[veclen]; curvecvalsall->vecsa[i]->creal = d->v_realdata[veclen]; curvecvalsall->vecsa[i]->cimag = 0.; } @@ -1507,7 +1510,7 @@ int sh_ExecutePerLoop(void) /* called once for a new plot from beginPlot() in outitf.c, - after the vectors in ngspice have been set. + after the vectors in ngspice for this plot have been set. Transfers vector information to the caller via callback datinitfcn() and sets transfer structure for use in sh_ExecutePerLoop() */ int sh_vecinit(runDesc *run)