Browse Source

drop some more casts

rlar 14 years ago
parent
commit
d5f6bcbedf
  1. 13
      ChangeLog
  2. 8
      src/frontend/outitf.c
  3. 6
      src/frontend/plotting/graf.c
  4. 2
      src/frontend/spiceif.c
  5. 2
      src/frontend/subckt.c
  6. 2
      src/spicelib/analysis/cktnames.c
  7. 6
      src/spicelib/devices/hisim2/hsm2noi.c
  8. 6
      src/spicelib/devices/hisimhv/hsmhvnoi.c
  9. 12
      src/spicelib/parser/ifnewuid.c
  10. 2
      src/spicelib/parser/inpptree.c
  11. 2
      src/xspice/mif/mifsetup.c

13
ChangeLog

@ -1,3 +1,16 @@
2012-02-06 Robert Larice
* src/frontend/outitf.c ,
* src/frontend/spiceif.c ,
* src/frontend/subckt.c ,
* src/frontend/plotting/graf.c ,
* src/spicelib/analysis/cktnames.c ,
* src/spicelib/devices/hisim2/hsm2noi.c ,
* src/spicelib/devices/hisimhv/hsmhvnoi.c ,
* src/spicelib/parser/ifnewuid.c ,
* src/spicelib/parser/inpptree.c ,
* src/xspice/mif/mifsetup.c :
drop some more casts
2012-02-06 Robert Larice 2012-02-06 Robert Larice
* src/spicelib/analysis/analysis.c , * src/spicelib/analysis/analysis.c ,
* src/spicelib/devices/urc/urcsetup.c : * src/spicelib/devices/urc/urcsetup.c :

8
src/frontend/outitf.c

@ -105,8 +105,8 @@ if (ARCHme != 0) return(OK);
name = "circuit name"; name = "circuit name";
return (beginPlot(analysisPtr, circuitPtr, name, return (beginPlot(analysisPtr, circuitPtr, name,
(char *) analName, (char *) refName, refType, numNames,
(char **) dataNames, dataType, FALSE,
analName, refName, refType, numNames,
dataNames, dataType, FALSE,
(runDesc **) plotPtr)); (runDesc **) plotPtr));
} }
@ -121,8 +121,8 @@ OUTwBeginPlot(CKTcircuit *circuitPtr, JOB *analysisPtr,
#endif /* PARALLEL_ARCH */ #endif /* PARALLEL_ARCH */
return (beginPlot(analysisPtr, circuitPtr, "circuit name", return (beginPlot(analysisPtr, circuitPtr, "circuit name",
(char *) analName, (char *) refName, refType, numNames,
(char **) dataNames, dataType, TRUE,
analName, refName, refType, numNames,
dataNames, dataType, TRUE,
(runDesc **) plotPtr)); (runDesc **) plotPtr));
} }

6
src/frontend/plotting/graf.c

@ -114,9 +114,9 @@ gr_init(double *xlims, double *ylims, /* The size of the screen. */
} }
if (cp_getvar("ticlist", CP_LIST, ticlist)) { if (cp_getvar("ticlist", CP_LIST, ticlist)) {
wl = (wordlist *)vareval("ticlist");
ticlist = (char *)wl_flatten(wl);
graph->ticdata = (double *) readtics(ticlist);
wl = vareval("ticlist");
ticlist = wl_flatten(wl);
graph->ticdata = readtics(ticlist);
} else } else
graph->ticdata = NULL; graph->ticdata = NULL;

2
src/frontend/spiceif.c

@ -889,7 +889,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, ft_curckt->ci_symtab );
INPgetMod( ckt, mods->GENmodName, &inpmod, ft_curckt->ci_symtab );
inpmod->INPmodUsed = 0; inpmod->INPmodUsed = 0;
FREE(mods); FREE(mods);

2
src/frontend/subckt.c

@ -1071,7 +1071,7 @@ translate(struct line *deck, char *formal, char *actual, char *scname, char *sub
/* Next we handle the POLY (if any) */ /* Next we handle the POLY (if any) */
/* get next token */ /* get next token */
t = s; t = s;
next_name = (char *)gettok_noparens(&t);
next_name = gettok_noparens(&t);
if ( (strcmp(next_name, "POLY") == 0) || if ( (strcmp(next_name, "POLY") == 0) ||
(strcmp(next_name, "poly") == 0)) { /* found POLY . . . . */ (strcmp(next_name, "poly") == 0)) { /* found POLY . . . . */

2
src/spicelib/analysis/cktnames.c

@ -38,7 +38,7 @@ CKTdnames(CKTcircuit *ckt)
i=0; i=0;
for (here = ckt->CKTnodes->next; here; here = here->next) { for (here = ckt->CKTnodes->next; here; here = here->next) {
printf("%03d: %s\n", here->number, (char *)here->name);
printf("%03d: %s\n", here->number, here->name);
} }
return(OK); return(OK);
} }

6
src/spicelib/devices/hisim2/hsm2noi.c

@ -81,7 +81,7 @@ int HSM2noise (
case N_DENS: case N_DENS:
for ( i = 0; i < HSM2NSRCS; i++ ) { for ( i = 0; i < HSM2NSRCS; i++ ) {
(void) sprintf(name, "onoise.%s%s", (void) sprintf(name, "onoise.%s%s",
(char *)here->HSM2name, HSM2nNames[i]);
here->HSM2name, HSM2nNames[i]);
data->namelist = data->namelist =
TREALLOC(IFuid, data->namelist, data->numPlots + 1); TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist) if (!data->namelist)
@ -94,7 +94,7 @@ int HSM2noise (
case INT_NOIZ: case INT_NOIZ:
for ( i = 0; i < HSM2NSRCS; i++ ) { for ( i = 0; i < HSM2NSRCS; i++ ) {
(void) sprintf(name, "onoise_total.%s%s", (void) sprintf(name, "onoise_total.%s%s",
(char *)here->HSM2name, HSM2nNames[i]);
here->HSM2name, HSM2nNames[i]);
data->namelist = data->namelist =
TREALLOC(IFuid, data->namelist, data->numPlots + 1); TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist) if (!data->namelist)
@ -104,7 +104,7 @@ int HSM2noise (
NULL, name, UID_OTHER, NULL); NULL, name, UID_OTHER, NULL);
(void) sprintf(name, "inoise_total.%s%s", (void) sprintf(name, "inoise_total.%s%s",
(char *)here->HSM2name, HSM2nNames[i]);
here->HSM2name, HSM2nNames[i]);
data->namelist = data->namelist =
TREALLOC(IFuid, data->namelist, data->numPlots + 1); TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist) if (!data->namelist)

6
src/spicelib/devices/hisimhv/hsmhvnoi.c

@ -81,7 +81,7 @@ int HSMHVnoise (
case N_DENS: case N_DENS:
for ( i = 0; i < HSMHVNSRCS; i++ ) { for ( i = 0; i < HSMHVNSRCS; i++ ) {
(void) sprintf(name, "onoise.%s%s", (void) sprintf(name, "onoise.%s%s",
(char *)here->HSMHVname, HSMHVnNames[i]);
here->HSMHVname, HSMHVnNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist) if (!data->namelist)
return(E_NOMEM); return(E_NOMEM);
@ -93,7 +93,7 @@ int HSMHVnoise (
case INT_NOIZ: case INT_NOIZ:
for ( i = 0; i < HSMHVNSRCS; i++ ) { for ( i = 0; i < HSMHVNSRCS; i++ ) {
(void) sprintf(name, "onoise_total.%s%s", (void) sprintf(name, "onoise_total.%s%s",
(char *)here->HSMHVname, HSMHVnNames[i]);
here->HSMHVname, HSMHVnNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist) if (!data->namelist)
return(E_NOMEM); return(E_NOMEM);
@ -102,7 +102,7 @@ int HSMHVnoise (
(IFuid) NULL, name, UID_OTHER, NULL); (IFuid) NULL, name, UID_OTHER, NULL);
(void) sprintf(name, "inoise_total.%s%s", (void) sprintf(name, "inoise_total.%s%s",
(char *)here->HSMHVname, HSMHVnNames[i]);
here->HSMHVname, HSMHVnNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist) if (!data->namelist)
return(E_NOMEM); return(E_NOMEM);

12
src/spicelib/parser/ifnewuid.c

@ -37,10 +37,10 @@ IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
if (olduid) { if (olduid) {
#ifdef HAVE_ASPRINTF #ifdef HAVE_ASPRINTF
asprintf(&newname, "%s#%s", (char *) olduid, suffix);
asprintf(&newname, "%s#%s", olduid, suffix);
#else /* ~ HAVE_ASPRINTF */ #else /* ~ HAVE_ASPRINTF */
newname = TMALLOC(char, strlen((char *) olduid) + strlen(suffix) + 2); /* 2 = strlen("#\0") */
sprintf(newname, "%s#%s", (char *) olduid, suffix);
newname = TMALLOC(char, strlen(olduid) + strlen(suffix) + 2); /* 2 = strlen("#\0") */
sprintf(newname, "%s#%s", olduid, suffix);
#endif /* HAVE_ASPRINTF */ #endif /* HAVE_ASPRINTF */
} else { } else {
@ -62,15 +62,15 @@ IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
error = INPinsert(&newname, 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 = newname;
break; break;
case UID_SIGNAL: case UID_SIGNAL:
error = INPmkTerm(ckt, &newname, error = INPmkTerm(ckt, &newname,
(INPtables *) ft_curckt->ci_symtab, nodedata);
ft_curckt->ci_symtab, nodedata);
if (error && error != E_EXISTS) if (error && error != E_EXISTS)
return (error); return (error);
*newuid = (IFuid) newname;
*newuid = newname;
break; break;
default: default:

2
src/spicelib/parser/inpptree.c

@ -928,7 +928,7 @@ static INPparseNode *mkinode(char *name)
values = TMALLOC(IFvalue, 1); values = TMALLOC(IFvalue, 1);
types = TMALLOC(int, 1); types = TMALLOC(int, 1);
} }
values[i].uValue = (IFuid) name;
values[i].uValue = name;
types[i] = IF_INSTANCE; types[i] = IF_INSTANCE;
numvalues++; numvalues++;
} }

2
src/xspice/mif/mifsetup.c

@ -353,7 +353,7 @@ MIFsetup(
if(smp_data_out->ibranch == 0) { if(smp_data_out->ibranch == 0) {
IFuid names[2]; IFuid names[2];
names[0] = here->MIFname; names[0] = here->MIFname;
names[1] = (IFuid) here->conn[i]->port[j]->vsource_str;
names[1] = here->conn[i]->port[j]->vsource_str;
SPfrontEnd->IFerror (ERR_FATAL, SPfrontEnd->IFerror (ERR_FATAL,
"%s: unknown controlling source %s",names); "%s: unknown controlling source %s",names);
return(E_BADPARM); return(E_BADPARM);

Loading…
Cancel
Save