Browse Source

INPtables, remove some casts

pre-master-46
rlar 16 years ago
parent
commit
805f60448a
  1. 7
      ChangeLog
  2. 2
      src/frontend/outitf.c
  3. 18
      src/frontend/spiceif.c
  4. 6
      src/spicelib/parser/ifnewuid.c
  5. 2
      src/tclspice.c

7
ChangeLog

@ -1,3 +1,10 @@
2010-07-08 Robert Larice
* src/tclspice.c ,
* src/frontend/outitf.c ,
* src/frontend/spiceif.c ,
* src/spicelib/parser/ifnewuid.c :
INPtables, remove some casts, which are no longer necessary
2010-07-08 Robert Larice 2010-07-08 Robert Larice
* src/tclspice.c , * src/tclspice.c ,
* src/frontend/outitf.h , * src/frontend/outitf.h ,

2
src/frontend/outitf.c

@ -426,7 +426,7 @@ addSpecialDesc(runDesc *run, char *name, char *devname, char *param, int depind)
unique = copy(devname); unique = copy(devname);
/* MW. My "special" routine here */ /* MW. My "special" routine here */
INPinsertNofree(&unique, (INPtables *) ft_curckt->ci_symtab);
INPinsertNofree(&unique, ft_curckt->ci_symtab);
data->specName = unique; data->specName = unique;
data->specParamName = copy(param); data->specParamName = copy(param);

18
src/frontend/spiceif.c

@ -161,7 +161,7 @@ if_inpdeck(struct line *deck, INPtables **tab)
ft_curckt->ci_curTask = ft_curckt->ci_defTask; ft_curckt->ci_curTask = ft_curckt->ci_defTask;
INPpas1( ckt, (card *) deck->li_next,(INPtables *)*tab);
INPpas1( ckt, (card *) deck->li_next, *tab);
INPpas2( ckt, (card *) deck->li_next, INPpas2( ckt, (card *) deck->li_next,
(INPtables *) *tab,ft_curckt->ci_defTask); (INPtables *) *tab,ft_curckt->ci_defTask);
INPkillMods(); INPkillMods();
@ -617,7 +617,7 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod
if (!param || (param && eq(param, "all"))) if (!param || (param && eq(param, "all")))
{ {
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(name, ft_curckt->ci_symtab);
typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo); typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo);
if (typecode == -1) if (typecode == -1)
{ {
@ -709,7 +709,7 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod
} }
else if (param) else if (param)
{ {
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(name, ft_curckt->ci_symtab);
typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo); typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo);
if (typecode == -1) if (typecode == -1)
{ {
@ -754,7 +754,7 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model)
if (param && eq(param, "all")) { if (param && eq(param, "all")) {
/* MW. My "special routine here" */ /* MW. My "special routine here" */
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(name, ft_curckt->ci_symtab);
typecode = finddev(ckt, *name, &dev, &mod); typecode = finddev(ckt, *name, &dev, &mod);
if (typecode == -1) { if (typecode == -1) {
@ -785,7 +785,7 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model)
} else if (param) { } else if (param) {
/* MW. */ /* MW. */
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(name, ft_curckt->ci_symtab);
typecode = finddev(ckt, *name, &dev, &mod); typecode = finddev(ckt, *name, &dev, &mod);
if (typecode == -1) { if (typecode == -1) {
fprintf(cp_err, fprintf(cp_err,
@ -822,7 +822,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
int typecode; int typecode;
/* retrieve device name from symbol table */ /* retrieve device name from symbol table */
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(name, ft_curckt->ci_symtab);
/* find the specified device */ /* find the specified device */
typecode = finddev(ckt, *name, &dev, &curMod); typecode = finddev(ckt, *name, &dev, &curMod);
if (typecode == -1) { if (typecode == -1) {
@ -834,7 +834,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
retrieve the model from the global model table; also add the model to 'ckt' retrieve the model from the global model table; also add the model to 'ckt'
and indicate model is being used and indicate model is being used
*/ */
INPgetMod( ckt, val, &inpmod, (INPtables *)ft_curckt->ci_symtab );
INPgetMod( ckt, val, &inpmod, ft_curckt->ci_symtab );
if ( inpmod == NULL ) { if ( inpmod == NULL ) {
fprintf(cp_err, "Error: no such model %s.\n", val); fprintf(cp_err, "Error: no such model %s.\n", val);
return; return;
@ -878,7 +878,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
if ( prevMod == NULL ) ckt->CKThead[typecode] = mods->GENnextModel; if ( prevMod == NULL ) ckt->CKThead[typecode] = mods->GENnextModel;
else prevMod->GENnextModel = mods->GENnextModel; else prevMod->GENnextModel = mods->GENnextModel;
INPgetMod( ckt, (char *)mods->GENmodName, &inpmod, (INPtables *)ft_curckt->ci_symtab );
INPgetMod( ckt, (char *)mods->GENmodName, &inpmod, ft_curckt->ci_symtab );
inpmod->INPmodUsed = 0; inpmod->INPmodUsed = 0;
FREE(mods); FREE(mods);
@ -899,7 +899,7 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_
int typecode; int typecode;
/* PN */ /* PN */
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(name, ft_curckt->ci_symtab);
typecode = finddev(ckt, *name, &dev, &mod); typecode = finddev(ckt, *name, &dev, &mod);
if (typecode == -1) { if (typecode == -1) {
fprintf(cp_err, "Error: no such device or model name %s\n", *name); fprintf(cp_err, "Error: no such device or model name %s\n", *name);

6
src/spicelib/parser/ifnewuid.c

@ -55,7 +55,7 @@ IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
case UID_INSTANCE: case UID_INSTANCE:
case UID_OTHER: case UID_OTHER:
case UID_MODEL: case UID_MODEL:
error = INPinsert(&newname, (INPtables *) ft_curckt->ci_symtab);
error = INPinsert(&newname, ft_curckt->ci_symtab);
if (error && error != E_EXISTS) if (error && error != E_EXISTS)
return (error); return (error);
*newuid = (IFuid) newname; *newuid = (IFuid) newname;
@ -85,13 +85,13 @@ int IFdelUid(CKTcircuit *ckt, IFuid uid, int type)
case UID_INSTANCE: case UID_INSTANCE:
case UID_OTHER: case UID_OTHER:
case UID_MODEL: case UID_MODEL:
error = INPremove(uid, (INPtables *) ft_curckt->ci_symtab);
error = INPremove(uid, ft_curckt->ci_symtab);
if (error && error != E_EXISTS) if (error && error != E_EXISTS)
return (error); return (error);
break; break;
case UID_SIGNAL: case UID_SIGNAL:
error = INPremTerm(uid, (INPtables *) ft_curckt->ci_symtab);
error = INPremTerm(uid, ft_curckt->ci_symtab);
if (error && error != E_EXISTS) if (error && error != E_EXISTS)
return (error); return (error);
break; break;

2
src/tclspice.c

@ -1233,7 +1233,7 @@ int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) {
} }
/* get the unique IFuid for name (device/model) */ /* get the unique IFuid for name (device/model) */
INPretrieve(&name,(INPtables *)ft_curckt->ci_symtab);
INPretrieve(&name, ft_curckt->ci_symtab);
err = (*(ft_sim->findInstance))(ft_curckt->ci_ckt,&typecode,&devptr,name,NULL,NULL); err = (*(ft_sim->findInstance))(ft_curckt->ci_ckt,&typecode,&devptr,name,NULL,NULL);
if (err != OK) { if (err != OK) {
typecode = -1; typecode = -1;

Loading…
Cancel
Save