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

This commit is contained in:
pnenzi 2003-12-31 16:12:08 +00:00
parent bcfdf3885a
commit a8aa5e2c41
15 changed files with 36 additions and 75 deletions

View File

@ -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 \

View File

@ -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;

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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 */

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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) {

View File

@ -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;

View File

@ -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) {

View File

@ -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) {

View File

@ -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;