2004-07-20 Stefan Jones <stefan.jones@multigig.com>
* src/tclspice.c: Make callback return plot index also
This commit is contained in:
parent
8ed3da8079
commit
fd4614a8d9
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
* src/tclspice.c:
|
||||
blt_plot() - look for BLT vectors ::spice::[XY]_Data
|
||||
Make callback return plot index also
|
||||
|
||||
2004-07-19 Stefan Jones <stefan.jones@multigig.com>
|
||||
|
||||
|
|
|
|||
|
|
@ -956,7 +956,7 @@ plotit(wordlist *wl, char *hcopy, char *devname)
|
|||
if (devname && eq(devname, "blt")) {
|
||||
/* Just send the pairs to Tcl/Tk */
|
||||
for (d = vecs; d; d = d->v_link2) {
|
||||
blt_plot(d, oneval ? (struct dvec *) NULL : d->v_scale);
|
||||
blt_plot(d, oneval ? (struct dvec *) NULL : d->v_scale,(d==vecs?1:0));
|
||||
}
|
||||
rtn = TRUE;
|
||||
goto quit;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ extern int sp_Tk_Update(void);
|
|||
|
||||
/* The blt callback method */
|
||||
#include <dvec.h>
|
||||
extern int blt_plot(struct dvec *y,struct dvec *x);
|
||||
extern int blt_plot(struct dvec *y,struct dvec *x,int new);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1326,7 +1326,8 @@ static void dvecToBlt(Blt_Vector *Data, struct dvec *x) {
|
|||
return;
|
||||
}
|
||||
|
||||
int blt_plot(struct dvec *y,struct dvec *x){
|
||||
int blt_plot(struct dvec *y,struct dvec *x,int new){
|
||||
static int ctr=-1;
|
||||
Blt_Vector *X_Data=NULL, *Y_Data=NULL;
|
||||
char buf[1024];
|
||||
|
||||
|
|
@ -1345,9 +1346,11 @@ int blt_plot(struct dvec *y,struct dvec *x){
|
|||
dvecToBlt(X_Data,x);
|
||||
dvecToBlt(Y_Data,y);
|
||||
|
||||
sprintf(buf,"spice_gr_Plot %s %s %s %s %s %s",
|
||||
if(new) ctr++;
|
||||
|
||||
sprintf(buf,"spice_gr_Plot %s %s %s %s %s %s %d",
|
||||
x->v_name, ft_typenames(x->v_type), ft_typabbrev(x->v_type),
|
||||
y->v_name, ft_typenames(y->v_type), ft_typabbrev(y->v_type));
|
||||
y->v_name, ft_typenames(y->v_type), ft_typabbrev(y->v_type),ctr);
|
||||
|
||||
if(Tcl_Eval(spice_interp,buf) != TCL_OK) {
|
||||
Tcl_ResetResult(spice_interp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue