Browse Source

Fixed cider code for inclusion into ngspice.

pre-master-46
pnenzi 23 years ago
parent
commit
310905710b
  1. 2
      src/ciderlib/input/doping.c
  2. 2
      src/ciderlib/oned/oneadmit.c
  3. 2
      src/ciderlib/oned/onecond.c
  4. 2
      src/ciderlib/oned/onedest.c
  5. 2
      src/ciderlib/oned/onepoiss.c
  6. 2
      src/ciderlib/oned/oneprint.c
  7. 2
      src/ciderlib/oned/oneproj.c
  8. 2
      src/ciderlib/oned/onesolve.c
  9. 2
      src/ciderlib/support/misc.c
  10. 2
      src/ciderlib/twod/twoadmit.c
  11. 2
      src/ciderlib/twod/twocond.c
  12. 2
      src/ciderlib/twod/twocont.c
  13. 2
      src/ciderlib/twod/twodest.c
  14. 2
      src/ciderlib/twod/twoncont.c
  15. 2
      src/ciderlib/twod/twopcont.c
  16. 2
      src/ciderlib/twod/twopoiss.c
  17. 2
      src/ciderlib/twod/twoprint.c
  18. 2
      src/ciderlib/twod/twoproj.c
  19. 3
      src/ciderlib/twod/twosolve.c
  20. 10
      src/spicelib/parser/inpgmod.c

2
src/ciderlib/input/doping.c

@ -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];
} }

2
src/ciderlib/oned/oneadmit.c

@ -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"

2
src/ciderlib/oned/onecond.c

@ -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"

2
src/ciderlib/oned/onedest.c

@ -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"

2
src/ciderlib/oned/onepoiss.c

@ -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. */

2
src/ciderlib/oned/oneprint.c

@ -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"

2
src/ciderlib/oned/oneproj.c

@ -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"

2
src/ciderlib/oned/onesolve.c

@ -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"

2
src/ciderlib/support/misc.c

@ -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 */

2
src/ciderlib/twod/twoadmit.c

@ -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"

2
src/ciderlib/twod/twocond.c

@ -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"

2
src/ciderlib/twod/twocont.c

@ -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"

2
src/ciderlib/twod/twodest.c

@ -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"

2
src/ciderlib/twod/twoncont.c

@ -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"

2
src/ciderlib/twod/twopcont.c

@ -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"

2
src/ciderlib/twod/twopoiss.c

@ -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"

2
src/ciderlib/twod/twoprint.c

@ -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"

2
src/ciderlib/twod/twoproj.c

@ -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"

3
src/ciderlib/twod/twosolve.c

@ -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"

10
src/spicelib/parser/inpgmod.c

@ -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…
Cancel
Save