From 23056573d8fc2ab343caf7106ecde2ac70be76d6 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 28 Apr 2011 15:59:36 +0000 Subject: [PATCH] code cleanup, drop NULL pointer casts --- ChangeLog | 4 + src/ciderlib/input/boundary.c | 4 +- src/ciderlib/input/contact.c | 4 +- src/ciderlib/input/domain.c | 4 +- src/ciderlib/input/doping.c | 4 +- src/ciderlib/input/electrod.c | 4 +- src/ciderlib/input/material.c | 4 +- src/ciderlib/input/mesh.c | 8 +- src/ciderlib/input/method.c | 4 +- src/ciderlib/input/mobility.c | 4 +- src/ciderlib/input/models.c | 4 +- src/ciderlib/input/optionsc.c | 4 +- src/ciderlib/input/output.c | 4 +- src/ciderlib/oned/onesolve.c | 2 +- src/ciderlib/twod/twosolve.c | 2 +- src/frontend/breakp2.c | 2 +- src/frontend/com_ahelp.c | 3 +- src/frontend/com_alias.c | 2 +- src/frontend/com_asciiplot.c | 2 +- src/frontend/com_hardcopy.c | 2 +- src/frontend/com_plot.c | 4 +- src/frontend/com_shell.c | 2 +- src/frontend/control.c | 2 +- src/frontend/define.c | 2 +- src/frontend/evaluate.c | 2 +- src/frontend/inp.c | 14 ++-- src/frontend/nutinp.c | 4 +- src/frontend/nutmegif.c | 2 +- src/frontend/parser/backq.c | 2 +- src/frontend/plotting/graf.c | 4 +- src/frontend/plotting/graphdb.c | 2 +- src/frontend/plotting/plotit.c | 6 +- src/frontend/plotting/x11.c | 6 +- src/frontend/resource.c | 2 +- src/frontend/runcoms.c | 2 +- src/frontend/runcoms2.c | 4 +- src/frontend/shyu.c | 4 +- src/frontend/spiceif.c | 64 +++++++-------- src/frontend/subckt.c | 2 +- src/frontend/vectors.c | 4 +- src/main.c | 4 +- src/maths/ni/niiter.c | 2 +- src/maths/sparse/spfactor.c | 2 +- src/maths/sparse/spsmp.c | 8 +- src/spicelib/analysis/acan.c | 6 +- src/spicelib/analysis/cktclrbk.c | 2 +- src/spicelib/analysis/cktdest.c | 4 +- src/spicelib/analysis/cktgrnd.c | 2 +- src/spicelib/analysis/cktic.c | 4 +- src/spicelib/analysis/cktlnkeq.c | 8 +- src/spicelib/analysis/cktmapn.c | 2 +- src/spicelib/analysis/cktmcrt.c | 2 +- src/spicelib/analysis/cktmknod.c | 4 +- src/spicelib/analysis/cktnames.c | 2 +- src/spicelib/analysis/cktnewn.c | 8 +- src/spicelib/analysis/cktnoise.c | 8 +- src/spicelib/analysis/cktnum2n.c | 2 +- src/spicelib/analysis/cktop.c | 44 +++++----- src/spicelib/analysis/cktpmnam.c | 2 +- src/spicelib/analysis/cktpname.c | 2 +- src/spicelib/analysis/cktsetbk.c | 4 +- src/spicelib/analysis/dcop.c | 2 +- src/spicelib/analysis/dctran.c | 6 +- src/spicelib/analysis/dctrcurv.c | 10 +-- src/spicelib/analysis/distoan.c | 12 +-- src/spicelib/analysis/noisean.c | 8 +- src/spicelib/analysis/pzan.c | 14 ++-- src/spicelib/analysis/tfanal.c | 12 +-- src/spicelib/devices/asrc/asrcset.c | 5 +- src/spicelib/devices/bjt/bjtdest.c | 2 +- src/spicelib/devices/bjt/bjtnoise.c | 8 +- src/spicelib/devices/bjt/bjtsetup.c | 2 +- src/spicelib/devices/bsim1/b1dest.c | 2 +- src/spicelib/devices/bsim1/b1noi.c | 8 +- src/spicelib/devices/bsim1/b1set.c | 2 +- src/spicelib/devices/bsim2/b2dest.c | 2 +- src/spicelib/devices/bsim2/b2noi.c | 8 +- src/spicelib/devices/bsim2/b2set.c | 2 +- src/spicelib/devices/bsim3/b3dest.c | 2 +- src/spicelib/devices/bsim3/b3noi.c | 8 +- src/spicelib/devices/bsim3/b3set.c | 2 +- src/spicelib/devices/bsim3soi/b4soidest.c | 2 +- src/spicelib/devices/bsim3soi/b4soinoi.c | 8 +- src/spicelib/devices/bsim3soi/b4soiset.c | 2 +- .../devices/bsim3soi_dd/b3soidddest.c | 2 +- src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c | 8 +- src/spicelib/devices/bsim3soi_dd/b3soiddset.c | 2 +- .../devices/bsim3soi_fd/b3soifddest.c | 2 +- src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c | 8 +- src/spicelib/devices/bsim3soi_fd/b3soifdset.c | 2 +- .../devices/bsim3soi_pd/b3soipddest.c | 2 +- src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c | 8 +- src/spicelib/devices/bsim3soi_pd/b3soipdset.c | 2 +- src/spicelib/devices/bsim3v0/b3v0dest.c | 2 +- src/spicelib/devices/bsim3v0/b3v0noi.c | 8 +- src/spicelib/devices/bsim3v0/b3v0set.c | 2 +- src/spicelib/devices/bsim3v1/b3v1dest.c | 2 +- src/spicelib/devices/bsim3v1/b3v1noi.c | 8 +- src/spicelib/devices/bsim3v1/b3v1set.c | 2 +- src/spicelib/devices/bsim3v32/b3v32dest.c | 2 +- src/spicelib/devices/bsim3v32/b3v32noi.c | 8 +- src/spicelib/devices/bsim3v32/b3v32set.c | 2 +- src/spicelib/devices/bsim4/b4dest.c | 2 +- src/spicelib/devices/bsim4/b4noi.c | 8 +- src/spicelib/devices/bsim4/b4set.c | 2 +- src/spicelib/devices/bsim4v2/b4v2dest.c | 2 +- src/spicelib/devices/bsim4v2/b4v2noi.c | 8 +- src/spicelib/devices/bsim4v2/b4v2set.c | 2 +- src/spicelib/devices/bsim4v3/b4v3dest.c | 2 +- src/spicelib/devices/bsim4v3/b4v3noi.c | 8 +- src/spicelib/devices/bsim4v3/b4v3set.c | 2 +- src/spicelib/devices/bsim4v4/b4v4dest.c | 2 +- src/spicelib/devices/bsim4v4/b4v4noi.c | 8 +- src/spicelib/devices/bsim4v4/b4v4set.c | 2 +- src/spicelib/devices/bsim4v5/b4v5dest.c | 2 +- src/spicelib/devices/bsim4v5/b4v5noi.c | 8 +- src/spicelib/devices/bsim4v5/b4v5set.c | 2 +- src/spicelib/devices/cap/capdest.c | 2 +- src/spicelib/devices/cap/capsetup.c | 2 +- src/spicelib/devices/cccs/cccsdest.c | 2 +- src/spicelib/devices/cccs/cccsset.c | 2 +- src/spicelib/devices/ccvs/ccvsdest.c | 2 +- src/spicelib/devices/ccvs/ccvsset.c | 2 +- src/spicelib/devices/cktcrte.c | 4 +- src/spicelib/devices/cktfinddev.c | 4 +- src/spicelib/devices/cktinit.c | 8 +- src/spicelib/devices/cpl/cpldest.c | 2 +- src/spicelib/devices/cpl/cplsetup.c | 2 +- src/spicelib/devices/csw/cswdest.c | 2 +- src/spicelib/devices/csw/cswnoise.c | 6 +- src/spicelib/devices/csw/cswsetup.c | 2 +- src/spicelib/devices/dio/diodest.c | 2 +- src/spicelib/devices/dio/dionoise.c | 8 +- src/spicelib/devices/dio/diosetup.c | 2 +- src/spicelib/devices/dio/diotemp.c | 6 +- src/spicelib/devices/hfet1/hfetdest.c | 2 +- src/spicelib/devices/hfet1/hfetsetup.c | 2 +- src/spicelib/devices/hfet2/hfet2dest.c | 2 +- src/spicelib/devices/hfet2/hfet2setup.c | 2 +- src/spicelib/devices/hisim/hsm1dest.c | 2 +- src/spicelib/devices/hisim/hsm1noi.c | 8 +- src/spicelib/devices/hisim/hsm1set.c | 2 +- src/spicelib/devices/ind/inddest.c | 2 +- src/spicelib/devices/ind/indsetup.c | 2 +- src/spicelib/devices/ind/mutdest.c | 2 +- src/spicelib/devices/ind/mutsetup.c | 8 +- src/spicelib/devices/isrc/isrcdest.c | 2 +- src/spicelib/devices/jfet/jfetdest.c | 2 +- src/spicelib/devices/jfet/jfetnoi.c | 8 +- src/spicelib/devices/jfet/jfetset.c | 2 +- src/spicelib/devices/jfet2/jfet2dest.c | 2 +- src/spicelib/devices/jfet2/jfet2noi.c | 8 +- src/spicelib/devices/jfet2/jfet2set.c | 2 +- src/spicelib/devices/ltra/ltraask.c | 2 +- src/spicelib/devices/ltra/ltradest.c | 2 +- src/spicelib/devices/ltra/ltraset.c | 2 +- src/spicelib/devices/ltra/ltratemp.c | 28 +++---- src/spicelib/devices/mes/mesdest.c | 2 +- src/spicelib/devices/mes/mesnoise.c | 8 +- src/spicelib/devices/mes/messetup.c | 2 +- src/spicelib/devices/mesa/mesadest.c | 2 +- src/spicelib/devices/mesa/mesasetup.c | 2 +- src/spicelib/devices/mos1/mos1dest.c | 2 +- src/spicelib/devices/mos1/mos1noi.c | 8 +- src/spicelib/devices/mos1/mos1set.c | 2 +- src/spicelib/devices/mos2/mos2dest.c | 2 +- src/spicelib/devices/mos2/mos2noi.c | 8 +- src/spicelib/devices/mos2/mos2set.c | 2 +- src/spicelib/devices/mos3/mos3dest.c | 2 +- src/spicelib/devices/mos3/mos3noi.c | 8 +- src/spicelib/devices/mos3/mos3set.c | 2 +- src/spicelib/devices/mos6/mos6dest.c | 2 +- src/spicelib/devices/mos6/mos6set.c | 2 +- src/spicelib/devices/mos9/mos9dest.c | 2 +- src/spicelib/devices/mos9/mos9noi.c | 8 +- src/spicelib/devices/mos9/mos9set.c | 2 +- src/spicelib/devices/nbjt/nbjtload.c | 4 +- src/spicelib/devices/nbjt/nbjtset.c | 2 +- src/spicelib/devices/nbjt2/nbt2load.c | 4 +- src/spicelib/devices/nbjt2/nbt2set.c | 2 +- src/spicelib/devices/ndev/ndevdest.c | 2 +- src/spicelib/devices/ndev/ndevset.c | 2 +- src/spicelib/devices/numd/numdload.c | 4 +- src/spicelib/devices/numd/numdset.c | 2 +- src/spicelib/devices/numd2/nud2load.c | 4 +- src/spicelib/devices/numd2/nud2set.c | 2 +- src/spicelib/devices/numos/nummload.c | 4 +- src/spicelib/devices/numos/nummset.c | 2 +- src/spicelib/devices/res/resdest.c | 2 +- src/spicelib/devices/res/resnoise.c | 8 +- src/spicelib/devices/res/ressetup.c | 2 +- src/spicelib/devices/soi3/soi3dest.c | 2 +- src/spicelib/devices/soi3/soi3nois.c | 12 +-- src/spicelib/devices/soi3/soi3set.c | 2 +- src/spicelib/devices/sw/swdest.c | 2 +- src/spicelib/devices/sw/swnoise.c | 6 +- src/spicelib/devices/sw/swsetup.c | 2 +- src/spicelib/devices/tra/tradest.c | 2 +- src/spicelib/devices/tra/trasetup.c | 2 +- src/spicelib/devices/txl/txldest.c | 2 +- src/spicelib/devices/txl/txlsetup.c | 2 +- src/spicelib/devices/urc/urcdest.c | 2 +- src/spicelib/devices/urc/urcsetup.c | 6 +- src/spicelib/devices/vbic/vbicdest.c | 2 +- src/spicelib/devices/vbic/vbicnoise.c | 10 +-- src/spicelib/devices/vbic/vbicsetup.c | 2 +- src/spicelib/devices/vccs/vccsdest.c | 2 +- src/spicelib/devices/vccs/vccsset.c | 2 +- src/spicelib/devices/vcvs/vcvsdest.c | 2 +- src/spicelib/devices/vcvs/vcvsset.c | 2 +- src/spicelib/devices/vsrc/vsrcdest.c | 2 +- src/spicelib/devices/vsrc/vsrcpzs.c | 2 +- src/spicelib/devices/vsrc/vsrcset.c | 2 +- src/spicelib/parser/inp2b.c | 2 +- src/spicelib/parser/inp2c.c | 6 +- src/spicelib/parser/inp2d.c | 2 +- src/spicelib/parser/inp2dot.c | 3 +- src/spicelib/parser/inp2e.c | 2 +- src/spicelib/parser/inp2f.c | 2 +- src/spicelib/parser/inp2g.c | 2 +- src/spicelib/parser/inp2h.c | 2 +- src/spicelib/parser/inp2i.c | 2 +- src/spicelib/parser/inp2j.c | 4 +- src/spicelib/parser/inp2k.c | 2 +- src/spicelib/parser/inp2l.c | 6 +- src/spicelib/parser/inp2m.c | 10 +-- src/spicelib/parser/inp2n.c | 2 +- src/spicelib/parser/inp2o.c | 2 +- src/spicelib/parser/inp2p.c | 4 +- src/spicelib/parser/inp2q.c | 4 +- src/spicelib/parser/inp2r.c | 6 +- src/spicelib/parser/inp2s.c | 2 +- src/spicelib/parser/inp2t.c | 2 +- src/spicelib/parser/inp2u.c | 2 +- src/spicelib/parser/inp2v.c | 2 +- src/spicelib/parser/inp2w.c | 2 +- src/spicelib/parser/inp2y.c | 8 +- src/spicelib/parser/inp2z.c | 4 +- src/spicelib/parser/inpaname.c | 4 +- src/spicelib/parser/inpapnam.c | 2 +- src/spicelib/parser/inpdomod.c | 2 +- src/spicelib/parser/inpdoopt.c | 2 +- src/spicelib/parser/inpdpar.c | 2 +- src/spicelib/parser/inperrc.c | 4 +- src/spicelib/parser/inpfindl.c | 4 +- src/spicelib/parser/inpfindv.c | 4 +- src/spicelib/parser/inpgmod.c | 12 +-- src/spicelib/parser/inpgval.c | 4 +- src/spicelib/parser/inpkmods.c | 5 +- src/spicelib/parser/inplist.c | 8 +- src/spicelib/parser/inplkmod.c | 2 +- src/spicelib/parser/inpmkmod.c | 4 +- src/spicelib/parser/inpmktmp.c | 2 +- src/spicelib/parser/inppas3.c | 4 +- src/spicelib/parser/inppname.c | 2 +- src/spicelib/parser/inpsymt.c | 10 +-- src/tclspice.c | 82 +++++++++---------- src/unsupported/snstart.c | 4 +- src/unsupported/spiced.c | 4 +- src/xspice/evt/evtiter.c | 2 +- src/xspice/evt/evtop.c | 2 +- src/xspice/ipc/ipcsockets.c | 2 +- src/xspice/mif/mifgetmod.c | 8 +- 263 files changed, 596 insertions(+), 596 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bae4f345..b4f26ace5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-04-27 Robert Larice + * */** : + code cleanup, drop NULL pointer casts + 2011-04-28 Robert Larice * src/frontend/plotting/x11.c , * src/frontend/plotting/x11.h : diff --git a/src/ciderlib/input/boundary.c b/src/ciderlib/input/boundary.c index 1ef054b6d..9e3b02b42 100644 --- a/src/ciderlib/input/boundary.c +++ b/src/ciderlib/input/boundary.c @@ -69,10 +69,10 @@ BDRYnewCard(void **inCard, void *inModel) newCard = NEW( BDRYcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->BDRYnextCard = (BDRYcard *)NULL; + newCard->BDRYnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENboundaries; diff --git a/src/ciderlib/input/contact.c b/src/ciderlib/input/contact.c index a4a37be31..c7c2aa978 100644 --- a/src/ciderlib/input/contact.c +++ b/src/ciderlib/input/contact.c @@ -44,10 +44,10 @@ CONTnewCard(void **inCard, void *inModel) newCard = NEW( CONTcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->CONTnextCard = (CONTcard *)NULL; + newCard->CONTnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENcontacts; diff --git a/src/ciderlib/input/domain.c b/src/ciderlib/input/domain.c index c77bc890a..8fda68429 100644 --- a/src/ciderlib/input/domain.c +++ b/src/ciderlib/input/domain.c @@ -61,10 +61,10 @@ DOMNnewCard(void **inCard, void *inModel) newCard = NEW( DOMNcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->DOMNnextCard = (DOMNcard *)NULL; + newCard->DOMNnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENdomains; diff --git a/src/ciderlib/input/doping.c b/src/ciderlib/input/doping.c index 7f5e6d9d5..9c6a15571 100644 --- a/src/ciderlib/input/doping.c +++ b/src/ciderlib/input/doping.c @@ -78,10 +78,10 @@ DOPnewCard(void **inCard, void *inModel) newCard = NEW( DOPcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->DOPnextCard = (DOPcard *)NULL; + newCard->DOPnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENdopings; diff --git a/src/ciderlib/input/electrod.c b/src/ciderlib/input/electrod.c index 150da10b5..d8e05d6ae 100644 --- a/src/ciderlib/input/electrod.c +++ b/src/ciderlib/input/electrod.c @@ -49,10 +49,10 @@ ELCTnewCard(void **inCard, void *inModel) newCard = NEW( ELCTcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->ELCTnextCard = (ELCTcard *)NULL; + newCard->ELCTnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENelectrodes; diff --git a/src/ciderlib/input/material.c b/src/ciderlib/input/material.c index 151ee18e6..e80625010 100644 --- a/src/ciderlib/input/material.c +++ b/src/ciderlib/input/material.c @@ -104,10 +104,10 @@ MATLnewCard(void **inCard, void *inModel) newCard = NEW( MATLcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->MATLnextCard = (MATLcard *)NULL; + newCard->MATLnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENmaterials; diff --git a/src/ciderlib/input/mesh.c b/src/ciderlib/input/mesh.c index da898bbe2..fc7c42066 100644 --- a/src/ciderlib/input/mesh.c +++ b/src/ciderlib/input/mesh.c @@ -62,10 +62,10 @@ XMSHnewCard(void **inCard, void *inModel) newCard = NEW( MESHcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->MESHnextCard = (MESHcard *)NULL; + newCard->MESHnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENxMeshes; @@ -88,10 +88,10 @@ YMSHnewCard(void **inCard, void *inModel) newCard = NEW( MESHcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->MESHnextCard = (MESHcard *)NULL; + newCard->MESHnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENyMeshes; diff --git a/src/ciderlib/input/method.c b/src/ciderlib/input/method.c index a44fdfbaf..a2d4bcd78 100644 --- a/src/ciderlib/input/method.c +++ b/src/ciderlib/input/method.c @@ -51,10 +51,10 @@ METHnewCard(void **inCard, void *inModel) if (!tmpCard) { /* First in list */ newCard = NEW( METHcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->METHnextCard = (METHcard *)NULL; + newCard->METHnextCard = NULL; *inCard = (void *)newCard; model->GENmethods = newCard; } else { /* Only one card of this type allowed */ diff --git a/src/ciderlib/input/mobility.c b/src/ciderlib/input/mobility.c index 86cd0ea15..69ad9d4f0 100644 --- a/src/ciderlib/input/mobility.c +++ b/src/ciderlib/input/mobility.c @@ -57,10 +57,10 @@ MOBnewCard(void **inCard, void *inModel) newCard = NEW( MOBcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->MOBnextCard = (MOBcard *)NULL; + newCard->MOBnextCard = NULL; *inCard = (void *)newCard; tmpCard = model->GENmobility; diff --git a/src/ciderlib/input/models.c b/src/ciderlib/input/models.c index 1d9bb8958..e20e0b1ff 100644 --- a/src/ciderlib/input/models.c +++ b/src/ciderlib/input/models.c @@ -63,10 +63,10 @@ MODLnewCard(void **inCard, void *inModel) if (!tmpCard) { /* First in list */ newCard = NEW( MODLcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->MODLnextCard = (MODLcard *)NULL; + newCard->MODLnextCard = NULL; *inCard = (void *)newCard; model->GENmodels = newCard; } else { /* Only one card of this type allowed */ diff --git a/src/ciderlib/input/optionsc.c b/src/ciderlib/input/optionsc.c index 8601de509..cf937014f 100644 --- a/src/ciderlib/input/optionsc.c +++ b/src/ciderlib/input/optionsc.c @@ -70,10 +70,10 @@ OPTNnewCard(void **inCard, void *inModel) if (!tmpCard) { /* First in list */ newCard = NEW( OPTNcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->OPTNnextCard = (OPTNcard *)NULL; + newCard->OPTNnextCard = NULL; *inCard = (void *)newCard; model->GENoptions = newCard; } else { /* Only one card of this type allowed */ diff --git a/src/ciderlib/input/output.c b/src/ciderlib/input/output.c index 1bd1c0b99..0addf1767 100644 --- a/src/ciderlib/input/output.c +++ b/src/ciderlib/input/output.c @@ -93,10 +93,10 @@ OUTPnewCard(void **inCard, void *inModel) if (!tmpCard) { /* First in list */ newCard = NEW( OUTPcard ); if (!newCard) { - *inCard = (void *)NULL; + *inCard = NULL; return(E_NOMEM); } - newCard->OUTPnextCard = (OUTPcard *)NULL; + newCard->OUTPnextCard = NULL; *inCard = (void *)newCard; model->GENoutputs = newCard; } else { /* Only one card of this type allowed */ diff --git a/src/ciderlib/oned/onesolve.c b/src/ciderlib/oned/onesolve.c index 74431b43d..c353f5a2d 100644 --- a/src/ciderlib/oned/onesolve.c +++ b/src/ciderlib/oned/onesolve.c @@ -586,7 +586,7 @@ ONEequilSolve(ONEdevice *pDevice) setupTime += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ - ONEdcSolve(pDevice, MaxIterations, newSolver, FALSE, (ONEtranInfo *) NULL); + ONEdcSolve(pDevice, MaxIterations, newSolver, FALSE, NULL); /* MISCELLANEOUS */ startTime = SPfrontEnd->IFseconds(); diff --git a/src/ciderlib/twod/twosolve.c b/src/ciderlib/twod/twosolve.c index 71e216316..061137263 100644 --- a/src/ciderlib/twod/twosolve.c +++ b/src/ciderlib/twod/twosolve.c @@ -485,7 +485,7 @@ TWOequilSolve(TWOdevice *pDevice) setupTime += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ - TWOdcSolve(pDevice, MaxIterations, newSolver, FALSE, (TWOtranInfo *) NULL); + TWOdcSolve(pDevice, MaxIterations, newSolver, FALSE, NULL); /* MISCELLANEOUS */ startTime = SPfrontEnd->IFseconds(); diff --git a/src/frontend/breakp2.c b/src/frontend/breakp2.c index 3e56f74d3..5e781ce6f 100644 --- a/src/frontend/breakp2.c +++ b/src/frontend/breakp2.c @@ -68,7 +68,7 @@ settrace(wordlist *wl, int what, char *name) d->db_type = DB_SAVE; break; } -/* wrd_chtrace((char *) NULL, TRUE, what); */ +/* wrd_chtrace(NULL, TRUE, what); */ } else { switch (what) { case VF_PRINT: diff --git a/src/frontend/com_ahelp.c b/src/frontend/com_ahelp.c index 15d618b84..aa9119686 100644 --- a/src/frontend/com_ahelp.c +++ b/src/frontend/com_ahelp.c @@ -73,8 +73,7 @@ com_ahelp(wordlist *wl) com = cc[i]; if ((com->co_env < (level << 13)) && (!(com->co_env & 4095) || (env & com->co_env))) { - if ((com->co_spiceonly && ft_nutmeg) || - (com->co_help == (char *) NULL)) { + if ((com->co_spiceonly && ft_nutmeg) || (com->co_help == NULL)) { continue; } out_printf("%s ", com->co_comname); diff --git a/src/frontend/com_alias.c b/src/frontend/com_alias.c index 805ff035c..e30408bd3 100644 --- a/src/frontend/com_alias.c +++ b/src/frontend/com_alias.c @@ -210,7 +210,7 @@ void com_alias(wordlist *wl) { if (wl == NULL) - cp_paliases((char *) NULL); + cp_paliases(NULL); else if (wl->wl_next == NULL) cp_paliases(wl->wl_word); else diff --git a/src/frontend/com_asciiplot.c b/src/frontend/com_asciiplot.c index 9576e1653..cefe70c79 100644 --- a/src/frontend/com_asciiplot.c +++ b/src/frontend/com_asciiplot.c @@ -12,6 +12,6 @@ void com_asciiplot(wordlist *wl) { - plotit(wl, (char *) NULL, "lpr"); + plotit(wl, NULL, "lpr"); return; } diff --git a/src/frontend/com_hardcopy.c b/src/frontend/com_hardcopy.c index f3c638db2..b2517e20e 100644 --- a/src/frontend/com_hardcopy.c +++ b/src/frontend/com_hardcopy.c @@ -151,7 +151,7 @@ com_hardcopy(wordlist *wl) if (DevSwitch(devtype)) return; - if (!wl || !plotit(wl, fname, (char *) NULL)) { + if (!wl || !plotit(wl, fname, NULL)) { printf("com_hardcopy: graph not defined\n"); DevSwitch(NULL); /* remember to switch back */ return; diff --git a/src/frontend/com_plot.c b/src/frontend/com_plot.c index adb0e1920..5a216fea0 100644 --- a/src/frontend/com_plot.c +++ b/src/frontend/com_plot.c @@ -13,7 +13,7 @@ void com_plot(wordlist *wl) { - plotit(wl, (char *) NULL, (char *) NULL); + plotit(wl, NULL, NULL); return; } @@ -21,7 +21,7 @@ com_plot(wordlist *wl) void com_bltplot(wordlist *wl) { - plotit(wl, (char *) NULL, "blt"); + plotit(wl, NULL, "blt"); return; } diff --git a/src/frontend/com_shell.c b/src/frontend/com_shell.c index f4efeb869..aaed22ad4 100644 --- a/src/frontend/com_shell.c +++ b/src/frontend/com_shell.c @@ -44,7 +44,7 @@ com_shell(wordlist *wl) svtstp = signal(SIGTSTP, SIG_DFL); /* XXX Sig on proc group */ do { - r = wait((union wait *) NULL); + r = wait(NULL); } while ((r != pid) && pid != -1); signal(SIGINT, (SIGNAL_FUNCTION) svint); signal(SIGQUIT, (SIGNAL_FUNCTION) svquit); diff --git a/src/frontend/control.c b/src/frontend/control.c index b8d652960..efc516576 100644 --- a/src/frontend/control.c +++ b/src/frontend/control.c @@ -867,7 +867,7 @@ void cp_resetcontrol(void) cp_free_control(); /* va: free it */ control[0] = cend[0] = NULL; stackp = 0; - cp_kwswitch(CT_LABEL, (char *) NULL); + cp_kwswitch(CT_LABEL, NULL); return; } diff --git a/src/frontend/define.c b/src/frontend/define.c index 9340f632c..3b866ccfb 100644 --- a/src/frontend/define.c +++ b/src/frontend/define.c @@ -48,7 +48,7 @@ com_define(wordlist *wlist) /* If there's nothing then print all the definitions. */ if (wlist == NULL) { - prdefs((char *) NULL); + prdefs(NULL); return; } diff --git a/src/frontend/evaluate.c b/src/frontend/evaluate.c index a87cc29b7..b470b5207 100644 --- a/src/frontend/evaluate.c +++ b/src/frontend/evaluate.c @@ -924,7 +924,7 @@ apply_func(struct func *func, struct pnode *arg) else if (eq(func->fu_name, "not")) t->v_name = mkcname('c', func->fu_name, v->v_name); else - t->v_name = mkcname('b', v->v_name, (char *) NULL); + t->v_name = mkcname('b', v->v_name, NULL); t->v_type = v->v_type; /* This is strange too. */ t->v_length = len; t->v_scale = v->v_scale; diff --git a/src/frontend/inp.c b/src/frontend/inp.c index 70c2a9709..a04d0695b 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -719,9 +719,9 @@ inp_dodeck( } else { if (ft_curckt) { ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, - (char *) NULL); + NULL); ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, - (char *) NULL); + NULL); } ft_curckt = ct = alloc(struct circ); } @@ -849,9 +849,9 @@ inp_dodeck( if (!reuse) { /* Be sure that ci_devices and ci_nodes are valid */ ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, - (char *) NULL); + NULL); cp_kwswitch(CT_DEVNAMES, ft_curckt->ci_devices); - ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, (char *) NULL); + ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL); cp_kwswitch(CT_NODENAMES, ft_curckt->ci_nodes); ft_newcirc(ct); /* Assign current circuit */ @@ -991,7 +991,7 @@ com_edit(wordlist *wl) cp_interactive = inter; return; } - inp_spsource(fp, FALSE, permfile ? filename : (char *) NULL); + inp_spsource(fp, FALSE, permfile ? filename : NULL); /* fclose(fp); */ /* MW. inp_spsource already closed fp */ @@ -1079,10 +1079,10 @@ com_source(wordlist *wl) /* Don't print the title if this is a spice initialisation file. */ if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word)) { - inp_spsource(fp, TRUE, tempfile ? (char *) NULL : wl->wl_word); + inp_spsource(fp, TRUE, tempfile ? NULL : wl->wl_word); } else { - inp_spsource(fp, FALSE, tempfile ? (char *) NULL : wl->wl_word); + inp_spsource(fp, FALSE, tempfile ? NULL : wl->wl_word); } cp_interactive = inter; if (tempfile) diff --git a/src/frontend/nutinp.c b/src/frontend/nutinp.c index b5f9cc34b..e360a74b2 100644 --- a/src/frontend/nutinp.c +++ b/src/frontend/nutinp.c @@ -242,9 +242,9 @@ nutcom_source(wordlist *wl) /* Don't print the title if this is a .spiceinit file. */ if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word)) - inp_nutsource(fp, TRUE, tempfile ? (char *) NULL : wl->wl_word); + inp_nutsource(fp, TRUE, tempfile ? NULL : wl->wl_word); else - inp_nutsource(fp, FALSE, tempfile ? (char *) NULL : wl->wl_word); + inp_nutsource(fp, FALSE, tempfile ? NULL : wl->wl_word); cp_interactive = inter; if (tempfile) (void) unlink(tempfile); diff --git a/src/frontend/nutmegif.c b/src/frontend/nutmegif.c index 46190b6bc..741cc8711 100644 --- a/src/frontend/nutmegif.c +++ b/src/frontend/nutmegif.c @@ -21,7 +21,7 @@ struct variable * nutif_getparam(CKTcircuit *ckt, char **name, char *param, int NG_IGNORE(name); NG_IGNORE(ckt); - return ((struct variable *) NULL); + return (NULL); } diff --git a/src/frontend/parser/backq.c b/src/frontend/parser/backq.c index 561e3fba2..c7c79be34 100644 --- a/src/frontend/parser/backq.c +++ b/src/frontend/parser/backq.c @@ -101,7 +101,7 @@ backeval(char *string) intv = cp_interactive; cp_interactive = FALSE; cp_bqflag = TRUE; - wl = cp_lexer((char *) NULL); + wl = cp_lexer(NULL); cp_bqflag = FALSE; cp_inp_cur = old; cp_interactive = intv; diff --git a/src/frontend/plotting/graf.c b/src/frontend/plotting/graf.c index 375dcc6cd..ca32290fe 100644 --- a/src/frontend/plotting/graf.c +++ b/src/frontend/plotting/graf.c @@ -577,7 +577,7 @@ gr_redraw(GRAPH *graph) else pass vec's plot's scale */ ft_graf(link->vector, - graph->onevalue ? (struct dvec *) NULL : + graph->onevalue ? NULL : (link->vector->v_scale ? link->vector->v_scale : link->vector->v_plot->pl_scale), @@ -685,7 +685,7 @@ iplot(struct plot *pl, int id) sprintf(commandline, "plot %s", yl); (void) gr_init(xlims, ylims, xs->v_name, - pl->pl_title, (char *) NULL, j, 0.0, 0.0, + pl->pl_title, NULL, j, 0.0, 0.0, GRID_LIN, PLOT_LIN, xs->v_name, yl, xs->v_type, yt, plot_cur->pl_typename, commandline); for (v = pl->pl_dvecs; v; v = v->v_next) diff --git a/src/frontend/plotting/graphdb.c b/src/frontend/plotting/graphdb.c index 82d09e648..87beff836 100644 --- a/src/frontend/plotting/graphdb.c +++ b/src/frontend/plotting/graphdb.c @@ -63,7 +63,7 @@ GRAPH *NewGraph(void) if ((list = NEWLISTGRAPH) == NULL) { internalerror("can't allocate a listgraph"); - return((GRAPH *) NULL); + return(NULL); } pgraph = &list->graph; diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 300113017..bc00fd8bc 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -1025,7 +1025,7 @@ plotit(wordlist *wl, char *hcopy, char *devname) if (devname && eq(devname, "blt")) { /* Just send the pairs to Tcl/Tk */ for (d = vecs; d; d = d->v_link2) { - blt_plot(d, oneval ? (struct dvec *) NULL : d->v_scale,(d==vecs?1:0)); + blt_plot(d, oneval ? NULL : d->v_scale, (d == vecs) ? 1 : 0); } rtn = TRUE; goto quit; @@ -1041,7 +1041,7 @@ plotit(wordlist *wl, char *hcopy, char *devname) pname = plot_cur->pl_typename; - if (!gr_init(xlims, ylims, (oneval ? (char *) NULL : xn), + if (!gr_init(xlims, ylims, (oneval ? NULL : xn), title ? title : vecs->v_plot->pl_title, hcopy, i, xdelta ? *xdelta : 0.0, ydelta ? *ydelta : 0.0, gtype, ptype, xlabel, ylabel, xt, j, pname, cline)) @@ -1049,7 +1049,7 @@ plotit(wordlist *wl, char *hcopy, char *devname) /* Now plot all the graphs. */ for (d = vecs; d; d = d->v_link2) - ft_graf(d, oneval ? (struct dvec *) NULL : d->v_scale, FALSE); + ft_graf(d, oneval ? NULL : d->v_scale, FALSE); gr_clean(); diff --git a/src/frontend/plotting/x11.c b/src/frontend/plotting/x11.c index a3d8aa9fb..7e083f2a7 100644 --- a/src/frontend/plotting/x11.c +++ b/src/frontend/plotting/x11.c @@ -345,7 +345,7 @@ handle_wm_messages(Widget w, XtPointer client_data, XEvent *ev, Boolean *cont) /* Recover from bad NewViewPort call. */ #define RECOVERNEWVIEWPORT() tfree(graph);\ - graph = (GRAPH *) NULL; + graph = NULL; /* need to do this or else DestroyGraph will free it again */ /* NewViewport is responsible for filling in graph->viewport */ @@ -1025,8 +1025,8 @@ X11_Input(REQUEST *request, RESPONSE *response) FD_SET(ConnectionNumber(display), &rfds); select (nfds + 1, &rfds, - (fd_set *)NULL, - (fd_set *)NULL, + NULL, + NULL, NULL); /* handle X events first */ diff --git a/src/frontend/resource.c b/src/frontend/resource.c index 50ec85a21..3edb1a150 100644 --- a/src/frontend/resource.c +++ b/src/frontend/resource.c @@ -120,7 +120,7 @@ char* copyword; /* Fill in the SPICE accounting structure... */ if (wl && (eq(wl->wl_word, "everything") || eq(wl->wl_word, "all"))) { - printres((char *) NULL); + printres(NULL); } else if (wl) { for (; wl; wl = wl->wl_next) { /* printres(cp_unquote(wl->wl_word)); DG: bad, memory leak*/ diff --git a/src/frontend/runcoms.c b/src/frontend/runcoms.c index fdb44e1a6..74225db1a 100644 --- a/src/frontend/runcoms.c +++ b/src/frontend/runcoms.c @@ -376,7 +376,7 @@ ft_dorun(char *file) if (file) return dosim("run", &wl); else - return dosim("run", (wordlist *) NULL); + return dosim("run", NULL); } /* ARGSUSED */ /* until the else clause gets put back */ diff --git a/src/frontend/runcoms2.c b/src/frontend/runcoms2.c index 5c1bb57d1..a7688f44f 100644 --- a/src/frontend/runcoms2.c +++ b/src/frontend/runcoms2.c @@ -138,7 +138,7 @@ com_resume(wordlist *wl) /*end saj*/ - err = if_run(ft_curckt->ci_ckt, "resume", (wordlist *) NULL, + err = if_run(ft_curckt->ci_ckt, "resume", NULL, ft_curckt->ci_symtab); /*close rawfile saj*/ @@ -189,7 +189,7 @@ com_rset(wordlist *wl) } ft_curckt->ci_vars = NULL; - inp_dodeck(ft_curckt->ci_deck, ft_curckt->ci_name, (wordlist *) NULL, + inp_dodeck(ft_curckt->ci_deck, ft_curckt->ci_name, NULL, TRUE, ft_curckt->ci_options, ft_curckt->ci_filename); return; } diff --git a/src/frontend/shyu.c b/src/frontend/shyu.c index 33eb89bfe..617f125d2 100644 --- a/src/frontend/shyu.c +++ b/src/frontend/shyu.c @@ -306,7 +306,7 @@ next: ptemp.iValue = 1; error = ft_sim->setAnalysisParm (ckt, senseJob, ft_sim->analyses[save]-> - analysisParms[i].id,&ptemp,(IFvalue*)NULL); + analysisParms[i].id, &ptemp, NULL); if(error) current->error = INPerrCat( current->error, INPerror(error)); } @@ -316,7 +316,7 @@ next: dataType,tab); error = ft_sim->setAnalysisParm (ckt, senseJob, ft_sim->analyses[save]-> - analysisParms[i].id,parm,(IFvalue*)NULL); + analysisParms[i].id, parm, NULL); if(error) current->error = INPerrCat( current->error, INPerror(error)); diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 536f96d62..e546ef3f6 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -111,7 +111,7 @@ if_inpdeck(struct line *deck, INPtables **tab) /*CDHW Create a task DDD with a new UID. ci_defTask will point to it CDHW*/ - err = IFnewUid(ckt, &taskUid, (IFuid)NULL, "default", UID_TASK, NULL); + err = IFnewUid(ckt, &taskUid, NULL, "default", UID_TASK, NULL); if(err) { ft_sperror(err,"newUid"); return(NULL); @@ -136,7 +136,7 @@ if_inpdeck(struct line *deck, INPtables **tab) } if(which != -1) { - err = IFnewUid(ckt,&optUid,(IFuid)NULL,"options",UID_ANALYSIS, + err = IFnewUid(ckt, &optUid, NULL, "options", UID_ANALYSIS, NULL); if(err) { ft_sperror(err,"newUid"); @@ -245,7 +245,7 @@ if_run(CKTcircuit *t, char *what, wordlist *args, INPtables *tab) /*CDHW Create an interactive task AAA with a new UID. ci_specTask will point to it CDHW*/ - err = IFnewUid(ft_curckt->ci_ckt,&specUid,(IFuid)NULL,"special", + err = IFnewUid(ft_curckt->ci_ckt, &specUid, NULL, "special", UID_TASK,NULL); if(err) { ft_sperror(err,"newUid"); @@ -273,7 +273,7 @@ ci_specTask will point to it CDHW*/ } } if(which != -1) { /*CDHW options are available CDHW*/ - err = IFnewUid(ft_curckt->ci_ckt,&optUid,(IFuid)NULL,"options", + err = IFnewUid(ft_curckt->ci_ckt, &optUid, NULL, "options", UID_ANALYSIS,NULL); if(err) { ft_sperror(err,"newUid"); @@ -496,12 +496,12 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value) #if (0) if ((err = ft_sim->setAnalysisParm (cc, ft_curckt->ci_curOpt, ft_sim->analyses[which]->analysisParms[i].id, &pval, - (IFvalue *)NULL)) != OK) + NULL)) != OK) ft_sperror(err, "setAnalysisParm(options) ci_curOpt"); #else /*CDHW*/ if ((err = ft_sim->setAnalysisParm (cc, ft_curckt->ci_defOpt, ft_sim->analyses[which]->analysisParms[i].id, &pval, - (IFvalue *)NULL)) != OK) + NULL)) != OK) ft_sperror(err, "setAnalysisParm(options) ci_curOpt"); return 1; #endif @@ -591,14 +591,14 @@ finddev_special( return(type); } type = -1; - *devptr = (GENinstance *)NULL; + *devptr = NULL; err = ft_sim->findModel (ck, &type, modptr, name); if(err == OK) { *device_or_model=1; return(type); } - *modptr = (GENmodel *)NULL; + *modptr = NULL; *device_or_model=2; return(-1); @@ -615,8 +615,8 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod IFvalue *pv; IFparm *opt; int typecode, i, modelo_dispositivo; - GENinstance *dev=(GENinstance *)NULL; - GENmodel *mod=(GENmodel *)NULL; + GENinstance *dev = NULL; + GENmodel *mod = NULL; IFdevice *device; NG_IGNORE(do_model); @@ -753,8 +753,8 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) IFvalue *pv; IFparm *opt; int typecode, i; - GENinstance *dev=(GENinstance *)NULL; - GENmodel *mod=(GENmodel *)NULL; + GENinstance *dev = NULL; + GENmodel *mod = NULL; IFdevice *device; /* fprintf(cp_err, "Calling if_getparam(%s, %s)\n", *name, param); */ @@ -820,11 +820,11 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) void if_setparam_model(CKTcircuit *ckt, char **name, char *val ) { - GENinstance *dev = (GENinstance *)NULL; - GENinstance *prevDev = (GENinstance *)NULL; - GENmodel *curMod = (GENmodel *) NULL; - GENmodel *newMod = (GENmodel *) NULL; - INPmodel *inpmod = (INPmodel *) NULL; + GENinstance *dev = NULL; + GENinstance *prevDev = NULL; + GENmodel *curMod = NULL; + GENmodel *newMod = NULL; + INPmodel *inpmod = NULL; GENinstance *iter; GENmodel *mods, *prevMod; int typecode; @@ -902,8 +902,8 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_ { IFparm *opt; IFdevice *device; - GENmodel *mod=(GENmodel *)NULL; - GENinstance *dev=(GENinstance *)NULL; + GENmodel *mod = NULL; + GENinstance *dev = NULL; int typecode; /* PN */ @@ -924,7 +924,7 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_ } if (do_model && !mod) { mod = dev->GENmodPtr; - dev = (GENinstance *)NULL; + dev = NULL; } doset(ckt, typecode, dev, mod, opt, val); @@ -1078,10 +1078,10 @@ doask(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op typecode, dev, mod, opt); */ if (dev) err = ft_sim->askInstanceQuest (ckt, dev, - opt->id, &pv, (IFvalue *)NULL); + opt->id, &pv, NULL); else err = ft_sim->askModelQuest (ckt, mod, - opt->id, &pv, (IFvalue *)NULL); + opt->id, &pv, NULL); if (err != OK) { ft_sperror(err, "if_getparam"); return (NULL); @@ -1163,10 +1163,10 @@ doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op if (dev) err = ft_sim->setInstanceParm (ckt, dev, - opt->id, &nval, (IFvalue *)NULL); + opt->id, &nval, NULL); else err = ft_sim->setModelParm (ckt, mod, - opt->id, &nval, (IFvalue *)NULL); + opt->id, &nval, NULL); return err; } @@ -1186,10 +1186,10 @@ finddev(CKTcircuit *ck, char *name, GENinstance **devptr, GENmodel **modptr) err = ft_sim->findInstance (ck, &type, devptr, name, NULL, NULL); if(err == OK) return(type); type = -1; - *devptr = (GENinstance *)NULL; + *devptr = NULL; err = ft_sim->findModel (ck, &type, modptr, name); if(err == OK) return(type); - *modptr = (GENmodel *)NULL; + *modptr = NULL; return(-1); } @@ -1203,7 +1203,7 @@ if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm) if(strcmp(ft_sim->analyses[which]->analysisParms[i].keyword,name)==0) { return( ft_sim->askAnalysisQuest (ckt, anal, ft_sim->analyses[which]->analysisParms[i].id,parm, - (IFvalue *)NULL) ); + NULL) ); } } return(E_BADPARM); @@ -1232,11 +1232,11 @@ if_tranparams(struct circ *ci, double *start, double *stop, double *step) } if(which == -1) return(FALSE); - err = IFnewUid(ci->ci_ckt,&tranUid,(IFuid)NULL,"Transient Analysis", + err = IFnewUid(ci->ci_ckt, &tranUid, NULL, "Transient Analysis", UID_ANALYSIS, NULL); if(err != OK) return(FALSE); err = ft_sim->findAnalysis (ci->ci_ckt, &which, &anal, tranUid, - ci->ci_curTask,(IFuid )NULL); + ci->ci_curTask, NULL); if(err != OK) return(FALSE); err = if_analQbyName(ci->ci_ckt,which,anal,"tstart",&tmp); if(err != OK) return(FALSE); @@ -1281,7 +1281,7 @@ if_getstat(CKTcircuit *ckt, char *name) return (NULL); if (ft_sim->askAnalysisQuest (ckt, &(ft_curckt->ci_curTask->taskOptions), ft_sim->analyses[which]->analysisParms[i].id, &parm, - (IFvalue *)NULL) == -1) { + NULL) == -1) { fprintf(cp_err, "if_getstat: Internal Error: can't get %s\n", name); @@ -1295,7 +1295,7 @@ if_getstat(CKTcircuit *ckt, char *name) } if (ft_sim->askAnalysisQuest (ckt, &(ft_curckt->ci_curTask->taskOptions), ft_sim->analyses[which]->analysisParms[i].id, - &parm, (IFvalue *)NULL) == -1) { + &parm, NULL) == -1) { fprintf(cp_err, "if_getstat: Internal Error: can't get %s\n", name); @@ -1553,7 +1553,7 @@ do {\ fprintf(cp_err,"error in CKTnames\n"); return; } - SPfrontEnd->IFnewUid (ckt, &timeUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &timeUid, NULL, "time", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index 199619a34..b08b6a80c 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -403,7 +403,7 @@ doit(struct line *deck) { struct line *c, *last, *lc, *lcc; struct line *savenext; - struct subs *sssfree = (struct subs *) NULL, *sss = (struct subs *) NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */ + struct subs *sssfree = NULL, *sss = NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */ char *s, *t, *scname, *subname; int nest, numpasses = MAXNEST, i; bool gotone; diff --git a/src/frontend/vectors.c b/src/frontend/vectors.c index 201612021..a230a56c3 100644 --- a/src/frontend/vectors.c +++ b/src/frontend/vectors.c @@ -273,7 +273,7 @@ plot_add(struct plot *pl) pl->pl_typename = copy(buf); plot_new(pl); cp_addkword(CT_PLOT, buf); - pl->pl_ccom = cp_kwswitch(CT_VECTOR, (char *) NULL); + pl->pl_ccom = cp_kwswitch(CT_VECTOR, NULL); plot_setcur(pl->pl_typename); return; @@ -707,7 +707,7 @@ plot_alloc(char *name) pl->pl_typename = copy(buf); cp_addkword(CT_PLOT, buf); /* va: create a new, empty keyword tree for class CT_VECTOR, s=old tree */ - s = cp_kwswitch(CT_VECTOR, (char *) NULL); + s = cp_kwswitch(CT_VECTOR, NULL); cp_addkword(CT_VECTOR, "all"); pl->pl_ccom = cp_kwswitch(CT_VECTOR, s); /* va: keyword tree is old tree again, new tree is linked to pl->pl_ccom */ diff --git a/src/main.c b/src/main.c index d0c43df91..0cb6a0d73 100644 --- a/src/main.c +++ b/src/main.c @@ -636,7 +636,7 @@ app_rl_readlines(void) /* History gets written in ../fte/misccoms.c com_quit */ #else - while (cp_evloop((char *) NULL) == 1) ; + while (cp_evloop(NULL) == 1) ; #endif /* defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) */ } @@ -1216,7 +1216,7 @@ bot: } /* --- if (!ft_servermode && !ft_nutmeg) --- */ if (!gotone && ft_batchmode && !ft_nutmeg) - inp_spsource(circuit_file, FALSE, (char *) NULL); + inp_spsource(circuit_file, FALSE, NULL); evl: if (ft_batchmode) { diff --git a/src/maths/ni/niiter.c b/src/maths/ni/niiter.c index 0a56f528b..87ce4230f 100644 --- a/src/maths/ni/niiter.c +++ b/src/maths/ni/niiter.c @@ -126,7 +126,7 @@ NIiter(CKTcircuit *ckt, int maxIter) (void)sprintf(message, "singular matrix: check nodes %s and %s\n", NODENAME(ckt,i),NODENAME(ckt,j)); - SPfrontEnd->IFerror (ERR_WARNING, message, (IFuid *)NULL); + SPfrontEnd->IFerror (ERR_WARNING, message, NULL); FREE(message); ckt->CKTstat->STATnumIter += iterno; #ifdef STEPDEBUG diff --git a/src/maths/sparse/spfactor.c b/src/maths/sparse/spfactor.c index c8329481c..ee0ed4927 100644 --- a/src/maths/sparse/spfactor.c +++ b/src/maths/sparse/spfactor.c @@ -342,7 +342,7 @@ spFactor(MatrixPtr eMatrix) if (Matrix->NeedsOrdering) { - return spOrderAndFactor( eMatrix, (RealVector)NULL, + return spOrderAndFactor( eMatrix, NULL, 0.0, 0.0, DIAG_PIVOTING_AS_DEFAULT ); } if (!Matrix->Partitioned) spPartition( eMatrix, spDEFAULT_PARTITION ); diff --git a/src/maths/sparse/spsmp.c b/src/maths/sparse/spsmp.c index ac7def851..d33739678 100644 --- a/src/maths/sparse/spsmp.c +++ b/src/maths/sparse/spsmp.c @@ -185,7 +185,7 @@ SMPcReorder(SMPmatrix *Matrix, double PivTol, double PivRel, { *NumSwaps = 1; spSetComplex( Matrix ); - return spOrderAndFactor( Matrix, (spREAL*)NULL, + return spOrderAndFactor( Matrix, NULL, (spREAL)PivRel, (spREAL)PivTol, YES ); } @@ -197,7 +197,7 @@ SMPreorder(SMPmatrix *Matrix, double PivTol, double PivRel, double Gmin) { spSetReal( Matrix ); LoadGmin( Matrix, Gmin ); - return spOrderAndFactor( Matrix, (spREAL*)NULL, + return spOrderAndFactor( Matrix, NULL, (spREAL)PivRel, (spREAL)PivTol, YES ); } @@ -235,7 +235,7 @@ SMPsolve(SMPmatrix *Matrix, double RHS[], double Spare[]) { NG_IGNORE(Spare); - spSolve( Matrix, RHS, RHS, (spREAL*)NULL, (spREAL*)NULL ); + spSolve( Matrix, RHS, RHS, NULL, NULL ); } /* @@ -556,7 +556,7 @@ void SMPcombine(SMPmatrix *Matrix, double RHS[], double Spare[]) { spSetReal( Matrix ); - spCombine( Matrix, RHS, Spare, (spREAL*)NULL, (spREAL*)NULL ); + spCombine( Matrix, RHS, Spare, NULL, NULL ); } /* diff --git a/src/spicelib/analysis/acan.c b/src/spicelib/analysis/acan.c index cd5dafc48..73b2989b3 100644 --- a/src/spicelib/analysis/acan.c +++ b/src/spicelib/analysis/acan.c @@ -130,7 +130,7 @@ ACan(CKTcircuit *ckt, int restart) * point... */ SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, - ckt->CKTcurJob->JOBname,(IFuid)NULL,IF_REAL,numNames,nameList, + ckt->CKTcurJob->JOBname, NULL, IF_REAL, numNames, nameList, IF_REAL,&acPlot); tfree(nameList); @@ -154,14 +154,14 @@ ACan(CKTcircuit *ckt, int restart) /* Dump operating point. */ error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "AC Operating Point", - (IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot); + NULL, IF_REAL, numNames, nameList, IF_REAL, &plot); if(error) return(error); CKTdump(ckt,(double)0,plot); SPfrontEnd->OUTendPlot (plot); plot = NULL; } - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, diff --git a/src/spicelib/analysis/cktclrbk.c b/src/spicelib/analysis/cktclrbk.c index c8171de0a..ed1314d3d 100644 --- a/src/spicelib/analysis/cktclrbk.c +++ b/src/spicelib/analysis/cktclrbk.c @@ -23,7 +23,7 @@ CKTclrBreak(CKTcircuit *ckt) if(ckt->CKTbreakSize >2) { tmp = TMALLOC(double, ckt->CKTbreakSize - 1); - if(tmp == (double *)NULL) return(E_NOMEM); + if(tmp == NULL) return(E_NOMEM); for(j=1;jCKTbreakSize;j++) { *(tmp+j-1) = *(ckt->CKTbreaks+j); } diff --git a/src/spicelib/analysis/cktdest.c b/src/spicelib/analysis/cktdest.c index 47bf5d955..44b40bb99 100644 --- a/src/spicelib/analysis/cktdest.c +++ b/src/spicelib/analysis/cktdest.c @@ -51,8 +51,8 @@ CKTdestroy(CKTcircuit *inCkt) FREE(node); node = nnode; } - ckt->CKTnodes = (CKTnode *)NULL; - ckt->CKTlastNode = (CKTnode *)NULL; + ckt->CKTnodes = NULL; + ckt->CKTlastNode = NULL; FREE(ckt); return(OK); } diff --git a/src/spicelib/analysis/cktgrnd.c b/src/spicelib/analysis/cktgrnd.c index df9b3f98f..81a1b45ff 100644 --- a/src/spicelib/analysis/cktgrnd.c +++ b/src/spicelib/analysis/cktgrnd.c @@ -36,7 +36,7 @@ CKTground(CKTcircuit *inCkt, CKTnode **node, IFuid name) ckt->CKTnodes->name = name; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; - ckt->CKTnodes->next = (CKTnode *)NULL; + ckt->CKTnodes->next = NULL; ckt->CKTlastNode = ckt->CKTnodes; } if(node) *node = ckt->CKTnodes; diff --git a/src/spicelib/analysis/cktic.c b/src/spicelib/analysis/cktic.c index e218e701b..17d7e0b09 100644 --- a/src/spicelib/analysis/cktic.c +++ b/src/spicelib/analysis/cktic.c @@ -26,7 +26,7 @@ CKTic(CKTcircuit *ckt) for(node = ckt->CKTnodes;node != NULL; node = node->next) { if(node->nsGiven) { node->ptr = SMPmakeElt(ckt->CKTmatrix,node->number,node->number); - if(node->ptr == (double *)NULL) return(E_NOMEM); + if(node->ptr == NULL) return(E_NOMEM); ckt->CKThadNodeset = 1; *(ckt->CKTrhs+node->number) = node->nodeset; } @@ -34,7 +34,7 @@ CKTic(CKTcircuit *ckt) if(! ( node->ptr)) { node->ptr = SMPmakeElt(ckt->CKTmatrix,node->number, node->number); - if(node->ptr == (double *)NULL) return(E_NOMEM); + if(node->ptr == NULL) return(E_NOMEM); } *(ckt->CKTrhs+node->number) = node->ic; } diff --git a/src/spicelib/analysis/cktlnkeq.c b/src/spicelib/analysis/cktlnkeq.c index b01fc87fe..5bf1f54c6 100644 --- a/src/spicelib/analysis/cktlnkeq.c +++ b/src/spicelib/analysis/cktlnkeq.c @@ -20,16 +20,16 @@ CKTlinkEq(CKTcircuit *ckt, CKTnode *node) { if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */ ckt->CKTnodes = TMALLOC(CKTnode, 1); - if(ckt->CKTnodes == (CKTnode *)NULL) return(E_NOMEM); - ckt->CKTnodes->name = (char *)NULL; + if(ckt->CKTnodes == NULL) return(E_NOMEM); + ckt->CKTnodes->name = NULL; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; ckt->CKTlastNode = ckt->CKTnodes; } - if(node == (CKTnode *)NULL) return(E_BADPARM); + if(node == NULL) return(E_BADPARM); ckt->CKTlastNode->next = node; ckt->CKTlastNode = ckt->CKTlastNode->next; ckt->CKTlastNode->number = ckt->CKTmaxEqNum++; - ckt->CKTlastNode->next = (CKTnode *)NULL; + ckt->CKTlastNode->next = NULL; return(OK); } diff --git a/src/spicelib/analysis/cktmapn.c b/src/spicelib/analysis/cktmapn.c index 449d74dd9..3cf4aa4a2 100644 --- a/src/spicelib/analysis/cktmapn.c +++ b/src/spicelib/analysis/cktmapn.c @@ -37,7 +37,7 @@ CKTmapNode(CKTcircuit *ckt, CKTnode **node, IFuid name) if(error) return(error); error = SPfrontEnd->IFnewUid (ckt, &uid, - (IFuid) NULL, + NULL, name, UID_SIGNAL, &mynode); /* get a uid for it */ diff --git a/src/spicelib/analysis/cktmcrt.c b/src/spicelib/analysis/cktmcrt.c index 1ecbcb78b..e704570e7 100644 --- a/src/spicelib/analysis/cktmcrt.c +++ b/src/spicelib/analysis/cktmcrt.c @@ -26,7 +26,7 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name) error = CKTfndMod(ckt, &type, &mymodfast, name); if(error == E_NOMOD) { mymodfast = (GENmodel *) tmalloc((size_t) *(DEVices[type]->DEVmodSize)); - if(mymodfast == (GENmodel *)NULL) return(E_NOMEM); + if(mymodfast == NULL) return(E_NOMEM); mymodfast->GENmodType = type; mymodfast->GENmodName = name; mymodfast->GENnextModel = ckt->CKThead[type]; diff --git a/src/spicelib/analysis/cktmknod.c b/src/spicelib/analysis/cktmknod.c index 86bb0fdfe..fcff6359f 100644 --- a/src/spicelib/analysis/cktmknod.c +++ b/src/spicelib/analysis/cktmknod.c @@ -24,8 +24,8 @@ CKTmkNode(CKTcircuit *ckt, CKTnode **node) NG_IGNORE(ckt); mynode = TMALLOC(CKTnode, 1); - if(mynode == (CKTnode *)NULL) return(E_NOMEM); - mynode->next = (CKTnode *)NULL; + if(mynode == NULL) return(E_NOMEM); + mynode->next = NULL; mynode->name = (IFuid) 0; if(node) *node = mynode; diff --git a/src/spicelib/analysis/cktnames.c b/src/spicelib/analysis/cktnames.c index 715ea99bc..91531d96f 100644 --- a/src/spicelib/analysis/cktnames.c +++ b/src/spicelib/analysis/cktnames.c @@ -22,7 +22,7 @@ CKTnames(CKTcircuit *ckt, int *numNames, IFuid **nameList) int i; *numNames = ckt->CKTmaxEqNum-1; *nameList = TMALLOC(IFuid, *numNames); - if ((*nameList) == (IFuid *)NULL) return(E_NOMEM); + if ((*nameList) == NULL) return(E_NOMEM); i=0; for (here = ckt->CKTnodes->next; here; here = here->next) { *((*nameList)+i++) = here->name; diff --git a/src/spicelib/analysis/cktnewn.c b/src/spicelib/analysis/cktnewn.c index 3a7f895dc..3d59d12a3 100644 --- a/src/spicelib/analysis/cktnewn.c +++ b/src/spicelib/analysis/cktnewn.c @@ -25,19 +25,19 @@ CKTnewNode(CKTcircuit *inCkt, CKTnode **node, IFuid name) CKTcircuit *ckt = /* fixme, drop that */ inCkt; if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */ ckt->CKTnodes = TMALLOC(CKTnode, 1); - if(ckt->CKTnodes == (CKTnode *)NULL) return(E_NOMEM); - ckt->CKTnodes->name = (char *)NULL; + if(ckt->CKTnodes == NULL) return(E_NOMEM); + ckt->CKTnodes->name = NULL; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; ckt->CKTlastNode = ckt->CKTnodes; } ckt->CKTlastNode->next = TMALLOC(CKTnode, 1); - if(ckt->CKTlastNode->next == (CKTnode *)NULL) return(E_NOMEM); + if(ckt->CKTlastNode->next == NULL) return(E_NOMEM); ckt->CKTlastNode = ckt->CKTlastNode->next; ckt->CKTlastNode->name = name; ckt->CKTlastNode->number = ckt->CKTmaxEqNum++; ckt->CKTlastNode->type = SP_VOLTAGE; - ckt->CKTlastNode->next = (CKTnode *)NULL; + ckt->CKTlastNode->next = NULL; if(node) *node = ckt->CKTlastNode; return(OK); diff --git a/src/spicelib/analysis/cktnoise.c b/src/spicelib/analysis/cktnoise.c index b8678222d..1beeb7518 100644 --- a/src/spicelib/analysis/cktnoise.c +++ b/src/spicelib/analysis/cktnoise.c @@ -54,12 +54,12 @@ CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data) data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, "onoise_spectrum", UID_OTHER, NULL); + NULL, "onoise_spectrum", UID_OTHER, NULL); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, "inoise_spectrum", UID_OTHER, NULL); + NULL, "inoise_spectrum", UID_OTHER, NULL); /* we've added two more plots */ @@ -71,11 +71,11 @@ CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data) data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, "onoise_total", UID_OTHER, NULL); + NULL, "onoise_total", UID_OTHER, NULL); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, "inoise_total", UID_OTHER, NULL); + NULL, "inoise_total", UID_OTHER, NULL); /* we've added two more plots */ data->outpVector = diff --git a/src/spicelib/analysis/cktnum2n.c b/src/spicelib/analysis/cktnum2n.c index 7db85c725..15628be67 100644 --- a/src/spicelib/analysis/cktnum2n.c +++ b/src/spicelib/analysis/cktnum2n.c @@ -27,5 +27,5 @@ CKTnum2nod(CKTcircuit *ckt, int node) return(here); } } - return((CKTnode *)NULL); + return(NULL); } diff --git a/src/spicelib/analysis/cktop.c b/src/spicelib/analysis/cktop.c index 2c5ecc6ac..b2c902859 100644 --- a/src/spicelib/analysis/cktop.c +++ b/src/spicelib/analysis/cktop.c @@ -163,7 +163,7 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, - "Starting dynamic gmin stepping", (IFuid *) NULL); + "Starting dynamic gmin stepping", NULL); NumNodes = 0; for (n = ckt->CKTnodes; n; n = n->next) @@ -196,7 +196,7 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, if (converged == 0){ ckt->CKTmode = continuemode; SPfrontEnd->IFerror (ERR_INFO, - "One successful gmin step", (IFuid *) NULL); + "One successful gmin step", NULL); if (ckt->CKTdiagGmin <= gtarget){ success = 1; @@ -234,11 +234,11 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, failed = 1; SPfrontEnd->IFerror (ERR_WARNING, "Last gmin step failed", - (IFuid *) NULL); + NULL); } else { SPfrontEnd->IFerror (ERR_WARNING, "Further gmin increment", - (IFuid *) NULL); + NULL); factor = sqrt (sqrt (factor)); ckt->CKTdiagGmin = OldGmin / factor; @@ -273,11 +273,11 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode, if (converged != 0){ SPfrontEnd->IFerror (ERR_WARNING, "Dynamic gmin stepping failed", - (IFuid *) NULL); + NULL); } else { SPfrontEnd->IFerror (ERR_INFO, "Dynamic gmin stepping completed", - (IFuid *) NULL); + NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; @@ -310,7 +310,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode, ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, - "Starting gmin stepping", (IFuid *) NULL); + "Starting gmin stepping", NULL); if (ckt->CKTgshunt == 0) ckt->CKTdiagGmin = ckt->CKTgmin; @@ -329,7 +329,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode, if (converged != 0){ ckt->CKTdiagGmin = ckt->CKTgshunt; SPfrontEnd->IFerror (ERR_WARNING, - "gmin step failed", (IFuid *) NULL); + "gmin step failed", NULL); break; } @@ -337,7 +337,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode, ckt->CKTmode = continuemode; SPfrontEnd->IFerror (ERR_INFO, - "One successful gmin step", (IFuid *) NULL); + "One successful gmin step", NULL); } ckt->CKTdiagGmin = ckt->CKTgshunt; @@ -355,7 +355,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode, if (converged == 0){ SPfrontEnd->IFerror (ERR_INFO, - "gmin stepping completed", (IFuid *) NULL); + "gmin stepping completed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ @@ -365,7 +365,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode, } else { SPfrontEnd->IFerror (ERR_WARNING, - "gmin stepping failed", (IFuid *) NULL); + "gmin stepping failed", NULL); } return (converged); @@ -397,7 +397,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, - "Starting source stepping", (IFuid *) NULL); + "Starting source stepping", NULL); ckt->CKTsrcFact = 0; raise = 0.001; @@ -451,7 +451,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, if (converged != 0){ ckt->CKTdiagGmin = ckt->CKTgshunt; SPfrontEnd->IFerror (ERR_WARNING, - "gmin step failed", (IFuid *) NULL); + "gmin step failed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; @@ -464,7 +464,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, ckt->CKTmode = continuemode; SPfrontEnd->IFerror (ERR_INFO, "One successful gmin step", - (IFuid *) NULL); + NULL); } ckt->CKTdiagGmin = ckt->CKTgshunt; } @@ -483,7 +483,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, SPfrontEnd->IFerror (ERR_INFO, - "One successful source step", (IFuid *) NULL); + "One successful source step", NULL); ckt->CKTsrcFact = ConvFact + raise; } @@ -520,7 +520,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, SPfrontEnd->IFerror (ERR_INFO, "One successful source step", - (IFuid *) NULL); + NULL); ckt->CKTsrcFact = ConvFact + raise; @@ -572,13 +572,13 @@ gillespie_src (CKTcircuit * ckt, long int firstmode, ckt->CKTsrcFact = 1; ckt->CKTcurrentAnalysis = DOING_TRAN; SPfrontEnd->IFerror (ERR_WARNING, - "source stepping failed", (IFuid *) NULL); + "source stepping failed", NULL); return (E_ITERLIM); } else { SPfrontEnd->IFerror (ERR_INFO, - "Source stepping completed", (IFuid *) NULL); + "Source stepping completed", NULL); return (0); } } @@ -605,7 +605,7 @@ spice3_src (CKTcircuit * ckt, long int firstmode, ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, - "Starting source stepping", (IFuid *) NULL); + "Starting source stepping", NULL); for (i = 0; i <= ckt->CKTnumSrcSteps; i++) { @@ -622,7 +622,7 @@ spice3_src (CKTcircuit * ckt, long int firstmode, ckt->CKTsrcFact = 1; ckt->CKTcurrentAnalysis = DOING_TRAN; SPfrontEnd->IFerror (ERR_WARNING, - "source stepping failed", (IFuid *) NULL); + "source stepping failed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; @@ -631,10 +631,10 @@ spice3_src (CKTcircuit * ckt, long int firstmode, return (converged); } SPfrontEnd->IFerror (ERR_INFO, - "One successful source step", (IFuid *) NULL); + "One successful source step", NULL); } SPfrontEnd->IFerror (ERR_INFO, - "Source stepping completed", (IFuid *) NULL); + "Source stepping completed", NULL); ckt->CKTsrcFact = 1; #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ diff --git a/src/spicelib/analysis/cktpmnam.c b/src/spicelib/analysis/cktpmnam.c index e49147b55..0a8b44f59 100644 --- a/src/spicelib/analysis/cktpmnam.c +++ b/src/spicelib/analysis/cktpmnam.c @@ -37,7 +37,7 @@ CKTpModName(char *parm, IFvalue *val, CKTcircuit *ckt, int type, IFuid name, GEN if(!strcmp(parm, DEVices[type]->DEVpublic.modelParms[i].keyword)) { error = CKTmodParam(ckt, *modfast, DEVices[type]->DEVpublic.modelParms[i].id, val, - (IFvalue*)NULL); + NULL); if(error) return(error); break; } diff --git a/src/spicelib/analysis/cktpname.c b/src/spicelib/analysis/cktpname.c index 20dc433d0..f0c424f6c 100644 --- a/src/spicelib/analysis/cktpname.c +++ b/src/spicelib/analysis/cktpname.c @@ -39,7 +39,7 @@ CKTpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, char *name, GENinst if(!strcmp(parm, DEVices[dev]->DEVpublic.instanceParms[i].keyword)) { error = CKTparam(ckt, *fast, DEVices[dev]->DEVpublic.instanceParms[i].id, val, - (IFvalue *)NULL); + NULL); if(error) return(error); break; } diff --git a/src/spicelib/analysis/cktsetbk.c b/src/spicelib/analysis/cktsetbk.c index 7b16330a4..bdb8d0c9f 100644 --- a/src/spicelib/analysis/cktsetbk.c +++ b/src/spicelib/analysis/cktsetbk.c @@ -29,7 +29,7 @@ CKTsetBreak(CKTcircuit *ckt, double time) if(ckt->CKTtime > time) { SPfrontEnd->IFerror (ERR_PANIC, "breakpoint in the past - HELP!", - (IFuid *)NULL); + NULL); return(E_INTERN); } for(i=0;iCKTbreakSize;i++) { @@ -54,7 +54,7 @@ CKTsetBreak(CKTcircuit *ckt, double time) } /* fits in middle - new array & insert */ tmp = TMALLOC(double, ckt->CKTbreakSize + 1); - if(tmp == (double *)NULL) return(E_NOMEM); + if(tmp == NULL) return(E_NOMEM); for(j=0;jCKTbreaks+j); } diff --git a/src/spicelib/analysis/dcop.c b/src/spicelib/analysis/dcop.c index 897d3811e..da88d8b13 100644 --- a/src/spicelib/analysis/dcop.c +++ b/src/spicelib/analysis/dcop.c @@ -47,7 +47,7 @@ DCop(CKTcircuit *ckt, int notused) if(error) return(error); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, - (IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot); + NULL, IF_REAL, numNames, nameList, IF_REAL, &plot); tfree(nameList); /* va: nameList not used any longer, it was a memory leak */ if(error) return(error); diff --git a/src/spicelib/analysis/dctran.c b/src/spicelib/analysis/dctran.c index 0cf8debbc..ca9e05f9a 100644 --- a/src/spicelib/analysis/dctran.c +++ b/src/spicelib/analysis/dctran.c @@ -115,7 +115,7 @@ DCtran(CKTcircuit *ckt, if(ckt->CKTbreaks) FREE(ckt->CKTbreaks); ckt->CKTbreaks = TMALLOC(double, 2); - if(ckt->CKTbreaks == (double *)NULL) return(E_NOMEM); + if(ckt->CKTbreaks == NULL) return(E_NOMEM); *(ckt->CKTbreaks) = 0; *(ckt->CKTbreaks+1) = ckt->CKTfinalTime; ckt->CKTbreakSize = 2; @@ -142,7 +142,7 @@ DCtran(CKTcircuit *ckt, #endif error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); - SPfrontEnd->IFnewUid (ckt, &timeUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &timeUid, NULL, "time", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, @@ -350,7 +350,7 @@ DCtran(CKTcircuit *ckt, error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); /* get timeUiD again */ - SPfrontEnd->IFnewUid (ckt, &timeUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &timeUid, NULL, "time", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname,timeUid,IF_REAL,666,nameList, diff --git a/src/spicelib/analysis/dctrcurv.c b/src/spicelib/analysis/dctrcurv.c index da24155bf..7d8388ea7 100644 --- a/src/spicelib/analysis/dctrcurv.c +++ b/src/spicelib/analysis/dctrcurv.c @@ -190,26 +190,26 @@ found:; if (cv->TRCVvType[i]==vcode) - SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL, + SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "v-sweep", UID_OTHER, NULL); else { if (cv->TRCVvType[i]==icode) - SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL, + SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "i-sweep", UID_OTHER, NULL); else { if (cv->TRCVvType[i]==TEMP_CODE) - SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL, + SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "temp-sweep", UID_OTHER, NULL); else { if (cv->TRCVvType[i]==rcode) - SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL, + SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "res-sweep", UID_OTHER, NULL); else - SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL, + SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "?-sweep", UID_OTHER, NULL); } /* icode */ } /* TEMP_CODE */ diff --git a/src/spicelib/analysis/distoan.c b/src/spicelib/analysis/distoan.c index 49daf8e0d..afaba3a64 100644 --- a/src/spicelib/analysis/distoan.c +++ b/src/spicelib/analysis/distoan.c @@ -109,7 +109,7 @@ time1 = SPfrontEnd->IFseconds(); /* Dump operating point. */ error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Distortion Operating Point", - (IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&acPlot); + NULL, IF_REAL, numNames, nameList, IF_REAL, &acPlot); if(error) return(error); CKTdump(ckt,(double)0,acPlot); SPfrontEnd->OUTendPlot (acPlot); @@ -514,7 +514,7 @@ time1 = SPfrontEnd->IFseconds(); if (! job->Df2wanted) { error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - 2nd harmonic", @@ -538,7 +538,7 @@ time1 = SPfrontEnd->IFseconds(); error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - 3rd harmonic", freqUid, IF_REAL, @@ -560,7 +560,7 @@ time1 = SPfrontEnd->IFseconds(); error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - IM: f1+f2", freqUid, IF_REAL, @@ -580,7 +580,7 @@ time1 = SPfrontEnd->IFseconds(); error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - IM: f1-f2", freqUid, IF_REAL, @@ -601,7 +601,7 @@ time1 = SPfrontEnd->IFseconds(); error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - IM: 2f1-f2", freqUid, IF_REAL, diff --git a/src/spicelib/analysis/noisean.c b/src/spicelib/analysis/noisean.c index 9bf835e4c..6e1cdfab5 100644 --- a/src/spicelib/analysis/noisean.c +++ b/src/spicelib/analysis/noisean.c @@ -49,7 +49,7 @@ NOISEan (CKTcircuit *ckt, int restart) code = CKTtypelook("Vsource"); if (code != -1) { error = CKTfndDev(ckt, &code, &inst, - job->input, (GENmodel *)NULL, (IFuid)NULL); + job->input, NULL, NULL); if (!error && !((VSRCinstance *)inst)->VSRCacGiven) { errMsg = TMALLOC(char, strlen(noacinput) + 1); strcpy(errMsg,noacinput); @@ -60,7 +60,7 @@ NOISEan (CKTcircuit *ckt, int restart) code = CKTtypelook("Isource"); if (code != -1 && inst==NULL) { error = CKTfndDev(ckt, &code, &inst, - job->input, (GENmodel *)NULL, (IFuid)NULL); + job->input, NULL, NULL); if (error) { /* XXX ??? */ SPfrontEnd->IFerror (ERR_WARNING, @@ -120,7 +120,7 @@ NOISEan (CKTcircuit *ckt, int restart) /* the current front-end needs the namelist to be fully declared before an OUTpBeginplot */ - SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); data->numPlots = 0; /* we don't have any plots yet */ @@ -279,7 +279,7 @@ NOISEan (CKTcircuit *ckt, int restart) SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Integrated Noise - V^2 or A^2", - (IFuid)NULL,(int)0,data->numPlots,data->namelist,IF_REAL, + NULL, (int)0, data->numPlots, data->namelist, IF_REAL, &(data->NplotPtr)); error = CKTnoise(ckt,INT_NOIZ,N_CALC,data); diff --git a/src/spicelib/analysis/pzan.c b/src/spicelib/analysis/pzan.c index 1e763ad4c..ebcaed9f1 100644 --- a/src/spicelib/analysis/pzan.c +++ b/src/spicelib/analysis/pzan.c @@ -47,7 +47,7 @@ PZan(CKTcircuit *ckt, int reset) if(error) return(error); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Distortion Operating Point", - (IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot); + NULL, IF_REAL, numNames, nameList, IF_REAL, &plot); if(error) return(error); CKTdump(ckt,(double)0,plot); SPfrontEnd->OUTendPlot (plot); @@ -93,8 +93,8 @@ PZinit(CKTcircuit *ckt) if (i != -1 && ckt->CKThead[i] != NULL) MERROR(E_XMISSIONLINE, "Transmission lines not supported") - pzan->PZpoleList = (PZtrial *) NULL; - pzan->PZzeroList = (PZtrial *) NULL; + pzan->PZpoleList = NULL; + pzan->PZzeroList = NULL; pzan->PZnPoles = 0; pzan->PZnZeros = 0; @@ -138,17 +138,17 @@ PZpost(CKTcircuit *ckt) j = 0; for (i = 0; i < pzan->PZnPoles; i++) { sprintf(name, "pole(%-u)", i+1); - SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), NULL, name, UID_OTHER, NULL); } for (i = 0; i < pzan->PZnZeros; i++) { sprintf(name, "zero(%-u)", i+1); - SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), NULL, name, UID_OTHER, NULL); } SPfrontEnd->OUTpBeginPlot (ckt, (JOB *)pzan, pzan->JOBname, - (IFuid)NULL, (int)0, pzan->PZnPoles + pzan->PZnZeros, namelist, + NULL, (int)0, pzan->PZnPoles + pzan->PZnZeros, namelist, IF_COMPLEX, &pzPlotPtr); j = 0; @@ -189,7 +189,7 @@ PZpost(CKTcircuit *ckt) outData.v.numValue = pzan->PZnPoles + pzan->PZnZeros; outData.v.vec.cVec = out_list; - SPfrontEnd->OUTpData (pzPlotPtr, (IFvalue *) NULL, &outData); + SPfrontEnd->OUTpData (pzPlotPtr, NULL, &outData); SPfrontEnd->OUTendPlot (pzPlotPtr); return(OK); diff --git a/src/spicelib/analysis/tfanal.c b/src/spicelib/analysis/tfanal.c index d31576b46..112bbdc3c 100644 --- a/src/spicelib/analysis/tfanal.c +++ b/src/spicelib/analysis/tfanal.c @@ -50,7 +50,7 @@ TFanal(CKTcircuit *ckt, int restart) Vtype = CKTtypelook("Vsource"); if(Itype != -1) { error = CKTfndDev(ckt,&Itype,&ptr, - ((TFan*)ckt->CKTcurJob)->TFinSrc, (GENmodel *)NULL, (IFuid)NULL); + ((TFan*)ckt->CKTcurJob)->TFinSrc, NULL, NULL); if(error ==0) { ((TFan*)ckt->CKTcurJob)->TFinIsI = 1; ((TFan*)ckt->CKTcurJob)->TFinIsV = 0; @@ -61,8 +61,8 @@ TFanal(CKTcircuit *ckt, int restart) if( (Vtype != -1) && (ptr==NULL) ) { error = CKTfndDev(ckt,&Vtype,&ptr, - ((TFan*)ckt->CKTcurJob)->TFinSrc, (GENmodel *)NULL, - (IFuid)NULL); + ((TFan*)ckt->CKTcurJob)->TFinSrc, NULL, + NULL); ((TFan*)ckt->CKTcurJob)->TFinIsV = 1; ((TFan*)ckt->CKTcurJob)->TFinIsI = 0; if(error !=0) { @@ -92,7 +92,7 @@ TFanal(CKTcircuit *ckt, int restart) ckt->CKTrhs[0]=0; /* make a UID for the transfer function output */ - SPfrontEnd->IFnewUid (ckt, &tfuid, (IFuid)NULL, "Transfer_function", + SPfrontEnd->IFnewUid (ckt, &tfuid, NULL, "Transfer_function", UID_OTHER, NULL); /* make a UID for the input impedance */ @@ -107,12 +107,12 @@ TFanal(CKTcircuit *ckt, int restart) name = TMALLOC(char, strlen(((TFan*)ckt->CKTcurJob)->TFoutName) + 22); (void)sprintf(name,"output_impedance_at_%s", ((TFan*)ckt->CKTcurJob)->TFoutName); - SPfrontEnd->IFnewUid (ckt, &outuid, (IFuid)NULL, + SPfrontEnd->IFnewUid (ckt, &outuid, NULL, name, UID_OTHER, NULL); } error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, - ((TFan*)(ckt->CKTcurJob))->JOBname,(IFuid)NULL,(int)0,3, + ((TFan*)(ckt->CKTcurJob))->JOBname, NULL, (int)0, 3, uids,IF_REAL,&plotptr); if(error) return(error); diff --git a/src/spicelib/devices/asrc/asrcset.c b/src/spicelib/devices/asrc/asrcset.c index 3c8188ed5..3b6858fa7 100644 --- a/src/spicelib/devices/asrc/asrcset.c +++ b/src/spicelib/devices/asrc/asrcset.c @@ -50,13 +50,12 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } #define MY_TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number))\ - ==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bjt/bjtdest.c b/src/spicelib/devices/bjt/bjtdest.c index 78f46c4fa..68a8bc016 100644 --- a/src/spicelib/devices/bjt/bjtdest.c +++ b/src/spicelib/devices/bjt/bjtdest.c @@ -29,7 +29,7 @@ BJTdestroy(GENmodel **inModel) for( ; mod ; mod = mod->BJTnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BJTinstance *)NULL; + prev = NULL; for(here = mod->BJTinstances ; here ; here = here->BJTnextInstance) { if(prev){ if(prev->BJTsens) FREE(prev->BJTsens); diff --git a/src/spicelib/devices/bjt/bjtnoise.c b/src/spicelib/devices/bjt/bjtnoise.c index 66ba5dc40..1ce06fb93 100644 --- a/src/spicelib/devices/bjt/bjtnoise.c +++ b/src/spicelib/devices/bjt/bjtnoise.c @@ -74,7 +74,7 @@ for (model=firstModel; model != NULL; model=model->BJTnextModel) { if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; @@ -88,7 +88,7 @@ for (model=firstModel; model != NULL; model=model->BJTnextModel) { if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s", @@ -98,7 +98,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; @@ -130,7 +130,7 @@ if (!data->namelist) return(E_NOMEM); ckt,SHOTNOISE,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode, *(ckt->CKTstate0 + inst->BJTcb) * inst->BJTm); - NevalSrc(&noizDens[BJTFLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[BJTFLNOIZ], NULL, ckt, N_GAIN,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode, (double)0.0); noizDens[BJTFLNOIZ] *= inst->BJTm * model->BJTfNcoef * diff --git a/src/spicelib/devices/bjt/bjtsetup.c b/src/spicelib/devices/bjt/bjtsetup.c index 3aee05f31..d6cc250e8 100644 --- a/src/spicelib/devices/bjt/bjtsetup.c +++ b/src/spicelib/devices/bjt/bjtsetup.c @@ -406,7 +406,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } TSTALLOC(BJTcolColPrimePtr,BJTcolNode,BJTcolPrimeNode) diff --git a/src/spicelib/devices/bsim1/b1dest.c b/src/spicelib/devices/bsim1/b1dest.c index 9e2276442..f2b335f42 100644 --- a/src/spicelib/devices/bsim1/b1dest.c +++ b/src/spicelib/devices/bsim1/b1dest.c @@ -23,7 +23,7 @@ B1destroy(GENmodel **inModel) for( ; mod ; mod = mod->B1nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (B1instance *)NULL; + prev = NULL; for(here = mod->B1instances ; here ; here = here->B1nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim1/b1noi.c b/src/spicelib/devices/bsim1/b1noi.c index 53d84d21c..762fcaf19 100644 --- a/src/spicelib/devices/bsim1/b1noi.c +++ b/src/spicelib/devices/bsim1/b1noi.c @@ -67,7 +67,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -83,7 +83,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -94,7 +94,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -121,7 +121,7 @@ if (!data->namelist) return(E_NOMEM); ckt,THERMNOISE,inst->B1dNodePrime,inst->B1sNodePrime, (2.0/3.0 * fabs(inst->B1gm * inst->B1m))); - NevalSrc(&noizDens[B1FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[B1FLNOIZ], NULL, ckt, N_GAIN,inst->B1dNodePrime, inst->B1sNodePrime, (double)0.0); noizDens[B1FLNOIZ] *= model->B1fNcoef * inst->B1m * diff --git a/src/spicelib/devices/bsim1/b1set.c b/src/spicelib/devices/bsim1/b1set.c index 18ff36c7a..26d86f8fd 100644 --- a/src/spicelib/devices/bsim1/b1set.c +++ b/src/spicelib/devices/bsim1/b1set.c @@ -370,7 +370,7 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim2/b2dest.c b/src/spicelib/devices/bsim2/b2dest.c index 863dfb40d..bd7fa1fb3 100644 --- a/src/spicelib/devices/bsim2/b2dest.c +++ b/src/spicelib/devices/bsim2/b2dest.c @@ -23,7 +23,7 @@ B2destroy(GENmodel **inModel) for( ; mod ; mod = mod->B2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (B2instance *)NULL; + prev = NULL; for(here = mod->B2instances ; here ; here = here->B2nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim2/b2noi.c b/src/spicelib/devices/bsim2/b2noi.c index 3bf233572..3abe3f8b0 100644 --- a/src/spicelib/devices/bsim2/b2noi.c +++ b/src/spicelib/devices/bsim2/b2noi.c @@ -67,7 +67,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -83,7 +83,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -94,7 +94,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -121,7 +121,7 @@ if (!data->namelist) return(E_NOMEM); ckt,THERMNOISE,inst->B2dNodePrime,inst->B2sNodePrime, (2.0/3.0 * fabs(inst->B2gm * inst->B2m))); - NevalSrc(&noizDens[B2FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[B2FLNOIZ], NULL, ckt, N_GAIN,inst->B2dNodePrime, inst->B2sNodePrime, (double)0.0); noizDens[B2FLNOIZ] *= model->B2fNcoef * inst->B2m * diff --git a/src/spicelib/devices/bsim2/b2set.c b/src/spicelib/devices/bsim2/b2set.c index 2367381d8..f2220df29 100644 --- a/src/spicelib/devices/bsim2/b2set.c +++ b/src/spicelib/devices/bsim2/b2set.c @@ -537,7 +537,7 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3/b3dest.c b/src/spicelib/devices/bsim3/b3dest.c index 06ea39ac3..f58ac0665 100644 --- a/src/spicelib/devices/bsim3/b3dest.c +++ b/src/spicelib/devices/bsim3/b3dest.c @@ -25,7 +25,7 @@ BSIM3model *oldmod = NULL; for (; mod ; mod = mod->BSIM3nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM3instance *)NULL; + prev = NULL; for (here = mod->BSIM3instances; here; here = here->BSIM3nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3/b3noi.c b/src/spicelib/devices/bsim3/b3noi.c index 65067a944..3afaac1b4 100644 --- a/src/spicelib/devices/bsim3/b3noi.c +++ b/src/spicelib/devices/bsim3/b3noi.c @@ -159,7 +159,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -174,7 +174,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -186,7 +186,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -246,7 +246,7 @@ int i; * here->BSIM3rds))); /* bugfix */ break; } - NevalSrc(&noizDens[BSIM3FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM3FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3dNodePrime, here->BSIM3sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3/b3set.c b/src/spicelib/devices/bsim3/b3set.c index 8bb4c0694..1ba68adbd 100644 --- a/src/spicelib/devices/bsim3/b3set.c +++ b/src/spicelib/devices/bsim3/b3set.c @@ -973,7 +973,7 @@ int nthreads; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3soi/b4soidest.c b/src/spicelib/devices/bsim3soi/b4soidest.c index bcded660c..45bca1876 100644 --- a/src/spicelib/devices/bsim3soi/b4soidest.c +++ b/src/spicelib/devices/bsim3soi/b4soidest.c @@ -31,7 +31,7 @@ B4SOImodel *oldmod = NULL; for (; mod ; mod = mod->B4SOInextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (B4SOIinstance *)NULL; + prev = NULL; for (here = mod->B4SOIinstances; here; here = here->B4SOInextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3soi/b4soinoi.c b/src/spicelib/devices/bsim3soi/b4soinoi.c index 2fcd4b69e..ce4dde22d 100644 --- a/src/spicelib/devices/bsim3soi/b4soinoi.c +++ b/src/spicelib/devices/bsim3soi/b4soinoi.c @@ -168,7 +168,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -183,7 +183,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -195,7 +195,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -412,7 +412,7 @@ int i; break; } - NevalSrc(&noizDens[B4SOIFLNOIZ], (double*) NULL, + NevalSrc(&noizDens[B4SOIFLNOIZ], NULL, ckt, N_GAIN, here->B4SOIdNodePrime, here->B4SOIsNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3soi/b4soiset.c b/src/spicelib/devices/bsim3soi/b4soiset.c index 64b19fdd3..b1a3f8f24 100644 --- a/src/spicelib/devices/bsim3soi/b4soiset.c +++ b/src/spicelib/devices/bsim3soi/b4soiset.c @@ -2493,7 +2493,7 @@ int nthreads; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3soi_dd/b3soidddest.c b/src/spicelib/devices/bsim3soi_dd/b3soidddest.c index 4914ab1e6..d01f730b8 100644 --- a/src/spicelib/devices/bsim3soi_dd/b3soidddest.c +++ b/src/spicelib/devices/bsim3soi_dd/b3soidddest.c @@ -26,7 +26,7 @@ B3SOIDDmodel *oldmod = NULL; for (; mod ; mod = mod->B3SOIDDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (B3SOIDDinstance *)NULL; + prev = NULL; for (here = mod->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c b/src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c index b513c4c1e..2d7aa80df 100644 --- a/src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c +++ b/src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c @@ -152,7 +152,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -167,7 +167,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -179,7 +179,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -223,7 +223,7 @@ int i; * pParam->B3SOIDDleff)))); break; } - NevalSrc(&noizDens[B3SOIDDFLNOIZ], (double*) NULL, + NevalSrc(&noizDens[B3SOIDDFLNOIZ], NULL, ckt, N_GAIN, here->B3SOIDDdNodePrime, here->B3SOIDDsNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3soi_dd/b3soiddset.c b/src/spicelib/devices/bsim3soi_dd/b3soiddset.c index bf3e57017..bc32473e1 100644 --- a/src/spicelib/devices/bsim3soi_dd/b3soiddset.c +++ b/src/spicelib/devices/bsim3soi_dd/b3soiddset.c @@ -1219,7 +1219,7 @@ IFuid tmpName; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3soi_fd/b3soifddest.c b/src/spicelib/devices/bsim3soi_fd/b3soifddest.c index 1bae0b873..0fc2fb945 100644 --- a/src/spicelib/devices/bsim3soi_fd/b3soifddest.c +++ b/src/spicelib/devices/bsim3soi_fd/b3soifddest.c @@ -26,7 +26,7 @@ B3SOIFDmodel *oldmod = NULL; for (; mod ; mod = mod->B3SOIFDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (B3SOIFDinstance *)NULL; + prev = NULL; for (here = mod->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c b/src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c index 17b95a216..5d0543101 100644 --- a/src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c +++ b/src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c @@ -152,7 +152,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -167,7 +167,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -179,7 +179,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -224,7 +224,7 @@ int i; * pParam->B3SOIFDleff)))); break; } - NevalSrc(&noizDens[B3SOIFDFLNOIZ], (double*) NULL, + NevalSrc(&noizDens[B3SOIFDFLNOIZ], NULL, ckt, N_GAIN, here->B3SOIFDdNodePrime, here->B3SOIFDsNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3soi_fd/b3soifdset.c b/src/spicelib/devices/bsim3soi_fd/b3soifdset.c index 5012825d8..d90227757 100644 --- a/src/spicelib/devices/bsim3soi_fd/b3soifdset.c +++ b/src/spicelib/devices/bsim3soi_fd/b3soifdset.c @@ -1217,7 +1217,7 @@ IFuid tmpName; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3soi_pd/b3soipddest.c b/src/spicelib/devices/bsim3soi_pd/b3soipddest.c index 1389a55fb..b48e8e7e9 100644 --- a/src/spicelib/devices/bsim3soi_pd/b3soipddest.c +++ b/src/spicelib/devices/bsim3soi_pd/b3soipddest.c @@ -26,7 +26,7 @@ B3SOIPDmodel *oldmod = NULL; for (; mod ; mod = mod->B3SOIPDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (B3SOIPDinstance *)NULL; + prev = NULL; for (here = mod->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c b/src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c index 7597e764b..29f669f7b 100644 --- a/src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c +++ b/src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c @@ -156,7 +156,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -171,7 +171,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -183,7 +183,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -233,7 +233,7 @@ int i; (here->B3SOIPDrds / here->B3SOIPDm))))); break; } - NevalSrc(&noizDens[B3SOIPDFLNOIZ], (double*) NULL, + NevalSrc(&noizDens[B3SOIPDFLNOIZ], NULL, ckt, N_GAIN, here->B3SOIPDdNodePrime, here->B3SOIPDsNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3soi_pd/b3soipdset.c b/src/spicelib/devices/bsim3soi_pd/b3soipdset.c index 61d8fc493..d3164eebf 100644 --- a/src/spicelib/devices/bsim3soi_pd/b3soipdset.c +++ b/src/spicelib/devices/bsim3soi_pd/b3soipdset.c @@ -1351,7 +1351,7 @@ IFuid tmpName; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3v0/b3v0dest.c b/src/spicelib/devices/bsim3v0/b3v0dest.c index 6eb753d06..fdf51b24f 100644 --- a/src/spicelib/devices/bsim3v0/b3v0dest.c +++ b/src/spicelib/devices/bsim3v0/b3v0dest.c @@ -20,7 +20,7 @@ BSIM3v0model *oldmod = NULL; for (; mod ; mod = mod->BSIM3v0nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM3v0instance *)NULL; + prev = NULL; for (here = mod->BSIM3v0instances; here; here = here->BSIM3v0nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3v0/b3v0noi.c b/src/spicelib/devices/bsim3v0/b3v0noi.c index 596a81bf3..7ea6559d6 100644 --- a/src/spicelib/devices/bsim3v0/b3v0noi.c +++ b/src/spicelib/devices/bsim3v0/b3v0noi.c @@ -125,7 +125,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -140,7 +140,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -152,7 +152,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -191,7 +191,7 @@ int i; + here->BSIM3v0gds) * here->BSIM3v0m)); } - NevalSrc(&noizDens[BSIM3v0FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM3v0FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3v0dNodePrime, here->BSIM3v0sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3v0/b3v0set.c b/src/spicelib/devices/bsim3v0/b3v0set.c index a5500f6f1..15eb6c162 100644 --- a/src/spicelib/devices/bsim3v0/b3v0set.c +++ b/src/spicelib/devices/bsim3v0/b3v0set.c @@ -848,7 +848,7 @@ IFuid tmpName; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3v1/b3v1dest.c b/src/spicelib/devices/bsim3v1/b3v1dest.c index cf674e0f2..ea9bbdf86 100644 --- a/src/spicelib/devices/bsim3v1/b3v1dest.c +++ b/src/spicelib/devices/bsim3v1/b3v1dest.c @@ -26,7 +26,7 @@ BSIM3v1model *oldmod = NULL; for (; mod ; mod = mod->BSIM3v1nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM3v1instance *)NULL; + prev = NULL; for (here = mod->BSIM3v1instances; here; here = here->BSIM3v1nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3v1/b3v1noi.c b/src/spicelib/devices/bsim3v1/b3v1noi.c index 1b6a9ef65..208ef62f1 100644 --- a/src/spicelib/devices/bsim3v1/b3v1noi.c +++ b/src/spicelib/devices/bsim3v1/b3v1noi.c @@ -150,7 +150,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -167,7 +167,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -181,7 +181,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -225,7 +225,7 @@ int i; * pParam->BSIM3v1leff)))); break; } - NevalSrc(&noizDens[BSIM3v1FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM3v1FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3v1dNodePrime, here->BSIM3v1sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3v1/b3v1set.c b/src/spicelib/devices/bsim3v1/b3v1set.c index f3721d12b..e43688303 100644 --- a/src/spicelib/devices/bsim3v1/b3v1set.c +++ b/src/spicelib/devices/bsim3v1/b3v1set.c @@ -907,7 +907,7 @@ IFuid tmpName; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim3v32/b3v32dest.c b/src/spicelib/devices/bsim3v32/b3v32dest.c index 1dde4a447..e2a530e7c 100644 --- a/src/spicelib/devices/bsim3v32/b3v32dest.c +++ b/src/spicelib/devices/bsim3v32/b3v32dest.c @@ -25,7 +25,7 @@ BSIM3v32model *oldmod = NULL; for (; mod ; mod = mod->BSIM3v32nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM3v32instance *)NULL; + prev = NULL; for (here = mod->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim3v32/b3v32noi.c b/src/spicelib/devices/bsim3v32/b3v32noi.c index 1108e5410..1c4fe2478 100644 --- a/src/spicelib/devices/bsim3v32/b3v32noi.c +++ b/src/spicelib/devices/bsim3v32/b3v32noi.c @@ -228,7 +228,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -243,7 +243,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -255,7 +255,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -316,7 +316,7 @@ int i; } break; } - NevalSrc(&noizDens[BSIM3v32FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM3v32FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3v32dNodePrime, here->BSIM3v32sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim3v32/b3v32set.c b/src/spicelib/devices/bsim3v32/b3v32set.c index 2486c75f7..56c407c8c 100644 --- a/src/spicelib/devices/bsim3v32/b3v32set.c +++ b/src/spicelib/devices/bsim3v32/b3v32set.c @@ -1010,7 +1010,7 @@ IFuid tmpName; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim4/b4dest.c b/src/spicelib/devices/bsim4/b4dest.c index 87488d390..f1003e180 100644 --- a/src/spicelib/devices/bsim4/b4dest.c +++ b/src/spicelib/devices/bsim4/b4dest.c @@ -27,7 +27,7 @@ BSIM4model *oldmod = NULL; for (; mod ; mod = mod->BSIM4nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM4instance *)NULL; + prev = NULL; for (here = mod->BSIM4instances; here; here = here->BSIM4nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim4/b4noi.c b/src/spicelib/devices/bsim4/b4noi.c index ababa637d..297b3fc81 100644 --- a/src/spicelib/devices/bsim4/b4noi.c +++ b/src/spicelib/devices/bsim4/b4noi.c @@ -140,7 +140,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -155,7 +155,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -167,7 +167,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -377,7 +377,7 @@ int i; break; } - NevalSrc(&noizDens[BSIM4FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM4FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4dNodePrime, here->BSIM4sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim4/b4set.c b/src/spicelib/devices/bsim4/b4set.c index dabc7999d..029d00488 100644 --- a/src/spicelib/devices/bsim4/b4set.c +++ b/src/spicelib/devices/bsim4/b4set.c @@ -2291,7 +2291,7 @@ int nthreads; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim4v2/b4v2dest.c b/src/spicelib/devices/bsim4v2/b4v2dest.c index fd4f9ea5c..07052a667 100644 --- a/src/spicelib/devices/bsim4v2/b4v2dest.c +++ b/src/spicelib/devices/bsim4v2/b4v2dest.c @@ -25,7 +25,7 @@ BSIM4v2model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM4v2instance *)NULL; + prev = NULL; for (here = mod->BSIM4v2instances; here; here = here->BSIM4v2nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim4v2/b4v2noi.c b/src/spicelib/devices/bsim4v2/b4v2noi.c index 9b8c9a9c4..2c3c39f23 100644 --- a/src/spicelib/devices/bsim4v2/b4v2noi.c +++ b/src/spicelib/devices/bsim4v2/b4v2noi.c @@ -134,7 +134,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -149,7 +149,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -161,7 +161,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -307,7 +307,7 @@ int i; break; } - NevalSrc(&noizDens[BSIM4v2FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM4v2FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v2dNodePrime, here->BSIM4v2sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim4v2/b4v2set.c b/src/spicelib/devices/bsim4v2/b4v2set.c index e0ff31757..e728d101f 100644 --- a/src/spicelib/devices/bsim4v2/b4v2set.c +++ b/src/spicelib/devices/bsim4v2/b4v2set.c @@ -1553,7 +1553,7 @@ JOB *job; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim4v3/b4v3dest.c b/src/spicelib/devices/bsim4v3/b4v3dest.c index 50adb7bd0..1dd9bc201 100644 --- a/src/spicelib/devices/bsim4v3/b4v3dest.c +++ b/src/spicelib/devices/bsim4v3/b4v3dest.c @@ -25,7 +25,7 @@ BSIM4v3model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v3nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM4v3instance *)NULL; + prev = NULL; for (here = mod->BSIM4v3instances; here; here = here->BSIM4v3nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim4v3/b4v3noi.c b/src/spicelib/devices/bsim4v3/b4v3noi.c index af0305b47..d8f8a0583 100644 --- a/src/spicelib/devices/bsim4v3/b4v3noi.c +++ b/src/spicelib/devices/bsim4v3/b4v3noi.c @@ -136,7 +136,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -151,7 +151,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -163,7 +163,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -309,7 +309,7 @@ int i; break; } - NevalSrc(&noizDens[BSIM4v3FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM4v3FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v3dNodePrime, here->BSIM4v3sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim4v3/b4v3set.c b/src/spicelib/devices/bsim4v3/b4v3set.c index d38cd2927..965506b96 100644 --- a/src/spicelib/devices/bsim4v3/b4v3set.c +++ b/src/spicelib/devices/bsim4v3/b4v3set.c @@ -1633,7 +1633,7 @@ JOB *job; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim4v4/b4v4dest.c b/src/spicelib/devices/bsim4v4/b4v4dest.c index ece3e9203..0934c3356 100644 --- a/src/spicelib/devices/bsim4v4/b4v4dest.c +++ b/src/spicelib/devices/bsim4v4/b4v4dest.c @@ -25,7 +25,7 @@ BSIM4v4model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v4nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM4v4instance *)NULL; + prev = NULL; for (here = mod->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim4v4/b4v4noi.c b/src/spicelib/devices/bsim4v4/b4v4noi.c index a3232779b..7edbddf0d 100644 --- a/src/spicelib/devices/bsim4v4/b4v4noi.c +++ b/src/spicelib/devices/bsim4v4/b4v4noi.c @@ -137,7 +137,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -152,7 +152,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -164,7 +164,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -310,7 +310,7 @@ int i; break; } - NevalSrc(&noizDens[BSIM4v4FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM4v4FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v4dNodePrime, here->BSIM4v4sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim4v4/b4v4set.c b/src/spicelib/devices/bsim4v4/b4v4set.c index a2be67c09..70ecc8912 100644 --- a/src/spicelib/devices/bsim4v4/b4v4set.c +++ b/src/spicelib/devices/bsim4v4/b4v4set.c @@ -1781,7 +1781,7 @@ JOB *job; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/bsim4v5/b4v5dest.c b/src/spicelib/devices/bsim4v5/b4v5dest.c index a4aa2fe45..94d62abb9 100644 --- a/src/spicelib/devices/bsim4v5/b4v5dest.c +++ b/src/spicelib/devices/bsim4v5/b4v5dest.c @@ -25,7 +25,7 @@ BSIM4v5model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v5nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM4v5instance *)NULL; + prev = NULL; for (here = mod->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/bsim4v5/b4v5noi.c b/src/spicelib/devices/bsim4v5/b4v5noi.c index 18aac1b73..d5e44ef42 100644 --- a/src/spicelib/devices/bsim4v5/b4v5noi.c +++ b/src/spicelib/devices/bsim4v5/b4v5noi.c @@ -139,7 +139,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -154,7 +154,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -166,7 +166,7 @@ int i; return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -363,7 +363,7 @@ int i; break; } - NevalSrc(&noizDens[BSIM4v5FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[BSIM4v5FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v5dNodePrime, here->BSIM4v5sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/bsim4v5/b4v5set.c b/src/spicelib/devices/bsim4v5/b4v5set.c index e5bbef270..fd324325f 100644 --- a/src/spicelib/devices/bsim4v5/b4v5set.c +++ b/src/spicelib/devices/bsim4v5/b4v5set.c @@ -1944,7 +1944,7 @@ JOB *job; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/cap/capdest.c b/src/spicelib/devices/cap/capdest.c index c89886b23..434cf8ef2 100644 --- a/src/spicelib/devices/cap/capdest.c +++ b/src/spicelib/devices/cap/capdest.c @@ -25,7 +25,7 @@ CAPdestroy(GENmodel **inModel) for( ; mod ; mod = mod->CAPnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (CAPinstance *)NULL; + prev = NULL; for(here = mod->CAPinstances ; here ; here = here->CAPnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/cap/capsetup.c b/src/spicelib/devices/cap/capsetup.c index 4209ecde9..a57dc1d24 100644 --- a/src/spicelib/devices/cap/capsetup.c +++ b/src/spicelib/devices/cap/capsetup.c @@ -93,7 +93,7 @@ CAPsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/cccs/cccsdest.c b/src/spicelib/devices/cccs/cccsdest.c index dfe7980f5..31dd970d4 100644 --- a/src/spicelib/devices/cccs/cccsdest.c +++ b/src/spicelib/devices/cccs/cccsdest.c @@ -23,7 +23,7 @@ CCCSdestroy(GENmodel **inModel) for( ; mod ; mod = mod->CCCSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (CCCSinstance *)NULL; + prev = NULL; for(here = mod->CCCSinstances ; here ; here = here->CCCSnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/cccs/cccsset.c b/src/spicelib/devices/cccs/cccsset.c index 9c4532c1c..f2c0dee5d 100644 --- a/src/spicelib/devices/cccs/cccsset.c +++ b/src/spicelib/devices/cccs/cccsset.c @@ -45,7 +45,7 @@ CCCSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/ccvs/ccvsdest.c b/src/spicelib/devices/ccvs/ccvsdest.c index 11bf9da8c..01611b0f9 100644 --- a/src/spicelib/devices/ccvs/ccvsdest.c +++ b/src/spicelib/devices/ccvs/ccvsdest.c @@ -22,7 +22,7 @@ CCVSdestroy(GENmodel **inModel) for( ; mod ; mod = mod->CCVSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (CCVSinstance *)NULL; + prev = NULL; for(here = mod->CCVSinstances ; here ; here = here->CCVSnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/ccvs/ccvsset.c b/src/spicelib/devices/ccvs/ccvsset.c index 3b587f6f2..9cadd4f8b 100644 --- a/src/spicelib/devices/ccvs/ccvsset.c +++ b/src/spicelib/devices/ccvs/ccvsset.c @@ -54,7 +54,7 @@ CCVSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/cktcrte.c b/src/spicelib/devices/cktcrte.c index 05ca999ac..27f6da7ef 100644 --- a/src/spicelib/devices/cktcrte.c +++ b/src/spicelib/devices/cktcrte.c @@ -33,7 +33,7 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid na type = modPtr->GENmodType; error = CKTfndDev(ckt, &type, &instPtr, name, inModPtr, - (char *)NULL ); + NULL ); if (error == OK) { if (inInstPtr) *inInstPtr = instPtr; @@ -47,7 +47,7 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid na #endif instPtr = (GENinstance *) tmalloc((size_t) *DEVices[type]->DEVinstSize); - if (instPtr == (GENinstance *)NULL) + if (instPtr == NULL) return E_NOMEM; instPtr->GENname = name; diff --git a/src/spicelib/devices/cktfinddev.c b/src/spicelib/devices/cktfinddev.c index 236470727..4febadaf9 100644 --- a/src/spicelib/devices/cktfinddev.c +++ b/src/spicelib/devices/cktfinddev.c @@ -51,7 +51,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, GENinstance **fast, IFuid name, GENmodel * mods = mods->GENnextModel) { /* and all instances */ - if (modname == (char *)NULL || mods->GENmodName == modname) { + if (modname == NULL || mods->GENmodName == modname) { for (here = mods->GENinstances; here != NULL; here = here->GENnextInstance) @@ -77,7 +77,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, GENinstance **fast, IFuid name, GENmodel * mods = mods->GENnextModel) { /* and all instances */ - if(modname == (char *)NULL || mods->GENmodName == modname) { + if(modname == NULL || mods->GENmodName == modname) { for (here = mods->GENinstances; here != NULL; here = here->GENnextInstance) diff --git a/src/spicelib/devices/cktinit.c b/src/spicelib/devices/cktinit.c index 8970e7759..b6677e234 100644 --- a/src/spicelib/devices/cktinit.c +++ b/src/spicelib/devices/cktinit.c @@ -38,11 +38,11 @@ CKTinit(CKTcircuit **ckt) /* new circuit to create */ for (i = 0; i < DEVmaxnum; i++) - sckt->CKThead[i] = (GENmodel *) NULL; + sckt->CKThead[i] = NULL; sckt->CKTmaxEqNum = 1; - sckt->CKTnodes = (CKTnode *) NULL; - sckt->CKTlastNode = (CKTnode *) NULL; + sckt->CKTnodes = NULL; + sckt->CKTlastNode = NULL; sckt->CKTmatrix = NULL; sckt->CKTgmin = 1e-12; @@ -78,7 +78,7 @@ CKTinit(CKTcircuit **ckt) /* new circuit to create */ sckt->CKTtroubleNode = 0; sckt->CKTtroubleElt = NULL; sckt->CKTtimePoints = NULL; - if (sckt->CKTstat == (STATistics *)NULL) + if (sckt->CKTstat == NULL) return E_NOMEM; sckt->CKTnodeDamping = 0; sckt->CKTabsDv = 0.5; diff --git a/src/spicelib/devices/cpl/cpldest.c b/src/spicelib/devices/cpl/cpldest.c index 2567bb2a1..22ccfb519 100644 --- a/src/spicelib/devices/cpl/cpldest.c +++ b/src/spicelib/devices/cpl/cpldest.c @@ -20,7 +20,7 @@ CPLdestroy(GENmodel **inModel) for( ; mod ; mod = mod->CPLnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (CPLinstance *)NULL; + prev = NULL; for(here = mod->CPLinstances ; here ; here = here->CPLnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/cpl/cplsetup.c b/src/spicelib/devices/cpl/cplsetup.c index 6e649b9f2..26618a7f7 100644 --- a/src/spicelib/devices/cpl/cplsetup.c +++ b/src/spicelib/devices/cpl/cplsetup.c @@ -185,7 +185,7 @@ CPLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/csw/cswdest.c b/src/spicelib/devices/csw/cswdest.c index e817d0f3f..7540dfb36 100644 --- a/src/spicelib/devices/csw/cswdest.c +++ b/src/spicelib/devices/csw/cswdest.c @@ -22,7 +22,7 @@ CSWdestroy(GENmodel **inModel) for( ; mod ; mod = mod->CSWnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (CSWinstance *)NULL; + prev = NULL; for(here = mod->CSWinstances ; here ; here = here->CSWnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/csw/cswnoise.c b/src/spicelib/devices/csw/cswnoise.c index 1c6341937..a8b66dc7d 100644 --- a/src/spicelib/devices/csw/cswnoise.c +++ b/src/spicelib/devices/csw/cswnoise.c @@ -57,7 +57,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ break; @@ -69,7 +69,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s",inst->CSWname); @@ -79,7 +79,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ break; diff --git a/src/spicelib/devices/csw/cswsetup.c b/src/spicelib/devices/csw/cswsetup.c index d8bed59c6..defb07a79 100644 --- a/src/spicelib/devices/csw/cswsetup.c +++ b/src/spicelib/devices/csw/cswsetup.c @@ -62,7 +62,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/dio/diodest.c b/src/spicelib/devices/dio/diodest.c index 527e930f6..e021d5df3 100644 --- a/src/spicelib/devices/dio/diodest.c +++ b/src/spicelib/devices/dio/diodest.c @@ -22,7 +22,7 @@ DIOdestroy(GENmodel **inModel) for( ; mod ; mod = mod->DIOnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (DIOinstance *)NULL; + prev = NULL; for(here = mod->DIOinstances ; here ; here = here->DIOnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/dio/dionoise.c b/src/spicelib/devices/dio/dionoise.c index 39337ed30..6f94bd3c3 100644 --- a/src/spicelib/devices/dio/dionoise.c +++ b/src/spicelib/devices/dio/dionoise.c @@ -66,7 +66,7 @@ DIOnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -79,7 +79,7 @@ DIOnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->DIOname,DIOnNames[i]); @@ -87,7 +87,7 @@ DIOnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -107,7 +107,7 @@ DIOnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, ckt,SHOTNOISE,inst->DIOposPrimeNode, inst->DIOnegNode, *(ckt->CKTstate0 + inst->DIOcurrent)); - NevalSrc(&noizDens[DIOFLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[DIOFLNOIZ], NULL, ckt, N_GAIN,inst->DIOposPrimeNode, inst->DIOnegNode, (double)0.0); noizDens[DIOFLNOIZ] *= model->DIOfNcoef * diff --git a/src/spicelib/devices/dio/diosetup.c b/src/spicelib/devices/dio/diosetup.c index 388a27b48..851933eeb 100644 --- a/src/spicelib/devices/dio/diosetup.c +++ b/src/spicelib/devices/dio/diosetup.c @@ -161,7 +161,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/dio/diotemp.c b/src/spicelib/devices/dio/diotemp.c index 146db219d..28b28ee14 100644 --- a/src/spicelib/devices/dio/diotemp.c +++ b/src/spicelib/devices/dio/diotemp.c @@ -186,14 +186,14 @@ DIOtemp(GENmodel *inModel, CKTcircuit *ckt) model->DIObreakdownVoltage/vt; #ifdef TRACE emsg = TMALLOC(char, 100); - if(emsg == (char *)NULL) return(E_NOMEM); + if(emsg == NULL) return(E_NOMEM); (void)sprintf(emsg, "%%s: breakdown current increased to %g to resolve", cbv); SPfrontEnd->IFerror (ERR_WARNING, emsg, &(here->DIOname)); FREE(emsg); SPfrontEnd->IFerror (ERR_WARNING, - "incompatibility with specified saturation current",(IFuid*)NULL); + "incompatibility with specified saturation current", NULL); #endif xbv=model->DIObreakdownVoltage; } else { @@ -210,7 +210,7 @@ DIOtemp(GENmodel *inModel, CKTcircuit *ckt) } #ifdef TRACE emsg = TMALLOC(char, 100); - if(emsg == (char *)NULL) return(E_NOMEM); + if(emsg == NULL) return(E_NOMEM); (void)sprintf(emsg, "%%s: unable to match forward and reverse diode regions: bv = %g, ibv = %g", xbv,xcbv); diff --git a/src/spicelib/devices/hfet1/hfetdest.c b/src/spicelib/devices/hfet1/hfetdest.c index 6cf89b9f6..75be3fc21 100644 --- a/src/spicelib/devices/hfet1/hfetdest.c +++ b/src/spicelib/devices/hfet1/hfetdest.c @@ -20,7 +20,7 @@ HFETAdestroy(GENmodel **inModel) for( ; mod ; mod = mod->HFETAnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (HFETAinstance *)NULL; + prev = NULL; for(here = mod->HFETAinstances ; here ; here = here->HFETAnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/hfet1/hfetsetup.c b/src/spicelib/devices/hfet1/hfetsetup.c index 5c5142167..352450668 100644 --- a/src/spicelib/devices/hfet1/hfetsetup.c +++ b/src/spicelib/devices/hfet1/hfetsetup.c @@ -356,7 +356,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/hfet2/hfet2dest.c b/src/spicelib/devices/hfet2/hfet2dest.c index 1932d007a..f00f51b80 100644 --- a/src/spicelib/devices/hfet2/hfet2dest.c +++ b/src/spicelib/devices/hfet2/hfet2dest.c @@ -20,7 +20,7 @@ void HFET2destroy(GENmodel **inModel) for( ; mod ; mod = mod->HFET2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (HFET2instance *)NULL; + prev = NULL; for(here = mod->HFET2instances ; here ; here = here->HFET2nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/hfet2/hfet2setup.c b/src/spicelib/devices/hfet2/hfet2setup.c index 854045064..c7b8437b2 100644 --- a/src/spicelib/devices/hfet2/hfet2setup.c +++ b/src/spicelib/devices/hfet2/hfet2setup.c @@ -176,7 +176,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/hisim/hsm1dest.c b/src/spicelib/devices/hisim/hsm1dest.c index 22e8d3a9d..b3faa40f6 100644 --- a/src/spicelib/devices/hisim/hsm1dest.c +++ b/src/spicelib/devices/hisim/hsm1dest.c @@ -24,7 +24,7 @@ HSM1destroy(GENmodel **inModel) for ( ;mod ;mod = mod->HSM1nextModel ) { if (oldmod) FREE(oldmod); oldmod = mod; - prev = (HSM1instance *)NULL; + prev = NULL; for ( here = mod->HSM1instances ;here ;here = here->HSM1nextInstance ) { if (prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/hisim/hsm1noi.c b/src/spicelib/devices/hisim/hsm1noi.c index 031d2c88f..7df0ef78f 100644 --- a/src/spicelib/devices/hisim/hsm1noi.c +++ b/src/spicelib/devices/hisim/hsm1noi.c @@ -95,7 +95,7 @@ HSM1noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); } break; case INT_NOIZ: @@ -107,7 +107,7 @@ HSM1noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); (void) sprintf(name, "inoise_total.%s%s", (char *)here->HSM1name, HSM1nNames[i]); @@ -116,7 +116,7 @@ HSM1noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid) NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); } break; } @@ -164,7 +164,7 @@ HSM1noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, here->HSM1dNodePrime, here->HSM1sNodePrime, 0.0); break; } - NevalSrc(&noizDens[HSM1FLNOIZ], (double*) NULL, + NevalSrc(&noizDens[HSM1FLNOIZ], NULL, ckt, N_GAIN, here->HSM1dNodePrime, here->HSM1sNodePrime, (double) 0.0); diff --git a/src/spicelib/devices/hisim/hsm1set.c b/src/spicelib/devices/hisim/hsm1set.c index 2ab4990a0..040e495a8 100644 --- a/src/spicelib/devices/hisim/hsm1set.c +++ b/src/spicelib/devices/hisim/hsm1set.c @@ -383,7 +383,7 @@ HSM1setup(register SMPmatrix *matrix, register GENmodel *inModel, /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/ind/inddest.c b/src/spicelib/devices/ind/inddest.c index eaa1cdecc..4f95d2c6b 100644 --- a/src/spicelib/devices/ind/inddest.c +++ b/src/spicelib/devices/ind/inddest.c @@ -22,7 +22,7 @@ INDdestroy(GENmodel **inModel) for( ; mod ; mod = mod->INDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (INDinstance *)NULL; + prev = NULL; for(here = mod->INDinstances ; here ; here = here->INDnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/ind/indsetup.c b/src/spicelib/devices/ind/indsetup.c index 650e526c5..b61b72402 100644 --- a/src/spicelib/devices/ind/indsetup.c +++ b/src/spicelib/devices/ind/indsetup.c @@ -91,7 +91,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/ind/mutdest.c b/src/spicelib/devices/ind/mutdest.c index 804ef9011..64ce79d22 100644 --- a/src/spicelib/devices/ind/mutdest.c +++ b/src/spicelib/devices/ind/mutdest.c @@ -23,7 +23,7 @@ MUTdestroy(GENmodel **inModel) for( ; mod ; mod = mod->MUTnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MUTinstance *)NULL; + prev = NULL; for(here = mod->MUTinstances ; here ; here = here->MUTnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/ind/mutsetup.c b/src/spicelib/devices/ind/mutsetup.c index b51815424..2c1c2a8e9 100644 --- a/src/spicelib/devices/ind/mutsetup.c +++ b/src/spicelib/devices/ind/mutsetup.c @@ -39,12 +39,12 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) if(ktype <= 0) { SPfrontEnd->IFerror (ERR_PANIC, "mutual inductor, but inductors not available!", - (IFuid *)NULL); + NULL); return(E_INTERN); } error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind1), - here->MUTindName1, (GENmodel *)NULL, (char *)NULL); + here->MUTindName1, NULL, NULL); if(error && error!= E_NODEV && error != E_NOMOD) return(error); if(error) { IFuid namarray[2]; @@ -55,7 +55,7 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) namarray); } error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind2), - here->MUTindName2, (GENmodel *)NULL, (char *)NULL); + here->MUTindName2, NULL, NULL); if(error && error!= E_NODEV && error != E_NOMOD) return(error); if(error) { IFuid namarray[2]; @@ -69,7 +69,7 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/isrc/isrcdest.c b/src/spicelib/devices/isrc/isrcdest.c index 859f2261c..80912bc0f 100644 --- a/src/spicelib/devices/isrc/isrcdest.c +++ b/src/spicelib/devices/isrc/isrcdest.c @@ -22,7 +22,7 @@ ISRCdestroy(GENmodel **inModel) for( ; mod ; mod = mod->ISRCnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (ISRCinstance *)NULL; + prev = NULL; for(here = mod->ISRCinstances ; here ; here = here->ISRCnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/jfet/jfetdest.c b/src/spicelib/devices/jfet/jfetdest.c index ef68425a8..c7e9a9077 100644 --- a/src/spicelib/devices/jfet/jfetdest.c +++ b/src/spicelib/devices/jfet/jfetdest.c @@ -22,7 +22,7 @@ JFETdestroy(GENmodel **inModel) for( ; mod ; mod = mod->JFETnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (JFETinstance *)NULL; + prev = NULL; for(here = mod->JFETinstances ; here ; here = here->JFETnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/jfet/jfetnoi.c b/src/spicelib/devices/jfet/jfetnoi.c index 894081414..0d85379a5 100644 --- a/src/spicelib/devices/jfet/jfetnoi.c +++ b/src/spicelib/devices/jfet/jfetnoi.c @@ -67,7 +67,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -83,7 +83,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -94,7 +94,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -121,7 +121,7 @@ if (!data->namelist) return(E_NOMEM); inst->JFETsourcePrimeNode, (2.0/3.0 * inst->JFETm * fabs(*(ckt->CKTstate0 + inst->JFETgm)))); - NevalSrc(&noizDens[JFETFLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[JFETFLNOIZ], NULL, ckt, N_GAIN,inst->JFETdrainPrimeNode, inst->JFETsourcePrimeNode, (double)0.0); noizDens[JFETFLNOIZ] *= inst->JFETm * model->JFETfNcoef * diff --git a/src/spicelib/devices/jfet/jfetset.c b/src/spicelib/devices/jfet/jfetset.c index f9375c32f..9f817147f 100644 --- a/src/spicelib/devices/jfet/jfetset.c +++ b/src/spicelib/devices/jfet/jfetset.c @@ -144,7 +144,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/jfet2/jfet2dest.c b/src/spicelib/devices/jfet2/jfet2dest.c index 3129012aa..ae6eb8b39 100644 --- a/src/spicelib/devices/jfet2/jfet2dest.c +++ b/src/spicelib/devices/jfet2/jfet2dest.c @@ -26,7 +26,7 @@ JFET2destroy(GENmodel **inModel) for( ; mod ; mod = mod->JFET2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (JFET2instance *)NULL; + prev = NULL; for(here = mod->JFET2instances ; here ; here = here->JFET2nextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/jfet2/jfet2noi.c b/src/spicelib/devices/jfet2/jfet2noi.c index 0b5831aba..031a25cb2 100644 --- a/src/spicelib/devices/jfet2/jfet2noi.c +++ b/src/spicelib/devices/jfet2/jfet2noi.c @@ -72,7 +72,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -88,7 +88,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -99,7 +99,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -126,7 +126,7 @@ if (!data->namelist) return(E_NOMEM); inst->JFET2sourcePrimeNode, (2.0/3.0 * inst->JFET2m * fabs(*(ckt->CKTstate0 + inst->JFET2gm)))); - NevalSrc(&noizDens[JFET2FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[JFET2FLNOIZ], NULL, ckt, N_GAIN,inst->JFET2drainPrimeNode, inst->JFET2sourcePrimeNode, (double)0.0); noizDens[JFET2FLNOIZ] *= inst->JFET2m * model->JFET2fNcoef * diff --git a/src/spicelib/devices/jfet2/jfet2set.c b/src/spicelib/devices/jfet2/jfet2set.c index ba096efb2..e2f2d6114 100644 --- a/src/spicelib/devices/jfet2/jfet2set.c +++ b/src/spicelib/devices/jfet2/jfet2set.c @@ -97,7 +97,7 @@ matrixpointers2: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/ltra/ltraask.c b/src/spicelib/devices/ltra/ltraask.c index d6f596643..bf2bec9a1 100644 --- a/src/spicelib/devices/ltra/ltraask.c +++ b/src/spicelib/devices/ltra/ltraask.c @@ -80,7 +80,7 @@ LTRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue * * value->v.numValue = temp = here->LTRAsizeDelay; while (temp--) { * value->v.vec.rVec++ = *here->LTRAdelays++; */ - value->v.vec.rVec = (double *) NULL; + value->v.vec.rVec = NULL; value->v.numValue = temp = 0; return (OK); default: diff --git a/src/spicelib/devices/ltra/ltradest.c b/src/spicelib/devices/ltra/ltradest.c index ab559e9f5..66d475cfb 100644 --- a/src/spicelib/devices/ltra/ltradest.c +++ b/src/spicelib/devices/ltra/ltradest.c @@ -20,7 +20,7 @@ LTRAdestroy(GENmodel **inModel) if (oldmod) FREE(oldmod); oldmod = mod; - prev = (LTRAinstance *) NULL; + prev = NULL; for (here = mod->LTRAinstances; here; here = here->LTRAnextInstance) { if (prev) FREE(prev); diff --git a/src/spicelib/devices/ltra/ltraset.c b/src/spicelib/devices/ltra/ltraset.c index c53981005..84cbe5024 100644 --- a/src/spicelib/devices/ltra/ltraset.c +++ b/src/spicelib/devices/ltra/ltraset.c @@ -186,7 +186,7 @@ LTRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/ltra/ltratemp.c b/src/spicelib/devices/ltra/ltratemp.c index 622ad82e4..3feec4c97 100644 --- a/src/spicelib/devices/ltra/ltratemp.c +++ b/src/spicelib/devices/ltra/ltratemp.c @@ -78,16 +78,16 @@ LTRAtemp(GENmodel *inModel, CKTcircuit *ckt) } /* - * model->LTRAh1dashValues = (double *) NULL; model->LTRAh2Values = - * (double *) NULL; model->LTRAh3dashValues = (double *) NULL; + * model->LTRAh1dashValues = NULL; model->LTRAh2Values = + * NULL; model->LTRAh3dashValues = NULL; * - * model->LTRAh1dashOthVals = (double *) NULL; model->LTRAh2OthVals = - * (double *) NULL; model->LTRAh3dashOthVals = (double *) NULL; + * model->LTRAh1dashOthVals = NULL; model->LTRAh2OthVals = + * NULL; model->LTRAh3dashOthVals = NULL; */ - model->LTRAh1dashCoeffs = (double *) NULL; - model->LTRAh2Coeffs = (double *) NULL; - model->LTRAh3dashCoeffs = (double *) NULL; + model->LTRAh1dashCoeffs = NULL; + model->LTRAh2Coeffs = NULL; + model->LTRAh3dashCoeffs = NULL; if (!model->LTRAtruncDontCut) { @@ -133,9 +133,9 @@ LTRAtemp(GENmodel *inModel, CKTcircuit *ckt) model->LTRAintH2 = 1.0; model->LTRAintH3dash = 0.0; - model->LTRAh1dashCoeffs = (double *) NULL; - model->LTRAh2Coeffs = (double *) NULL; - model->LTRAh3dashCoeffs = (double *) NULL; + model->LTRAh1dashCoeffs = NULL; + model->LTRAh2Coeffs = NULL; + model->LTRAh3dashCoeffs = NULL; break; @@ -151,10 +151,10 @@ LTRAtemp(GENmodel *inModel, CKTcircuit *ckt) here = here->LTRAnextInstance) { if (here->LTRAowner != ARCHme) continue; - here->LTRAv1 = (double *) NULL; - here->LTRAi1 = (double *) NULL; - here->LTRAv2 = (double *) NULL; - here->LTRAi2 = (double *) NULL; + here->LTRAv1 = NULL; + here->LTRAi1 = NULL; + here->LTRAv2 = NULL; + here->LTRAi2 = NULL; } } return (OK); diff --git a/src/spicelib/devices/mes/mesdest.c b/src/spicelib/devices/mes/mesdest.c index 32b7dae9a..622146ca6 100644 --- a/src/spicelib/devices/mes/mesdest.c +++ b/src/spicelib/devices/mes/mesdest.c @@ -22,7 +22,7 @@ MESdestroy(GENmodel **inModel) for( ; mod ; mod = mod->MESnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MESinstance *)NULL; + prev = NULL; for(here = mod->MESinstances ; here ; here = here->MESnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/mes/mesnoise.c b/src/spicelib/devices/mes/mesnoise.c index f74989f04..3229a5e09 100644 --- a/src/spicelib/devices/mes/mesnoise.c +++ b/src/spicelib/devices/mes/mesnoise.c @@ -67,7 +67,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -83,7 +83,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -98,7 +98,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -125,7 +125,7 @@ if (!data->namelist) return(E_NOMEM); inst->MESsourcePrimeNode, (2.0/3.0 * inst->MESm * fabs(*(ckt->CKTstate0 + inst->MESgm)))); - NevalSrc(&noizDens[MESFLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[MESFLNOIZ], NULL, ckt, N_GAIN,inst->MESdrainPrimeNode, inst->MESsourcePrimeNode, (double)0.0); noizDens[MESFLNOIZ] *= inst->MESm * model->MESfNcoef * diff --git a/src/spicelib/devices/mes/messetup.c b/src/spicelib/devices/mes/messetup.c index ed63af719..cf485fccf 100644 --- a/src/spicelib/devices/mes/messetup.c +++ b/src/spicelib/devices/mes/messetup.c @@ -130,7 +130,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/mesa/mesadest.c b/src/spicelib/devices/mesa/mesadest.c index ccc93b766..9f7c112e8 100644 --- a/src/spicelib/devices/mesa/mesadest.c +++ b/src/spicelib/devices/mesa/mesadest.c @@ -20,7 +20,7 @@ MESAdestroy(GENmodel **inModel) for( ; mod ; mod = mod->MESAnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MESAinstance *)NULL; + prev = NULL; for(here = mod->MESAinstances ; here ; here = here->MESAnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/mesa/mesasetup.c b/src/spicelib/devices/mesa/mesasetup.c index d0736805f..97b996197 100644 --- a/src/spicelib/devices/mesa/mesasetup.c +++ b/src/spicelib/devices/mesa/mesasetup.c @@ -361,7 +361,7 @@ matrixpointers: } #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/mos1/mos1dest.c b/src/spicelib/devices/mos1/mos1dest.c index 65777c455..95d948c5a 100644 --- a/src/spicelib/devices/mos1/mos1dest.c +++ b/src/spicelib/devices/mos1/mos1dest.c @@ -22,7 +22,7 @@ MOS1destroy(GENmodel **inModel) for( ; mod ; mod = mod->MOS1nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MOS1instance *)NULL; + prev = NULL; for(here = mod->MOS1instances ; here ; here = here->MOS1nextInstance) { if(prev){ if(prev->MOS1sens) FREE(prev->MOS1sens); diff --git a/src/spicelib/devices/mos1/mos1noi.c b/src/spicelib/devices/mos1/mos1noi.c index b3de164ab..731f17ec9 100644 --- a/src/spicelib/devices/mos1/mos1noi.c +++ b/src/spicelib/devices/mos1/mos1noi.c @@ -78,7 +78,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -94,7 +94,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -105,7 +105,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -131,7 +131,7 @@ if (!data->namelist) return(E_NOMEM); ckt,THERMNOISE,inst->MOS1dNodePrime,inst->MOS1sNodePrime, (2.0/3.0 * fabs(inst->MOS1gm))); - NevalSrc(&noizDens[MOS1FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[MOS1FLNOIZ], NULL, ckt, N_GAIN,inst->MOS1dNodePrime, inst->MOS1sNodePrime, (double)0.0); noizDens[MOS1FLNOIZ] *= model->MOS1fNcoef * diff --git a/src/spicelib/devices/mos1/mos1set.c b/src/spicelib/devices/mos1/mos1set.c index 01bfd3cbc..ee9510a80 100644 --- a/src/spicelib/devices/mos1/mos1set.c +++ b/src/spicelib/devices/mos1/mos1set.c @@ -179,7 +179,7 @@ MOS1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } TSTALLOC(MOS1DdPtr,MOS1dNode,MOS1dNode) diff --git a/src/spicelib/devices/mos2/mos2dest.c b/src/spicelib/devices/mos2/mos2dest.c index ef4f4fc02..f9f164aa9 100644 --- a/src/spicelib/devices/mos2/mos2dest.c +++ b/src/spicelib/devices/mos2/mos2dest.c @@ -22,7 +22,7 @@ MOS2destroy(GENmodel **inModel) for( ; mod ; mod = mod->MOS2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MOS2instance *)NULL; + prev = NULL; for(here = mod->MOS2instances ; here ; here = here->MOS2nextInstance) { if(prev){ if(prev->MOS2sens) FREE(prev->MOS2sens); diff --git a/src/spicelib/devices/mos2/mos2noi.c b/src/spicelib/devices/mos2/mos2noi.c index 536a42e8b..1a9486a99 100644 --- a/src/spicelib/devices/mos2/mos2noi.c +++ b/src/spicelib/devices/mos2/mos2noi.c @@ -68,7 +68,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -84,7 +84,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -95,7 +95,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -121,7 +121,7 @@ if (!data->namelist) return(E_NOMEM); ckt,THERMNOISE,inst->MOS2dNodePrime,inst->MOS2sNodePrime, (2.0/3.0 * fabs(inst->MOS2gm))); - NevalSrc(&noizDens[MOS2FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[MOS2FLNOIZ], NULL, ckt, N_GAIN,inst->MOS2dNodePrime, inst->MOS2sNodePrime, (double)0.0); noizDens[MOS2FLNOIZ] *= model->MOS2fNcoef * diff --git a/src/spicelib/devices/mos2/mos2set.c b/src/spicelib/devices/mos2/mos2set.c index a72786e6e..995aeaf62 100644 --- a/src/spicelib/devices/mos2/mos2set.c +++ b/src/spicelib/devices/mos2/mos2set.c @@ -201,7 +201,7 @@ MOS2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/mos3/mos3dest.c b/src/spicelib/devices/mos3/mos3dest.c index df7131bde..080af96ef 100644 --- a/src/spicelib/devices/mos3/mos3dest.c +++ b/src/spicelib/devices/mos3/mos3dest.c @@ -22,7 +22,7 @@ MOS3destroy(GENmodel **inModel) for( ; mod ; mod = mod->MOS3nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MOS3instance *)NULL; + prev = NULL; for(here = mod->MOS3instances ; here ; here = here->MOS3nextInstance) { if(prev){ if(prev->MOS3sens) FREE(prev->MOS3sens); diff --git a/src/spicelib/devices/mos3/mos3noi.c b/src/spicelib/devices/mos3/mos3noi.c index cc5743b70..fbe507c40 100644 --- a/src/spicelib/devices/mos3/mos3noi.c +++ b/src/spicelib/devices/mos3/mos3noi.c @@ -68,7 +68,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -84,7 +84,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -95,7 +95,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -122,7 +122,7 @@ if (!data->namelist) return(E_NOMEM); ckt,THERMNOISE,inst->MOS3dNodePrime,inst->MOS3sNodePrime, (2.0/3.0 * fabs(inst->MOS3gm))); - NevalSrc(&noizDens[MOS3FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[MOS3FLNOIZ], NULL, ckt, N_GAIN,inst->MOS3dNodePrime, inst->MOS3sNodePrime, (double)0.0); noizDens[MOS3FLNOIZ] *= model->MOS3fNcoef * diff --git a/src/spicelib/devices/mos3/mos3set.c b/src/spicelib/devices/mos3/mos3set.c index 8fc9d4e4d..dd373f5ad 100644 --- a/src/spicelib/devices/mos3/mos3set.c +++ b/src/spicelib/devices/mos3/mos3set.c @@ -227,7 +227,7 @@ MOS3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/mos6/mos6dest.c b/src/spicelib/devices/mos6/mos6dest.c index abf7930f2..205441c41 100644 --- a/src/spicelib/devices/mos6/mos6dest.c +++ b/src/spicelib/devices/mos6/mos6dest.c @@ -22,7 +22,7 @@ MOS6destroy(GENmodel **inModel) for( ; mod ; mod = mod->MOS6nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MOS6instance *)NULL; + prev = NULL; for(here = mod->MOS6instances ; here ; here = here->MOS6nextInstance) { if(prev){ if(prev->MOS6sens) FREE(prev->MOS6sens); diff --git a/src/spicelib/devices/mos6/mos6set.c b/src/spicelib/devices/mos6/mos6set.c index 377c0e5cd..b1be6af3d 100644 --- a/src/spicelib/devices/mos6/mos6set.c +++ b/src/spicelib/devices/mos6/mos6set.c @@ -190,7 +190,7 @@ matrixpointers: } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/mos9/mos9dest.c b/src/spicelib/devices/mos9/mos9dest.c index 058929961..7f3084294 100644 --- a/src/spicelib/devices/mos9/mos9dest.c +++ b/src/spicelib/devices/mos9/mos9dest.c @@ -23,7 +23,7 @@ MOS9destroy(GENmodel **inModel) for( ; mod ; mod = mod->MOS9nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (MOS9instance *)NULL; + prev = NULL; for(here = mod->MOS9instances ; here ; here = here->MOS9nextInstance) { if(prev){ if(prev->MOS9sens) FREE(prev->MOS9sens); diff --git a/src/spicelib/devices/mos9/mos9noi.c b/src/spicelib/devices/mos9/mos9noi.c index cc194a4bc..f12cbbe86 100644 --- a/src/spicelib/devices/mos9/mos9noi.c +++ b/src/spicelib/devices/mos9/mos9noi.c @@ -68,7 +68,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -84,7 +84,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -95,7 +95,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -122,7 +122,7 @@ if (!data->namelist) return(E_NOMEM); ckt,THERMNOISE,inst->MOS9dNodePrime,inst->MOS9sNodePrime, (2.0/3.0 * fabs(inst->MOS9gm))); - NevalSrc(&noizDens[MOS9FLNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[MOS9FLNOIZ], NULL, ckt, N_GAIN,inst->MOS9dNodePrime, inst->MOS9sNodePrime, (double)0.0); noizDens[MOS9FLNOIZ] *= model->MOS9fNcoef * diff --git a/src/spicelib/devices/mos9/mos9set.c b/src/spicelib/devices/mos9/mos9set.c index b23969bf0..b6fe5e4aa 100644 --- a/src/spicelib/devices/mos9/mos9set.c +++ b/src/spicelib/devices/mos9/mos9set.c @@ -226,7 +226,7 @@ MOS9setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/nbjt/nbjtload.c b/src/spicelib/devices/nbjt/nbjtload.c index 5d65b7391..921f6fa36 100644 --- a/src/spicelib/devices/nbjt/nbjtload.c +++ b/src/spicelib/devices/nbjt/nbjtload.c @@ -317,9 +317,9 @@ NBJTload(GENmodel *inModel, CKTcircuit *ckt) devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* compute the currents */ - NBJTcurrent(pDevice, FALSE, (double *) NULL, + NBJTcurrent(pDevice, FALSE, NULL, &ie, &ic); - NBJTconductance(pDevice, FALSE, (double *) NULL, + NBJTconductance(pDevice, FALSE, NULL, &dIeDVce, &dIcDVce, &dIeDVbe, &dIcDVbe); /* * Add Gmin terms to everything in case we are operating at diff --git a/src/spicelib/devices/nbjt/nbjtset.c b/src/spicelib/devices/nbjt/nbjtset.c index f106b4c97..c05d794a6 100644 --- a/src/spicelib/devices/nbjt/nbjtset.c +++ b/src/spicelib/devices/nbjt/nbjtset.c @@ -229,7 +229,7 @@ NBJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if ((inst->ptr = SMPmakeElt(matrix,inst->first,inst->second))==(double *)NULL){\ +if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/nbjt2/nbt2load.c b/src/spicelib/devices/nbjt2/nbt2load.c index f574b3560..2273c61c2 100644 --- a/src/spicelib/devices/nbjt2/nbt2load.c +++ b/src/spicelib/devices/nbjt2/nbt2load.c @@ -332,8 +332,8 @@ NBJT2load(GENmodel *inModel, CKTcircuit *ckt) devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* compute the currents */ - NBJT2current(pDevice, FALSE, (double *) NULL, &ie, &ic); - NBJT2conductance(pDevice, FALSE, (double *) NULL, + NBJT2current(pDevice, FALSE, NULL, &ie, &ic); + NBJT2conductance(pDevice, FALSE, NULL, &dIeDVce, &dIcDVce, &dIeDVbe, &dIcDVbe); } else { diff --git a/src/spicelib/devices/nbjt2/nbt2set.c b/src/spicelib/devices/nbjt2/nbt2set.c index 867a20a91..c8444f672 100644 --- a/src/spicelib/devices/nbjt2/nbt2set.c +++ b/src/spicelib/devices/nbjt2/nbt2set.c @@ -246,7 +246,7 @@ NBJT2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if ((inst->ptr = SMPmakeElt(matrix,inst->first,inst->second))==(double *)NULL){\ +if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/ndev/ndevdest.c b/src/spicelib/devices/ndev/ndevdest.c index 43bfeb2bd..29f4483ad 100644 --- a/src/spicelib/devices/ndev/ndevdest.c +++ b/src/spicelib/devices/ndev/ndevdest.c @@ -22,7 +22,7 @@ NDEVdestroy(GENmodel **inModel) for( ; mod ; mod = mod->NDEVnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (NDEVinstance *)NULL; + prev = NULL; for(here = mod->NDEVinstances ; here ; here = here->NDEVnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/ndev/ndevset.c b/src/spicelib/devices/ndev/ndevset.c index 27b3494a0..08f8eb113 100644 --- a/src/spicelib/devices/ndev/ndevset.c +++ b/src/spicelib/devices/ndev/ndevset.c @@ -51,7 +51,7 @@ int NDEVsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states send(model->sock,&(here->Ndevinfo),sizeof(here->Ndevinfo),0); /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/numd/numdload.c b/src/spicelib/devices/numd/numdload.c index 1cb0970f5..3aea93e57 100644 --- a/src/spicelib/devices/numd/numdload.c +++ b/src/spicelib/devices/numd/numdload.c @@ -254,8 +254,8 @@ NUMDload(GENmodel *inModel, CKTcircuit *ckt) devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* Get the current and conductance information. */ - NUMDcurrent(pDevice, FALSE, (double *) NULL, &id); - NUMDconductance(pDevice, FALSE, (double *) NULL, &gd); + NUMDcurrent(pDevice, FALSE, NULL, &id); + NUMDconductance(pDevice, FALSE, NULL, &gd); } else { /* reduce the voltage step until converged */ /* restore the boundary potential to previous value */ diff --git a/src/spicelib/devices/numd/numdset.c b/src/spicelib/devices/numd/numdset.c index 2fb740e7e..d67ef9484 100644 --- a/src/spicelib/devices/numd/numdset.c +++ b/src/spicelib/devices/numd/numdset.c @@ -218,7 +218,7 @@ NUMDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if ((inst->ptr = SMPmakeElt(matrix,inst->first,inst->second))==(double *)NULL){\ +if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/numd2/nud2load.c b/src/spicelib/devices/numd2/nud2load.c index f15ba9da3..35d7250ed 100644 --- a/src/spicelib/devices/numd2/nud2load.c +++ b/src/spicelib/devices/numd2/nud2load.c @@ -263,8 +263,8 @@ NUMD2load(GENmodel *inModel, CKTcircuit *ckt) if (devConverged && finite(pDevice->rhsNorm)) { /* extract the current and conductance information */ - NUMD2current(pDevice, FALSE, (double *) NULL, &id); - NUMD2conductance(pDevice, FALSE, (double *) NULL, &gd); + NUMD2current(pDevice, FALSE, NULL, &id); + NUMD2conductance(pDevice, FALSE, NULL, &gd); } else { /* do voltage step backtracking */ /* restore the boundary nodes to the previous value */ diff --git a/src/spicelib/devices/numd2/nud2set.c b/src/spicelib/devices/numd2/nud2set.c index 6805a043c..0a87f0983 100644 --- a/src/spicelib/devices/numd2/nud2set.c +++ b/src/spicelib/devices/numd2/nud2set.c @@ -244,7 +244,7 @@ NUMD2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if ((inst->ptr = SMPmakeElt(matrix,inst->first,inst->second))==(double *)NULL){\ +if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } matrixpointers: diff --git a/src/spicelib/devices/numos/nummload.c b/src/spicelib/devices/numos/nummload.c index cf15e4a3d..4a267f82f 100644 --- a/src/spicelib/devices/numos/nummload.c +++ b/src/spicelib/devices/numos/nummload.c @@ -409,8 +409,8 @@ NUMOSload(GENmodel *inModel, CKTcircuit *ckt) devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* compute the currents */ - NUMOScurrent(pDevice, FALSE, (double *) NULL, &id, &is, &ig); - NUMOSconductance(pDevice, FALSE, (double *) NULL, &g); + NUMOScurrent(pDevice, FALSE, NULL, &id, &is, &ig); + NUMOSconductance(pDevice, FALSE, NULL, &g); /* * Add gmin to the gate conductance terms since they will be zero. * XXX This messes up the gXY output values, but we choose not to diff --git a/src/spicelib/devices/numos/nummset.c b/src/spicelib/devices/numos/nummset.c index ceec06bec..3bc9da230 100644 --- a/src/spicelib/devices/numos/nummset.c +++ b/src/spicelib/devices/numos/nummset.c @@ -243,7 +243,7 @@ NUMOSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if ((inst->ptr = SMPmakeElt(matrix,inst->first,inst->second))==(double *)NULL){\ +if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/res/resdest.c b/src/spicelib/devices/res/resdest.c index 985d78fce..82f71e9b7 100644 --- a/src/spicelib/devices/res/resdest.c +++ b/src/spicelib/devices/res/resdest.c @@ -22,7 +22,7 @@ RESdestroy(GENmodel **inModel) for( ; mod ; mod = mod->RESnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (RESinstance *)NULL; + prev = NULL; for(here = mod->RESinstances ; here ; here = here->RESnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/res/resnoise.c b/src/spicelib/devices/res/resnoise.c index 7999074e9..9ed646704 100644 --- a/src/spicelib/devices/res/resnoise.c +++ b/src/spicelib/devices/res/resnoise.c @@ -80,7 +80,7 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; @@ -95,7 +95,7 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -107,7 +107,7 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } @@ -125,7 +125,7 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, ckt,THERMNOISE, inst->RESposNode,inst->RESnegNode, inst->RESconduct * inst->RESm, inst->RESdtemp); - NevalSrc2(&noizDens[RESFLNOIZ],(double*)NULL, ckt, + NevalSrc2(&noizDens[RESFLNOIZ], NULL, ckt, N_GAIN,inst->RESposNode, inst->RESnegNode, (double)0.0, (double)0.0); diff --git a/src/spicelib/devices/res/ressetup.c b/src/spicelib/devices/res/ressetup.c index 0d4690ebc..10520a396 100644 --- a/src/spicelib/devices/res/ressetup.c +++ b/src/spicelib/devices/res/ressetup.c @@ -44,7 +44,7 @@ RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/soi3/soi3dest.c b/src/spicelib/devices/soi3/soi3dest.c index 62eeb8228..8aefe0171 100644 --- a/src/spicelib/devices/soi3/soi3dest.c +++ b/src/spicelib/devices/soi3/soi3dest.c @@ -37,7 +37,7 @@ SOI3destroy(GENmodel **inModel) for( ; mod ; mod = mod->SOI3nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (SOI3instance *)NULL; + prev = NULL; for(here = mod->SOI3instances ; here ; here = here->SOI3nextInstance) { if(prev){ /* if(prev->SOI3sens) FREE(prev->SOI3sens); */ diff --git a/src/spicelib/devices/soi3/soi3nois.c b/src/spicelib/devices/soi3/soi3nois.c index f9bdefc2b..275fdcf68 100644 --- a/src/spicelib/devices/soi3/soi3nois.c +++ b/src/spicelib/devices/soi3/soi3nois.c @@ -93,7 +93,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -109,7 +109,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->SOI3name,SOI3nNames[i]); @@ -119,7 +119,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -140,7 +140,7 @@ if (!data->namelist) return(E_NOMEM); * is valid in ALL regions and not just saturation. */ EffectiveLength=inst->SOI3l - 2*model->SOI3latDiff; - NevalSrc(&noizDens[SOI3RDNOIZ],(double*)NULL, + NevalSrc(&noizDens[SOI3RDNOIZ], NULL, ckt,N_GAIN,inst->SOI3dNodePrime,inst->SOI3dNode, (double)0.0); noizDens[SOI3RDNOIZ] *= 4 * CONSTboltz * @@ -148,7 +148,7 @@ if (!data->namelist) return(E_NOMEM); inst->SOI3drainConductance * inst->SOI3m; lnNdens[SOI3RDNOIZ] = log(MAX(noizDens[SOI3RDNOIZ],N_MINLOG)); - NevalSrc(&noizDens[SOI3RSNOIZ],(double*)NULL, + NevalSrc(&noizDens[SOI3RSNOIZ], NULL, ckt,N_GAIN,inst->SOI3sNodePrime,inst->SOI3sNode, (double)0.0); noizDens[SOI3RSNOIZ] *= 4 * CONSTboltz * @@ -156,7 +156,7 @@ if (!data->namelist) return(E_NOMEM); inst->SOI3sourceConductance * inst->SOI3m; lnNdens[SOI3RSNOIZ] = log(MAX(noizDens[SOI3RSNOIZ],N_MINLOG)); - NevalSrc(&gain,(double*)NULL,ckt, + NevalSrc(&gain, NULL, ckt, N_GAIN,inst->SOI3dNodePrime, inst->SOI3sNodePrime, (double)0.0); diff --git a/src/spicelib/devices/soi3/soi3set.c b/src/spicelib/devices/soi3/soi3set.c index 10e925ece..498bad89a 100644 --- a/src/spicelib/devices/soi3/soi3set.c +++ b/src/spicelib/devices/soi3/soi3set.c @@ -570,7 +570,7 @@ SOI3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/sw/swdest.c b/src/spicelib/devices/sw/swdest.c index 53553fbf6..fc0dd5c73 100644 --- a/src/spicelib/devices/sw/swdest.c +++ b/src/spicelib/devices/sw/swdest.c @@ -22,7 +22,7 @@ SWdestroy(GENmodel **inModel) for( ; mod ; mod = mod->SWnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (SWinstance *)NULL; + prev = NULL; for(here = mod->SWinstances ; here ; here = here->SWnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/sw/swnoise.c b/src/spicelib/devices/sw/swnoise.c index e092cb63e..72bd24533 100644 --- a/src/spicelib/devices/sw/swnoise.c +++ b/src/spicelib/devices/sw/swnoise.c @@ -57,7 +57,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -71,7 +71,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ @@ -82,7 +82,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ diff --git a/src/spicelib/devices/sw/swsetup.c b/src/spicelib/devices/sw/swsetup.c index d4add9604..07034b69d 100644 --- a/src/spicelib/devices/sw/swsetup.c +++ b/src/spicelib/devices/sw/swsetup.c @@ -53,7 +53,7 @@ SWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/tra/tradest.c b/src/spicelib/devices/tra/tradest.c index 82ff019a5..b0e21e5fb 100644 --- a/src/spicelib/devices/tra/tradest.c +++ b/src/spicelib/devices/tra/tradest.c @@ -22,7 +22,7 @@ TRAdestroy(GENmodel **inModel) for( ; mod ; mod = mod->TRAnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (TRAinstance *)NULL; + prev = NULL; for(here = mod->TRAinstances ; here ; here = here->TRAnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/tra/trasetup.c b/src/spicelib/devices/tra/trasetup.c index cc3b2826a..94a812d8c 100644 --- a/src/spicelib/devices/tra/trasetup.c +++ b/src/spicelib/devices/tra/trasetup.c @@ -64,7 +64,7 @@ TRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/txl/txldest.c b/src/spicelib/devices/txl/txldest.c index 3963bdcba..cbaa87e55 100644 --- a/src/spicelib/devices/txl/txldest.c +++ b/src/spicelib/devices/txl/txldest.c @@ -22,7 +22,7 @@ TXLdestroy(GENmodel **inModel) for( ; mod ; mod = mod->TXLnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (TXLinstance *)NULL; + prev = NULL; for(here = mod->TXLinstances ; here ; here = here->TXLnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/txl/txlsetup.c b/src/spicelib/devices/txl/txlsetup.c index aff2cda55..850503800 100644 --- a/src/spicelib/devices/txl/txlsetup.c +++ b/src/spicelib/devices/txl/txlsetup.c @@ -119,7 +119,7 @@ TXLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/urc/urcdest.c b/src/spicelib/devices/urc/urcdest.c index 6017ea112..8fbe07c3e 100644 --- a/src/spicelib/devices/urc/urcdest.c +++ b/src/spicelib/devices/urc/urcdest.c @@ -23,7 +23,7 @@ URCdestroy(GENmodel **inModel) for( ; mod ; mod = mod->URCnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (URCinstance *)NULL; + prev = NULL; for(here = mod->URCinstances ; here ; here = here->URCnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/urc/urcsetup.c b/src/spicelib/devices/urc/urcsetup.c index e1b29459d..b195715f6 100644 --- a/src/spicelib/devices/urc/urcsetup.c +++ b/src/spicelib/devices/urc/urcsetup.c @@ -98,7 +98,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = SPfrontEnd->IFnewUid (ckt, &dioUid, here->URCname, "diodemod", UID_MODEL, NULL); if(error) return(error); - modfast = (GENmodel *)NULL; + modfast = NULL; error = CKTmodCrt(ckt,dtype,&modfast, dioUid); if(error) return(error); @@ -115,7 +115,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = SPfrontEnd->IFnewUid (ckt, &capUid, here->URCname, "capmod", UID_MODEL, NULL); if(error) return(error); - modfast = (GENmodel *)NULL; + modfast = NULL; error = CKTmodCrt(ckt,ctype,&modfast, capUid); if(error) return(error); @@ -124,7 +124,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) error = SPfrontEnd->IFnewUid (ckt, &resUid, here->URCname, "resmod", UID_MODEL, NULL); if(error) return(error); - rmodfast = (GENmodel *)NULL; + rmodfast = NULL; error = CKTmodCrt(ckt,rtype,&rmodfast,resUid); if(error) return(error); lowl = CKTnum2nod(ckt,here->URCposNode); diff --git a/src/spicelib/devices/vbic/vbicdest.c b/src/spicelib/devices/vbic/vbicdest.c index ae8ecfb0a..af6ffb439 100644 --- a/src/spicelib/devices/vbic/vbicdest.c +++ b/src/spicelib/devices/vbic/vbicdest.c @@ -28,7 +28,7 @@ VBICdestroy(GENmodel **inModel) for( ; mod ; mod = mod->VBICnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (VBICinstance *)NULL; + prev = NULL; for(here = mod->VBICinstances ; here ; here = here->VBICnextInstance) { if(prev){ if(prev->VBICsens) FREE(prev->VBICsens); diff --git a/src/spicelib/devices/vbic/vbicnoise.c b/src/spicelib/devices/vbic/vbicnoise.c index 978d3b067..31b816543 100644 --- a/src/spicelib/devices/vbic/vbicnoise.c +++ b/src/spicelib/devices/vbic/vbicnoise.c @@ -83,7 +83,7 @@ VBICnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata * if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; @@ -97,7 +97,7 @@ VBICnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata * if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s", @@ -107,7 +107,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), - (IFuid)NULL, name, UID_OTHER, NULL); + NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; @@ -165,7 +165,7 @@ if (!data->namelist) return(E_NOMEM); *(ckt->CKTstate0 + inst->VBICiccp)); - NevalSrc(&noizDens[VBICFLBENOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[VBICFLBENOIZ], NULL, ckt, N_GAIN,inst->VBICbaseBINode, inst->VBICemitEINode, (double)0.0); noizDens[VBICFLBENOIZ] *= inst->VBICm * model->VBICfNcoef * @@ -175,7 +175,7 @@ if (!data->namelist) return(E_NOMEM); lnNdens[VBICFLBENOIZ] = log(MAX(noizDens[VBICFLBENOIZ],N_MINLOG)); - NevalSrc(&noizDens[VBICFLBEPNOIZ],(double*)NULL,ckt, + NevalSrc(&noizDens[VBICFLBEPNOIZ], NULL, ckt, N_GAIN,inst->VBICbaseBXNode, inst->VBICbaseBPNode, (double)0.0); noizDens[VBICFLBEPNOIZ] *= inst->VBICm * model->VBICfNcoef * diff --git a/src/spicelib/devices/vbic/vbicsetup.c b/src/spicelib/devices/vbic/vbicsetup.c index 0dcebefc8..ca8c3eb85 100644 --- a/src/spicelib/devices/vbic/vbicsetup.c +++ b/src/spicelib/devices/vbic/vbicsetup.c @@ -470,7 +470,7 @@ matrixpointers: /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } TSTALLOC(VBICcollCollPtr,VBICcollNode,VBICcollNode) diff --git a/src/spicelib/devices/vccs/vccsdest.c b/src/spicelib/devices/vccs/vccsdest.c index 4d031cfd2..f5d99a99b 100644 --- a/src/spicelib/devices/vccs/vccsdest.c +++ b/src/spicelib/devices/vccs/vccsdest.c @@ -23,7 +23,7 @@ VCCSdestroy(GENmodel **inModel) for( ; mod ; mod = mod->VCCSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (VCCSinstance *)NULL; + prev = NULL; for(here = mod->VCCSinstances ; here ; here = here->VCCSnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/vccs/vccsset.c b/src/spicelib/devices/vccs/vccsset.c index 3697c8697..365aca4f4 100644 --- a/src/spicelib/devices/vccs/vccsset.c +++ b/src/spicelib/devices/vccs/vccsset.c @@ -37,7 +37,7 @@ VCCSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/vcvs/vcvsdest.c b/src/spicelib/devices/vcvs/vcvsdest.c index b571c50fa..2cf0d5be9 100644 --- a/src/spicelib/devices/vcvs/vcvsdest.c +++ b/src/spicelib/devices/vcvs/vcvsdest.c @@ -22,7 +22,7 @@ VCVSdestroy(GENmodel **inModel) for( ; mod ; mod = mod->VCVSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (VCVSinstance *)NULL; + prev = NULL; for(here = mod->VCVSinstances ; here ; here = here->VCVSnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/vcvs/vcvsset.c b/src/spicelib/devices/vcvs/vcvsset.c index ececd6f15..1ee3cc963 100644 --- a/src/spicelib/devices/vcvs/vcvsset.c +++ b/src/spicelib/devices/vcvs/vcvsset.c @@ -46,7 +46,7 @@ VCVSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/vsrc/vsrcdest.c b/src/spicelib/devices/vsrc/vsrcdest.c index 0be49f262..304614bb4 100644 --- a/src/spicelib/devices/vsrc/vsrcdest.c +++ b/src/spicelib/devices/vsrc/vsrcdest.c @@ -22,7 +22,7 @@ VSRCdestroy(GENmodel **inModel) for( ; mod ; mod = mod->VSRCnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (VSRCinstance *)NULL; + prev = NULL; for(here = mod->VSRCinstances ; here ; here = here->VSRCnextInstance) { if(prev) FREE(prev); prev = here; diff --git a/src/spicelib/devices/vsrc/vsrcpzs.c b/src/spicelib/devices/vsrc/vsrcpzs.c index d80b47233..59c57a49d 100644 --- a/src/spicelib/devices/vsrc/vsrcpzs.c +++ b/src/spicelib/devices/vsrc/vsrcpzs.c @@ -38,7 +38,7 @@ VSRCpzSetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/devices/vsrc/vsrcset.c b/src/spicelib/devices/vsrc/vsrcset.c index 65f83fb6b..e288cce44 100644 --- a/src/spicelib/devices/vsrc/vsrcset.c +++ b/src/spicelib/devices/vsrc/vsrcset.c @@ -45,7 +45,7 @@ VSRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ -if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ +if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } diff --git a/src/spicelib/parser/inp2b.c b/src/spicelib/parser/inp2b.c index d6302ef8b..818066ef4 100644 --- a/src/spicelib/parser/inp2b.c +++ b/src/spicelib/parser/inp2b.c @@ -53,7 +53,7 @@ void INP2B(CKTcircuit *ckt, INPtables * tab, card * current) if (!tab->defBmod) { /* create default B model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "B", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "B", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defBmod), uid)); } IFC(newInstance, (ckt, tab->defBmod, &fast, name)); diff --git a/src/spicelib/parser/inp2c.c b/src/spicelib/parser/inp2c.c index 6c45fcec8..959f3df46 100644 --- a/src/spicelib/parser/inp2c.c +++ b/src/spicelib/parser/inp2c.c @@ -64,7 +64,7 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, card * current) if (INPlookMod(model)) { /* If this is a valid model connect it */ INPinsert(&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { @@ -80,7 +80,7 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, card * current) line = saveline; /* go back */ type = mytype; if (!tab->defCmod) { /* create default C model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "C", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "C", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defCmod), uid)); } @@ -93,7 +93,7 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defCmod) { /* create default C model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "C", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "C", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defCmod), uid)); } diff --git a/src/spicelib/parser/inp2d.c b/src/spicelib/parser/inp2d.c index 0af73d8b8..688448c4a 100644 --- a/src/spicelib/parser/inp2d.c +++ b/src/spicelib/parser/inp2d.c @@ -67,7 +67,7 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defDmod) { /* create default D model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "D", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "D", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defDmod), uid)); } diff --git a/src/spicelib/parser/inp2dot.c b/src/spicelib/parser/inp2dot.c index 9723f9fc4..71aed63cb 100644 --- a/src/spicelib/parser/inp2dot.c +++ b/src/spicelib/parser/inp2dot.c @@ -595,7 +595,7 @@ dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current, ft_sim->setAnalysisParm (ckt, foo, ft_sim->analyses[which]->analysisParms[i].id, &ptemp, - (IFvalue *) NULL); + NULL); if (error) current->error = INPerrCat(current->error, INPerror(error)); @@ -609,7 +609,6 @@ dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current, analyses [which]->analysisParms [i].id, parm, - (IFvalue *) NULL); if (error) current->error = diff --git a/src/spicelib/parser/inp2e.c b/src/spicelib/parser/inp2e.c index f861ef358..781a0d3a4 100644 --- a/src/spicelib/parser/inp2e.c +++ b/src/spicelib/parser/inp2e.c @@ -52,7 +52,7 @@ void INP2E(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname4, tab, &node4); if (!tab->defEmod) { /* create default E model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "E", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "E", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defEmod), uid)); } IFC(newInstance, (ckt, tab->defEmod, &fast, name)); diff --git a/src/spicelib/parser/inp2f.c b/src/spicelib/parser/inp2f.c index 83abb7426..7c4fa7443 100644 --- a/src/spicelib/parser/inp2f.c +++ b/src/spicelib/parser/inp2f.c @@ -45,7 +45,7 @@ void INP2F(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defFmod) { /* create default F model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "F", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "F", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defFmod), uid)); } diff --git a/src/spicelib/parser/inp2g.c b/src/spicelib/parser/inp2g.c index 2b07f8e4b..9b74ed0ad 100644 --- a/src/spicelib/parser/inp2g.c +++ b/src/spicelib/parser/inp2g.c @@ -52,7 +52,7 @@ void INP2G(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname4, tab, &node4); if (!tab->defGmod) { /* create default G model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "G", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "G", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defGmod), uid)); } IFC(newInstance, (ckt, tab->defGmod, &fast, name)); diff --git a/src/spicelib/parser/inp2h.c b/src/spicelib/parser/inp2h.c index 7cd514007..ab6c5504a 100644 --- a/src/spicelib/parser/inp2h.c +++ b/src/spicelib/parser/inp2h.c @@ -45,7 +45,7 @@ void INP2H(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defHmod) { /* create default H model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "H", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "H", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defHmod), uid)); } IFC(newInstance, (ckt, tab->defHmod, &fast, name)); diff --git a/src/spicelib/parser/inp2i.c b/src/spicelib/parser/inp2i.c index 2f4e6c091..90043f357 100644 --- a/src/spicelib/parser/inp2i.c +++ b/src/spicelib/parser/inp2i.c @@ -45,7 +45,7 @@ void INP2I(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defImod) { /* create default I model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "I", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "I", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defImod), uid)); } IFC(newInstance, (ckt, tab->defImod, &fast, name)); diff --git a/src/spicelib/parser/inp2j.c b/src/spicelib/parser/inp2j.c index 8593004fa..047a8d596 100644 --- a/src/spicelib/parser/inp2j.c +++ b/src/spicelib/parser/inp2j.c @@ -46,7 +46,7 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); INPinsert(&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (thismodel->INPmodType != INPtypelook("JFET") @@ -65,7 +65,7 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, card * current) } if (!tab->defJmod) { /* create default J model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "J", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "J", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defJmod), uid)); } diff --git a/src/spicelib/parser/inp2k.c b/src/spicelib/parser/inp2k.c index ca6c7ef2d..470bf5509 100644 --- a/src/spicelib/parser/inp2k.c +++ b/src/spicelib/parser/inp2k.c @@ -37,7 +37,7 @@ void INP2K(CKTcircuit *ckt, INPtables * tab, card * current) INPinsert(&name, tab); if (!tab->defKmod) { /* create deafult K model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "K", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "K", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defKmod), uid)); } IFC(newInstance, (ckt, tab->defKmod, &fast, name)); diff --git a/src/spicelib/parser/inp2l.c b/src/spicelib/parser/inp2l.c index 8cef02051..f527f642a 100644 --- a/src/spicelib/parser/inp2l.c +++ b/src/spicelib/parser/inp2l.c @@ -64,7 +64,7 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, card * current) if (INPlookMod(model)) { /* If this is a valid model connect it */ INPinsert(&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { @@ -80,7 +80,7 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, card * current) line = saveline; /* go back */ type = mytype; if (!tab->defLmod) { /* create default L model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "L", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "L", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defLmod), uid)); } @@ -93,7 +93,7 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defLmod) { /* create default L model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "L", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "L", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defLmod), uid)); } diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index cd9ebd20b..9b1b96359 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -74,7 +74,7 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) INPgetNetTok (&line, &nname5, 1); /* get 5th token */ save = line; /*saj - save the posn for later if the default mosfet model is used */ - thismodel = (INPmodel *) NULL; + thismodel = NULL; #ifdef TRACE printf("INP2M: checking for 4 node device\n"); #endif @@ -89,7 +89,7 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) { /* 5th token is not a model in the table */ nodeflag = 1; /* now specify a 5 node device */ INPgetNetTok (&line, &nname6, 1); /* get next token */ - thismodel = (INPmodel *) NULL; + thismodel = NULL; #ifdef TRACE printf("INP2M: checking for 5 node device\n"); #endif @@ -98,7 +98,7 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) { /* 6th token is not a model in the table */ nodeflag = 2; /* now specify a 6 node device */ INPgetNetTok (&line, &nname7, 1); /* get next token */ - thismodel = (INPmodel *) NULL; + thismodel = NULL; #ifdef TRACE printf("INP2M: checking for 6 node device\n"); #endif @@ -187,7 +187,7 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) INPinsert (&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; #ifdef TRACE printf("INP2M: Looking up model\n"); #endif @@ -250,7 +250,7 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current) if (!tab->defMmod) { /* create default M model */ - IFnewUid (ckt, &uid, (IFuid) NULL, "M", UID_MODEL, NULL); + IFnewUid (ckt, &uid, NULL, "M", UID_MODEL, NULL); IFC (newModel, (ckt, type, &(tab->defMmod), uid)); } mdfast = tab->defMmod; diff --git a/src/spicelib/parser/inp2n.c b/src/spicelib/parser/inp2n.c index 65fbb4a14..b890f0bc5 100644 --- a/src/spicelib/parser/inp2n.c +++ b/src/spicelib/parser/inp2n.c @@ -82,7 +82,7 @@ void INP2N(CKTcircuit *ckt, INPtables * tab, card * current) if (INPlookMod(model)) { /* If this is a valid model connect it */ INPinsert(&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { diff --git a/src/spicelib/parser/inp2o.c b/src/spicelib/parser/inp2o.c index c86ac6277..96d92578e 100644 --- a/src/spicelib/parser/inp2o.c +++ b/src/spicelib/parser/inp2o.c @@ -76,7 +76,7 @@ void INP2O(CKTcircuit *ckt, INPtables * tab, card * current) } else { if (!tab->defOmod) { /* create default O model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "O", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "O", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defOmod), uid)); } diff --git a/src/spicelib/parser/inp2p.c b/src/spicelib/parser/inp2p.c index e0a34e1bf..a74e16233 100644 --- a/src/spicelib/parser/inp2p.c +++ b/src/spicelib/parser/inp2p.c @@ -83,7 +83,7 @@ int num, i; INPgetTok(&line,&model,1); if(*model) { /* token isn't null */ INPinsert(&model,tab); - thismodel = (INPmodel *)NULL; + thismodel = NULL; current->error = INPgetMod(ckt,model,&thismodel,tab); if(thismodel != NULL) { if(mytype != thismodel->INPmodType) { @@ -96,7 +96,7 @@ int num, i; type = mytype; if(!tab->defPmod) { /* create default P model */ - IFnewUid(ckt, &uid, (IFuid)NULL, "P", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "P", UID_MODEL, NULL); IFC(newModel, (ckt,type,&(tab->defPmod),uid)) } mdfast = tab->defPmod; diff --git a/src/spicelib/parser/inp2q.c b/src/spicelib/parser/inp2q.c index c77ec332c..9bc0e264f 100644 --- a/src/spicelib/parser/inp2q.c +++ b/src/spicelib/parser/inp2q.c @@ -65,7 +65,7 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); - thismodel = (INPmodel *) NULL; + thismodel = NULL; /* See if 4th token after device specification is a model name */ if (INPlookMod(model)) { /* 3-terminal device - substrate to ground */ @@ -157,7 +157,7 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) if (!tab->defQmod) { /* create default Q model */ char *err; - IFnewUid(ckt, &uid, (IFuid) NULL, "Q", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "Q", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defQmod), uid)); err = TMALLOC(char, 70 + strlen(model)); (void) sprintf(err, "Unable to find definition of model %s - default BJT assumed \n", model); diff --git a/src/spicelib/parser/inp2r.c b/src/spicelib/parser/inp2r.c index 679124f63..c7cb8faac 100644 --- a/src/spicelib/parser/inp2r.c +++ b/src/spicelib/parser/inp2r.c @@ -155,7 +155,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current) printf("In INP2R, Valid R Model: %s\n", model); #endif INPinsert(&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { @@ -171,7 +171,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current) line = saveline; /* go back */ type = mytype; if (!tab->defRmod) { /* create default R model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "R", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "R", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defRmod), uid)); } @@ -184,7 +184,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defRmod) { /* create default R model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "R", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "R", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defRmod), uid)); } diff --git a/src/spicelib/parser/inp2s.c b/src/spicelib/parser/inp2s.c index b7b0e228b..a819fa838 100644 --- a/src/spicelib/parser/inp2s.c +++ b/src/spicelib/parser/inp2s.c @@ -68,7 +68,7 @@ void INP2S(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defSmod) { /* create deafult S model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "S", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "S", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defSmod), uid)); } diff --git a/src/spicelib/parser/inp2t.c b/src/spicelib/parser/inp2t.c index d0478ad60..cdc9c5c2c 100644 --- a/src/spicelib/parser/inp2t.c +++ b/src/spicelib/parser/inp2t.c @@ -53,7 +53,7 @@ void INP2T(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname4, tab, &node4); if (!tab->defTmod) { /* create deafult T model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "T", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "T", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defTmod), uid)); } IFC(newInstance, (ckt, tab->defTmod, &fast, name)); diff --git a/src/spicelib/parser/inp2u.c b/src/spicelib/parser/inp2u.c index 17a277b47..68b64eceb 100644 --- a/src/spicelib/parser/inp2u.c +++ b/src/spicelib/parser/inp2u.c @@ -63,7 +63,7 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defUmod) { /* create deafult U model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "U", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "U", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defUmod), uid)); } diff --git a/src/spicelib/parser/inp2v.c b/src/spicelib/parser/inp2v.c index e54b769a4..4b250cceb 100644 --- a/src/spicelib/parser/inp2v.c +++ b/src/spicelib/parser/inp2v.c @@ -45,7 +45,7 @@ void INP2V(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defVmod) { /* create default V model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "V", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "V", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defVmod), uid)); } IFC(newInstance, (ckt, tab->defVmod, &fast, name)); diff --git a/src/spicelib/parser/inp2w.c b/src/spicelib/parser/inp2w.c index 36d3aad4f..087b8a732 100644 --- a/src/spicelib/parser/inp2w.c +++ b/src/spicelib/parser/inp2w.c @@ -65,7 +65,7 @@ void INP2W(CKTcircuit *ckt, INPtables * tab, card * current) type = mytype; if (!tab->defWmod) { /* create deafult W model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "W", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "W", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defWmod), uid)); } diff --git a/src/spicelib/parser/inp2y.c b/src/spicelib/parser/inp2y.c index 6487244b9..fcbbf6d72 100644 --- a/src/spicelib/parser/inp2y.c +++ b/src/spicelib/parser/inp2y.c @@ -72,7 +72,7 @@ int lenvalgiven = 0; INPgetTok(&line,&model,1); if(*model) { /* token isn't null */ INPinsert(&model,tab); - thismodel = (INPmodel *)NULL; + thismodel = NULL; current->error = INPgetMod(ckt,model,&thismodel,tab); INPgetTok(&line,&model,1); if (strcmp(model, "len") == 0) { @@ -127,7 +127,7 @@ int lenvalgiven = 0; INPtermInsert(ckt, &internal1, tab, &inode1); if(!tab->defRmod) { /* create default R model */ - IFnewUid(ckt, &uid, (IFuid)NULL, "R", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "R", UID_MODEL, NULL); IFC(newModel, (ckt,type,&(tab->defRmod),uid)) } mdfast = tab->defRmod; @@ -162,7 +162,7 @@ int lenvalgiven = 0; /* capacitor on node1 */ type = INPtypelook("Capacitor"); if(!tab->defCmod) { - IFnewUid(ckt, &uid, (IFuid)NULL, "C", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "C", UID_MODEL, NULL); IFC(newModel,(ckt,type,&(tab->defCmod),uid)) } mdfast4 = tab->defCmod; @@ -210,7 +210,7 @@ int lenvalgiven = 0; type = mytype; if(!tab->defYmod) { /* create default Y model */ - IFnewUid(ckt, &uid, (IFuid)NULL, "Y", UID_MODEL, NULL); + IFnewUid(ckt, &uid, NULL, "Y", UID_MODEL, NULL); IFC(newModel, (ckt,type,&(tab->defYmod),uid)) } mdfast = tab->defYmod; diff --git a/src/spicelib/parser/inp2z.c b/src/spicelib/parser/inp2z.c index f0a767352..8b53f7499 100644 --- a/src/spicelib/parser/inp2z.c +++ b/src/spicelib/parser/inp2z.c @@ -54,7 +54,7 @@ void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current) INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); INPinsert(&model, tab); - thismodel = (INPmodel *) NULL; + thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if ( thismodel->INPmodType != INPtypelook("MES") @@ -79,7 +79,7 @@ void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current) if (!tab->defZmod) { /* create default Z model */ - IFnewUid(ckt, &uid, (IFuid) NULL, "Z", UID_MODEL, + IFnewUid(ckt, &uid, NULL, "Z", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defZmod), uid)); } diff --git a/src/spicelib/parser/inpaname.c b/src/spicelib/parser/inpaname.c index 0e1b42eae..c76735697 100644 --- a/src/spicelib/parser/inpaname.c +++ b/src/spicelib/parser/inpaname.c @@ -40,8 +40,8 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam, * (name, type, direct pointer) - the type and direct pointer * WILL be set on return unless error is not OK */ - error = sim->findInstance (ckt, dev, fast, devnam, (GENmodel *) NULL, - (char *) NULL); + error = sim->findInstance (ckt, dev, fast, devnam, NULL, + NULL); if (error) return (error); diff --git a/src/spicelib/parser/inpapnam.c b/src/spicelib/parser/inpapnam.c index b66a45fda..fd6171d01 100644 --- a/src/spicelib/parser/inpapnam.c +++ b/src/spicelib/parser/inpapnam.c @@ -27,7 +27,7 @@ INPapName(CKTcircuit *ckt, int type, JOB *analPtr, char *parmname, analyses[type]-> analysisParms[i].id, value, - (IFvalue *) NULL); + NULL); } } return (E_BADPARM); diff --git a/src/spicelib/parser/inpdomod.c b/src/spicelib/parser/inpdomod.c index ad6142440..a2e28d244 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -23,7 +23,7 @@ char *INPdomodel(CKTcircuit *ckt, card * image, INPtables * tab) int lev, error1=0; char ver[100]; char *typename; - char *err = (char *) NULL; + char *err = NULL; char *line; char *val; double rval=0, lval=0; diff --git a/src/spicelib/parser/inpdoopt.c b/src/spicelib/parser/inpdoopt.c index 85ba07750..2dbacb545 100644 --- a/src/spicelib/parser/inpdoopt.c +++ b/src/spicelib/parser/inpdoopt.c @@ -67,7 +67,7 @@ INPdoOpts( val = INPgetValue(ckt,&line, prm->analysisParms[i].dataType&IF_VARTYPES, tab); error = ft_sim->setAnalysisParm (ckt, anal, - prm->analysisParms[i].id,val,(IFvalue*)NULL); + prm->analysisParms[i].id, val, NULL); if(error) { errmsg = TMALLOC(char, 35 + strlen(token)); (void) sprintf(errmsg, diff --git a/src/spicelib/parser/inpdpar.c b/src/spicelib/parser/inpdpar.c index 3f2c1af3b..eed27a612 100644 --- a/src/spicelib/parser/inpdpar.c +++ b/src/spicelib/parser/inpdpar.c @@ -70,7 +70,7 @@ char *INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast, [dev]). instanceParms[i].id, val, - (IFvalue *) NULL); + NULL); if (error) { rtn = (INPerror(error)); goto quit; diff --git a/src/spicelib/parser/inperrc.c b/src/spicelib/parser/inperrc.c index c235c4547..7f56937bd 100644 --- a/src/spicelib/parser/inperrc.c +++ b/src/spicelib/parser/inperrc.c @@ -14,8 +14,8 @@ Author: 1985 Thomas L. Quarles char *INPerrCat(char *a, char *b) { - if (a != (char *) NULL) { - if (b == (char *) NULL) { /* a valid, b null, return a */ + if (a != NULL) { + if (b == NULL) { /* a valid, b null, return a */ return (a); } else { /* both valid - hard work... */ register char *errtmp; diff --git a/src/spicelib/parser/inpfindl.c b/src/spicelib/parser/inpfindl.c index 34d09f0d9..4a3f412f6 100644 --- a/src/spicelib/parser/inpfindl.c +++ b/src/spicelib/parser/inpfindl.c @@ -56,7 +56,7 @@ char *INPfindLev(char *line, int *level) (" illegal (too high) argument to level parameter - level=1 assumed")); } - return ((char *) NULL); + return (NULL); } @@ -65,6 +65,6 @@ char *INPfindLev(char *line, int *level) #ifdef TRACE /* this is annoying for bjt's */ fprintf(stderr,"Warning -- Level not specified on line \"%s\"\nUsing level 1.\n", line); #endif - return ((char *) NULL); + return (NULL); } } diff --git a/src/spicelib/parser/inpfindv.c b/src/spicelib/parser/inpfindv.c index 0c75d82bd..0c6fbcce0 100644 --- a/src/spicelib/parser/inpfindv.c +++ b/src/spicelib/parser/inpfindv.c @@ -28,11 +28,11 @@ char *INPfindVer(char *line, char *version) /* now the magic string */ sscanf(where, "%s", version); /* We get the version number */ - return ((char *) NULL); + return (NULL); } else { /* no level on the line => default */ sprintf( version, "default" ); printf("Warning -- Version not specified on line \"%s\"\nSetting version to 'default'.\n", line); - return ((char *) NULL); + return (NULL); } } diff --git a/src/spicelib/parser/inpgmod.c b/src/spicelib/parser/inpgmod.c index e01c506a8..760eda5ec 100644 --- a/src/spicelib/parser/inpgmod.c +++ b/src/spicelib/parser/inpgmod.c @@ -100,7 +100,7 @@ create_model( CKTcircuit* ckt, INPmodel* modtmp, INPtables* tab ) error = ft_sim->setModelParm (ckt, modtmp->INPmodfast, (* (ft_sim->devices)[(modtmp)->INPmodType]).modelParms[j].id, - val, (IFvalue *) NULL); + val, NULL); if (error) return error; break; @@ -214,7 +214,7 @@ INPgetModBin( CKTcircuit* ckt, char* name, INPmodel** model, INPtables* tab, cha l = parse_values[0]*scale; w = parse_values[1]*scale; - for ( modtmp = modtab; modtmp != (INPmodel*)NULL; modtmp = modtmp->INPnextModel ) { + for ( modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel ) { if ( modtmp->INPmodType != INPtypelook( "BSIM3" ) && modtmp->INPmodType != INPtypelook( "BSIM3v32" ) && modtmp->INPmodType != INPtypelook( "BSIM4" ) && modtmp->INPmodType != INPtypelook( "BSIM4v2" ) && modtmp->INPmodType != INPtypelook( "BSIM4v3" ) && modtmp->INPmodType != INPtypelook( "BSIM4v4" ) && @@ -251,7 +251,7 @@ char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab) printf("In INPgetMod, examining model %s . . . \n", name); #endif - for (modtmp = modtab; modtmp != (INPmodel *) NULL; modtmp = ((modtmp)->INPnextModel)) { + for (modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel) { #ifdef TRACE /* SDB debug statement */ @@ -264,7 +264,7 @@ char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab) if (modtmp->INPmodType < 0) { /* First check for illegal model type */ /* illegal device type, so can't handle */ - *model = (INPmodel *) NULL; + *model = NULL; err = TMALLOC(char, 35 + strlen(name)); (void) sprintf(err,"Unknown device type for model %s \n", name); @@ -281,11 +281,11 @@ char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab) if ( error ) return INPerror(error); } *model = modtmp; - return ((char *) NULL); + return (NULL); } } /* didn't find model - ERROR - return model */ - *model = (INPmodel *) NULL; + *model = NULL; err = TMALLOC(char, 60 + strlen(name)); (void) sprintf(err, "Unable to find definition of model %s - default assumed \n", name); diff --git a/src/spicelib/parser/inpgval.c b/src/spicelib/parser/inpgval.c index b5baef80a..110ac6112 100644 --- a/src/spicelib/parser/inpgval.c +++ b/src/spicelib/parser/inpgval.c @@ -70,11 +70,11 @@ IFvalue *INPgetValue(CKTcircuit *ckt, char **line, int type, INPtables * tab) } else if (type == IF_PARSETREE) { INPgetTree(line, &pt, ckt, tab); if (!pt) - return ((IFvalue *) NULL); + return (NULL); temp.tValue = (IFparseTree *) pt; /*INPptPrint("Parse tree is: ", temp.tValue); */ } else { /* don't know what type of parameter caller is talking about! */ - return ((IFvalue *) NULL); + return (NULL); } return (&temp); } diff --git a/src/spicelib/parser/inpkmods.c b/src/spicelib/parser/inpkmods.c index e8e2319dd..0e0a71686 100644 --- a/src/spicelib/parser/inpkmods.c +++ b/src/spicelib/parser/inpkmods.c @@ -18,13 +18,12 @@ void INPkillMods(void) INPmodel *modtmp; INPmodel *prev = NULL; - for (modtmp = modtab; modtmp != (INPmodel *) NULL; modtmp = - modtmp->INPnextModel) { + for (modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel) { if (prev) FREE(prev); prev = modtmp; } if (prev) FREE(prev); - modtab = (INPmodel *) NULL; + modtab = NULL; } diff --git a/src/spicelib/parser/inplist.c b/src/spicelib/parser/inplist.c index 93678d921..c18045b00 100644 --- a/src/spicelib/parser/inplist.c +++ b/src/spicelib/parser/inplist.c @@ -27,15 +27,15 @@ void INPlist(FILE * file, card * deck, int type) if (type == LOGICAL) { for (here = deck; here != NULL; here = here->nextcard) { fprintf(file, "%6d : %s\n", here->linenum, here->line); - if (here->error != (char *) NULL) { + if (here->error != NULL) { fprintf(file, "%s", here->error); } } } else if (type == PHYSICAL) { for (here = deck; here != NULL; here = here->nextcard) { - if (here->actualLine == (card *) NULL) { + if (here->actualLine == NULL) { fprintf(file, "%6d : %s\n", here->linenum, here->line); - if (here->error != (char *) NULL) { + if (here->error != NULL) { fprintf(file, "%s", here->error); } } else { @@ -43,7 +43,7 @@ void INPlist(FILE * file, card * deck, int type) there = there->nextcard) { fprintf(file, "%6d : %s\n", there->linenum, there->line); - if (there->error != (char *) NULL) { + if (there->error != NULL) { fprintf(file, "%s", there->error); } } diff --git a/src/spicelib/parser/inplkmod.c b/src/spicelib/parser/inplkmod.c index ebd77a542..5e638735b 100644 --- a/src/spicelib/parser/inplkmod.c +++ b/src/spicelib/parser/inplkmod.c @@ -22,7 +22,7 @@ int INPlookMod(char *name) { register INPmodel **i; - for (i = &modtab; *i != (INPmodel *) NULL; i = &((*i)->INPnextModel)) { + for (i = &modtab; *i != NULL; i = &((*i)->INPnextModel)) { if (strcmp((*i)->INPmodName, name) == 0) { /* found the model in question - return TRUE */ return (1); diff --git a/src/spicelib/parser/inpmkmod.c b/src/spicelib/parser/inpmkmod.c index b11bdfb0e..e111b15cf 100644 --- a/src/spicelib/parser/inpmkmod.c +++ b/src/spicelib/parser/inpmkmod.c @@ -25,7 +25,7 @@ int INPmakeMod(char *token, int type, card * line) /* First cycle through model table and see if model name already exists in there. If it does, just return. */ - for (i = &modtab; *i != (INPmodel *) NULL; i = &((*i)->INPnextModel)) { + for (i = &modtab; *i != NULL; i = &((*i)->INPnextModel)) { if (strcmp((*i)->INPmodName, token) == 0) { return (OK); } @@ -45,7 +45,7 @@ int INPmakeMod(char *token, int type, card * line) (*i)->INPmodName = token; /* model name */ (*i)->INPmodType = type; /* model type */ - (*i)->INPnextModel = (INPmodel *) NULL; /* pointer to next model (end of list) */ + (*i)->INPnextModel = NULL; /* pointer to next model (end of list) */ (*i)->INPmodUsed = 0; /* model is unused */ (*i)->INPmodLine = line; /* model line */ (*i)->INPmodfast = NULL; diff --git a/src/spicelib/parser/inpmktmp.c b/src/spicelib/parser/inpmktmp.c index 93b1b6250..dab8bf7ad 100644 --- a/src/spicelib/parser/inpmktmp.c +++ b/src/spicelib/parser/inpmktmp.c @@ -18,7 +18,7 @@ char *INPmkTemp(char *string) len = strlen(string); temp = TMALLOC(char, len + 1); - if (temp != (char *) NULL) + if (temp != NULL) (void) strcpy(temp, string); return (temp); diff --git a/src/spicelib/parser/inppas3.c b/src/spicelib/parser/inppas3.c index cbbdfae32..2ca2bc5a9 100644 --- a/src/spicelib/parser/inppas3.c +++ b/src/spicelib/parser/inppas3.c @@ -78,7 +78,7 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task, fprintf(stderr, "Warning : Nodeset on non-existant node - %s\n", name); ptemp.rValue = INPevaluate(&line,&error,1); - IFC(setNodeParm,(ckt,node1,which,&ptemp,(IFvalue*)NULL)); + IFC(setNodeParm, (ckt, node1, which, &ptemp, NULL)); continue; } LITERR(" Error: .nodeset syntax error.\n") @@ -111,7 +111,7 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task, fprintf(stderr, "Warning : IC on non-existant node - %s\n", name); ptemp.rValue = INPevaluate(&line,&error,1); - IFC(setNodeParm,(ckt,node1,which,&ptemp,(IFvalue*)NULL)) + IFC(setNodeParm, (ckt, node1, which, &ptemp, NULL)) continue; } LITERR(" Error: .ic syntax error.\n") diff --git a/src/spicelib/parser/inppname.c b/src/spicelib/parser/inppname.c index c3a57d4ad..6ade36e0a 100644 --- a/src/spicelib/parser/inppname.c +++ b/src/spicelib/parser/inppname.c @@ -35,7 +35,7 @@ int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, GENinstance *f ft_sim->setInstanceParm (ckt, fast, (*(ft_sim->devices)[dev]). instanceParms[i].id, val, - (IFvalue *) NULL); + NULL); if (error) return (error); break; diff --git a/src/spicelib/parser/inpsymt.c b/src/spicelib/parser/inpsymt.c index 5e48a981c..22dcc43bc 100644 --- a/src/spicelib/parser/inpsymt.c +++ b/src/spicelib/parser/inpsymt.c @@ -57,7 +57,7 @@ int INPtermInsert(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node } } t = TMALLOC(struct INPnTab, 1); - if (t == (struct INPnTab *) NULL) + if (t == NULL) return (E_NOMEM); ZERO(t, struct INPnTab); error = ft_sim->newNode (ckt, &(t->t_node), *token); @@ -94,7 +94,7 @@ int INPmkTerm(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) } } t = TMALLOC(struct INPnTab, 1); - if (t == (struct INPnTab *) NULL) + if (t == NULL) return (E_NOMEM); ZERO(t, struct INPnTab); t->t_node = *node; @@ -123,7 +123,7 @@ int INPgndInsert(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) } } t = TMALLOC(struct INPnTab, 1); - if (t == (struct INPnTab *) NULL) + if (t == NULL) return (E_NOMEM); ZERO(t, struct INPnTab); error = ft_sim->groundNode (ckt, &(t->t_node), *token); @@ -169,7 +169,7 @@ int INPinsert(char **token, INPtables * tab) return (E_EXISTS); } t = TMALLOC(struct INPtab, 1); - if (t == (struct INPtab *) NULL) + if (t == NULL) return (E_NOMEM); ZERO(t, struct INPtab); t->t_ent = *token; @@ -196,7 +196,7 @@ int INPinsertNofree(char **token, INPtables * tab) return (E_EXISTS); } t = TMALLOC(struct INPtab, 1); - if (t == (struct INPtab *) NULL) + if (t == NULL) return (E_NOMEM); ZERO(t, struct INPtab); t->t_ent = *token; diff --git a/src/tclspice.c b/src/tclspice.c index a8a72fae8..933eb95bc 100755 --- a/src/tclspice.c +++ b/src/tclspice.c @@ -229,7 +229,7 @@ int blt_plot(struct dvec *y,struct dvec *x,int new); for(;0 < plot;plot--){ pl = pl->pl_next; if(!pl) - return (struct plot *)NULL; + return NULL; } return pl; } @@ -1318,10 +1318,10 @@ int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) { } else if (strcmp(paramname,opt->keyword)==0) { if (devptr) err = ft_sim->askInstanceQuest (ft_curckt->ci_ckt, devptr, - opt->id, &pv, (IFvalue *)NULL); + opt->id, &pv, NULL); else err = ft_sim->askModelQuest (ft_curckt->ci_ckt, modptr, - opt->id, &pv, (IFvalue *)NULL); + opt->id, &pv, NULL); if (err==OK) { sprintf(buf,"%g",pv.rValue); /* dataType is here always real */ Tcl_SetResult(interp,buf,TCL_VOLATILE); @@ -2347,51 +2347,51 @@ bot: if(Tcl_GetCommandInfo(interp,buf, &infoPtr)!= 0){ printf("Command '%s' can not be registered!\n", buf); }else{ - Tcl_CreateCommand(interp,buf, _tcl_dispatch, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateCommand(interp, buf, _tcl_dispatch, NULL, NULL); } } - Tcl_CreateCommand(interp, TCLSPICE_prefix "spice_header", spice_header, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "spice_data", spice_data, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "spicetoblt", spicetoblt, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "vectoblt", vectoblt, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "lastVector", lastVector, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "get_value", get_value, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "spice", _spice_dispatch, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "get_output", get_output, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "get_param", get_param, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "get_mod_param", get_mod_param, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "delta", delta, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "maxstep", maxstep, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_variables", plot_variables, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_variablesInfo", plot_variablesInfo, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_get_value", plot_get_value, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_datapoints", plot_datapoints, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_title", plot_title, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_date", plot_date, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_name", plot_name, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_typename", plot_typename, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_nvars", plot_nvars, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_defaultscale", plot_defaultscale, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_getvector", plot_getvector, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "getplot", plot_getplot, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - - Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTrigger", registerTrigger, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTriggerCallback", registerTriggerCallback, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "popTriggerEvent", popTriggerEvent, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "unregisterTrigger", unregisterTrigger, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "listTriggers", listTriggers, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - - Tcl_CreateCommand(interp, TCLSPICE_prefix "registerStepCallback", registerTriggerCallback, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "spice_header", spice_header, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "spice_data", spice_data, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "spicetoblt", spicetoblt, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "vectoblt", vectoblt, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "lastVector", lastVector, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "get_value", get_value, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "spice", _spice_dispatch, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "get_output", get_output, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "get_param", get_param, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "get_mod_param", get_mod_param, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "delta", delta, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "maxstep", maxstep, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_variables", plot_variables, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_variablesInfo", plot_variablesInfo, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_get_value", plot_get_value, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_datapoints", plot_datapoints, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_title", plot_title, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_date", plot_date, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_name", plot_name, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_typename", plot_typename, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_nvars", plot_nvars, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_defaultscale", plot_defaultscale, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_getvector", plot_getvector, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "getplot", plot_getplot, NULL, NULL); + + Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTrigger", registerTrigger, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTriggerCallback", registerTriggerCallback, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "popTriggerEvent", popTriggerEvent, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "unregisterTrigger", unregisterTrigger, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "listTriggers", listTriggers, NULL, NULL); + + Tcl_CreateCommand(interp, TCLSPICE_prefix "registerStepCallback", registerTriggerCallback, NULL, NULL); #ifdef THREADS - Tcl_CreateCommand(interp, TCLSPICE_prefix "bg", _tcl_dispatch, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "halt", _tcl_dispatch, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "running", running, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "bg", _tcl_dispatch, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "halt", _tcl_dispatch, NULL, NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "running", running, NULL, NULL); #endif - Tcl_CreateCommand(interp, TCLSPICE_prefix "tmeasure", tmeasure, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "tmeasure", tmeasure, NULL, NULL); - Tcl_CreateCommand(interp, TCLSPICE_prefix "registerStepCallback", registerStepCallback, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateCommand(interp, TCLSPICE_prefix "registerStepCallback", registerStepCallback, NULL, NULL); Tcl_LinkVar(interp, TCLSPICE_prefix "steps_completed", (char *)&steps_completed, TCL_LINK_READ_ONLY|TCL_LINK_INT); Tcl_LinkVar(interp, TCLSPICE_prefix "blt_vnum", (char *)&blt_vnum, TCL_LINK_READ_ONLY|TCL_LINK_INT); diff --git a/src/unsupported/snstart.c b/src/unsupported/snstart.c index d2bc528c2..80e1fc78a 100644 --- a/src/unsupported/snstart.c +++ b/src/unsupported/snstart.c @@ -37,10 +37,10 @@ SENstartup(ckt) parmtemp.iValue = 1; for(i=0;iCKTsenInfo->SENnumVal;i++) { type = -1; - fast = (GENinstance *)NULL; + fast = NULL; err = CKTfndDev((GENERIC*)ckt,&type,(GENERIC**)&fast, (*((ckt->CKTsenInfo->SENdevices)+i)), - (GENERIC *)NULL, (GENERIC *)NULL); + NULL, NULL); if(err != OK) return(err); err = CKTpName( (*((ckt->CKTsenInfo->SENparmNames)+i)), diff --git a/src/unsupported/spiced.c b/src/unsupported/spiced.c index 8f391cb84..7e7266e27 100644 --- a/src/unsupported/spiced.c +++ b/src/unsupported/spiced.c @@ -121,7 +121,7 @@ main(ac, av) (void) dup2(0, 2); i = open("/dev/tty", O_RDWR); if (i > 0) { - (void) ioctl(i, TIOCNOTTY, (char *) NULL); + (void) ioctl(i, TIOCNOTTY, NULL); (void) close(i); } @@ -266,7 +266,7 @@ sigchild() int pid; FILE *fp; - pid = wait((union wait *) NULL); + pid = wait(NULL); if (pid == -1) { fp = fopen(Spiced_Log, "a"); fprintf(fp, "\n>>>spiced: wait: %s\n\n", sys_errlist[errno]); diff --git a/src/xspice/evt/evtiter.c b/src/xspice/evt/evtiter.c index 4e4c66304..fe081c05d 100755 --- a/src/xspice/evt/evtiter.c +++ b/src/xspice/evt/evtiter.c @@ -294,7 +294,7 @@ int EVTiter( SPfrontEnd->IFerror (ERR_WARNING, "Too many iteration passes in event-driven circuits", - (IFuid *) NULL); + NULL); return(E_ITERLIM); } diff --git a/src/xspice/evt/evtop.c b/src/xspice/evt/evtop.c index b0709e238..0680f7089 100755 --- a/src/xspice/evt/evtop.c +++ b/src/xspice/evt/evtop.c @@ -176,7 +176,7 @@ int EVTop( SPfrontEnd->IFerror (ERR_WARNING, "Too many analog/event-driven solution alternations", - (IFuid *) NULL); + NULL); err_msg = TMALLOC(char, 10000); output_queue = &(ckt->evt->queue.output); diff --git a/src/xspice/ipc/ipcsockets.c b/src/xspice/ipc/ipcsockets.c index d1c36f630..29c55d199 100755 --- a/src/xspice/ipc/ipcsockets.c +++ b/src/xspice/ipc/ipcsockets.c @@ -301,7 +301,7 @@ bytes_to_integer ( index++; } /* u = ntohl (*((u_long *) buff)); */ - u = strtoul(buff, (char **) NULL, 10); + u = strtoul(buff, NULL, 10); return u; } /* end bytes_to_integer */ diff --git a/src/xspice/mif/mifgetmod.c b/src/xspice/mif/mifgetmod.c index b2136883f..74e034c18 100755 --- a/src/xspice/mif/mifgetmod.c +++ b/src/xspice/mif/mifgetmod.c @@ -118,7 +118,7 @@ char *MIFgetMod( */ /*------------------------------------ - for (i = &modtab; *i != (INPmodel *) NULL; i = &((*i)->INPnextModel)) { + for (i = &modtab; *i != NULL; i = &((*i)->INPnextModel)) { if (strcmp((*i)->INPmodName, token) == 0) { return (OK); } @@ -206,7 +206,7 @@ char *MIFgetMod( error = ft_sim->setModelParm (ckt, ((modtmp)->INPmodfast), (*(ft_sim->devices)[(modtmp)->INPmodType ]). - modelParms[j].id,val,(IFvalue*)NULL); + modelParms[j].id, val, NULL); if(error) return(INPerror(error)); break; @@ -240,7 +240,7 @@ char *MIFgetMod( } /* end if model parameters not processed yet */ *model = modtmp; - return((char *)NULL); + return(NULL); } /* end if name matches */ @@ -248,7 +248,7 @@ char *MIFgetMod( /* didn't find model - ERROR - return NULL model */ - *model = (INPmodel *)NULL; + *model = NULL; err = TMALLOC(char, 60 + strlen(name)); sprintf(err, " MIF-ERROR - unable to find definition of model %s\n",name);