Fixed cider code for inclusion into ngspice.
This commit is contained in:
parent
2a3285f5cd
commit
310905710b
|
|
@ -107,7 +107,7 @@ DOPparam(int param, IFvalue *value, void *inCard)
|
||||||
case DOP_DOMAIN:
|
case DOP_DOMAIN:
|
||||||
if ( !card->DOPdomainsGiven ) {
|
if ( !card->DOPdomainsGiven ) {
|
||||||
card->DOPnumDomains = value->v.numValue;
|
card->DOPnumDomains = value->v.numValue;
|
||||||
card->DOPdomains = (int *)xmalloc(value->v.numValue * sizeof(int));
|
card->DOPdomains = (int *)tmalloc(value->v.numValue * sizeof(int));
|
||||||
for ( i=0; i < card->DOPnumDomains; i++ ) {
|
for ( i=0; i < card->DOPnumDomains; i++ ) {
|
||||||
card->DOPdomains[i] = value->v.vec.iVec[i];
|
card->DOPdomains[i] = value->v.vec.iVec[i];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "onemesh.h"
|
#include "onemesh.h"
|
||||||
#include "complex.h"
|
#include "complex.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "ifsim.h"
|
#include "ifsim.h"
|
||||||
|
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||||
#include "onemesh.h"
|
#include "onemesh.h"
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
|
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
#include "oneddefs.h"
|
#include "oneddefs.h"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "numenum.h"
|
#include "numenum.h"
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "onemesh.h"
|
#include "onemesh.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
#include "oneddefs.h"
|
#include "oneddefs.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
#include "oneddefs.h"
|
#include "oneddefs.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
|
|
||||||
/* Functions to setup and solve the 1D poisson equation. */
|
/* Functions to setup and solve the 1D poisson equation. */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "onemesh.h"
|
#include "onemesh.h"
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "carddefs.h"
|
#include "carddefs.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
#include "oneddefs.h"
|
#include "oneddefs.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||||
#include "onemesh.h"
|
#include "onemesh.h"
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
#include "oneddefs.h"
|
#include "oneddefs.h"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "numenum.h"
|
#include "numenum.h"
|
||||||
#include "onedev.h"
|
#include "onedev.h"
|
||||||
#include "onemesh.h"
|
#include "onemesh.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "onedext.h"
|
#include "onedext.h"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "ngspice.h"
|
#include "ngspice.h"
|
||||||
#include "numglobs.h"
|
#include "numglobs.h"
|
||||||
#include "numenum.h"
|
#include "numenum.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
|
|
||||||
|
|
||||||
/* Used in Solution Projection Calculations */
|
/* Used in Solution Projection Calculations */
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "complex.h"
|
#include "complex.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "ifsim.h"
|
#include "ifsim.h"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
#include "cidersupt.h"
|
#include "cidersupt.h"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "numenum.h"
|
#include "numenum.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
#include "cidersupt.h"
|
#include "cidersupt.h"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
#include "cidersupt.h"
|
#include "cidersupt.h"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "numenum.h"
|
#include "numenum.h"
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "carddefs.h"
|
#include "carddefs.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
#include "cidersupt.h"
|
#include "cidersupt.h"
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group
|
||||||
#include "numenum.h"
|
#include "numenum.h"
|
||||||
#include "twodev.h"
|
#include "twodev.h"
|
||||||
#include "twomesh.h"
|
#include "twomesh.h"
|
||||||
#include "spMatrix.h"
|
#include "spmatrix.h"
|
||||||
#include "bool.h"
|
#include "bool.h"
|
||||||
|
#include "macros.h"
|
||||||
#include "twoddefs.h"
|
#include "twoddefs.h"
|
||||||
#include "twodext.h"
|
#include "twodext.h"
|
||||||
#include "cidersupt.h"
|
#include "cidersupt.h"
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ INPparseNumMod( ckt, model, tab, errMessage )
|
||||||
cardType = lastType;
|
cardType = lastType;
|
||||||
while (*line == '+') line++; /* Skip leading '+'s */
|
while (*line == '+') line++; /* Skip leading '+'s */
|
||||||
} else {
|
} else {
|
||||||
tmp = (char *)xmalloc((55)*sizeof(char));
|
tmp = (char *)tmalloc((55)*sizeof(char));
|
||||||
(void) sprintf(tmp,
|
(void) sprintf(tmp,
|
||||||
"Error on card %d : illegal continuation \'+\' - ignored",
|
"Error on card %d : illegal continuation \'+\' - ignored",
|
||||||
cardNum);
|
cardNum);
|
||||||
|
|
@ -275,7 +275,7 @@ INPparseNumMod( ckt, model, tab, errMessage )
|
||||||
cardType = E_MISSING;
|
cardType = E_MISSING;
|
||||||
} else {
|
} else {
|
||||||
/* Error */
|
/* Error */
|
||||||
tmp =(char *)xmalloc((55+strlen(cardName))*sizeof(char));
|
tmp =(char *)tmalloc((55+strlen(cardName))*sizeof(char));
|
||||||
(void) sprintf(tmp,
|
(void) sprintf(tmp,
|
||||||
"Error on card %d : unrecognized name (%s) - ignored",
|
"Error on card %d : unrecognized name (%s) - ignored",
|
||||||
cardNum, cardName );
|
cardNum, cardName );
|
||||||
|
|
@ -298,14 +298,14 @@ INPparseNumMod( ckt, model, tab, errMessage )
|
||||||
idx = INPfindParm(parm, info->cardParms, info->numParms);
|
idx = INPfindParm(parm, info->cardParms, info->numParms);
|
||||||
if (idx == E_MISSING) {
|
if (idx == E_MISSING) {
|
||||||
/* parm not found */
|
/* parm not found */
|
||||||
tmp = (char *)xmalloc((60+strlen(parm)) * sizeof(char));
|
tmp = (char *)tmalloc((60+strlen(parm)) * sizeof(char));
|
||||||
(void)sprintf(tmp,
|
(void)sprintf(tmp,
|
||||||
"Error on card %d : unrecognized parameter (%s) - ignored",
|
"Error on card %d : unrecognized parameter (%s) - ignored",
|
||||||
cardNum, parm);
|
cardNum, parm);
|
||||||
err = INPerrCat(err, tmp);
|
err = INPerrCat(err, tmp);
|
||||||
} else if (idx == E_AMBIGUOUS) {
|
} else if (idx == E_AMBIGUOUS) {
|
||||||
/* parm ambiguous */
|
/* parm ambiguous */
|
||||||
tmp = (char *)xmalloc((58+strlen(parm)) * sizeof(char));
|
tmp = (char *)tmalloc((58+strlen(parm)) * sizeof(char));
|
||||||
(void)sprintf(tmp,
|
(void)sprintf(tmp,
|
||||||
"Error on card %d : ambiguous parameter (%s) - ignored",
|
"Error on card %d : ambiguous parameter (%s) - ignored",
|
||||||
cardNum, parm);
|
cardNum, parm);
|
||||||
|
|
@ -318,7 +318,7 @@ INPparseNumMod( ckt, model, tab, errMessage )
|
||||||
== IF_FLAG) {
|
== IF_FLAG) {
|
||||||
value->iValue = 0;
|
value->iValue = 0;
|
||||||
} else {
|
} else {
|
||||||
tmp =(char *)xmalloc((63+strlen(parm))*sizeof(char));
|
tmp =(char *)tmalloc((63+strlen(parm))*sizeof(char));
|
||||||
(void)sprintf(tmp,
|
(void)sprintf(tmp,
|
||||||
"Error on card %d : non-boolean parameter (%s) - \'^\' ignored",
|
"Error on card %d : non-boolean parameter (%s) - \'^\' ignored",
|
||||||
cardNum, parm);
|
cardNum, parm);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue