From 5c08bf15762f5ca120cca0a3ddcfcadab44d0a49 Mon Sep 17 00:00:00 2001 From: sjborley Date: Sat, 21 May 2005 12:37:23 +0000 Subject: [PATCH] Fixed a structure initailisation problem in the VBIC device that occurs when cider is enabled. Also fixed lots of warning within ciderlib related to unused variables. --- src/ciderlib/input/dopset.c | 2 ++ src/ciderlib/input/matlset.c | 3 ++- src/ciderlib/input/meshset.c | 7 ++++--- src/ciderlib/input/modlset.c | 7 +++---- src/ciderlib/input/outpset.c | 7 +++---- src/ciderlib/oned/onecond.c | 6 ++---- src/ciderlib/oned/onecont.c | 19 ++++++++++--------- src/ciderlib/oned/onemesh.c | 8 +++++--- src/ciderlib/oned/onepoiss.c | 5 +++-- src/ciderlib/oned/oneproj.c | 6 +++--- src/ciderlib/oned/oneread.c | 2 +- src/ciderlib/oned/onesetup.c | 7 ++----- src/ciderlib/oned/onesolve.c | 10 +++------- src/ciderlib/support/integset.c | 3 ++- src/ciderlib/support/suprem.c | 9 +++++---- src/ciderlib/twod/twoadmit.c | 11 +++++------ src/ciderlib/twod/twocond.c | 20 ++++++++------------ src/ciderlib/twod/twocont.c | 4 ++-- src/ciderlib/twod/twomesh.c | 5 +++-- src/ciderlib/twod/twomobfn.c | 5 +++-- src/ciderlib/twod/twoncont.c | 4 ++-- src/ciderlib/twod/twopcont.c | 4 ++-- src/ciderlib/twod/twopoiss.c | 7 ++++--- src/ciderlib/twod/twoprint.c | 7 ++++--- src/ciderlib/twod/tworead.c | 2 +- src/ciderlib/twod/twosetup.c | 3 +-- src/ciderlib/twod/twosolve.c | 5 +++-- src/include/cidersupt.h | 5 +++++ src/misc/getopt.c | 1 + src/spicelib/devices/vbic/vbicinit.c | 12 +++++++++++- src/spicelib/parser/inpgmod.c | 27 +++++++++++---------------- 31 files changed, 116 insertions(+), 107 deletions(-) diff --git a/src/ciderlib/input/dopset.c b/src/ciderlib/input/dopset.c index 79d2cc289..3b872c5f8 100644 --- a/src/ciderlib/input/dopset.c +++ b/src/ciderlib/input/dopset.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modifed: 2001 Paolo Nenzi +$Id$ **********/ #include "ngspice.h" @@ -13,6 +14,7 @@ Modifed: 2001 Paolo Nenzi #include "gendev.h" #include "sperror.h" #include "suffix.h" +#include "cidersupt.h" extern int DOPnewCard(void**,void*); extern int DOPparam(int,IFvalue*,void*); diff --git a/src/ciderlib/input/matlset.c b/src/ciderlib/input/matlset.c index 9b54529af..a21f91f4d 100644 --- a/src/ciderlib/input/matlset.c +++ b/src/ciderlib/input/matlset.c @@ -2,6 +2,7 @@ Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi +$Id$ **********/ #include "ngspice.h" @@ -12,7 +13,7 @@ Modified: 2001 Paolo Nenzi #include "material.h" #include "sperror.h" #include "suffix.h" - +#include "cidersupt.h" extern int MATLcheck( MATLcard * ); extern int MATLsetup( MATLcard *, MaterialInfo ** ); diff --git a/src/ciderlib/input/meshset.c b/src/ciderlib/input/meshset.c index 5fbccefe2..21392f25b 100644 --- a/src/ciderlib/input/meshset.c +++ b/src/ciderlib/input/meshset.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi +$Id$ **********/ /********** Mesh Setup & Query Routines. @@ -906,10 +907,10 @@ twoSideSpacing(double width, double hStart, double hEnd, double rWanted, double remaining; /* Length of span between hs and he */ double rTempS, rTempE; /* For temporarily calc'ed ratios */ double hsLast, heLast; /* Used to ensure ratio is valid */ - double rConnect, rMin, rMax; /* " */ + double rConnect; /* " */ double hMax, hMin; /* Max and min between hStart and hEnd */ double tmp; - int i,j; /* Indices for searching for best ratio */ + int i; /* Indices for searching for best ratio */ int solnFound; /* For partial search termination */ int solnError; /* For partial search termination */ int nSaveS = 0; /* Saves best solution so far */ @@ -1180,7 +1181,7 @@ maxLimSpacing(double width, double hStart, double hMax, double rWanted, double rSaveS = 0.0; /* Saves best solution so far */ int nSaveS = 0; /* " */ int nSaveM = 0; /* " */ - int i, j; /* Searching indices */ + int i; /* Searching indices */ int solnFound; /* For partial search termination */ int solnError; /* For partial search termination */ char errBuf[80]; diff --git a/src/ciderlib/input/modlset.c b/src/ciderlib/input/modlset.c index 057d53d2e..e24ed686b 100644 --- a/src/ciderlib/input/modlset.c +++ b/src/ciderlib/input/modlset.c @@ -2,6 +2,7 @@ Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi +$Id$ **********/ #include "ngspice.h" @@ -24,10 +25,8 @@ extern int MODLsetup( MODLcard * ); int MODLcheck(MODLcard *cardList) { - MODLcard *card, *card2; - int cardNum = 0, cardNum2; - int error = OK; - char ebuf[512]; /* error message buffer */ + MODLcard *card; + int cardNum = 0; for ( card = cardList; card != NIL(MODLcard); card = card->MODLnextCard ) { cardNum++; diff --git a/src/ciderlib/input/outpset.c b/src/ciderlib/input/outpset.c index 4ef8e4dac..b9e1b98c4 100644 --- a/src/ciderlib/input/outpset.c +++ b/src/ciderlib/input/outpset.c @@ -2,6 +2,7 @@ Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi +$Id$ **********/ #include "ngspice.h" @@ -26,10 +27,8 @@ extern int OUTPsetup( OUTPcard * ); int OUTPcheck(OUTPcard *cardList) { - OUTPcard *card, *card2; - int cardNum = 0, cardNum2; - int error = OK; - char ebuf[512]; /* error message buffer */ + OUTPcard *card; + int cardNum = 0; for ( card = cardList; card != NIL(OUTPcard); card = card->OUTPnextCard ) { cardNum++; diff --git a/src/ciderlib/oned/onecond.c b/src/ciderlib/oned/onecond.c index 6aaf9e1a1..8c2c538cb 100644 --- a/src/ciderlib/oned/onecond.c +++ b/src/ciderlib/oned/onecond.c @@ -1,6 +1,7 @@ /********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ /* Functions to compute device conductances and currents */ @@ -171,10 +172,8 @@ NUMDcurrent(ONEdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; - int index; double *delta = pDevice->dcDeltaSolution; - double dPsi, dN, dP, *solution; - + double dPsi, dN, dP; *id = 0.0; @@ -203,7 +202,6 @@ NBJTcurrent(ONEdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; - int index; double dPsi, dN, dP; double *solution; diff --git a/src/ciderlib/oned/onecont.c b/src/ciderlib/oned/onecont.c index 19a552cc8..ba6717ad8 100644 --- a/src/ciderlib/oned/onecont.c +++ b/src/ciderlib/oned/onecont.c @@ -1,6 +1,7 @@ /********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -30,7 +31,7 @@ ONE_jacBuild(ONEdevice *pDevice) { char *matrix = pDevice->matrix; ONEelem *pElem; - ONEnode *pNode, *pNode1; + ONEnode *pNode; int index, eIndex; int psiEqn, nEqn, pEqn; /* scratch for deref'd eqn numbers */ int psiEqnL=0, nEqnL=0, pEqnL=0; @@ -112,12 +113,12 @@ ONE_sysLoad(ONEdevice *pDevice, BOOLEAN tranAnalysis, ONEtranInfo *info) { ONEelem *pElem; - ONEnode *pNode, *pNode1; + ONEnode *pNode; ONEedge *pEdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, rDx, dPsi; - double rhsN, rhsP, generation; + double generation; double perTime = 0.0; double fNd, fNa, fdNd, fdNa; double netConc, dNd, dNa, psi, nConc, pConc; @@ -271,9 +272,9 @@ ONE_jacLoad(ONEdevice *pDevice) ONEedge *pEdge; int index, eIndex; double dx, rDx, dPsi; - double rhsN, rhsP, generation; + double generation; double fNd, fNa, fdNd, fdNa; - double netConc, dNd, dNa, psi, nConc, pConc; + double dNd, dNa, psi, nConc, pConc; /* first compute the currents and their derivatives */ @@ -385,12 +386,12 @@ ONE_rhsLoad(ONEdevice *pDevice, BOOLEAN tranAnalysis, ONEtranInfo *info) { ONEelem *pElem; - ONEnode *pNode, *pNode1; + ONEnode *pNode; ONEedge *pEdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, rDx, dPsi; - double rhsN, rhsP, generation; + double generation; double perTime; double fNd, fNa, fdNd, fdNa; double netConc, dNd, dNa, psi, nConc, pConc; @@ -500,13 +501,13 @@ ONE_commonTerms(ONEdevice *pDevice, BOOLEAN currentOnly, { ONEelem *pElem; ONEedge *pEdge; - ONEnode *pNode, *pNode1; + ONEnode *pNode; int index, eIndex; double psi1, psi2, psi, nConc=0.0, pConc=0.0, nC, pC, nP1, pP1; double dPsiN, dPsiP; double bPsiN, dbPsiN, bMPsiN, dbMPsiN; double bPsiP, dbPsiP, bMPsiP, dbMPsiP; - double mun, dMun, mup, dMup, rDx; + double mun, dMun, mup, dMup; double conc1, conc2; double cnAug, cpAug; diff --git a/src/ciderlib/oned/onemesh.c b/src/ciderlib/oned/onemesh.c index ca3ad50a8..f4a03f1a2 100644 --- a/src/ciderlib/oned/onemesh.c +++ b/src/ciderlib/oned/onemesh.c @@ -1,6 +1,7 @@ /********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -14,7 +15,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group /* Forward Declarations */ -static void ONEresetEvalFlag(ONEdevice *); +/* static void ONEresetEvalFlag(ONEdevice *); sjb - not used */ void ONEbuildMesh(ONEdevice *pDevice, ONEcoord *pCoord, ONEdomain *pDomain, @@ -24,7 +25,7 @@ ONEbuildMesh(ONEdevice *pDevice, ONEcoord *pCoord, ONEdomain *pDomain, int elemType; double xPos; ONEcoord *pC; - ONEnode *pNode, *pNextNode; + ONEnode *pNode; ONEdomain *pD; ONEelem *pElem; ONEmaterial *pM; @@ -314,7 +315,6 @@ ONEprnMesh(ONEdevice *pDevice) int eIndex, index; ONEelem *pElem; ONEnode *pNode; - ONEedge *pEdge; char *name; @@ -354,6 +354,7 @@ ONEprnMesh(ONEdevice *pDevice) } } +/* sjb - not used static void ONEresetEvalFlag(ONEdevice *pDevice) { @@ -369,3 +370,4 @@ ONEresetEvalFlag(ONEdevice *pDevice) pElem->pEdge->evaluated = FALSE; } } +*/ diff --git a/src/ciderlib/oned/onepoiss.c b/src/ciderlib/oned/onepoiss.c index 8328b1ead..cfc53bf7a 100644 --- a/src/ciderlib/oned/onepoiss.c +++ b/src/ciderlib/oned/onepoiss.c @@ -1,6 +1,7 @@ /********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -45,7 +46,7 @@ void ONEQsysLoad(ONEdevice *pDevice) { ONEelem *pElem; - ONEnode *pNode, *pNode1; + ONEnode *pNode; int index, i; double *pRhs = pDevice->rhs; double rDx, dPsi; @@ -154,7 +155,7 @@ ONEQcommonTerms(ONEdevice *pDevice) { ONEelem *pElem; ONEedge *pEdge; - ONEnode *pNode, *pNode1; + ONEnode *pNode; int i, index; double psi1, psi2, refPsi; diff --git a/src/ciderlib/oned/oneproj.c b/src/ciderlib/oned/oneproj.c index 816746ab0..17c983fa1 100644 --- a/src/ciderlib/oned/oneproj.c +++ b/src/ciderlib/oned/oneproj.c @@ -1,6 +1,7 @@ /********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -224,7 +225,6 @@ NUMDupdate(ONEdevice *pDevice, double delV, BOOLEAN updateBoundary) { ONEelem *pElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEnode *pNode; - ONEedge *pEdge; double delPsi, delN, delP; int i, index; @@ -322,9 +322,9 @@ NBJTsetBCs(ONEdevice *pDevice, double vce, double vbe) { ONEelem *pLastElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; - ONEnode *pNode; +/* ONEnode *pNode; double psi, conc, sign, absConc; - double nie, ni, pi; + double nie, ni, pi; */ /* normalize the voltages */ vce = vce / VNorm; diff --git a/src/ciderlib/oned/oneread.c b/src/ciderlib/oned/oneread.c index c02bb82aa..f25e084d7 100644 --- a/src/ciderlib/oned/oneread.c +++ b/src/ciderlib/oned/oneread.c @@ -1,6 +1,7 @@ /********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ /* @@ -29,7 +30,6 @@ ONEreadState(ONEdevice *pDevice, char *fileName, int numVolts, ONEnode **nodeArray=NULL; ONEnode *pNode; ONEelem *pElem; - ONEmaterial *info; double refPsi = 0.0; double *psiData, *nData, *pData; double *vData[2]; diff --git a/src/ciderlib/oned/onesetup.c b/src/ciderlib/oned/onesetup.c index 6ae807754..31aef6d6f 100644 --- a/src/ciderlib/oned/onesetup.c +++ b/src/ciderlib/oned/onesetup.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ /********** @@ -27,7 +28,6 @@ ONEsetup(ONEdevice *pDevice) double temp1, deltaEg, avgConc, totalConc, absNetConc; double ncv0, dBand, dNie, psiBand[2]; int index, eIndex; - int numContactNodes; ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; @@ -120,7 +120,7 @@ ONEcopyBCinfo(ONEdevice *pDevice, ONEelem *pElem, BDRYcard *bdry, int index) { ONEnode *pNode; ONEelem *pNElem; - int eIndex, nIndex; + int eIndex; double length; @@ -154,13 +154,10 @@ void ONEsetBCparams(ONEdevice *pDevice, BDRYcard *bdryList, CONTcard *contList) { int index, xIndex; - ONEnode *pNode; ONEelem *pElem, *pNElem; BDRYcard *bdry; CONTcard *cont; - - for (bdry = bdryList; bdry != NIL(BDRYcard); bdry = bdry->BDRYnextCard) { for (xIndex = bdry->BDRYixLow; xIndex < bdry->BDRYixHigh; xIndex++) { pElem = pDevice->elemArray[xIndex]; diff --git a/src/ciderlib/oned/onesolve.c b/src/ciderlib/oned/onesolve.c index 9779ddfbe..410c1146a 100644 --- a/src/ciderlib/oned/onesolve.c +++ b/src/ciderlib/oned/onesolve.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ /* @@ -51,7 +52,7 @@ ONEdcSolve(ONEdevice *pDevice, int iterationLimit, BOOLEAN newSolver, BOOLEAN quitLoop; BOOLEAN debug = FALSE; double *rhs = pDevice->rhs; - double *intermediate = pDevice->copiedSolution; +/* double *intermediate = pDevice->copiedSolution; */ double *solution = pDevice->dcSolution; double *delta = pDevice->dcDeltaSolution; double poissNorm, contNorm; @@ -928,7 +929,7 @@ ONEtrunc(ONEdevice *pDevice, ONEtranInfo *info, double delta) int nIndex, eIndex; ONEelem *pElem; ONEnode *pNode; - double tolN, tolP, lte, relError, temp, relLTE; + double tolN, tolP, lte, relError, temp; double lteCoeff = info->lteCoeff; double mult = 10.0; double reltol; @@ -1010,11 +1011,6 @@ ONEsaveState(ONEdevice *pDevice) double ONEnuNorm(ONEdevice *pDevice) { - double norm = 0.0; - double temp; - int index; - - /* The LU Decomposed matrix is available. Use it to calculate x. */ spSolve(pDevice->matrix, pDevice->rhs, pDevice->rhsImag, NIL(spREAL), NIL(spREAL)); diff --git a/src/ciderlib/support/integset.c b/src/ciderlib/support/integset.c index 64105a585..cdf17e812 100644 --- a/src/ciderlib/support/integset.c +++ b/src/ciderlib/support/integset.c @@ -1,6 +1,7 @@ /********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -92,7 +93,7 @@ void computePredCoeff(int method, int order, double *predCoeff, double *delta) { int i, j, k; - double num, denom, prod, temp; + double num, denom, prod; if( method == TRAPEZOIDAL && order > 2 ) { printf("\n computePredCoeff: order > 2 for trapezoidal"); diff --git a/src/ciderlib/support/suprem.c b/src/ciderlib/support/suprem.c index cf7704382..08ced9346 100644 --- a/src/ciderlib/support/suprem.c +++ b/src/ciderlib/support/suprem.c @@ -2,18 +2,20 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ /* Functions to read SUPREM (Binary or Ascii) & ASCII input files */ #include "ngspice.h" #include "profile.h" +#include "cidersupt.h" void readAsciiData( char *fileName, int impType, DOPtable **ppTable ) { FILE *fpAscii; - int index, i; + int index; double x, y; int numPoints; DOPtable *tmpTable; @@ -45,7 +47,7 @@ readAsciiData( char *fileName, int impType, DOPtable **ppTable ) profileData[0][0] = numPoints; for( index = 1; index <= numPoints; index++ ) { - fscanf( fpAscii, "%f %f ", &x, &y ); + fscanf( fpAscii, "%lf %lf ", &x, &y ); profileData[ 0 ][ index ] = x; profileData[ 1 ][ index ] = sign * ABS(y); } @@ -117,11 +119,10 @@ DOPtable **ppTable; #define MAX_GRID 500 float x[ MAX_GRID ], conc[ MAX_GRID ]; - int index, i, j; + int index; DOPtable *tmpTable; double **profileData; int numNodes; - char *colon, *impName; /* read the Suprem data file */ if ( fileType == 0 ) { /* BINARY FILE */ diff --git a/src/ciderlib/twod/twoadmit.c b/src/ciderlib/twod/twoadmit.c index ece5c83c7..0dbdb2280 100644 --- a/src/ciderlib/twod/twoadmit.c +++ b/src/ciderlib/twod/twoadmit.c @@ -1,6 +1,7 @@ /********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ /* Functions to compute the ac admittances of a device. */ @@ -346,7 +347,7 @@ NUMOSadmittance(TWOdevice *pDevice, double omega, struct mosAdmittances *yAc) TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; - TWOcontact *pBContact = pDevice->pLastContact; +/* TWOcontact *pBContact = pDevice->pLastContact; */ TWOnode *pNode; TWOelem *pElem; int index, eIndex; @@ -762,7 +763,6 @@ contactAdmittance(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN delVContact, TWOelem *pElem; SPcomplex psiAc, nAc, pAc; SPcomplex prod1, prod2, sum; - double yReal, yImag; double temp; CMPLX_ASSIGN_VALUE(yTotal, 0.0, 0.0); @@ -961,9 +961,8 @@ oxideAdmittance(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN delVContact, TWOedge *pHEdge, *pVEdge; int index, i, indexPsi, numContactNodes; TWOelem *pElem; - SPcomplex psiAc, nAc, pAc; - SPcomplex prod1, prod2, sum; - double yReal, yImag; + SPcomplex psiAc; + SPcomplex prod1, prod2; CMPLX_ASSIGN_VALUE(yTotal, 0.0, 0.0); @@ -1205,7 +1204,7 @@ NUMOSys(TWOdevice *pDevice, SPcomplex *s, struct mosAdmittances *yAc) TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; - TWOcontact *pBContact = pDevice->pLastContact; +/* TWOcontact *pBContact = pDevice->pLastContact; */ TWOnode *pNode; TWOelem *pElem; int index, eIndex; diff --git a/src/ciderlib/twod/twocond.c b/src/ciderlib/twod/twocond.c index 3b61b2dbd..6c9578ee1 100644 --- a/src/ciderlib/twod/twocond.c +++ b/src/ciderlib/twod/twocond.c @@ -1,6 +1,7 @@ /********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group +$Id$ **********/ /* Functions to compute terminal conductances & currents. */ @@ -21,7 +22,6 @@ void double *intCoeff, double *gd) { TWOcontact *pContact = pDevice->pFirstContact; - int index; double *incVpn; BOOLEAN deltaVContact = FALSE; @@ -47,7 +47,6 @@ void TWOcontact *pEmitContact = pDevice->pLastContact; TWOcontact *pColContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; - int index; double width = pDevice->width; double *incVce, *incVbe; @@ -86,8 +85,6 @@ void TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; - TWOcontact *pBContact = pDevice->pLastContact; - int index; double width = pDevice->width; double *incVdb, *incVsb, *incVgb; @@ -433,7 +430,7 @@ double int index, i, numContactNodes; TWOnode *pNode, *pHNode = NULL, *pVNode = NULL; TWOelem *pElem; - double dPsiDv, dnDv, dpDv; + double dPsiDv; double gTotal = 0.0; if ( !tranAnalysis ) { @@ -499,10 +496,9 @@ void double *intCoeff, double *id) { TWOcontact *pPContact = pDevice->pFirstContact; - TWOcontact *pNContact = pDevice->pLastContact; - int index; +/* TWOcontact *pNContact = pDevice->pLastContact; */ double ip, ipPrime, *solution; - double in; +/* double in;*/ BOOLEAN deltaVContact = FALSE; solution = pDevice->dcDeltaSolution; @@ -532,9 +528,9 @@ void { TWOcontact *pEmitContact = pDevice->pLastContact; TWOcontact *pColContact = pDevice->pFirstContact; - TWOcontact *pBaseContact = pDevice->pFirstContact->next; +/* TWOcontact *pBaseContact = pDevice->pFirstContact->next; */ double *solution, iePrime, icPrime; - double ib; +/* double ib; */ solution = pDevice->dcDeltaSolution; @@ -567,9 +563,9 @@ void TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; - TWOcontact *pBContact = pDevice->pLastContact; +/* TWOcontact *pBContact = pDevice->pLastContact; */ double *solution, idPrime, isPrime, igPrime; - double ib; +/* double ib; */ solution = pDevice->dcDeltaSolution; diff --git a/src/ciderlib/twod/twocont.c b/src/ciderlib/twod/twocont.c index 743f47792..cb466da82 100644 --- a/src/ciderlib/twod/twocont.c +++ b/src/ciderlib/twod/twocont.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -669,7 +670,6 @@ void TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; - TWOchannel *pCh; int index, eIndex; double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; @@ -797,7 +797,7 @@ void TWO_commonTerms(TWOdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, TWOtranInfo *info) { - TWOelem *pElem, *pElem1; + TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; diff --git a/src/ciderlib/twod/twomesh.c b/src/ciderlib/twod/twomesh.c index a2cfd6f34..ef63076c2 100644 --- a/src/ciderlib/twod/twomesh.c +++ b/src/ciderlib/twod/twomesh.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -26,7 +27,6 @@ TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, { int xIndex, yIndex, eIndex, index; int elemType; - TWOcoord *pX, *pY; TWOelem *pElem, *pElem1; TWOnode *pNode, *pNode1, *pNextHNode, *pNextVNode, *pNextDNode; TWOnode ***nodeArray = NULL; @@ -35,14 +35,15 @@ TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, TWOdomain *pD; TWOelectrode *pE; TWOmaterial *pM; - BOOLEAN error = FALSE; BOOLEAN interiorNode; int poiEqn, numEqn, numElem, numNodes, numEdges; int numXNodes = pDevice->numXNodes; int numYNodes = pDevice->numYNodes; double *xScale = pDevice->xScale; double *yScale = pDevice->yScale; +#ifdef NOTDEF FILE *meshFile; +#endif /* Generate work arrays. */ XCALLOC(nodeArray, TWOnode **, 1 + numXNodes); diff --git a/src/ciderlib/twod/twomobfn.c b/src/ciderlib/twod/twomobfn.c index 1575c1068..9551fb8f8 100644 --- a/src/ciderlib/twod/twomobfn.c +++ b/src/ciderlib/twod/twomobfn.c @@ -1,6 +1,7 @@ /********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1990 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -25,7 +26,7 @@ MOBsurfElec(TWOmaterial *info, TWOelem *pElem, double ex, double ey, double thetaB = info->thetaB[ELEC]; double eL, eN, eD, e0, mun; double temp1, temp2, temp3, temp4, temp5; - double temp6, temp7, temp8, temp9, temp10; + double temp6, temp7, temp8, temp9; double sgnN, sgnL; double dMunDEs; /* Surface Field Derivative */ double dMunDEn; /* (Local) Normal Field Derivative */ @@ -225,7 +226,7 @@ MOBsurfHole(TWOmaterial *info, TWOelem *pElem, double ex, double ey, double thetaB = info->thetaB[HOLE]; double eL, eN, eD, mup; double temp1, temp2, temp3, temp4, temp5; - double temp6, temp7, temp8, temp9, temp10; + double temp6, temp7, temp8, temp9; double sgnN, sgnL; double dMupDEs; /* Surface Field Derivative */ double dMupDEn; /* (Local) Normal Field Derivative */ diff --git a/src/ciderlib/twod/twoncont.c b/src/ciderlib/twod/twoncont.c index ae57f36a1..441603c83 100644 --- a/src/ciderlib/twod/twoncont.c +++ b/src/ciderlib/twod/twoncont.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -556,7 +557,6 @@ void TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; - TWOchannel *pCh; int index, eIndex; double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; @@ -670,7 +670,7 @@ void TWONcommonTerms(TWOdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, TWOtranInfo *info) { - TWOelem *pElem, *pElem1; + TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; diff --git a/src/ciderlib/twod/twopcont.c b/src/ciderlib/twod/twopcont.c index 8b9fa12fe..9461fe723 100644 --- a/src/ciderlib/twod/twopcont.c +++ b/src/ciderlib/twod/twopcont.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -554,7 +555,6 @@ void TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; - TWOchannel *pCh; int index, eIndex; double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; @@ -668,7 +668,7 @@ void TWOPcommonTerms(TWOdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, TWOtranInfo *info) { - TWOelem *pElem, *pElem1; + TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; diff --git a/src/ciderlib/twod/twopoiss.c b/src/ciderlib/twod/twopoiss.c index 59c6f16bc..394421793 100644 --- a/src/ciderlib/twod/twopoiss.c +++ b/src/ciderlib/twod/twopoiss.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -95,7 +96,7 @@ void TWOQsysLoad(TWOdevice *pDevice) { TWOelem *pElem; - TWOnode *pNode, *pNode1; + TWOnode *pNode; TWOedge *pHEdge, *pVEdge; int index, eIndex; double *pRhs = pDevice->rhs; @@ -175,7 +176,7 @@ void TWOQrhsLoad(TWOdevice *pDevice) { TWOelem *pElem; - TWOnode *pNode, *pNode1; + TWOnode *pNode; TWOedge *pHEdge, *pVEdge; int index, eIndex; double *pRhs = pDevice->rhs; @@ -240,7 +241,7 @@ TWOQcommonTerms(TWOdevice *pDevice) { TWOelem *pElem; TWOedge *pEdge; - TWOnode *pNode, *pNode1; + TWOnode *pNode; int index, eIndex; double psi1, psi2, refPsi; diff --git a/src/ciderlib/twod/twoprint.c b/src/ciderlib/twod/twoprint.c index 21219c3c2..465c47b86 100644 --- a/src/ciderlib/twod/twoprint.c +++ b/src/ciderlib/twod/twoprint.c @@ -2,6 +2,7 @@ Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -19,11 +20,11 @@ Author: 1992 David A. Gates, U. C. Berkeley CAD Group void TWOprnSolution(FILE *file, TWOdevice *pDevice, OUTPcard *output) { - int i, index, xIndex, yIndex; + int index, xIndex, yIndex; int numVars = 0; TWOnode ***nodeArray = NULL; TWOnode *pNode; - TWOelem *pElem, *pNextElem; + TWOelem *pElem; TWOmaterial *info; double data[50]; double ex, ey, refPsi = 0.0, eGap, dGap; @@ -344,7 +345,7 @@ void TWOmemStats(FILE *file, TWOdevice *pDevice) { static char *memFormat = "%-20s%10d%10d\n"; - static char *sumFormat = "%20s %-10d\n"; +/* static char *sumFormat = "%20s %-10d\n"; */ unsigned int size; unsigned int memory; TWOmaterial *pMaterial; diff --git a/src/ciderlib/twod/tworead.c b/src/ciderlib/twod/tworead.c index 156e51409..390ed226f 100644 --- a/src/ciderlib/twod/tworead.c +++ b/src/ciderlib/twod/tworead.c @@ -1,6 +1,7 @@ /********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ /* @@ -30,7 +31,6 @@ TWOreadState(TWOdevice *pDevice, char *fileName, int numVolts, double *pV1, TWOnode ***nodeArray = NULL; TWOnode *pNode; TWOelem *pElem; - TWOmaterial *info; double refPsi = 0.0; double *psiData, *nData, *pData; double *vData[3]; diff --git a/src/ciderlib/twod/twosetup.c b/src/ciderlib/twod/twosetup.c index 9cda8c41a..05cf69453 100644 --- a/src/ciderlib/twod/twosetup.c +++ b/src/ciderlib/twod/twosetup.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ /********** @@ -252,9 +253,7 @@ static void TWOcopyBCinfo( pDevice, pElem, card, index ) void TWOsetBCparams(TWOdevice *pDevice, BDRYcard *cardList) { int index, xIndex, yIndex; /* Need to access in X/Y order. */ - TWOnode *pNode; TWOelem *pElem, *pNElem; - TWOedge *pEdge; BDRYcard *card; for ( card = cardList; card != NIL(BDRYcard); card = card->BDRYnextCard ) { diff --git a/src/ciderlib/twod/twosolve.c b/src/ciderlib/twod/twosolve.c index 4a8a4d997..71e216316 100644 --- a/src/ciderlib/twod/twosolve.c +++ b/src/ciderlib/twod/twosolve.c @@ -2,6 +2,7 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group +$Id$ **********/ #include "ngspice.h" @@ -805,7 +806,7 @@ int TWOnewDelta(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { int index, iterNum = 0; - double newNorm, origNorm; + double newNorm; double fib, lambda, fibn, fibp; BOOLEAN acceptable = FALSE, error = FALSE; @@ -940,7 +941,7 @@ TWOtrunc(TWOdevice *pDevice, TWOtranInfo *info, double delta) int nIndex, eIndex; TWOelem *pElem; TWOnode *pNode; - double tolN, tolP, lte, relError, temp, relLTE; + double tolN, tolP, lte, relError, temp; double lteCoeff = info->lteCoeff; double mult = 10.0; double reltol; diff --git a/src/include/cidersupt.h b/src/include/cidersupt.h index fa9a5ac17..a22a0d3bc 100644 --- a/src/include/cidersupt.h +++ b/src/include/cidersupt.h @@ -2,11 +2,16 @@ * cidersupt.h * * CIDER support library header + * $Id$ */ #ifndef _CIDERSUPT_H #define _CIDERSUPT_H +#include "numglobs.h" +#include "material.h" +#include "gendev.h" +#include "profile.h" /* externals for database.c */ extern struct plot* DBread( char *); diff --git a/src/misc/getopt.c b/src/misc/getopt.c index 964189d2d..762dab09f 100644 --- a/src/misc/getopt.c +++ b/src/misc/getopt.c @@ -39,6 +39,7 @@ #endif #include +#include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C diff --git a/src/spicelib/devices/vbic/vbicinit.c b/src/spicelib/devices/vbic/vbicinit.c index d6b79a2c6..d8af2eb62 100644 --- a/src/spicelib/devices/vbic/vbicinit.c +++ b/src/spicelib/devices/vbic/vbicinit.c @@ -1,3 +1,10 @@ +/* + * vbicinit.c + * + * $Id$ + */ + + #include "config.h" #include "devdefs.h" @@ -67,7 +74,10 @@ SPICEdev VBICinfo = { NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ VBICnoise, /* DEVnoise */ - +#ifdef CIDER + NULL, /* DEVdump */ + NULL, /* DEVacct */ +#endif &VBICiSize, /* DEVinstSize */ &VBICmSize /* DEVmodSize */ diff --git a/src/spicelib/parser/inpgmod.c b/src/spicelib/parser/inpgmod.c index 16b076229..f331d5183 100644 --- a/src/spicelib/parser/inpgmod.c +++ b/src/spicelib/parser/inpgmod.c @@ -2,6 +2,7 @@ Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles, 1991 David A. Gates Modified: 2001 Paolo Nenzi (Cider Integration) +$Id$ **********/ #include "ngspice.h" @@ -24,6 +25,10 @@ extern int INPnumCards; #define E_MISSING -1 #define E_AMBIGUOUS -2 +static int INPparseNumMod( void* ckt, INPmodel *model, INPtables *tab, char **errMessage ); +static int INPfindCard( char *name, IFcardInfo *table[], int numCards ); +static int INPfindParm( char *name, IFparm *table, int numParms ); + /* end Cider Integration */ #endif /* CIDER */ @@ -189,12 +194,8 @@ char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab) * '+' = continue previous card * other = new card */ -int -INPparseNumMod( ckt, model, tab, errMessage ) - void* ckt; - INPmodel *model; - INPtables *tab; - char **errMessage; +static int +INPparseNumMod( void* ckt, INPmodel *model, INPtables *tab, char **errMessage ) { card *txtCard; /* Text description of a card */ GENcard *tmpCard; /* Processed description of a card */ @@ -344,11 +345,8 @@ INPparseNumMod( ckt, model, tab, errMessage ) /* * Locate the best match to a card name in an IFcardInfo table */ -int -INPfindCard( name, table, numCards ) - char *name; - IFcardInfo *table[]; - int numCards; +static int +INPfindCard( char *name, IFcardInfo *table[], int numCards ) { int test; int match, bestMatch; @@ -375,11 +373,8 @@ INPfindCard( name, table, numCards ) /* * Locate the best match to a parameter name in an IFparm table */ -int -INPfindParm( name, table, numParms ) - char *name; - IFparm *table; - int numParms; +static int +INPfindParm( char *name, IFparm *table, int numParms ) { int test, best; int match, bestMatch;