diff --git a/ChangeLog b/ChangeLog index f3114db71..4e27478fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-08-07 Robert Larice + * src/tclspice.c , + * src/include/tclspice.h : + bug fix, I've recently broken compilation of tclspice. + - missing #include + - use the GENmodel and GENinstance type instead of void* + - muffle some type warnings. + 2010-08-07 Robert Larice * configure.in : for gcc, don't report `unused parameter' Warnings diff --git a/src/include/tclspice.h b/src/include/tclspice.h index 2e6de954e..8e94b99c5 100755 --- a/src/include/tclspice.h +++ b/src/include/tclspice.h @@ -12,6 +12,7 @@ extern void blt_lockvec(int index); int Tcl_ExecutePerLoop(); #include +#include /* For tk ploting */ disp_fn_Init_t sp_Tk_Init; diff --git a/src/tclspice.c b/src/tclspice.c index c26a75c98..6496ef7c8 100755 --- a/src/tclspice.c +++ b/src/tclspice.c @@ -680,7 +680,7 @@ static int _run(int argc,char **argv){ /* Catch Ctrl-C to break simulations */ #ifndef _MSC_VER_ - oldHandler = signal(SIGINT,ft_sigintr); + oldHandler = signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if(SETJMP(jbuf, 1)!=0) { signal(SIGINT,oldHandler); return TCL_OK; @@ -1200,8 +1200,8 @@ static int get_param TCL_CMDPROCARGS(clientData,interp,argc,argv) { int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) { char *name; char *paramname; - void *devptr=NULL; - void *modptr=NULL; + GENinstance *devptr=NULL; + GENmodel *modptr=NULL; IFdevice *device; IFparm *opt; IFvalue pv; @@ -1235,7 +1235,7 @@ int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) { err = (*(ft_sim->findInstance))(ft_curckt->ci_ckt,&typecode,&devptr,name,NULL,NULL); if (err != OK) { typecode = -1; - devptr = (void *)NULL; + devptr = NULL; err = (*(ft_sim->findModel))(ft_curckt->ci_ckt,&typecode,&modptr,name); } if (err != OK) { @@ -1253,10 +1253,10 @@ int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) { found=TRUE; } else if (strcmp(paramname,opt->keyword)==0) { if (devptr) - err = (*(ft_sim->askInstanceQuest))(ft_curckt->ci_ckt, (GENinstance*) devptr, + err = (*(ft_sim->askInstanceQuest))(ft_curckt->ci_ckt, devptr, opt->id, &pv, (IFvalue *)NULL); else - err = (*(ft_sim->askModelQuest))(ft_curckt->ci_ckt, (GENmodel*) modptr, + err = (*(ft_sim->askModelQuest))(ft_curckt->ci_ckt, modptr, opt->id, &pv, (IFvalue *)NULL); if (err==OK) { sprintf(buf,"%g",pv.rValue); /* dataType is here always real */ @@ -2202,7 +2202,7 @@ int Spice_Init(Tcl_Interp *interp) { /* Read the user config files */ /* To catch interrupts during .spiceinit... */ - old_sigint = signal(SIGINT, ft_sigintr); + old_sigint = signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if (SETJMP(jbuf, 1) == 1) { fprintf(cp_err, "Warning: error executing .spiceinit.\n"); goto bot;