Browse Source

Code cleaned. Added compilation of TXLfindBr and TXLaccept but non included into device.

pre-master-46
pnenzi 23 years ago
parent
commit
a8aa5e2c41
  1. 2
      src/spicelib/devices/txl/Makefile.am
  2. 9
      src/spicelib/devices/txl/txlacct.c
  3. 14
      src/spicelib/devices/txl/txlask.c
  4. 3
      src/spicelib/devices/txl/txldefs.h
  5. 5
      src/spicelib/devices/txl/txldel.c
  6. 3
      src/spicelib/devices/txl/txldest.c
  7. 18
      src/spicelib/devices/txl/txlext.h
  8. 9
      src/spicelib/devices/txl/txlfbr.c
  9. 8
      src/spicelib/devices/txl/txlinit.c
  10. 8
      src/spicelib/devices/txl/txlload.c
  11. 6
      src/spicelib/devices/txl/txlmask.c
  12. 5
      src/spicelib/devices/txl/txlmdel.c
  13. 5
      src/spicelib/devices/txl/txlmpar.c
  14. 6
      src/spicelib/devices/txl/txlparam.c
  15. 10
      src/spicelib/devices/txl/txlsetup.c

2
src/spicelib/devices/txl/Makefile.am

@ -4,8 +4,10 @@ noinst_LIBRARIES = libtxl.a
libtxl_a_SOURCES = \
txl.c \
txlacct.c \
txlask.c \
txldest.c \
txlfbr.c \
txlload.c \
txlmdel.c \
txlparam.c \

9
src/spicelib/devices/txl/txlacct.c

@ -6,7 +6,6 @@ Author: 1992 Charles Hough
#include "ngspice.h"
#include <math.h>
#include "cktdefs.h"
#include "txldefs.h"
#include "sperror.h"
@ -14,14 +13,12 @@ Author: 1992 Charles Hough
int
TXLaccept(ckt,inModel)
register CKTcircuit *ckt;
GENmodel *inModel;
TXLaccept(CKTcircuit *ckt, GENmodel *inModel)
/* set up the breakpoint table.
*/
{
register TXLmodel *model = (TXLmodel *)inModel;
register TXLinstance *here;
TXLmodel *model = (TXLmodel *)inModel;
TXLinstance *here;
int hint;
double h, v, v1;
NODE *nd;

14
src/spicelib/devices/txl/txlask.c

@ -6,7 +6,6 @@ Author: 1992 Charles Hough
#include "ngspice.h"
#include <math.h>
#include "const.h"
#include "txldefs.h"
#include "ifsim.h"
@ -17,12 +16,7 @@ Author: 1992 Charles Hough
/*ARGSUSED*/
int
TXLask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
TXLask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
TXLinstance *fast = (TXLinstance *)inst;
switch(which) {
@ -32,9 +26,9 @@ TXLask(ckt,inst,which,value,select)
case TXL_IN_NODE:
value->iValue = fast->TXLposNode;
return(OK);
case TXL_LENGTH:
value->rValue = fast->TXLlength;
return(OK);
case TXL_LENGTH:
value->rValue = fast->TXLlength;
return(OK);
default:
return(E_BADPARM);
}

3
src/spicelib/devices/txl/txldefs.h

@ -28,6 +28,7 @@ typedef struct sTXLinstance {
TXLine *txline2; /* pointer to SWEC txline type. temporary storage */
char *in_node_name;
char *out_node_name;
int TXLbranch; /* unused */
double *TXLposPosptr;
double *TXLposNegptr;
@ -47,7 +48,7 @@ typedef struct sTXLinstance {
unsigned TXLibr1Given : 1;
unsigned TXLibr2Given : 1;
unsigned TXLdcGiven : 1;
unsigned TXLlengthgiven : 1; /* flag to indicate C was specified */
unsigned TXLlengthgiven : 1; /* flag to indicate C was specified */
} TXLinstance ;

5
src/spicelib/devices/txl/txldel.c

@ -12,10 +12,7 @@ Author: 1992 Charles Hough
int
TXLdelete(inModel,name,inst)
GENmodel *inModel;
IFuid name;
GENinstance **inst;
TXLdelete(GENmodel *inModel, IFuid name, GENinstance **inst)
{
TXLmodel *model = (TXLmodel *)inModel;
TXLinstance **fast = (TXLinstance **)inst;

3
src/spicelib/devices/txl/txldest.c

@ -11,8 +11,7 @@ Author: 1992 Charles Hough
void
TXLdestroy(inModel)
GENmodel **inModel;
TXLdestroy(GENmodel **inModel)
{
TXLmodel **model = (TXLmodel **)inModel;
TXLinstance *here;

18
src/spicelib/devices/txl/txlext.h

@ -1,19 +1,13 @@
#ifdef __STDC__
/* extern int TXLaccept(CKTcircuit*,GENmodel*); */
extern int TXLaccept(CKTcircuit*,GENmodel*);
extern int TXLask(CKTcircuit*, GENinstance*, int, IFvalue*, IFvalue*);
extern int TXLdelete(GENmodel*,IFuid,GENinstance**);
extern void TXLdestroy(GENmodel**);
extern int TXLfindBr(CKTcircuit*, GENmodel*, IFuid);
extern int TXLload(GENmodel*,CKTcircuit*);
extern int TXLmodAsk(CKTcircuit*, GENmodel*, int, IFvalue*);
extern int TXLmDelete(GENmodel**,IFuid,GENmodel*);
extern int TXLmParam(int,IFvalue*,GENmodel*);
extern int TXLparam(int,IFvalue*,GENinstance*,IFvalue*);
extern int TXLsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
#else /* stdc */
/* extern int TXLaccept(); */
extern int TXLdelete();
extern void TXLdestroy();
extern int TXLload();
extern int TXLmDelete();
extern int TXLmParam();
extern int TXLparam();
extern int TXLsetup();
#endif /* stdc */

9
src/spicelib/devices/txl/txlfbr.c

@ -13,13 +13,10 @@ Author: 1992 Charles Hough
int
TXLfindBr(ckt,inModel,name)
register CKTcircuit *ckt;
GENmodel *inModel;
register IFuid name;
TXLfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name)
{
register TXLmodel *model = (TXLmodel *)inModel;
register TXLinstance *here;
TXLmodel *model = (TXLmodel *)inModel;
TXLinstance *here;
int error;
CKTnode *tmp;

8
src/spicelib/devices/txl/txlinit.c

@ -53,15 +53,15 @@ SPICEdev TXLinfo = {
DEVpzSetup : NULL,
DEVtemperature: NULL,
DEVtrunc : NULL,
DEVfindBranch : NULL, /* TXLfindBranch, */
DEVfindBranch : NULL, /* TXLfindBranch default: disabled */
DEVacLoad : TXLload, /* ac load */
DEVaccept : NULL,
DEVaccept : NULL, /* TXLaccept default: disabled */
DEVdestroy : TXLdestroy,
DEVmodDelete : TXLmDelete,
DEVdelete : TXLdelete,
DEVsetic : NULL,
DEVask : NULL,
DEVmodAsk : NULL,
DEVask : TXLask,
DEVmodAsk : TXLmodAsk,
DEVpzLoad : NULL,
DEVconvTest : NULL,
DEVsenSetup : NULL,

8
src/spicelib/devices/txl/txlload.c

@ -26,12 +26,10 @@ static void copy_tx();
/*ARGSUSED*/
int
TXLload(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
TXLload(GENmodel *inModel, CKTcircuit *ckt)
{
register TXLmodel *model = (TXLmodel *)inModel;
register TXLinstance *here;
TXLmodel *model = (TXLmodel *)inModel;
TXLinstance *here;
TXLine *tx, *tx2;
int k, l;
int time, time2;

6
src/spicelib/devices/txl/txlmask.c

@ -18,11 +18,7 @@ Author: 1992 Charles Hough
/* ARGSUSED */
int
TXLmodAsk(ckt,inModel,which,value)
CKTcircuit *ckt;
GENmodel *inModel;
int which;
IFvalue *value;
TXLmodAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value)
{
TXLmodel *model = (TXLmodel *)inModel;
switch(which) {

5
src/spicelib/devices/txl/txlmdel.c

@ -12,10 +12,7 @@ Author: 1992 Charles Hough
int
TXLmDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
TXLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
TXLmodel **model = (TXLmodel **)inModel;
TXLmodel *modfast = (TXLmodel *)kill;

5
src/spicelib/devices/txl/txlmpar.c

@ -14,10 +14,7 @@ Author: 1992 Charles Hough
int
TXLmParam(param,value,inModel)
int param;
IFvalue *value;
GENmodel *inModel;
TXLmParam(int param, IFvalue *value, GENmodel *inModel)
{
register TXLmodel *model = (TXLmodel *)inModel;
switch(param) {

6
src/spicelib/devices/txl/txlparam.c

@ -14,11 +14,7 @@ Author: 1992 Charles Hough
/* ARGSUSED */
int
TXLparam(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
TXLparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
TXLinstance *here = (TXLinstance *)inst;
switch(param) {

10
src/spicelib/devices/txl/txlsetup.c

@ -75,14 +75,10 @@ static double AA[3][4];
/* ARGSUSED */
int
TXLsetup(matrix,inModel,ckt,state)
register SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit*ckt;
int *state;
TXLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
{
register TXLmodel *model = (TXLmodel *)inModel;
register TXLinstance *here;
TXLmodel *model = (TXLmodel *)inModel;
TXLinstance *here;
CKTnode *tmp;
int error;

Loading…
Cancel
Save