hisim2, convert K&R function definitions to ansi style

This commit is contained in:
rlar 2011-05-22 10:09:40 +00:00
parent 40cecd644e
commit 446a346caf
17 changed files with 68 additions and 64 deletions

View File

@ -1,3 +1,7 @@
2011-05-22 Robert Larice
* src/spicelib/devices/hisim2/* :
hisim2, convert K&R function definitions to ansi style
2011-05-22 Robert Larice 2011-05-22 Robert Larice
* src/spicelib/devices/hisim2/hsm2noi.c : * src/spicelib/devices/hisim2/hsm2noi.c :
hisim2, remove #include "fteconst.h" hisim2, remove #include "fteconst.h"

View File

@ -21,9 +21,9 @@
#include "hsm2def.h" #include "hsm2def.h"
int HSM2acLoad(inModel,ckt) int HSM2acLoad(
GENmodel *inModel; GENmodel *inModel,
register CKTcircuit *ckt; register CKTcircuit *ckt)
{ {
register HSM2model *model = (HSM2model*)inModel; register HSM2model *model = (HSM2model*)inModel;
register HSM2instance *here; register HSM2instance *here;

View File

@ -22,12 +22,12 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2ask(ckt,inst,which,value,select) int HSM2ask(
CKTcircuit *ckt; CKTcircuit *ckt,
GENinstance *inst; GENinstance *inst,
int which; int which,
IFvalue *value; IFvalue *value,
IFvalue *select; IFvalue *select)
{ {
HSM2instance *here = (HSM2instance*)inst; HSM2instance *here = (HSM2instance*)inst;

View File

@ -23,9 +23,9 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2convTest(inModel,ckt) int HSM2convTest(
GENmodel *inModel; GENmodel *inModel,
register CKTcircuit *ckt; register CKTcircuit *ckt)
{ {
register HSM2model *model = (HSM2model*)inModel; register HSM2model *model = (HSM2model*)inModel;
register HSM2instance *here; register HSM2instance *here;

View File

@ -20,10 +20,10 @@
#include "gendefs.h" #include "gendefs.h"
#include "suffix.h" #include "suffix.h"
int HSM2delete(inModel,name,inInst) int HSM2delete(
GENmodel *inModel; GENmodel *inModel,
IFuid name; IFuid name,
GENinstance **inInst; GENinstance **inInst)
{ {
HSM2instance **fast = (HSM2instance**)inInst; HSM2instance **fast = (HSM2instance**)inInst;
HSM2model *model = (HSM2model*)inModel; HSM2model *model = (HSM2model*)inModel;

View File

@ -18,8 +18,8 @@
#include "hsm2def.h" #include "hsm2def.h"
#include "suffix.h" #include "suffix.h"
void HSM2destroy(inModel) void HSM2destroy(
GENmodel **inModel; GENmodel **inModel)
{ {
HSM2model **model = (HSM2model**)inModel; HSM2model **model = (HSM2model**)inModel;
HSM2instance *here; HSM2instance *here;

View File

@ -20,9 +20,9 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2getic(inModel,ckt) int HSM2getic(
GENmodel *inModel; GENmodel *inModel,
CKTcircuit *ckt; CKTcircuit *ckt)
{ {
HSM2model *model = (HSM2model*)inModel; HSM2model *model = (HSM2model*)inModel;
HSM2instance *here; HSM2instance *here;

View File

@ -185,9 +185,9 @@ static void ShowPhysVals(here,model,isFirst,vds,vgs,vbs,vgd,vbd,vgb)
} }
} }
int HSM2load(inModel,ckt) int HSM2load(
GENmodel *inModel; GENmodel *inModel,
register CKTcircuit *ckt; register CKTcircuit *ckt)
/* actually load the current value into the /* actually load the current value into the
* sparse matrix previously provided * sparse matrix previously provided
*/ */

View File

@ -22,11 +22,11 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2mAsk(ckt,inst,which,value) int HSM2mAsk(
CKTcircuit *ckt; CKTcircuit *ckt,
GENmodel *inst; GENmodel *inst,
int which; int which,
IFvalue *value; IFvalue *value)
{ {
HSM2model *model = (HSM2model *)inst; HSM2model *model = (HSM2model *)inst;

View File

@ -19,10 +19,10 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2mDelete(inModel,modname,kill) int HSM2mDelete(
GENmodel **inModel; GENmodel **inModel,
IFuid modname; IFuid modname,
GENmodel *kill; GENmodel *kill)
{ {
HSM2model **model = (HSM2model**)inModel; HSM2model **model = (HSM2model**)inModel;
HSM2model *modfast = (HSM2model*)kill; HSM2model *modfast = (HSM2model*)kill;

View File

@ -20,10 +20,10 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2mParam(param,value,inMod) int HSM2mParam(
int param; int param,
IFvalue *value; IFvalue *value,
GENmodel *inMod; GENmodel *inMod)
{ {
HSM2model *mod = (HSM2model*)inMod; HSM2model *mod = (HSM2model*)inMod;
switch (param) { switch (param) {

View File

@ -35,12 +35,12 @@
extern void NevalSrc(); extern void NevalSrc();
extern double Nintegrate(); extern double Nintegrate();
int HSM2noise (mode, operation, inModel, ckt, data, OnDens) int HSM2noise (
int mode, operation; int mode, int operation,
GENmodel *inModel; GENmodel *inModel,
CKTcircuit *ckt; CKTcircuit *ckt,
register Ndata *data; register Ndata *data,
double *OnDens; double *OnDens)
{ {
register HSM2model *model = (HSM2model *)inModel; register HSM2model *model = (HSM2model *)inModel;
register HSM2instance *here; register HSM2instance *here;

View File

@ -20,11 +20,11 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2param(param,value,inst,select) int HSM2param(
int param; int param,
IFvalue *value; IFvalue *value,
GENinstance *inst; GENinstance *inst,
IFvalue *select; IFvalue *select)
{ {
HSM2instance *here = (HSM2instance*)inst; HSM2instance *here = (HSM2instance*)inst;

View File

@ -21,10 +21,10 @@
#include "hsm2def.h" #include "hsm2def.h"
#include "suffix.h" #include "suffix.h"
int HSM2pzLoad(inModel,ckt,s) int HSM2pzLoad(
GENmodel *inModel; GENmodel *inModel,
register CKTcircuit *ckt; register CKTcircuit *ckt,
register SPcomplex *s; register SPcomplex *s)
{ {
register HSM2model *model = (HSM2model*)inModel; register HSM2model *model = (HSM2model*)inModel;
register HSM2instance *here; register HSM2instance *here;

View File

@ -24,11 +24,11 @@
#include "suffix.h" #include "suffix.h"
int HSM2setup(matrix,inModel,ckt,states) int HSM2setup(
register SMPmatrix *matrix; register SMPmatrix *matrix,
register GENmodel *inModel; register GENmodel *inModel,
register CKTcircuit *ckt; register CKTcircuit *ckt,
int *states; int *states)
/* load the HSM2 device structure with those pointers needed later /* load the HSM2 device structure with those pointers needed later
* for fast matrix loading * for fast matrix loading
*/ */

View File

@ -62,9 +62,9 @@
y = ( xmin ) + 0.5 * ( T1 + T2 ) ; \ y = ( xmin ) + 0.5 * ( T1 + T2 ) ; \
} }
int HSM2temp(inModel,ckt) int HSM2temp(
GENmodel *inModel; GENmodel *inModel,
CKTcircuit *ckt; CKTcircuit *ckt)
{ {
register HSM2model *model = (HSM2model *)inModel ; register HSM2model *model = (HSM2model *)inModel ;
register HSM2instance *here ; register HSM2instance *here ;

View File

@ -20,10 +20,10 @@
#include "sperror.h" #include "sperror.h"
#include "suffix.h" #include "suffix.h"
int HSM2trunc(inModel,ckt,timeStep) int HSM2trunc(
GENmodel *inModel; GENmodel *inModel,
register CKTcircuit *ckt; register CKTcircuit *ckt,
double *timeStep; double *timeStep)
{ {
register HSM2model *model = (HSM2model*)inModel; register HSM2model *model = (HSM2model*)inModel;