diff --git a/ChangeLog b/ChangeLog index 9e77cce98..f25cf03b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2010-07-07 Robert Larice + * src/tclspice.c , + * src/frontend/com_option.c , + * src/frontend/inp.c , + * src/frontend/resource.c , + * src/frontend/shyu.c , + * src/frontend/spiceif.c , + * src/include/cktdefs.h , + * src/include/ftedefs.h , + * src/include/ifsim.h , + * src/include/inpdefs.h , + * src/spicelib/analysis/ckt.h , + * src/spicelib/analysis/cktsetap.c , + * src/spicelib/devices/cktinit.c , + * src/spicelib/parser/inp.h , + * src/spicelib/parser/inp2dot.c , + * src/spicelib/parser/inpapnam.c , + * src/spicelib/parser/inpdoopt.c , + * src/spicelib/parser/inpgtitl.c , + * src/spicelib/parser/inppas1.c , + * src/spicelib/parser/inppas1.h , + * src/spicelib/parser/inppas2.c , + * src/spicelib/parser/inppas2.h : + the first of a series of four patches, which will change the code + to use the CKTcircuit type instead of the current mixed void*/char* + 2010-07-06 Robert Larice * src/include/fteext.h : ansi function declarations (prototypes) for some functions diff --git a/src/frontend/com_option.c b/src/frontend/com_option.c index 2ece53aa5..7ade66240 100644 --- a/src/frontend/com_option.c +++ b/src/frontend/com_option.c @@ -25,7 +25,7 @@ struct variable *vars; return; } - circuit = (CKTcircuit *)(ft_curckt->ci_ckt); + circuit = (ft_curckt->ci_ckt); if (wl == NULL) { diff --git a/src/frontend/inp.c b/src/frontend/inp.c index e68a7858e..997ca4b5f 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -667,7 +667,7 @@ inp_dodeck( ) { struct circ *ct; struct line *dd; - char *ckt, *s; + CKTcircuit *ckt; char *s; INPtables *tab = NULL; struct variable *eev = NULL; wordlist *wl; diff --git a/src/frontend/resource.c b/src/frontend/resource.c index 4057e3206..76e757883 100644 --- a/src/frontend/resource.c +++ b/src/frontend/resource.c @@ -442,7 +442,7 @@ printres(char *name) /* begin cider integration */ /* Now print out interesting stuff about numerical devices. */ if (!name || eq(name, "devices")) { - (void) NDEVacct((CKTcircuit*)ft_curckt->ci_ckt, cp_out); + (void) NDEVacct(ft_curckt->ci_ckt, cp_out); yy = TRUE; } /* end cider integration */ diff --git a/src/frontend/shyu.c b/src/frontend/shyu.c index 047a8f40b..d88f548be 100644 --- a/src/frontend/shyu.c +++ b/src/frontend/shyu.c @@ -27,7 +27,7 @@ Copyright 1990 Regents of the University of California. All rights reserved. int if_sens_run(CKTcircuit *t, wordlist *args, INPtables *tab) { - void *ckt = (void *) t; + CKTcircuit *ckt = (CKTcircuit * /*fixme*/) t; void *senseJob; void *acJob; void *opJob; diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index d3aa184bb..c2b03cda9 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -89,7 +89,7 @@ static int finddev_special(CKTcircuit *ck, char *name, GENinstance **devptr, GEN CKTcircuit * if_inpdeck(struct line *deck, INPtables **tab) { - void *ckt; + CKTcircuit *ckt; int err, i, j; struct line *ll; IFuid taskUid; @@ -161,8 +161,8 @@ if_inpdeck(struct line *deck, INPtables **tab) ft_curckt->ci_curTask = ft_curckt->ci_defTask; - INPpas1((void *) ckt, (card *) deck->li_next,(INPtables *)*tab); - INPpas2((void *) ckt, (card *) deck->li_next, + INPpas1( ckt, (card *) deck->li_next,(INPtables *)*tab); + INPpas2( ckt, (card *) deck->li_next, (INPtables *) *tab,ft_curckt->ci_defTask); INPkillMods(); @@ -197,7 +197,7 @@ if_inpdeck(struct line *deck, INPtables **tab) int if_run(CKTcircuit *t, char *what, wordlist *args, INPtables *tab) { - void *ckt = (void *) t; + CKTcircuit *ckt = (CKTcircuit *) t; int err; struct line deck; char buf[BSIZE_SP]; @@ -386,7 +386,7 @@ if_option(CKTcircuit *ckt, char *name, int type, char *value) { IFvalue pval; int err, i; - void *cc = (void *) ckt; + CKTcircuit *cc = (CKTcircuit * /*fixme*/) ckt; char **vv; int which = -1; @@ -1326,9 +1326,9 @@ void com_loadsnap(wordlist *wl) { /* allocate all the vectors, with luck! */ if (!error) - error = CKTsetup((CKTcircuit *)ft_curckt->ci_ckt); + error = CKTsetup(ft_curckt->ci_ckt); if (!error) - error = CKTtemp((CKTcircuit *)ft_curckt->ci_ckt); + error = CKTtemp(ft_curckt->ci_ckt); if(error) { fprintf(cp_err,"Some error in the CKT setup fncts!\n"); @@ -1342,7 +1342,7 @@ void com_loadsnap(wordlist *wl) { /* now load the binary file */ - ckt = (CKTcircuit *)ft_curckt->ci_ckt; + ckt = ft_curckt->ci_ckt; file = fopen(wl->wl_next->wl_word,"rb"); @@ -1557,7 +1557,7 @@ void com_savesnap(wordlist *wl) { /* save the data */ - ckt = (CKTcircuit *)ft_curckt->ci_ckt; + ckt = ft_curckt->ci_ckt; task = (TSKtask *)ft_curckt->ci_curTask; diff --git a/src/include/cktdefs.h b/src/include/cktdefs.h index a639baec0..b77f17028 100644 --- a/src/include/cktdefs.h +++ b/src/include/cktdefs.h @@ -305,7 +305,7 @@ extern int CKTfndNode(void *, void **, IFuid); extern int CKTfndTask(void *, void **, IFuid ); extern int CKTground(void *, void **, IFuid); extern int CKTic(CKTcircuit *); -extern int CKTinit(void **); +extern int CKTinit(CKTcircuit **); extern int CKTinst2Node(void *, void *, int , CKTnode **, IFuid *); extern int CKTlinkEq(CKTcircuit *, CKTnode *); extern int CKTload(CKTcircuit *); @@ -340,7 +340,7 @@ extern int CKTsenLoad(CKTcircuit *); extern void CKTsenPrint(CKTcircuit *); extern int CKTsenSetup(CKTcircuit *); extern int CKTsenUpdate(CKTcircuit *); -extern int CKTsetAnalPm(void *, void *, int , IFvalue *, IFvalue *); +extern int CKTsetAnalPm(CKTcircuit *, void *, int , IFvalue *, IFvalue *); extern int CKTsetBreak(CKTcircuit *, double); extern int CKTsetNodPm(void *, void *, int , IFvalue *, IFvalue *); extern int CKTsetOpt(CKTcircuit *, void *, int , IFvalue *); diff --git a/src/include/ftedefs.h b/src/include/ftedefs.h index 8a07ce47c..ae6f112f5 100644 --- a/src/include/ftedefs.h +++ b/src/include/ftedefs.h @@ -26,7 +26,7 @@ struct save_info { struct circ { char *ci_name; /* What the circuit can be called. */ - char *ci_ckt; /* The CKTcircuit structure. */ + CKTcircuit *ci_ckt; /* The CKTcircuit structure. */ INPtables *ci_symtab; /* The INP symbol table. */ struct line *ci_deck; /* The input deck. */ struct line *ci_origdeck;/* The input deck, before subckt expansion. */ diff --git a/src/include/ifsim.h b/src/include/ifsim.h index 093d909aa..753f8a420 100644 --- a/src/include/ifsim.h +++ b/src/include/ifsim.h @@ -345,7 +345,7 @@ struct IFsimulator { char *description; /* description of this simulator */ char *version; /* version or revision level of simulator*/ - int (*newCircuit) (void **); + int (*newCircuit) (CKTcircuit **); /* create new circuit */ int (*deleteCircuit) (void *); /* destroy old circuit's data structures*/ @@ -393,7 +393,7 @@ struct IFsimulator { /* create a new task */ int (*newAnalysis) (void *, int, IFuid, void **, void *); /* create new analysis within a task */ - int (*setAnalysisParm) (void *, void *, int, IFvalue *, IFvalue *); + int (*setAnalysisParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *); /* set a parameter on an analysis */ int (*askAnalysisQuest) (void *, void *, int, IFvalue *, IFvalue *); /* ask a question about an analysis */ diff --git a/src/include/inpdefs.h b/src/include/inpdefs.h index cda3398fa..98c6fe1aa 100644 --- a/src/include/inpdefs.h +++ b/src/include/inpdefs.h @@ -90,11 +90,11 @@ int IFnewUid(void *, IFuid *, IFuid, char *, int, void **); int IFdelUid(void *, IFuid, int); int INPaName(char *, IFvalue *, void *, int *, char *, void **, IFsimulator *, int *, IFvalue *); -int INPapName(void *, int, void *, char *, IFvalue *); +int INPapName(CKTcircuit *, int, void *, char *, IFvalue *); void INPcaseFix(char *); char *INPdevParse(char **, void *, int, void *, double *, int *, INPtables *); char *INPdomodel(void *, card *, INPtables *); -void INPdoOpts(void *, void *, card *, INPtables *); +void INPdoOpts(CKTcircuit *, void *, card *, INPtables *); char *INPerrCat(char *, char *); char *INPerror(int); double INPevaluate(char **, int *, int); @@ -113,8 +113,8 @@ int INPremove(char *, INPtables *); int INPlookMod(char *); int INPmakeMod(char *, int, card *); char *INPmkTemp(char *); -void INPpas1(void *, card *, INPtables *); -void INPpas2(void *, card *, INPtables *, void *); +void INPpas1(CKTcircuit *, card *, INPtables *); +void INPpas2(CKTcircuit *, card *, INPtables *, void *); void INPpas3(void *, card *, INPtables *, void *, IFparm *, int); int INPpName(char *, IFvalue *, void *, int, void *); int INPtermInsert(void *, char **, INPtables *, void **); @@ -143,7 +143,7 @@ void INP2V(void *, INPtables *, card *); void INP2W(void *, INPtables *, card *); void INP2Y(void *, INPtables *, card *); void INP2Z(void *, INPtables *, card *); -int INP2dot(void *, INPtables *, card *, void *, void *); +int INP2dot(CKTcircuit *, INPtables *, card *, void *, void *); INPtables *INPtabInit(int); void INPkillMods(void); void INPtabEnd(INPtables *); diff --git a/src/spicelib/analysis/ckt.h b/src/spicelib/analysis/ckt.h index 38c4ac627..2be608a19 100644 --- a/src/spicelib/analysis/ckt.h +++ b/src/spicelib/analysis/ckt.h @@ -42,7 +42,7 @@ int CKTfndNode( void *, void **, IFuid ); int CKTfndTask( void *, void **, IFuid ); int CKTground( void *, void **, IFuid ); int CKTic( CKTcircuit *); -int CKTinit( void **); +int CKTinit( CKTcircuit **); int CKTinst2Node( void *, void *, int , CKTnode **, IFuid *); int CKTlinkEq(CKTcircuit*,CKTnode*); int CKTload( CKTcircuit *); @@ -75,7 +75,7 @@ int CKTsenLoad( CKTcircuit *); void CKTsenPrint( CKTcircuit *); int CKTsenSetup( CKTcircuit *); int CKTsenUpdate( CKTcircuit *); -int CKTsetAnalPm( void *, void *, int , IFvalue *, IFvalue *); +int CKTsetAnalPm( CKTcircuit *, void *, int , IFvalue *, IFvalue *); int CKTsetBreak( CKTcircuit *, double ); int CKTsetNodPm( void *, void *, int , IFvalue *, IFvalue *); int CKTsetOpt( CKTcircuit *, void *, int , IFvalue *); diff --git a/src/spicelib/analysis/cktsetap.c b/src/spicelib/analysis/cktsetap.c index 758c18852..b8204900f 100644 --- a/src/spicelib/analysis/cktsetap.c +++ b/src/spicelib/analysis/cktsetap.c @@ -16,7 +16,7 @@ extern SPICEanalysis *analInfo[]; /* ARGSUSED */ int -CKTsetAnalPm(void *ckt, void *analPtr, int parm, IFvalue *value, IFvalue *selector) +CKTsetAnalPm(CKTcircuit *ckt, void *analPtr, int parm, IFvalue *value, IFvalue *selector) { int type = ((JOB *)analPtr)->JOBtype; if((analInfo[type]->setParm)==NULL) return(E_BADPARM); diff --git a/src/spicelib/devices/cktinit.c b/src/spicelib/devices/cktinit.c index d97b13b7f..3c223fbb9 100644 --- a/src/spicelib/devices/cktinit.c +++ b/src/spicelib/devices/cktinit.c @@ -21,12 +21,12 @@ Modifed: 2000 AlansFixes #endif int -CKTinit(void **ckt) /* new circuit to create */ +CKTinit(CKTcircuit **ckt) /* new circuit to create */ { int i; CKTcircuit *sckt; - *ckt = (void *) tmalloc(sizeof(CKTcircuit)); - sckt = (CKTcircuit *)(*ckt); + *ckt = (CKTcircuit *) tmalloc(sizeof(CKTcircuit)); + sckt = (CKTcircuit * /*fixme*/)(*ckt); if (sckt == NULL) return(E_NOMEM); /* gtri - begin - dynamically allocate the array of model lists */ diff --git a/src/spicelib/parser/inp.h b/src/spicelib/parser/inp.h index 30e008647..fa68d9e44 100644 --- a/src/spicelib/parser/inp.h +++ b/src/spicelib/parser/inp.h @@ -42,16 +42,16 @@ void INP2V(void *ckt, INPtables *tab, card *current); void INP2W(void *ckt, INPtables *tab, card *current); void INP2Y(void *ckt, INPtables *tab, card *current); void INP2Z(void *ckt, INPtables *tab, card *current); -int INP2dot(void *ckt, INPtables *tab, card *current, void *task, void *gnode); +int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode); /* inpxxxx.c */ int INPaName(char *parm, IFvalue *val, void *ckt, int *dev, char *devnam, void **fast, IFsimulator *sim, int *dataType, IFvalue *selector); -int INPapName(void *ckt, int type, void *analPtr, char *parmname, IFvalue *value); +int INPapName(CKTcircuit *ckt, int type, void *analPtr, char *parmname, IFvalue *value); void INPcaseFix(register char *string); char * INPdomodel(void *ckt, card *image, INPtables *tab); -void INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab); +void INPdoOpts(CKTcircuit *ckt, void *anal, card *optCard, INPtables *tab); char * INPdevParse(char **line, void *ckt, int dev, void *fast, double *leading, int *waslead, INPtables *tab); char * INPerrCat(char *a, char *b); @@ -61,7 +61,7 @@ char * INPfindLev(char *line, int *level); char * INPfindVer(char *line, char *version); char * INPgetMod(void *ckt, char *name, INPmodel **model, INPtables *tab); int INPgetStr(char **line, char **token, int gobble); -int INPgetTitle(void **ckt, card **data); +int INPgetTitle(CKTcircuit **ckt, card **data); int INPgetTok(char **line, char **token, int gobble); int INPgetUTok(char **line, char **token, int gobble); IFvalue * INPgetValue(void *ckt, char **line, int type, INPtables *tab); @@ -70,8 +70,8 @@ void INPlist(FILE *file, card *deck, int type); int INPlookMod(char *name); int INPmakeMod(char *token, int type, card *line); char * INPmkTemp(char *string); -void INPpas1(void *ckt, card *deck, INPtables *tab); -void INPpas2(void *ckt, card *data, INPtables *tab, void *task); +void INPpas1(CKTcircuit *ckt, card *deck, INPtables *tab); +void INPpas2(CKTcircuit *ckt, card *data, INPtables *tab, void *task); int INPpName(char *parm, IFvalue *val, void *ckt, int dev, void *fast); /* inpptree.c */ diff --git a/src/spicelib/parser/inp2dot.c b/src/spicelib/parser/inp2dot.c index 1c6ceedd9..f1d14a9fb 100644 --- a/src/spicelib/parser/inp2dot.c +++ b/src/spicelib/parser/inp2dot.c @@ -15,7 +15,7 @@ Modified: 2000 AlansFixes static int -dot_noise(char *line, void *ckt, INPtables *tab, card *current, +dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { int which; /* which analysis we are performing */ @@ -148,7 +148,7 @@ dot_op(char *line, void *ckt, INPtables *tab, card *current, static int -dot_disto(char *line, void *ckt, INPtables *tab, card *current, +dot_disto(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { int which; /* which analysis we are performing */ @@ -189,7 +189,7 @@ dot_disto(char *line, void *ckt, INPtables *tab, card *current, static int -dot_ac(char *line, void *ckt, INPtables *tab, card *current, +dot_ac(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { int error; /* error code temporary */ @@ -226,7 +226,7 @@ dot_ac(char *line, void *ckt, INPtables *tab, card *current, } static int -dot_pz(char *line, void *ckt, INPtables *tab, card *current, +dot_pz(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { int error; /* error code temporary */ @@ -268,7 +268,7 @@ dot_pz(char *line, void *ckt, INPtables *tab, card *current, static int -dot_dc(char *line, void *ckt, INPtables *tab, card *current, +dot_dc(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { char *name; /* the resistor's name */ @@ -319,7 +319,7 @@ dot_dc(char *line, void *ckt, INPtables *tab, card *current, static int -dot_tf(char *line, void *ckt, INPtables *tab, card *current, +dot_tf(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { char *name; /* the resistor's name */ @@ -392,7 +392,7 @@ dot_tf(char *line, void *ckt, INPtables *tab, card *current, static int -dot_tran(char *line, void *ckt, INPtables *tab, card *current, +dot_tran(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { int error; /* error code temporary */ @@ -446,7 +446,7 @@ dot_tran(char *line, void *ckt, INPtables *tab, card *current, static int -dot_sens(char *line, void *ckt, INPtables *tab, card *current, +dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { char *name; /* the resistor's name */ @@ -620,7 +620,7 @@ dot_sens2(char *line, void *ckt, INPtables *tab, card *current, #endif static int -dot_options(char *line, void *ckt, INPtables *tab, card *current, +dot_options(char *line, CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode, void *foo) { /* .option - specify program options - rather complicated */ @@ -633,7 +633,7 @@ dot_options(char *line, void *ckt, INPtables *tab, card *current, int -INP2dot(void *ckt, INPtables *tab, card *current, void *task, void *gnode) +INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode) { /* . Many possibilities */ @@ -721,7 +721,7 @@ INP2dot(void *ckt, INPtables *tab, card *current, void *task, void *gnode) else if ((strcmp(token, ".options") == 0)|| (strcmp(token,".option")==0) || (strcmp(token,".opt")==0)) { - rtn = dot_options(line, ckt, tab, current, task, gnode, foo); + rtn = dot_options(line, (CKTcircuit * /*fixme*/) ckt, tab, current, task, gnode, foo); goto quit; } /* Added by H.Tanaka to find .global option */ diff --git a/src/spicelib/parser/inpapnam.c b/src/spicelib/parser/inpapnam.c index 7789d7b96..12304b70c 100644 --- a/src/spicelib/parser/inpapnam.c +++ b/src/spicelib/parser/inpapnam.c @@ -12,7 +12,7 @@ Author: 1985 Thomas L. Quarles #include "inp.h" int -INPapName(void *ckt, int type, void *analPtr, char *parmname, +INPapName(CKTcircuit *ckt, int type, void *analPtr, char *parmname, IFvalue * value) { int i; diff --git a/src/spicelib/parser/inpdoopt.c b/src/spicelib/parser/inpdoopt.c index b0aeda7bb..b773911a2 100644 --- a/src/spicelib/parser/inpdoopt.c +++ b/src/spicelib/parser/inpdoopt.c @@ -19,7 +19,7 @@ Modified: 2000 AlansFixes void INPdoOpts( - void *ckt, + CKTcircuit *ckt, void *anal, card *optCard, INPtables *tab) diff --git a/src/spicelib/parser/inpgtitl.c b/src/spicelib/parser/inpgtitl.c index 5ae3cb913..9113ce4ef 100644 --- a/src/spicelib/parser/inpgtitl.c +++ b/src/spicelib/parser/inpgtitl.c @@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles #include "fteext.h" #include "inp.h" -int INPgetTitle(void **ckt, card ** data) +int INPgetTitle(CKTcircuit **ckt, card ** data) { int error; diff --git a/src/spicelib/parser/inppas1.c b/src/spicelib/parser/inppas1.c index 17833029a..b34ed30b0 100644 --- a/src/spicelib/parser/inppas1.c +++ b/src/spicelib/parser/inppas1.c @@ -14,7 +14,7 @@ Author: 1985 Thomas L. Quarles * The first pass of the circuit parser just looks for '.model' lines */ -void INPpas1(void *ckt, card * deck, INPtables * tab) +void INPpas1(CKTcircuit *ckt, card * deck, INPtables * tab) { card *current; char *temp, *thisline; diff --git a/src/spicelib/parser/inppas1.h b/src/spicelib/parser/inppas1.h index 6635e6228..df0d158e3 100644 --- a/src/spicelib/parser/inppas1.h +++ b/src/spicelib/parser/inppas1.h @@ -3,6 +3,6 @@ #include -void INPpas1(void *ckt, card *deck, INPtables *tab); +void INPpas1(CKTcircuit *ckt, card *deck, INPtables *tab); #endif diff --git a/src/spicelib/parser/inppas2.c b/src/spicelib/parser/inppas2.c index 9eda2ecc8..40ee4e29c 100644 --- a/src/spicelib/parser/inppas2.c +++ b/src/spicelib/parser/inppas2.c @@ -26,7 +26,7 @@ extern void SetAnalyse( char * Analyse, int Percent); /* pass 2 - Scan through the lines. ".model" cards have processed in * pass1 and are ignored here. */ -void INPpas2(void *ckt, card * data, INPtables * tab, void *task) +void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, void *task) { card *current; diff --git a/src/spicelib/parser/inppas2.h b/src/spicelib/parser/inppas2.h index 9095ef7ae..70b7a7f2e 100644 --- a/src/spicelib/parser/inppas2.h +++ b/src/spicelib/parser/inppas2.h @@ -3,7 +3,7 @@ #include -void INPpas2(void *ckt, card *data, INPtables *tab, void *task); +void INPpas2(CKTcircuit *ckt, card *data, INPtables *tab, void *task); #endif diff --git a/src/tclspice.c b/src/tclspice.c index 4b6de16ee..8ac540a57 100755 --- a/src/tclspice.c +++ b/src/tclspice.c @@ -1289,10 +1289,10 @@ static int delta TCL_CMDPROCARGS(clientData,interp,argc,argv) { } if(argc == 2) { - ((CKTcircuit *)ft_curckt->ci_ckt)->CKTdelta = atof(argv[1]); + (ft_curckt->ci_ckt)->CKTdelta = atof(argv[1]); } /*Ok, as log as string less than 200 chars*/ - sprintf(interp->result,"%G",((CKTcircuit *)ft_curckt->ci_ckt)->CKTdelta); + sprintf(interp->result,"%G",(ft_curckt->ci_ckt)->CKTdelta); return TCL_OK; } @@ -1311,7 +1311,7 @@ static int maxstep TCL_CMDPROCARGS(clientData,interp,argc,argv) { return TCL_ERROR; } - job = (TRANan*)((CKTcircuit *)ft_curckt->ci_ckt)->CKTcurJob; + job = (TRANan*)(ft_curckt->ci_ckt)->CKTcurJob; if(argc == 2) { job->TRANmaxStep = atof(argv[1]); }