diff --git a/ChangeLog b/ChangeLog index 23b1ac6c4..e5bbcbf56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-09-30 Vera Albrecht + + * src/include/cktdefs.h src/spicelib/analysis/noisean.c: + Fix resuming noise analysis causing segfault, + also fix compiler warnings. + 2003-08-31 Stefan Jones * configure.in: diff --git a/src/include/cktdefs.h b/src/include/cktdefs.h index 6a53e602c..8891fcbd7 100644 --- a/src/include/cktdefs.h +++ b/src/include/cktdefs.h @@ -379,7 +379,8 @@ extern int NIpzSym(PZtrial **, PZtrial *); extern int NIpzSym2(PZtrial **, PZtrial *); extern int NIreinit( CKTcircuit *); extern int NIsenReinit( CKTcircuit *); -extern int NIdIter (CKTcircuit *); +extern int NIdIter (CKTcircuit *); +extern void NInzIter(CKTcircuit *ckt, int posDrive, int negDrive); extern IFfrontEnd *SPfrontEnd; #endif /*CKT*/ diff --git a/src/spicelib/analysis/noisean.c b/src/spicelib/analysis/noisean.c index 45bbd6f06..548fc0774 100644 --- a/src/spicelib/analysis/noisean.c +++ b/src/spicelib/analysis/noisean.c @@ -25,7 +25,7 @@ extern int CKTnoise( CKTcircuit *, int, int, Ndata * ); int NOISEan (CKTcircuit *ckt, int restart) { - Ndata *data; + static Ndata *data; double realVal; double imagVal; int error; @@ -34,7 +34,7 @@ NOISEan (CKTcircuit *ckt, int restart) int code; int step; IFuid freqUid; - char *inst; + void *inst; double freqTol; /* tolerence parameter for finding final frequency; hack */ NOISEAN *job = (NOISEAN*) (ckt->CKTcurJob); @@ -47,7 +47,7 @@ NOISEan (CKTcircuit *ckt, int restart) inst = NULL; code = CKTtypelook("Vsource"); if (code != -1) { - error = CKTfndDev((void *)ckt,&code,(void **)&inst, + error = CKTfndDev((void *)ckt,&code,&inst, job->input, (void *)NULL, (IFuid)NULL); if (!error && !((VSRCinstance *)inst)->VSRCacGiven) { errMsg = MALLOC(strlen(noacinput)+1); @@ -58,7 +58,7 @@ NOISEan (CKTcircuit *ckt, int restart) code = CKTtypelook("Isource"); if (code != -1 && inst==NULL) { - error = CKTfndDev((void *)ckt,&code, (void **)&inst, + error = CKTfndDev((void *)ckt,&code, &inst, job->input, (void *)NULL,(IFuid)NULL); if (error) { /* XXX ??? */