From 310905710bddfe3c26337b05157b7d6cb4e8f8af Mon Sep 17 00:00:00 2001 From: pnenzi Date: Wed, 13 Aug 2003 23:21:03 +0000 Subject: [PATCH] Fixed cider code for inclusion into ngspice. --- src/ciderlib/input/doping.c | 2 +- src/ciderlib/oned/oneadmit.c | 2 +- src/ciderlib/oned/onecond.c | 2 +- src/ciderlib/oned/onedest.c | 2 +- src/ciderlib/oned/onepoiss.c | 2 +- src/ciderlib/oned/oneprint.c | 2 +- src/ciderlib/oned/oneproj.c | 2 +- src/ciderlib/oned/onesolve.c | 2 +- src/ciderlib/support/misc.c | 2 +- src/ciderlib/twod/twoadmit.c | 2 +- src/ciderlib/twod/twocond.c | 2 +- src/ciderlib/twod/twocont.c | 2 +- src/ciderlib/twod/twodest.c | 2 +- src/ciderlib/twod/twoncont.c | 2 +- src/ciderlib/twod/twopcont.c | 2 +- src/ciderlib/twod/twopoiss.c | 2 +- src/ciderlib/twod/twoprint.c | 2 +- src/ciderlib/twod/twoproj.c | 2 +- src/ciderlib/twod/twosolve.c | 3 ++- src/spicelib/parser/inpgmod.c | 10 +++++----- 20 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/ciderlib/input/doping.c b/src/ciderlib/input/doping.c index 0e9723ae2..ef9d0a96d 100644 --- a/src/ciderlib/input/doping.c +++ b/src/ciderlib/input/doping.c @@ -107,7 +107,7 @@ DOPparam(int param, IFvalue *value, void *inCard) case DOP_DOMAIN: if ( !card->DOPdomainsGiven ) { 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++ ) { card->DOPdomains[i] = value->v.vec.iVec[i]; } diff --git a/src/ciderlib/oned/oneadmit.c b/src/ciderlib/oned/oneadmit.c index 5950a1e68..8b898651d 100644 --- a/src/ciderlib/oned/oneadmit.c +++ b/src/ciderlib/oned/oneadmit.c @@ -12,7 +12,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "onedev.h" #include "onemesh.h" #include "complex.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "ifsim.h" #include "onedext.h" diff --git a/src/ciderlib/oned/onecond.c b/src/ciderlib/oned/onecond.c index 936411e09..6aaf9e1a1 100644 --- a/src/ciderlib/oned/onecond.c +++ b/src/ciderlib/oned/onecond.c @@ -11,7 +11,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "onemesh.h" #include "onedev.h" #include "macros.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "onedext.h" #include "oneddefs.h" diff --git a/src/ciderlib/oned/onedest.c b/src/ciderlib/oned/onedest.c index b91ff072e..02227e912 100644 --- a/src/ciderlib/oned/onedest.c +++ b/src/ciderlib/oned/onedest.c @@ -8,7 +8,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "numenum.h" #include "onedev.h" #include "onemesh.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "onedext.h" #include "oneddefs.h" diff --git a/src/ciderlib/oned/onepoiss.c b/src/ciderlib/oned/onepoiss.c index 0ce6ca821..8328b1ead 100644 --- a/src/ciderlib/oned/onepoiss.c +++ b/src/ciderlib/oned/onepoiss.c @@ -10,7 +10,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "onedev.h" #include "onedext.h" #include "oneddefs.h" -#include "spMatrix.h" +#include "spmatrix.h" /* Functions to setup and solve the 1D poisson equation. */ diff --git a/src/ciderlib/oned/oneprint.c b/src/ciderlib/oned/oneprint.c index b2fdd705a..a7f43967c 100644 --- a/src/ciderlib/oned/oneprint.c +++ b/src/ciderlib/oned/oneprint.c @@ -11,7 +11,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group #include "onemesh.h" #include "onedev.h" #include "carddefs.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "onedext.h" #include "oneddefs.h" diff --git a/src/ciderlib/oned/oneproj.c b/src/ciderlib/oned/oneproj.c index 4d23b673b..816746ab0 100644 --- a/src/ciderlib/oned/oneproj.c +++ b/src/ciderlib/oned/oneproj.c @@ -9,7 +9,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "onemesh.h" #include "onedev.h" #include "macros.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "bool.h" #include "onedext.h" #include "oneddefs.h" diff --git a/src/ciderlib/oned/onesolve.c b/src/ciderlib/oned/onesolve.c index 2f3e27282..9779ddfbe 100644 --- a/src/ciderlib/oned/onesolve.c +++ b/src/ciderlib/oned/onesolve.c @@ -13,7 +13,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "numenum.h" #include "onedev.h" #include "onemesh.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "bool.h" #include "macros.h" #include "onedext.h" diff --git a/src/ciderlib/support/misc.c b/src/ciderlib/support/misc.c index 7fc0a987f..d7f565c60 100644 --- a/src/ciderlib/support/misc.c +++ b/src/ciderlib/support/misc.c @@ -12,7 +12,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group #include "ngspice.h" #include "numglobs.h" #include "numenum.h" -#include "spMatrix.h" +#include "spmatrix.h" /* Used in Solution Projection Calculations */ diff --git a/src/ciderlib/twod/twoadmit.c b/src/ciderlib/twod/twoadmit.c index f1aa8a297..ece5c83c7 100644 --- a/src/ciderlib/twod/twoadmit.c +++ b/src/ciderlib/twod/twoadmit.c @@ -12,7 +12,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "twodev.h" #include "twomesh.h" #include "complex.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "bool.h" #include "macros.h" #include "ifsim.h" diff --git a/src/ciderlib/twod/twocond.c b/src/ciderlib/twod/twocond.c index a113c8db6..3b61b2dbd 100644 --- a/src/ciderlib/twod/twocond.c +++ b/src/ciderlib/twod/twocond.c @@ -11,7 +11,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "twomesh.h" #include "twodev.h" #include "bool.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" diff --git a/src/ciderlib/twod/twocont.c b/src/ciderlib/twod/twocont.c index b8a53d036..743f47792 100644 --- a/src/ciderlib/twod/twocont.c +++ b/src/ciderlib/twod/twocont.c @@ -10,7 +10,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "twomesh.h" #include "twodev.h" #include "bool.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "cidersupt.h" diff --git a/src/ciderlib/twod/twodest.c b/src/ciderlib/twod/twodest.c index 2ef027444..f3a1a1c9b 100644 --- a/src/ciderlib/twod/twodest.c +++ b/src/ciderlib/twod/twodest.c @@ -8,7 +8,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "numenum.h" #include "twodev.h" #include "twomesh.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" diff --git a/src/ciderlib/twod/twoncont.c b/src/ciderlib/twod/twoncont.c index 9779563d3..ae57f36a1 100644 --- a/src/ciderlib/twod/twoncont.c +++ b/src/ciderlib/twod/twoncont.c @@ -10,7 +10,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "twomesh.h" #include "twodev.h" #include "bool.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "cidersupt.h" diff --git a/src/ciderlib/twod/twopcont.c b/src/ciderlib/twod/twopcont.c index 28f5f994c..8b9fa12fe 100644 --- a/src/ciderlib/twod/twopcont.c +++ b/src/ciderlib/twod/twopcont.c @@ -10,7 +10,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "twomesh.h" #include "twodev.h" #include "bool.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "cidersupt.h" diff --git a/src/ciderlib/twod/twopoiss.c b/src/ciderlib/twod/twopoiss.c index 7866ebd51..59c6f16bc 100644 --- a/src/ciderlib/twod/twopoiss.c +++ b/src/ciderlib/twod/twopoiss.c @@ -9,7 +9,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "numenum.h" #include "twomesh.h" #include "twodev.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" diff --git a/src/ciderlib/twod/twoprint.c b/src/ciderlib/twod/twoprint.c index d55f6e6d5..21219c3c2 100644 --- a/src/ciderlib/twod/twoprint.c +++ b/src/ciderlib/twod/twoprint.c @@ -11,7 +11,7 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group #include "twomesh.h" #include "twodev.h" #include "carddefs.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "bool.h" #include "twoddefs.h" #include "twodext.h" diff --git a/src/ciderlib/twod/twoproj.c b/src/ciderlib/twod/twoproj.c index ddd851dc9..2c0bd70f2 100644 --- a/src/ciderlib/twod/twoproj.c +++ b/src/ciderlib/twod/twoproj.c @@ -15,7 +15,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "twomesh.h" #include "twodev.h" #include "bool.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "cidersupt.h" diff --git a/src/ciderlib/twod/twosolve.c b/src/ciderlib/twod/twosolve.c index 9b204f683..4a8a4d997 100644 --- a/src/ciderlib/twod/twosolve.c +++ b/src/ciderlib/twod/twosolve.c @@ -9,8 +9,9 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "numenum.h" #include "twodev.h" #include "twomesh.h" -#include "spMatrix.h" +#include "spmatrix.h" #include "bool.h" +#include "macros.h" #include "twoddefs.h" #include "twodext.h" #include "cidersupt.h" diff --git a/src/spicelib/parser/inpgmod.c b/src/spicelib/parser/inpgmod.c index 6bd3c3ab8..16b076229 100644 --- a/src/spicelib/parser/inpgmod.c +++ b/src/spicelib/parser/inpgmod.c @@ -242,7 +242,7 @@ INPparseNumMod( ckt, model, tab, errMessage ) cardType = lastType; while (*line == '+') line++; /* Skip leading '+'s */ } else { - tmp = (char *)xmalloc((55)*sizeof(char)); + tmp = (char *)tmalloc((55)*sizeof(char)); (void) sprintf(tmp, "Error on card %d : illegal continuation \'+\' - ignored", cardNum); @@ -275,7 +275,7 @@ INPparseNumMod( ckt, model, tab, errMessage ) cardType = E_MISSING; } else { /* Error */ - tmp =(char *)xmalloc((55+strlen(cardName))*sizeof(char)); + tmp =(char *)tmalloc((55+strlen(cardName))*sizeof(char)); (void) sprintf(tmp, "Error on card %d : unrecognized name (%s) - ignored", cardNum, cardName ); @@ -298,14 +298,14 @@ INPparseNumMod( ckt, model, tab, errMessage ) idx = INPfindParm(parm, info->cardParms, info->numParms); if (idx == E_MISSING) { /* parm not found */ - tmp = (char *)xmalloc((60+strlen(parm)) * sizeof(char)); + tmp = (char *)tmalloc((60+strlen(parm)) * sizeof(char)); (void)sprintf(tmp, "Error on card %d : unrecognized parameter (%s) - ignored", cardNum, parm); err = INPerrCat(err, tmp); } else if (idx == E_AMBIGUOUS) { /* parm ambiguous */ - tmp = (char *)xmalloc((58+strlen(parm)) * sizeof(char)); + tmp = (char *)tmalloc((58+strlen(parm)) * sizeof(char)); (void)sprintf(tmp, "Error on card %d : ambiguous parameter (%s) - ignored", cardNum, parm); @@ -318,7 +318,7 @@ INPparseNumMod( ckt, model, tab, errMessage ) == IF_FLAG) { value->iValue = 0; } else { - tmp =(char *)xmalloc((63+strlen(parm))*sizeof(char)); + tmp =(char *)tmalloc((63+strlen(parm))*sizeof(char)); (void)sprintf(tmp, "Error on card %d : non-boolean parameter (%s) - \'^\' ignored", cardNum, parm);