diff --git a/ChangeLog b/ChangeLog index 83b8ad953..8769995d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-12-31 Paolo Nenzi + * src/spicelib/devices/tra/*: Cleaned code. + + * src/spicelib/devices/ltra/*: Cleaned code. + + * src/spicelib/devices/urc/*: Cleaned code. + * tests/transmission/{cpl*, txl*, ibm*}: Added test files for the kspice's cpl and txl devices. @@ -18,7 +24,8 @@ * tests/mes, tests/mes/subth.cir: added test netlist for mes devices. - * DEVICES: updated documentation including MES and MESA changes. + * DEVICES: updated documentation including MES, MESA, CPL, TXL, TRA, + LTRA and URC changes. 2003-12-30 Paolo Nenzi diff --git a/DEVICES b/DEVICES index 7b2ee41ea..d4cb882fd 100644 --- a/DEVICES +++ b/DEVICES @@ -74,11 +74,29 @@ CPL - Simple Coupled Multiconductor Lines (Kspice) you have kspice docs, can you write a short description of its use ? + - Does not implement parallel code switches + LTRA - Lossy Transmission line - Initial release + Initial Release. + Ver: N/A + Class: O + Level: 1 (and only) + Status: + + Original spice model. + + - Does not implement parallel code switches TRA - Transmission line - Initial release + Initial Release. + Ver: N/A + Class: T + Level: 1 (and only) + Status: + + Original spice model. + + - Does not implement parallel code switches TXL - Simple Lossy Transmission Line (Kspice) Initial Release. @@ -93,10 +111,20 @@ TXL - Simple Lossy Transmission Line (Kspice) There is some code left out from compilation: TXLaccept and TXLfindBr. Any ideas ? + + - Does not implement parallel code switches URC - Uniform distributed RC line - Initial release + Initial Release. + Ver: N/A + Class: U + Level: 1 (and only) + Status: + + Original spcice model. + + - Does not implement parallel code switches *************************************************************************** diff --git a/src/spicelib/devices/ltra/ltra.c b/src/spicelib/devices/ltra/ltra.c index 121048242..846f42c60 100644 --- a/src/spicelib/devices/ltra/ltra.c +++ b/src/spicelib/devices/ltra/ltra.c @@ -10,7 +10,6 @@ Author: 1990 Jaijeet S. Roychowdhury */ #include "ngspice.h" -#include #include "devdefs.h" #include "ifsim.h" #include "ltradefs.h" diff --git a/src/spicelib/devices/ltra/ltraacct.c b/src/spicelib/devices/ltra/ltraacct.c index 0788e809c..b8ecf0ff6 100644 --- a/src/spicelib/devices/ltra/ltraacct.c +++ b/src/spicelib/devices/ltra/ltraacct.c @@ -4,16 +4,13 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "cktdefs.h" #include "ltradefs.h" #include "sperror.h" #include "suffix.h" int -LTRAaccept(ckt, inModel) - CKTcircuit *ckt; - GENmodel *inModel; +LTRAaccept(CKTcircuit *ckt, GENmodel *inModel) { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; diff --git a/src/spicelib/devices/ltra/ltraacld.c b/src/spicelib/devices/ltra/ltraacld.c index ec7718a54..27465de1d 100644 --- a/src/spicelib/devices/ltra/ltraacld.c +++ b/src/spicelib/devices/ltra/ltraacld.c @@ -5,7 +5,6 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "cktdefs.h" #include "ltradefs.h" #include "trandefs.h" @@ -13,9 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury #include "suffix.h" int -LTRAacLoad(inModel, ckt) - GENmodel *inModel; - CKTcircuit *ckt; +LTRAacLoad(GENmodel *inModel, CKTcircuit *ckt) /* * load the appropriate values for the current timepoint into the sparse * matrix and the right-hand-side vector diff --git a/src/spicelib/devices/ltra/ltraask.c b/src/spicelib/devices/ltra/ltraask.c index bf4e07cb9..f6a7bfa44 100644 --- a/src/spicelib/devices/ltra/ltraask.c +++ b/src/spicelib/devices/ltra/ltraask.c @@ -8,7 +8,6 @@ Author: 1990 Jaijeet S. Roychowdhury */ #include "ngspice.h" -#include #include "cktdefs.h" #include "devdefs.h" #include "ifsim.h" @@ -18,12 +17,7 @@ Author: 1990 Jaijeet S. Roychowdhury /* ARGSUSED */ int -LTRAask(ckt, inst, which, value, select) - CKTcircuit *ckt; - GENinstance *inst; - int which; - IFvalue *value; - IFvalue *select; +LTRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { LTRAinstance *here = (LTRAinstance *) inst; int temp; diff --git a/src/spicelib/devices/ltra/ltradel.c b/src/spicelib/devices/ltra/ltradel.c index 1d897af9c..5e45729c7 100644 --- a/src/spicelib/devices/ltra/ltradel.c +++ b/src/spicelib/devices/ltra/ltradel.c @@ -4,16 +4,12 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "ltradefs.h" #include "sperror.h" #include "suffix.h" int -LTRAdelete(inModel, name, kill) - GENmodel *inModel; - IFuid name; - GENinstance **kill; +LTRAdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { LTRAinstance **fast = (LTRAinstance **) kill; LTRAmodel *model = (LTRAmodel *) inModel; diff --git a/src/spicelib/devices/ltra/ltradest.c b/src/spicelib/devices/ltra/ltradest.c index 99438ea9f..ab559e9f5 100644 --- a/src/spicelib/devices/ltra/ltradest.c +++ b/src/spicelib/devices/ltra/ltradest.c @@ -4,13 +4,11 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "ltradefs.h" #include "suffix.h" void -LTRAdestroy(inModel) - GENmodel **inModel; +LTRAdestroy(GENmodel **inModel) { LTRAmodel **model = (LTRAmodel **) inModel; LTRAinstance *here; diff --git a/src/spicelib/devices/ltra/ltraext.h b/src/spicelib/devices/ltra/ltraext.h index 58aa13e9c..09cc06a8c 100644 --- a/src/spicelib/devices/ltra/ltraext.h +++ b/src/spicelib/devices/ltra/ltraext.h @@ -4,7 +4,7 @@ Author: 1990 Jaijeet S. Roychowdhury Modified: 2000 AlansFixes **********/ -#ifdef __STDC__ + extern int LTRAaccept(CKTcircuit*,GENmodel*); extern int LTRAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int LTRAacLoad(GENmodel*,CKTcircuit*); @@ -44,43 +44,3 @@ extern double LTRAh3dashCoeffSetup(double*,int,double,double,double,double*,int, extern void LTRArcCoeffsSetup(double*,double*,double*,double*,double*,double*,int,double,double,double,double*,int,double); extern void LTRArlcCoeffsSetup(double*,double*,double*,double*,double*,double*,int,double,double,double,double,double*,int,double,int*); extern int LTRAstraightLineCheck(double,double,double,double,double,double,double,double); -#else /* stdc */ -extern int LTRAaccept(); -extern int LTRAask(); -extern int LTRAacLoad(); -extern int LTRAdelete(); -extern void LTRAdestroy(); -extern int LTRAload(); -extern int LTRAmAsk(); -extern int LTRAmDelete(); -extern int LTRAparam(); -extern int LTRAmParam(); -extern int LTRAsetup(); -extern int LTRAunsetup(); -extern int LTRAtemp(); -extern int LTRAtrunc(); - -extern int LTRAquadInterp(); -/* -extern double LTRAcoeffSetup(); -extern double LTRAtCoeffSetup(); -extern double LTRAdivDiffs(); -*/ -extern double LTRArlcH1dashFunc(); -extern double LTRArlcH2Func(); -extern double LTRArlcH3dashFunc(); -extern double LTRArlcH1dashTwiceIntFunc(); -extern double LTRArlcH3dashIntFunc(); -extern double LTRArcH1dashTwiceIntFunc(); -extern double LTRArcH2TwiceIntFunc(); -extern double LTRArcH3dashTwiceIntFunc(); -extern double LTRAlteCalculate(); -/* -extern double LTRAh1dashCoeffSetup(); -extern double LTRAh3dashCoeffSetup(); -*/ -extern void LTRArcCoeffsSetup(); -extern void LTRArlcCoeffsSetup(); -extern int LTRAstraightLineCheck(); -#endif /* stdc */ - diff --git a/src/spicelib/devices/ltra/ltraload.c b/src/spicelib/devices/ltra/ltraload.c index f9203236f..3a8ad7540 100644 --- a/src/spicelib/devices/ltra/ltraload.c +++ b/src/spicelib/devices/ltra/ltraload.c @@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "cktdefs.h" #include "ltradefs.h" #include "trandefs.h" @@ -12,9 +11,7 @@ Author: 1990 Jaijeet S. Roychowdhury #include "suffix.h" int -LTRAload(inModel, ckt) - GENmodel *inModel; - CKTcircuit *ckt; +LTRAload(GENmodel *inModel, CKTcircuit *ckt) /* * load the appropriate values for the current timepoint into the sparse * matrix and the right-hand-side vector diff --git a/src/spicelib/devices/ltra/ltramask.c b/src/spicelib/devices/ltra/ltramask.c index c6a468f8a..fea412ef1 100644 --- a/src/spicelib/devices/ltra/ltramask.c +++ b/src/spicelib/devices/ltra/ltramask.c @@ -8,7 +8,6 @@ Author: 1990 Jaijeet S. Roychowdhury */ #include "ngspice.h" -#include #include "const.h" #include "ifsim.h" #include "ltradefs.h" @@ -16,11 +15,7 @@ Author: 1990 Jaijeet S. Roychowdhury #include "suffix.h" int -LTRAmAsk(ckt, inModel, param, value) - CKTcircuit *ckt; - GENmodel *inModel; - int param; - IFvalue *value; +LTRAmAsk(CKTcircuit *ckt, GENmodel *inModel, int param, IFvalue *value) { LTRAmodel *mods = (LTRAmodel *) inModel; diff --git a/src/spicelib/devices/ltra/ltramdel.c b/src/spicelib/devices/ltra/ltramdel.c index da31773a7..be309476a 100644 --- a/src/spicelib/devices/ltra/ltramdel.c +++ b/src/spicelib/devices/ltra/ltramdel.c @@ -4,16 +4,12 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "ltradefs.h" #include "sperror.h" #include "suffix.h" int -LTRAmDelete(inModel, modname, kill) - GENmodel **inModel; - IFuid modname; - GENmodel *kill; +LTRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { LTRAmodel **model = (LTRAmodel **) inModel; LTRAmodel *modfast = (LTRAmodel *) kill; diff --git a/src/spicelib/devices/ltra/ltrampar.c b/src/spicelib/devices/ltra/ltrampar.c index 11d8e1fb3..3fb420b52 100644 --- a/src/spicelib/devices/ltra/ltrampar.c +++ b/src/spicelib/devices/ltra/ltrampar.c @@ -8,7 +8,6 @@ Author: 1990 Jaijeet S. Roychowdhury */ #include "ngspice.h" -#include #include "const.h" #include "ifsim.h" #include "ltradefs.h" @@ -16,10 +15,7 @@ Author: 1990 Jaijeet S. Roychowdhury #include "suffix.h" int -LTRAmParam(param, value, inModel) - int param; - IFvalue *value; - GENmodel *inModel; +LTRAmParam(int param, IFvalue *value, GENmodel *inModel) { LTRAmodel *mods = (LTRAmodel *) inModel; diff --git a/src/spicelib/devices/ltra/ltrapar.c b/src/spicelib/devices/ltra/ltrapar.c index 2cbd68e3a..1a18a6fb3 100644 --- a/src/spicelib/devices/ltra/ltrapar.c +++ b/src/spicelib/devices/ltra/ltrapar.c @@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "ltradefs.h" #include "ifsim.h" #include "sperror.h" @@ -13,11 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury /* ARGSUSED */ int -LTRAparam(param, value, inst, select) - int param; - IFvalue *value; - GENinstance *inst; - IFvalue *select; +LTRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { LTRAinstance *here = (LTRAinstance *) inst; switch (param) { @@ -41,10 +36,13 @@ LTRAparam(param, value, inst, select) switch (value->v.numValue) { case 4: here->LTRAinitCur2 = *(value->v.vec.rVec + 3); + break; case 3: here->LTRAinitVolt2 = *(value->v.vec.rVec + 2); + break; case 2: here->LTRAinitCur1 = *(value->v.vec.rVec + 1); + break; case 1: here->LTRAinitVolt1 = *(value->v.vec.rVec); break; diff --git a/src/spicelib/devices/ltra/ltraset.c b/src/spicelib/devices/ltra/ltraset.c index a93c1c348..c611923be 100644 --- a/src/spicelib/devices/ltra/ltraset.c +++ b/src/spicelib/devices/ltra/ltraset.c @@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "smpdefs.h" #include "cktdefs.h" #include "ltradefs.h" @@ -12,11 +11,7 @@ Author: 1990 Jaijeet S. Roychowdhury #include "suffix.h" int -LTRAsetup(matrix, inModel, ckt, state) - SMPmatrix *matrix; - GENmodel *inModel; - CKTcircuit *ckt; - int *state; +LTRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* * load the transmission line structure with those pointers needed later for * fast matrix loading @@ -223,9 +218,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ } int -LTRAunsetup(inModel, ckt) - GENmodel *inModel; - CKTcircuit *ckt; +LTRAunsetup(GENmodel *inModel, CKTcircuit *ckt) { LTRAmodel *model; LTRAinstance *here; diff --git a/src/spicelib/devices/ltra/ltratemp.c b/src/spicelib/devices/ltra/ltratemp.c index 2bc3c5f4d..21a2f275b 100644 --- a/src/spicelib/devices/ltra/ltratemp.c +++ b/src/spicelib/devices/ltra/ltratemp.c @@ -4,7 +4,6 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "smpdefs.h" #include "cktdefs.h" #include "ltradefs.h" @@ -13,9 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury /* ARGSUSED */ int -LTRAtemp(inModel, ckt) - GENmodel *inModel; - CKTcircuit *ckt; +LTRAtemp(GENmodel *inModel, CKTcircuit *ckt) /* * pre-process parameters for later use */ diff --git a/src/spicelib/devices/ltra/ltratrun.c b/src/spicelib/devices/ltra/ltratrun.c index 76d85050e..627208bd1 100644 --- a/src/spicelib/devices/ltra/ltratrun.c +++ b/src/spicelib/devices/ltra/ltratrun.c @@ -4,17 +4,13 @@ Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice.h" -#include #include "cktdefs.h" #include "ltradefs.h" #include "sperror.h" #include "suffix.h" int -LTRAtrunc(inModel, ckt, timeStep) - GENmodel *inModel; - CKTcircuit *ckt; - double *timeStep; +LTRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { LTRAmodel *model = (LTRAmodel *) inModel; diff --git a/src/spicelib/devices/tra/tra.c b/src/spicelib/devices/tra/tra.c index cde047471..092cf4652 100644 --- a/src/spicelib/devices/tra/tra.c +++ b/src/spicelib/devices/tra/tra.c @@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles **********/ #include "ngspice.h" -#include #include "devdefs.h" #include "ifsim.h" #include "tradefs.h" diff --git a/src/spicelib/devices/tra/traacct.c b/src/spicelib/devices/tra/traacct.c index 84eef8a10..f41ad5318 100644 --- a/src/spicelib/devices/tra/traacct.c +++ b/src/spicelib/devices/tra/traacct.c @@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "cktdefs.h" #include "tradefs.h" #include "sperror.h" @@ -14,9 +13,7 @@ Author: 1985 Thomas L. Quarles int -TRAaccept(ckt,inModel) - CKTcircuit *ckt; - GENmodel *inModel; +TRAaccept(CKTcircuit *ckt, GENmodel *inModel) { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; diff --git a/src/spicelib/devices/tra/traacld.c b/src/spicelib/devices/tra/traacld.c index db96a1ab7..61b0be26c 100644 --- a/src/spicelib/devices/tra/traacld.c +++ b/src/spicelib/devices/tra/traacld.c @@ -4,16 +4,13 @@ Author: 1985 Thomas L. Quarles **********/ #include "ngspice.h" -#include #include "cktdefs.h" #include "tradefs.h" #include "sperror.h" #include "suffix.h" int -TRAacLoad(inModel,ckt) - GENmodel *inModel; - CKTcircuit *ckt; +TRAacLoad(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ diff --git a/src/spicelib/devices/tra/traask.c b/src/spicelib/devices/tra/traask.c index 707fbab2d..71e915370 100644 --- a/src/spicelib/devices/tra/traask.c +++ b/src/spicelib/devices/tra/traask.c @@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "cktdefs.h" #include "devdefs.h" #include "ifsim.h" @@ -22,12 +21,7 @@ Author: 1987 Thomas L. Quarles /* ARGSUSED */ int -TRAask(ckt,inst,which,value,select) - CKTcircuit *ckt; - GENinstance *inst; - int which; - IFvalue *value; - IFvalue *select; +TRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { TRAinstance *here = (TRAinstance *)inst; int temp; diff --git a/src/spicelib/devices/tra/tradel.c b/src/spicelib/devices/tra/tradel.c index 8dc4b61bf..e8b31ea66 100644 --- a/src/spicelib/devices/tra/tradel.c +++ b/src/spicelib/devices/tra/tradel.c @@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "tradefs.h" #include "sperror.h" #include "suffix.h" int -TRAdelete(inModel,name,kill) - GENmodel *inModel; - IFuid name; - GENinstance **kill; +TRAdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { TRAinstance **fast = (TRAinstance **)kill; TRAmodel *model = (TRAmodel *)inModel; diff --git a/src/spicelib/devices/tra/tradest.c b/src/spicelib/devices/tra/tradest.c index 210c313f3..82ff019a5 100644 --- a/src/spicelib/devices/tra/tradest.c +++ b/src/spicelib/devices/tra/tradest.c @@ -6,14 +6,12 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "tradefs.h" #include "suffix.h" void -TRAdestroy(inModel) - GENmodel **inModel; +TRAdestroy(GENmodel **inModel) { TRAmodel **model = (TRAmodel **)inModel; TRAinstance *here; diff --git a/src/spicelib/devices/tra/traext.h b/src/spicelib/devices/tra/traext.h index 11faa7911..95a1d2b25 100644 --- a/src/spicelib/devices/tra/traext.h +++ b/src/spicelib/devices/tra/traext.h @@ -3,7 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ -#ifdef __STDC__ extern int TRAacLoad(GENmodel*,CKTcircuit*); extern int TRAaccept(CKTcircuit*,GENmodel*); extern int TRAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); @@ -17,18 +16,3 @@ extern int TRAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int TRAunsetup(GENmodel*,CKTcircuit*); extern int TRAtemp(GENmodel*,CKTcircuit*); extern int TRAtrunc(GENmodel*,CKTcircuit*,double*); -#else /* stdc */ -extern int TRAacLoad(); -extern int TRAaccept(); -extern int TRAask(); -extern int TRAdelete(); -extern void TRAdestroy(); -extern int TRAload(); -extern int TRAmAsk(); -extern int TRAmDelete(); -extern int TRAparam(); -extern int TRAsetup(); -extern int TRAunsetup(); -extern int TRAtemp(); -extern int TRAtrunc(); -#endif /* stdc */ diff --git a/src/spicelib/devices/tra/traload.c b/src/spicelib/devices/tra/traload.c index 4b4bbb569..d19967e95 100644 --- a/src/spicelib/devices/tra/traload.c +++ b/src/spicelib/devices/tra/traload.c @@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "cktdefs.h" #include "tradefs.h" #include "trandefs.h" @@ -16,9 +15,7 @@ Author: 1985 Thomas L. Quarles /*ARGSUSED*/ int -TRAload(inModel,ckt) - GENmodel *inModel; - CKTcircuit *ckt; +TRAload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ diff --git a/src/spicelib/devices/tra/tramdel.c b/src/spicelib/devices/tra/tramdel.c index 01e00c8b7..f092317c5 100644 --- a/src/spicelib/devices/tra/tramdel.c +++ b/src/spicelib/devices/tra/tramdel.c @@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "tradefs.h" #include "sperror.h" #include "suffix.h" int -TRAmDelete(inModel,modname,kill) - GENmodel **inModel; - IFuid modname; - GENmodel *kill; +TRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { TRAmodel **model = (TRAmodel **)inModel; TRAmodel *modfast = (TRAmodel *)kill; diff --git a/src/spicelib/devices/tra/traparam.c b/src/spicelib/devices/tra/traparam.c index 2790336fa..af11358ee 100644 --- a/src/spicelib/devices/tra/traparam.c +++ b/src/spicelib/devices/tra/traparam.c @@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "tradefs.h" #include "ifsim.h" #include "sperror.h" @@ -15,11 +14,7 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED */ int -TRAparam(param,value,inst,select) - int param; - IFvalue *value; - GENinstance *inst; - IFvalue *select; +TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { TRAinstance *here = (TRAinstance *)inst; switch(param) { @@ -67,10 +62,13 @@ TRAparam(param,value,inst,select) switch(value->v.numValue){ case 4: here->TRAinitCur2 = *(value->v.vec.rVec+3); + break; case 3: here->TRAinitVolt2 = *(value->v.vec.rVec+2); + break; case 2: here->TRAinitCur1 = *(value->v.vec.rVec+1); + break; case 1: here->TRAinitVolt1 = *(value->v.vec.rVec); break; diff --git a/src/spicelib/devices/tra/trasetup.c b/src/spicelib/devices/tra/trasetup.c index bf8354570..4330d7c01 100644 --- a/src/spicelib/devices/tra/trasetup.c +++ b/src/spicelib/devices/tra/trasetup.c @@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "smpdefs.h" #include "cktdefs.h" #include "tradefs.h" @@ -16,11 +15,7 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED */ int -TRAsetup(matrix,inModel,ckt,state) - SMPmatrix *matrix; - GENmodel *inModel; - CKTcircuit *ckt; - int *state; +TRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* load the transmission line structure with those pointers needed later * for fast matrix loading */ @@ -118,9 +113,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ } int -TRAunsetup(inModel,ckt) - GENmodel *inModel; - CKTcircuit *ckt; +TRAunsetup(GENmodel *inModel, CKTcircuit *ckt) { TRAmodel *model; TRAinstance *here; diff --git a/src/spicelib/devices/tra/tratemp.c b/src/spicelib/devices/tra/tratemp.c index 64f178844..051e24c1b 100644 --- a/src/spicelib/devices/tra/tratemp.c +++ b/src/spicelib/devices/tra/tratemp.c @@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "smpdefs.h" #include "cktdefs.h" #include "tradefs.h" @@ -16,9 +15,7 @@ Author: 1985 Thomas L. Quarles /* ARGSUSED */ int -TRAtemp(inModel,ckt) - GENmodel *inModel; - CKTcircuit *ckt; +TRAtemp(GENmodel *inModel, CKTcircuit *ckt) /* * pre-process parameters for later use */ diff --git a/src/spicelib/devices/tra/tratrunc.c b/src/spicelib/devices/tra/tratrunc.c index 78eb1997d..0886934fa 100644 --- a/src/spicelib/devices/tra/tratrunc.c +++ b/src/spicelib/devices/tra/tratrunc.c @@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles */ #include "ngspice.h" -#include #include "cktdefs.h" #include "tradefs.h" #include "sperror.h" @@ -14,10 +13,7 @@ Author: 1985 Thomas L. Quarles int -TRAtrunc(inModel,ckt,timeStep) - GENmodel *inModel; - CKTcircuit *ckt; - double *timeStep; +TRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { TRAmodel *model = (TRAmodel *)inModel; diff --git a/src/spicelib/devices/urc/urc.c b/src/spicelib/devices/urc/urc.c index 682150f58..2f8dc3244 100644 --- a/src/spicelib/devices/urc/urc.c +++ b/src/spicelib/devices/urc/urc.c @@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles **********/ #include "ngspice.h" -#include #include "devdefs.h" #include "urcdefs.h" #include "suffix.h" diff --git a/src/spicelib/devices/urc/urcask.c b/src/spicelib/devices/urc/urcask.c index d36bf2d5e..4ea479ca8 100644 --- a/src/spicelib/devices/urc/urcask.c +++ b/src/spicelib/devices/urc/urcask.c @@ -12,7 +12,6 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "cktdefs.h" #include "devdefs.h" #include "ifsim.h" @@ -23,12 +22,7 @@ Author: 1987 Thomas L. Quarles /* ARGSUSED */ int -URCask(ckt,inst,which,value,select) - CKTcircuit *ckt; - GENinstance *inst; - int which; - IFvalue *value; - IFvalue *select; +URCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { URCinstance *here = (URCinstance *)inst; switch(which) { diff --git a/src/spicelib/devices/urc/urcdel.c b/src/spicelib/devices/urc/urcdel.c index 2a80a64b9..d8eeee563 100644 --- a/src/spicelib/devices/urc/urcdel.c +++ b/src/spicelib/devices/urc/urcdel.c @@ -6,17 +6,13 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "urcdefs.h" #include "sperror.h" #include "suffix.h" int -URCdelete(inModel,name,inst) - GENmodel *inModel; - IFuid name; - GENinstance **inst; +URCdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { URCmodel *model = (URCmodel *)inModel; URCinstance **fast = (URCinstance**)inst; diff --git a/src/spicelib/devices/urc/urcdest.c b/src/spicelib/devices/urc/urcdest.c index 0f4849e65..6017ea112 100644 --- a/src/spicelib/devices/urc/urcdest.c +++ b/src/spicelib/devices/urc/urcdest.c @@ -7,14 +7,12 @@ Author: 1987 Thomas L. Quarles #include "ngspice.h" -#include #include "urcdefs.h" #include "suffix.h" void -URCdestroy(inModel) - GENmodel **inModel; +URCdestroy(GENmodel **inModel) { URCmodel **model = (URCmodel **)inModel; URCinstance *here; diff --git a/src/spicelib/devices/urc/urcmask.c b/src/spicelib/devices/urc/urcmask.c index 522705a28..9fc4f2352 100644 --- a/src/spicelib/devices/urc/urcmask.c +++ b/src/spicelib/devices/urc/urcmask.c @@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "cktdefs.h" #include "devdefs.h" #include "ifsim.h" @@ -22,11 +21,7 @@ Author: 1987 Thomas L. Quarles /* ARGSUSED */ int -URCmAsk(ckt,inst,which,value) - CKTcircuit *ckt; - GENmodel *inst; - int which; - IFvalue *value; +URCmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { URCmodel *here = (URCmodel *)inst; switch(which) { diff --git a/src/spicelib/devices/urc/urcmdel.c b/src/spicelib/devices/urc/urcmdel.c index 7e9d8bf1a..7639364fd 100644 --- a/src/spicelib/devices/urc/urcmdel.c +++ b/src/spicelib/devices/urc/urcmdel.c @@ -6,17 +6,13 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "urcdefs.h" #include "sperror.h" #include "suffix.h" int -URCmDelete(inModel,modname,kill) - GENmodel **inModel; - IFuid modname; - GENmodel *kill; +URCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { URCmodel **model = (URCmodel**)inModel; URCmodel *modfast = (URCmodel *)kill; diff --git a/src/spicelib/devices/urc/urcmpar.c b/src/spicelib/devices/urc/urcmpar.c index b7471f4f8..d64649c29 100644 --- a/src/spicelib/devices/urc/urcmpar.c +++ b/src/spicelib/devices/urc/urcmpar.c @@ -6,7 +6,6 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "urcdefs.h" #include "ifsim.h" #include "sperror.h" @@ -14,10 +13,7 @@ Author: 1987 Thomas L. Quarles int -URCmParam(param,value,inModel) - int param; - IFvalue *value; - GENmodel *inModel; +URCmParam(int param, IFvalue *value, GENmodel *inModel) { URCmodel *model = (URCmodel *)inModel; switch(param) { diff --git a/src/spicelib/devices/urc/urcparam.c b/src/spicelib/devices/urc/urcparam.c index 5e6d81f04..18029c592 100644 --- a/src/spicelib/devices/urc/urcparam.c +++ b/src/spicelib/devices/urc/urcparam.c @@ -6,7 +6,6 @@ Author: 1987 Thomas L. Quarles */ #include "ngspice.h" -#include #include "ifsim.h" #include "urcdefs.h" #include "sperror.h" @@ -15,11 +14,7 @@ Author: 1987 Thomas L. Quarles /* ARGSUSED */ int -URCparam(param,value,inst,select) - int param; - IFvalue *value; - GENinstance *inst; - IFvalue *select; +URCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { URCinstance *here = (URCinstance *)inst; switch(param) { diff --git a/src/spicelib/devices/urc/urcsetup.c b/src/spicelib/devices/urc/urcsetup.c index eb73b490b..d0f37289a 100644 --- a/src/spicelib/devices/urc/urcsetup.c +++ b/src/spicelib/devices/urc/urcsetup.c @@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles **********/ #include "ngspice.h" -#include #include "ifsim.h" #include "urcdefs.h" #include "cktdefs.h" @@ -14,11 +13,7 @@ Author: 1987 Thomas L. Quarles /* ARGSUSED */ int -URCsetup(matrix,inModel,ckt,state) - SMPmatrix *matrix; - GENmodel *inModel; - CKTcircuit *ckt; - int *state; +URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* create the resistors/capacitors used to model the URC */ { @@ -280,9 +275,7 @@ URCsetup(matrix,inModel,ckt,state) } int -URCunsetup(inModel,ckt) - GENmodel *inModel; - CKTcircuit *ckt; +URCunsetup(GENmodel *inModel, CKTcircuit *ckt) { IFuid varUid; int error;