Code cleanup.

This commit is contained in:
pnenzi 2004-01-20 13:05:10 +00:00
parent a03bd669f9
commit 7d91b8bbd2
74 changed files with 68 additions and 422 deletions

View File

@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
**********/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "devdefs.h"
#include "ccvsdefs.h"

View File

@ -9,7 +9,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -19,12 +18,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
CCVSask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
CCVSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
CCVSinstance *here = (CCVSinstance*)inst;
double vr;

View File

@ -6,18 +6,13 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "ccvsdefs.h"
#include "sperror.h"
#include "suffix.h"
int
CCVSdelete(inModel,name,kill)
GENmodel *inModel;
IFuid name;
GENinstance **kill;
CCVSdelete(GENmodel *inModel, IFuid name, GENinstance **kill)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance **fast = (CCVSinstance**)kill;

View File

@ -6,14 +6,12 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "ccvsdefs.h"
#include "suffix.h"
void
CCVSdestroy(inModel)
GENmodel **inModel;
CCVSdestroy(GENmodel **inModel)
{
CCVSmodel **model = (CCVSmodel**)inModel;
CCVSinstance *here;

View File

@ -3,7 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
**********/
#ifdef __STDC__
extern int CCVSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int CCVSdelete(GENmodel*,IFuid,GENinstance**);
extern void CCVSdestroy(GENmodel**);
@ -18,20 +17,3 @@ extern void CCVSsPrint(GENmodel*,CKTcircuit*);
extern int CCVSsSetup(SENstruct*,GENmodel*);
extern int CCVSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int CCVSunsetup(GENmodel*,CKTcircuit*);
#else /* stdc */
extern int CCVSask();
extern int CCVSdelete();
extern void CCVSdestroy();
extern int CCVSfindBr();
extern int CCVSload();
extern int CCVSmDelete();
extern int CCVSparam();
extern int CCVSpzLoad();
extern int CCVSsAcLoad();
extern int CCVSsLoad();
extern void CCVSsPrint();
extern int CCVSsSetup();
extern int CCVSsetup();
extern int CCVSunsetup();
#endif /* stdc */

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -14,10 +13,7 @@ Author: 1985 Thomas L. Quarles
int
CCVSfindBr(ckt,inModel,name)
CKTcircuit *ckt;
GENmodel *inModel;
IFuid name;
CCVSfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance *here;

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -15,10 +14,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
CCVSload(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CCVSload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current voltage value into the
* sparse matrix previously provided

View File

@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "ccvsdefs.h"
#include "sperror.h"
#include "suffix.h"
int
CCVSmDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
CCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
CCVSmodel **model = (CCVSmodel**)inModel;
CCVSmodel *modfast = (CCVSmodel*)kill;

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -15,11 +14,7 @@ Author: 1985 Thomas L. Quarles
/* ARGSUSED */
int
CCVSparam(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
CCVSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
CCVSinstance *here = (CCVSinstance*)inst;
switch(param) {

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "complex.h"
#include "sperror.h"
@ -16,11 +15,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
CCVSpzLoad(inModel,ckt,s)
GENmodel *inModel;
CKTcircuit *ckt;
SPcomplex *s;
CCVSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* actually load the current voltage value into the
* sparse matrix previously provided

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -18,10 +17,7 @@ Author: 1985 Thomas L. Quarles
int
CCVSsAcLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CCVSsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance *here;

View File

@ -8,7 +8,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -16,11 +15,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
CCVSsetup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
CCVSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance *here;
@ -66,9 +61,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
}
int
CCVSunsetup(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CCVSunsetup(GENmodel *inModel, CKTcircuit *ckt)
{
CCVSmodel *model;
CCVSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -18,9 +17,7 @@ Author: 1985 Thomas L. Quarles
int
CCVSsLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CCVSsLoad(GENmodel *inModel, CKTcircuit *ckt)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -18,9 +17,7 @@ Author: 1985 Thomas L. Quarles
void
CCVSsPrint(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CCVSsPrint(GENmodel *inModel, CKTcircuit *ckt)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ccvsdefs.h"
#include "sperror.h"
@ -18,10 +17,7 @@ Author: 1985 Thomas L. Quarles
int
CCVSsSetup(info,inModel)
SENstruct *info;
GENmodel *inModel;
CCVSsSetup(SENstruct *info, GENmodel *inModel)
{
CCVSmodel *model = (CCVSmodel*)inModel;
CCVSinstance *here;

View File

@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
**********/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "devdefs.h"
#include "cswdefs.h"

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "cswdefs.h"
#include "sperror.h"
@ -14,10 +13,7 @@ Author: 1985 Gordon Jacobs
int
CSWacLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CSWacLoad(GENmodel *inModel, CKTcircuit *ckt)
/* load the current values into the
* sparse matrix previously provided

View File

@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -22,12 +21,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
CSWask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
CSWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
CSWinstance *here = (CSWinstance*)inst;
static char *msg = "Current and power not available in ac analysis";

View File

@ -6,17 +6,13 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cswdefs.h"
#include "sperror.h"
#include "suffix.h"
int
CSWdelete(inModel,name,inst)
GENmodel *inModel;
IFuid name;
GENinstance **inst;
CSWdelete(GENmodel *inModel, IFuid name, GENinstance **inst)
{
CSWmodel *model = (CSWmodel*)inModel;

View File

@ -6,14 +6,12 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cswdefs.h"
#include "suffix.h"
void
CSWdestroy(inModel)
GENmodel **inModel;
CSWdestroy(GENmodel **inModel)
{
CSWmodel **model = (CSWmodel**)inModel;
CSWinstance *here;

View File

@ -4,7 +4,6 @@ Author: 1985 Gordon M. Jacobs
Modified: 2000 AlansFixes
**********/
#ifdef __STDC__
extern int CSWask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int CSWacLoad(GENmodel*,CKTcircuit*);
extern int CSWdelete(GENmodel*,IFuid,GENinstance**);
@ -17,22 +16,4 @@ extern int CSWparam(int,IFvalue*,GENinstance*,IFvalue*);
extern int CSWpzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
extern int CSWsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int CSWnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int CSWtrunc(GENmodel*,CKTcircuit*,double*);
#else /* stdc */
extern int CSWask();
extern int CSWacLoad();
extern int CSWdelete();
extern void CSWdestroy();
extern int CSWload();
extern int CSWmAsk();
extern int CSWmDelete();
extern int CSWmParam();
extern int CSWparam();
extern int CSWpzLoad();
extern int CSWsetup();
extern int CSWnoise();
extern int CSWtrunc();
#endif /* stdc */

View File

@ -5,7 +5,6 @@ Modified: 2001 Jon Engelbert
**********/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "cswdefs.h"
#include "trandefs.h"
@ -13,9 +12,7 @@ Modified: 2001 Jon Engelbert
#include "suffix.h"
int
CSWload(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
CSWload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current values into the
* sparse matrix previously provided

View File

@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -22,11 +21,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
CSWmAsk(ckt,inst,which,value)
CKTcircuit *ckt;
GENmodel *inst;
int which;
IFvalue *value;
CSWmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
{
CSWmodel *here = (CSWmodel*)inst;
switch(which) {

View File

@ -6,17 +6,13 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cswdefs.h"
#include "sperror.h"
#include "suffix.h"
int
CSWmDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
CSWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
CSWmodel **model = (CSWmodel**)inModel;
CSWmodel *modfast = (CSWmodel*)kill;

View File

@ -7,7 +7,6 @@ Modified: 2001 Jon Englebert
*/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "cswdefs.h"
#include "sperror.h"
@ -15,10 +14,7 @@ Modified: 2001 Jon Englebert
int
CSWmParam(param,value,inModel)
int param;
IFvalue *value;
GENmodel *inModel;
CSWmParam(int param, IFvalue *value, GENmodel *inModel)
{
CSWmodel *model = (CSWmodel*)inModel;
switch(param) {

View File

@ -4,7 +4,6 @@ Author: 1987 Gary W. Ng
**********/
#include "ngspice.h"
#include <stdio.h>
#include "cswdefs.h"
#include "cktdefs.h"
#include "iferrmsg.h"
@ -25,13 +24,7 @@ extern void NevalSrc();
extern double Nintegrate();
int
CSWnoise (mode, operation, genmodel, ckt, data, OnDens)
int mode;
int operation;
GENmodel *genmodel;
CKTcircuit *ckt;
Ndata *data;
double *OnDens;
CSWnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens)
{
CSWmodel *firstModel = (CSWmodel *) genmodel;
CSWmodel *model;

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cswdefs.h"
#include "ifsim.h"
#include "sperror.h"
@ -15,11 +14,7 @@ Author: 1985 Gordon Jacobs
/* ARGSUSED */
int
CSWparam(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
CSWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
CSWinstance *here = (CSWinstance*)inst;
switch(param) {

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "cswdefs.h"
#include "sperror.h"
@ -16,10 +15,7 @@ Author: 1985 Gordon Jacobs
/* ARGSUSED */
int
CSWpzLoad(inModel,ckt,s)
GENmodel *inModel;
CKTcircuit *ckt;
SPcomplex *s;
CSWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* load the current values into the
* sparse matrix previously provided

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "cswdefs.h"
#include "sperror.h"
@ -14,11 +13,7 @@ Author: 1985 Gordon Jacobs
int
CSWsetup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
CSWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the switch conductance with those pointers needed later
* for fast matrix loading
*/

View File

@ -7,7 +7,6 @@ Modified: 2000 AlansFixes
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "sperror.h"
#include "suffix.h"

View File

@ -4,7 +4,6 @@ Author: 1987
**********/
#include "ngspice.h"
#include <stdio.h>
#include "devdefs.h"
#include "ifsim.h"
#include "swdefs.h"

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "swdefs.h"
#include "sperror.h"
@ -14,9 +13,7 @@ Author: 1985 Gordon Jacobs
int
SWacLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
SWacLoad(GENmodel *inModel, CKTcircuit *ckt)
/* load the current values into the
* sparse matrix previously provided
* during AC analysis.

View File

@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -22,12 +21,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
SWask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
SWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
SWinstance *here = (SWinstance *)inst;
static char *msg = "Current and power not available in ac analysis";

View File

@ -6,17 +6,13 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "swdefs.h"
#include "sperror.h"
#include "suffix.h"
int
SWdelete(inModel,name,inst)
GENmodel *inModel;
IFuid name;
GENinstance **inst;
SWdelete(GENmodel *inModel, IFuid name, GENinstance **inst)
{
SWmodel *model = (SWmodel *)inModel;
SWinstance **fast = (SWinstance **)inst;

View File

@ -6,14 +6,12 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "swdefs.h"
#include "suffix.h"
void
SWdestroy(inModel)
GENmodel **inModel;
SWdestroy(GENmodel **inModel)
{
SWmodel **model = (SWmodel**)inModel;
SWinstance *here;

View File

@ -4,7 +4,6 @@ Author: 1985 Gordon M. Jacobs
Modified: 2000 AlansFixes
**********/
#ifdef __STDC__
extern int SWacLoad(GENmodel*,CKTcircuit*);
extern int SWask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int SWdelete(GENmodel*,IFuid,GENinstance**);
@ -18,19 +17,3 @@ extern int SWpzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
extern int SWsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int SWnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int SWtrunc(GENmodel*,CKTcircuit*,double*);
#else /* stdc */
extern int SWacLoad();
extern int SWask();
extern int SWdelete();
extern void SWdestroy();
extern int SWload();
extern int SWmAsk();
extern int SWmDelete();
extern int SWmParam();
extern int SWparam();
extern int SWpzLoad();
extern int SWsetup();
extern int SWnoise();
extern int SWtrunc();
#endif /* stdc */

View File

@ -5,7 +5,6 @@ Modified: 2001 Jon Engelbert
**********/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "swdefs.h"
#include "trandefs.h"
@ -13,9 +12,7 @@ Modified: 2001 Jon Engelbert
#include "suffix.h"
int
SWload(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
SWload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current values into the
* sparse matrix previously provided
*/

View File

@ -11,7 +11,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -22,11 +21,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
SWmAsk(ckt,inModel,which,value)
CKTcircuit *ckt;
GENmodel *inModel;
int which;
IFvalue *value;
SWmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value)
{
SWmodel *model = (SWmodel *)inModel;
switch(which) {

View File

@ -6,17 +6,13 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "swdefs.h"
#include "sperror.h"
#include "suffix.h"
int
SWmDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
SWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
SWmodel **model = (SWmodel **)inModel;
SWmodel *modfast = (SWmodel *)kill;

View File

@ -7,7 +7,6 @@ Modified: 2001 Jon Engelbert
*/
#include "ngspice.h"
#include <stdio.h>
#include "swdefs.h"
#include "ifsim.h"
#include "sperror.h"
@ -15,10 +14,7 @@ Modified: 2001 Jon Engelbert
int
SWmParam(param,value,inModel)
int param;
IFvalue *value;
GENmodel *inModel;
SWmParam(int param, IFvalue *value, GENmodel *inModel)
{
SWmodel *model = (SWmodel *)inModel;
switch(param) {

View File

@ -4,7 +4,6 @@ Author: 1987 Gary W. Ng
**********/
#include "ngspice.h"
#include <stdio.h>
#include "swdefs.h"
#include "cktdefs.h"
#include "iferrmsg.h"
@ -25,13 +24,7 @@ extern void NevalSrc();
extern double Nintegrate();
int
SWnoise (mode, operation, genmodel, ckt, data, OnDens)
int mode;
int operation;
GENmodel *genmodel;
CKTcircuit *ckt;
Ndata *data;
double *OnDens;
SWnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens)
{
SWmodel *firstModel = (SWmodel *) genmodel;
SWmodel *model;

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "swdefs.h"
#include "ifsim.h"
#include "sperror.h"
@ -15,11 +14,7 @@ Author: 1985 Gordon Jacobs
/*ARGSUSED*/
int
SWparam(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
SWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
SWinstance *here = (SWinstance *)inst;
switch(param) {

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "swdefs.h"
#include "sperror.h"
@ -16,10 +15,7 @@ Author: 1985 Gordon Jacobs
/* ARGSUSED */
int
SWpzLoad(inModel,ckt,s)
GENmodel *inModel;
CKTcircuit *ckt;
SPcomplex *s;
SWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* load the current values into the
* sparse matrix previously provided
* during AC analysis.

View File

@ -6,7 +6,6 @@ Author: 1985 Gordon Jacobs
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "swdefs.h"
@ -15,11 +14,7 @@ Author: 1985 Gordon Jacobs
int
SWsetup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
SWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the switch conductance with those pointers needed later
* for fast matrix loading
*/

View File

@ -7,22 +7,16 @@ Modified: 2000 AlansFixes
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "sperror.h"
#include "suffix.h"
#include "swdefs.h"
int
SWtrunc(inModel,ckt,timeStep)
GENmodel *inModel;
register CKTcircuit *ckt;
register double *timeStep;
SWtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
register SWmodel *model = (SWmodel*)inModel;
register SWinstance *here;
SWmodel *model = (SWmodel*)inModel;
SWinstance *here;
double lastChange, maxChange, maxStep, ref;
for( ; model!= NULL; model = model->SWnextModel) {

View File

@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
**********/
#include "ngspice.h"
#include <stdio.h>
#include "devdefs.h"
#include "ifsim.h"
#include "vccsdefs.h"

View File

@ -9,7 +9,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -19,12 +18,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
VCCSask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
VCCSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
VCCSinstance *here = (VCCSinstance*)inst;
double vr;

View File

@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "vccsdefs.h"
#include "sperror.h"
#include "suffix.h"
int
VCCSdelete(inModel,name,inst)
GENmodel *inModel;
IFuid name;
GENinstance **inst;
VCCSdelete(GENmodel *inModel, IFuid name, GENinstance **inst)
{
VCCSmodel *model = (VCCSmodel *)inModel;
VCCSinstance **fast = (VCCSinstance**)inst;

View File

@ -6,14 +6,12 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "vccsdefs.h"
#include "suffix.h"
void
VCCSdestroy(inModel)
GENmodel **inModel;
VCCSdestroy(GENmodel **inModel)
{
VCCSmodel **model = (VCCSmodel**)inModel;
VCCSinstance *here;

View File

@ -3,7 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
**********/
#ifdef __STDC__
extern int VCCSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int VCCSdelete(GENmodel*,IFuid,GENinstance**);
extern void VCCSdestroy(GENmodel**);
@ -16,17 +15,3 @@ extern int VCCSsLoad(GENmodel*,CKTcircuit*);
extern int VCCSsSetup(SENstruct*,GENmodel*);
extern void VCCSsPrint(GENmodel*,CKTcircuit*);
extern int VCCSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
#else /* stdc */
extern int VCCSask();
extern int VCCSdelete();
extern void VCCSdestroy();
extern int VCCSload();
extern int VCCSmDelete();
extern int VCCSparam();
extern int VCCSpzLoad();
extern int VCCSsAcLoad();
extern int VCCSsLoad();
extern int VCCSsSetup();
extern void VCCSsPrint();
extern int VCCSsetup();
#endif /* stdc */

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "vccsdefs.h"
#include "sperror.h"
@ -15,9 +14,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
VCCSload(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCCSload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current values into the
* sparse matrix previously provided
*/

View File

@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "vccsdefs.h"
#include "sperror.h"
#include "suffix.h"
int
VCCSmDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
VCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
VCCSmodel **model = (VCCSmodel **)inModel;
VCCSmodel *modfast = (VCCSmodel *)kill;

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "vccsdefs.h"
#include "sperror.h"
@ -15,11 +14,7 @@ Author: 1985 Thomas L. Quarles
/* ARGSUSED */
int
VCCSparam(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
VCCSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
VCCSinstance *here = (VCCSinstance *)inst;
switch(param) {

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "complex.h"
#include "sperror.h"
@ -16,10 +15,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
VCCSpzLoad(inModel,ckt,s)
GENmodel *inModel;
CKTcircuit *ckt;
SPcomplex *s;
VCCSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* actually load the current values into the
* sparse matrix previously provided
*/

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vccsdefs.h"
@ -19,9 +18,7 @@ Author: 1985 Thomas L. Quarles
int
VCCSsAcLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCCSsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
{
VCCSmodel *model = (VCCSmodel *)inModel;
VCCSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vccsdefs.h"
@ -20,11 +19,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
VCCSsetup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
VCCSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
{
VCCSmodel *model = (VCCSmodel *)inModel;
VCCSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vccsdefs.h"
@ -19,9 +18,7 @@ Author: 1985 Thomas L. Quarles
int
VCCSsLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCCSsLoad(GENmodel *inModel, CKTcircuit *ckt)
{
VCCSmodel *model = (VCCSmodel *)inModel;
VCCSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vccsdefs.h"
@ -19,9 +18,7 @@ Author: 1985 Thomas L. Quarles
void
VCCSsPrint(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCCSsPrint(GENmodel *inModel, CKTcircuit *ckt)
{
VCCSmodel *model = (VCCSmodel *)inModel;
VCCSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vccsdefs.h"
@ -19,9 +18,7 @@ Author: 1985 Thomas L. Quarles
int
VCCSsSetup(info,inModel)
SENstruct *info;
GENmodel *inModel;
VCCSsSetup(SENstruct *info, GENmodel *inModel)
{
VCCSmodel *model = (VCCSmodel *)inModel;
VCCSinstance *here;

View File

@ -4,7 +4,6 @@ Author: 1987 Thomas L. Quarles
**********/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "devdefs.h"
#include "vcvsdefs.h"

View File

@ -9,7 +9,6 @@ Author: 1987 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "devdefs.h"
#include "ifsim.h"
@ -19,12 +18,7 @@ Author: 1987 Thomas L. Quarles
/* ARGSUSED */
int
VCVSask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
VCVSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
VCVSinstance *here = (VCVSinstance *)inst;
double vr;

View File

@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "vcvsdefs.h"
#include "sperror.h"
#include "suffix.h"
int
VCVSdelete(inModel,name,inst)
GENmodel *inModel;
IFuid name;
GENinstance **inst;
VCVSdelete(GENmodel *inModel, IFuid name, GENinstance **inst)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance **fast = (VCVSinstance**)inst;

View File

@ -6,14 +6,12 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "vcvsdefs.h"
#include "suffix.h"
void
VCVSdestroy(inModel)
GENmodel **inModel;
VCVSdestroy(GENmodel **inModel)
{
VCVSmodel **model = (VCVSmodel **)inModel;
VCVSinstance *here;

View File

@ -3,7 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
**********/
#ifdef __STDC__
extern int VCVSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int VCVSdelete(GENmodel*,IFuid,GENinstance**);
extern void VCVSdestroy(GENmodel**);
@ -18,19 +17,4 @@ extern int VCVSsSetup(SENstruct*,GENmodel*);
extern void VCVSsPrint(GENmodel*,CKTcircuit*);
extern int VCVSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int VCVSunsetup(GENmodel*,CKTcircuit*);
#else /* stdc */
extern int VCVSask();
extern int VCVSdelete();
extern void VCVSdestroy();
extern int VCVSfindBr();
extern int VCVSload();
extern int VCVSmDelete();
extern int VCVSparam();
extern int VCVSpzLoad();
extern int VCVSsAcLoad();
extern int VCVSsLoad();
extern int VCVSsSetup();
extern void VCVSsPrint();
extern int VCVSsetup();
extern int VCVSunsetup();
#endif /* stdc */

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "vcvsdefs.h"
#include "trandefs.h"
@ -15,10 +14,7 @@ Author: 1985 Thomas L. Quarles
int
VCVSfindBr(ckt,inModel,name)
CKTcircuit *ckt;
GENmodel *inModel;
IFuid name;
VCVSfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance *here;

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "vcvsdefs.h"
#include "sperror.h"
@ -15,9 +14,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
VCVSload(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCVSload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current voltage value into the
* sparse matrix previously provided
*/

View File

@ -6,17 +6,13 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "vcvsdefs.h"
#include "sperror.h"
#include "suffix.h"
int
VCVSmDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
VCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
VCVSmodel **model = (VCVSmodel**)inModel;
VCVSmodel *modfast = (VCVSmodel *)kill;

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "ifsim.h"
#include "vcvsdefs.h"
#include "sperror.h"
@ -15,11 +14,7 @@ Author: 1985 Thomas L. Quarles
/* ARGSUSED */
int
VCVSparam(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
VCVSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
VCVSinstance *here = (VCVSinstance *)inst;
switch(param) {

View File

@ -6,7 +6,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "complex.h"
#include "sperror.h"
@ -16,10 +15,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
VCVSpzLoad(inModel,ckt,s)
GENmodel *inModel;
CKTcircuit *ckt;
SPcomplex *s;
VCVSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* actually load the current voltage value into the
* sparse matrix previously provided
*/

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "vcvsdefs.h"
#include "sperror.h"
@ -18,9 +17,7 @@ Author: 1985 Thomas L. Quarles
int
VCVSsAcLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCVSsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance *here;

View File

@ -8,7 +8,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vcvsdefs.h"
@ -17,11 +16,7 @@ Author: 1985 Thomas L. Quarles
/*ARGSUSED*/
int
VCVSsetup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
VCVSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance *here;
@ -59,9 +54,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
}
int
VCVSunsetup(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCVSunsetup(GENmodel *inModel, CKTcircuit *ckt)
{
VCVSmodel *model;
VCVSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "vcvsdefs.h"
#include "sperror.h"
@ -18,9 +17,7 @@ Author: 1985 Thomas L. Quarles
int
VCVSsLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCVSsLoad(GENmodel *inModel, CKTcircuit *ckt)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "vcvsdefs.h"
#include "sperror.h"
@ -18,9 +17,7 @@ Author: 1985 Thomas L. Quarles
void
VCVSsPrint(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
VCVSsPrint(GENmodel *inModel, CKTcircuit *ckt)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance *here;

View File

@ -10,7 +10,6 @@ Author: 1985 Thomas L. Quarles
*/
#include "ngspice.h"
#include <stdio.h>
#include "smpdefs.h"
#include "cktdefs.h"
#include "vcvsdefs.h"
@ -19,9 +18,7 @@ Author: 1985 Thomas L. Quarles
int
VCVSsSetup(info,inModel)
SENstruct *info;
GENmodel *inModel;
VCVSsSetup(SENstruct *info, GENmodel *inModel)
{
VCVSmodel *model = (VCVSmodel *)inModel;
VCVSinstance *here;