emmit a Warning when CKTunsetup() was incomplete

This commit is contained in:
rlar 2017-01-05 11:39:50 +01:00
parent b5ccfca24b
commit 65f10abb5d
2 changed files with 5 additions and 0 deletions

View File

@ -152,6 +152,7 @@ struct CKTcircuit {
CKTnode *CKTnodes; /* ??? */
CKTnode *CKTlastNode; /* ??? */
CKTnode *prev_CKTlastNode; /* just before model setup */
/* This define should be somewhere else ??? */
#define NODENAME(ckt,nodenum) CKTnodName(ckt,nodenum)

View File

@ -77,6 +77,7 @@ CKTsetup(CKTcircuit *ckt)
SetAnalyse("Device Setup", 0);
#endif
ckt->prev_CKTlastNode = ckt->CKTlastNode;
for (i=0;i<DEVmaxnum;i++) {
if ( DEVices[i] && DEVices[i]->DEVsetup && ckt->CKThead[i] ) {
error = DEVices[i]->DEVsetup (matrix, ckt->CKThead[i], ckt,
@ -163,6 +164,9 @@ CKTunsetup(CKTcircuit *ckt)
error = e2;
}
}
if (ckt->prev_CKTlastNode != ckt->CKTlastNode)
fprintf(stderr, "Warning: CKTunsetup() was incomplete, this will cause serious problems, please report this issue !\n");
ckt->CKTisSetup = 0;
if(error) return(error);