code cleanup, drop NULL pointer casts
This commit is contained in:
parent
a987113675
commit
23056573d8
|
|
@ -1,3 +1,7 @@
|
|||
2011-04-27 Robert Larice
|
||||
* */** :
|
||||
code cleanup, drop NULL pointer casts
|
||||
|
||||
2011-04-28 Robert Larice
|
||||
* src/frontend/plotting/x11.c ,
|
||||
* src/frontend/plotting/x11.h :
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ BDRYnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( BDRYcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->BDRYnextCard = (BDRYcard *)NULL;
|
||||
newCard->BDRYnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENboundaries;
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ CONTnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( CONTcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->CONTnextCard = (CONTcard *)NULL;
|
||||
newCard->CONTnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENcontacts;
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ DOMNnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( DOMNcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->DOMNnextCard = (DOMNcard *)NULL;
|
||||
newCard->DOMNnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENdomains;
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ DOPnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( DOPcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->DOPnextCard = (DOPcard *)NULL;
|
||||
newCard->DOPnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENdopings;
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ ELCTnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( ELCTcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->ELCTnextCard = (ELCTcard *)NULL;
|
||||
newCard->ELCTnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENelectrodes;
|
||||
|
|
|
|||
|
|
@ -104,10 +104,10 @@ MATLnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( MATLcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->MATLnextCard = (MATLcard *)NULL;
|
||||
newCard->MATLnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENmaterials;
|
||||
|
|
|
|||
|
|
@ -62,10 +62,10 @@ XMSHnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( MESHcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->MESHnextCard = (MESHcard *)NULL;
|
||||
newCard->MESHnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENxMeshes;
|
||||
|
|
@ -88,10 +88,10 @@ YMSHnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( MESHcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->MESHnextCard = (MESHcard *)NULL;
|
||||
newCard->MESHnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENyMeshes;
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ METHnewCard(void **inCard, void *inModel)
|
|||
if (!tmpCard) { /* First in list */
|
||||
newCard = NEW( METHcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->METHnextCard = (METHcard *)NULL;
|
||||
newCard->METHnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
model->GENmethods = newCard;
|
||||
} else { /* Only one card of this type allowed */
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ MOBnewCard(void **inCard, void *inModel)
|
|||
|
||||
newCard = NEW( MOBcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->MOBnextCard = (MOBcard *)NULL;
|
||||
newCard->MOBnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
|
||||
tmpCard = model->GENmobility;
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ MODLnewCard(void **inCard, void *inModel)
|
|||
if (!tmpCard) { /* First in list */
|
||||
newCard = NEW( MODLcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->MODLnextCard = (MODLcard *)NULL;
|
||||
newCard->MODLnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
model->GENmodels = newCard;
|
||||
} else { /* Only one card of this type allowed */
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ OPTNnewCard(void **inCard, void *inModel)
|
|||
if (!tmpCard) { /* First in list */
|
||||
newCard = NEW( OPTNcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->OPTNnextCard = (OPTNcard *)NULL;
|
||||
newCard->OPTNnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
model->GENoptions = newCard;
|
||||
} else { /* Only one card of this type allowed */
|
||||
|
|
|
|||
|
|
@ -93,10 +93,10 @@ OUTPnewCard(void **inCard, void *inModel)
|
|||
if (!tmpCard) { /* First in list */
|
||||
newCard = NEW( OUTPcard );
|
||||
if (!newCard) {
|
||||
*inCard = (void *)NULL;
|
||||
*inCard = NULL;
|
||||
return(E_NOMEM);
|
||||
}
|
||||
newCard->OUTPnextCard = (OUTPcard *)NULL;
|
||||
newCard->OUTPnextCard = NULL;
|
||||
*inCard = (void *)newCard;
|
||||
model->GENoutputs = newCard;
|
||||
} else { /* Only one card of this type allowed */
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ ONEequilSolve(ONEdevice *pDevice)
|
|||
setupTime += SPfrontEnd->IFseconds() - startTime;
|
||||
|
||||
/* SOLVE */
|
||||
ONEdcSolve(pDevice, MaxIterations, newSolver, FALSE, (ONEtranInfo *) NULL);
|
||||
ONEdcSolve(pDevice, MaxIterations, newSolver, FALSE, NULL);
|
||||
|
||||
/* MISCELLANEOUS */
|
||||
startTime = SPfrontEnd->IFseconds();
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ TWOequilSolve(TWOdevice *pDevice)
|
|||
setupTime += SPfrontEnd->IFseconds() - startTime;
|
||||
|
||||
/* SOLVE */
|
||||
TWOdcSolve(pDevice, MaxIterations, newSolver, FALSE, (TWOtranInfo *) NULL);
|
||||
TWOdcSolve(pDevice, MaxIterations, newSolver, FALSE, NULL);
|
||||
|
||||
/* MISCELLANEOUS */
|
||||
startTime = SPfrontEnd->IFseconds();
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ settrace(wordlist *wl, int what, char *name)
|
|||
d->db_type = DB_SAVE;
|
||||
break;
|
||||
}
|
||||
/* wrd_chtrace((char *) NULL, TRUE, what); */
|
||||
/* wrd_chtrace(NULL, TRUE, what); */
|
||||
} else {
|
||||
switch (what) {
|
||||
case VF_PRINT:
|
||||
|
|
|
|||
|
|
@ -73,8 +73,7 @@ com_ahelp(wordlist *wl)
|
|||
com = cc[i];
|
||||
if ((com->co_env < (level << 13)) && (!(com->co_env & 4095) ||
|
||||
(env & com->co_env))) {
|
||||
if ((com->co_spiceonly && ft_nutmeg) ||
|
||||
(com->co_help == (char *) NULL)) {
|
||||
if ((com->co_spiceonly && ft_nutmeg) || (com->co_help == NULL)) {
|
||||
continue;
|
||||
}
|
||||
out_printf("%s ", com->co_comname);
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void
|
|||
com_alias(wordlist *wl)
|
||||
{
|
||||
if (wl == NULL)
|
||||
cp_paliases((char *) NULL);
|
||||
cp_paliases(NULL);
|
||||
else if (wl->wl_next == NULL)
|
||||
cp_paliases(wl->wl_word);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@
|
|||
void
|
||||
com_asciiplot(wordlist *wl)
|
||||
{
|
||||
plotit(wl, (char *) NULL, "lpr");
|
||||
plotit(wl, NULL, "lpr");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ com_hardcopy(wordlist *wl)
|
|||
|
||||
if (DevSwitch(devtype)) return;
|
||||
|
||||
if (!wl || !plotit(wl, fname, (char *) NULL)) {
|
||||
if (!wl || !plotit(wl, fname, NULL)) {
|
||||
printf("com_hardcopy: graph not defined\n");
|
||||
DevSwitch(NULL); /* remember to switch back */
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
void
|
||||
com_plot(wordlist *wl)
|
||||
{
|
||||
plotit(wl, (char *) NULL, (char *) NULL);
|
||||
plotit(wl, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ com_plot(wordlist *wl)
|
|||
void
|
||||
com_bltplot(wordlist *wl)
|
||||
{
|
||||
plotit(wl, (char *) NULL, "blt");
|
||||
plotit(wl, NULL, "blt");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ com_shell(wordlist *wl)
|
|||
svtstp = signal(SIGTSTP, SIG_DFL);
|
||||
/* XXX Sig on proc group */
|
||||
do {
|
||||
r = wait((union wait *) NULL);
|
||||
r = wait(NULL);
|
||||
} while ((r != pid) && pid != -1);
|
||||
signal(SIGINT, (SIGNAL_FUNCTION) svint);
|
||||
signal(SIGQUIT, (SIGNAL_FUNCTION) svquit);
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ void cp_resetcontrol(void)
|
|||
cp_free_control(); /* va: free it */
|
||||
control[0] = cend[0] = NULL;
|
||||
stackp = 0;
|
||||
cp_kwswitch(CT_LABEL, (char *) NULL);
|
||||
cp_kwswitch(CT_LABEL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ com_define(wordlist *wlist)
|
|||
|
||||
/* If there's nothing then print all the definitions. */
|
||||
if (wlist == NULL) {
|
||||
prdefs((char *) NULL);
|
||||
prdefs(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ apply_func(struct func *func, struct pnode *arg)
|
|||
else if (eq(func->fu_name, "not"))
|
||||
t->v_name = mkcname('c', func->fu_name, v->v_name);
|
||||
else
|
||||
t->v_name = mkcname('b', v->v_name, (char *) NULL);
|
||||
t->v_name = mkcname('b', v->v_name, NULL);
|
||||
t->v_type = v->v_type; /* This is strange too. */
|
||||
t->v_length = len;
|
||||
t->v_scale = v->v_scale;
|
||||
|
|
|
|||
|
|
@ -719,9 +719,9 @@ inp_dodeck(
|
|||
} else {
|
||||
if (ft_curckt) {
|
||||
ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES,
|
||||
(char *) NULL);
|
||||
NULL);
|
||||
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES,
|
||||
(char *) NULL);
|
||||
NULL);
|
||||
}
|
||||
ft_curckt = ct = alloc(struct circ);
|
||||
}
|
||||
|
|
@ -849,9 +849,9 @@ inp_dodeck(
|
|||
if (!reuse) {
|
||||
/* Be sure that ci_devices and ci_nodes are valid */
|
||||
ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES,
|
||||
(char *) NULL);
|
||||
NULL);
|
||||
cp_kwswitch(CT_DEVNAMES, ft_curckt->ci_devices);
|
||||
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, (char *) NULL);
|
||||
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL);
|
||||
cp_kwswitch(CT_NODENAMES, ft_curckt->ci_nodes);
|
||||
ft_newcirc(ct);
|
||||
/* Assign current circuit */
|
||||
|
|
@ -991,7 +991,7 @@ com_edit(wordlist *wl)
|
|||
cp_interactive = inter;
|
||||
return;
|
||||
}
|
||||
inp_spsource(fp, FALSE, permfile ? filename : (char *) NULL);
|
||||
inp_spsource(fp, FALSE, permfile ? filename : NULL);
|
||||
|
||||
/* fclose(fp); */
|
||||
/* MW. inp_spsource already closed fp */
|
||||
|
|
@ -1079,10 +1079,10 @@ com_source(wordlist *wl)
|
|||
|
||||
/* Don't print the title if this is a spice initialisation file. */
|
||||
if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word)) {
|
||||
inp_spsource(fp, TRUE, tempfile ? (char *) NULL : wl->wl_word);
|
||||
inp_spsource(fp, TRUE, tempfile ? NULL : wl->wl_word);
|
||||
}
|
||||
else {
|
||||
inp_spsource(fp, FALSE, tempfile ? (char *) NULL : wl->wl_word);
|
||||
inp_spsource(fp, FALSE, tempfile ? NULL : wl->wl_word);
|
||||
}
|
||||
cp_interactive = inter;
|
||||
if (tempfile)
|
||||
|
|
|
|||
|
|
@ -242,9 +242,9 @@ nutcom_source(wordlist *wl)
|
|||
/* Don't print the title if this is a .spiceinit file. */
|
||||
if (ft_nutmeg || substring(INITSTR, owl->wl_word)
|
||||
|| substring(ALT_INITSTR, owl->wl_word))
|
||||
inp_nutsource(fp, TRUE, tempfile ? (char *) NULL : wl->wl_word);
|
||||
inp_nutsource(fp, TRUE, tempfile ? NULL : wl->wl_word);
|
||||
else
|
||||
inp_nutsource(fp, FALSE, tempfile ? (char *) NULL : wl->wl_word);
|
||||
inp_nutsource(fp, FALSE, tempfile ? NULL : wl->wl_word);
|
||||
cp_interactive = inter;
|
||||
if (tempfile)
|
||||
(void) unlink(tempfile);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ struct variable * nutif_getparam(CKTcircuit *ckt, char **name, char *param, int
|
|||
NG_IGNORE(name);
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
return ((struct variable *) NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ backeval(char *string)
|
|||
intv = cp_interactive;
|
||||
cp_interactive = FALSE;
|
||||
cp_bqflag = TRUE;
|
||||
wl = cp_lexer((char *) NULL);
|
||||
wl = cp_lexer(NULL);
|
||||
cp_bqflag = FALSE;
|
||||
cp_inp_cur = old;
|
||||
cp_interactive = intv;
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ gr_redraw(GRAPH *graph)
|
|||
else pass vec's plot's scale
|
||||
*/
|
||||
ft_graf(link->vector,
|
||||
graph->onevalue ? (struct dvec *) NULL :
|
||||
graph->onevalue ? NULL :
|
||||
(link->vector->v_scale ?
|
||||
link->vector->v_scale :
|
||||
link->vector->v_plot->pl_scale),
|
||||
|
|
@ -685,7 +685,7 @@ iplot(struct plot *pl, int id)
|
|||
sprintf(commandline, "plot %s", yl);
|
||||
|
||||
(void) gr_init(xlims, ylims, xs->v_name,
|
||||
pl->pl_title, (char *) NULL, j, 0.0, 0.0,
|
||||
pl->pl_title, NULL, j, 0.0, 0.0,
|
||||
GRID_LIN, PLOT_LIN, xs->v_name, yl, xs->v_type, yt,
|
||||
plot_cur->pl_typename, commandline);
|
||||
for (v = pl->pl_dvecs; v; v = v->v_next)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ GRAPH *NewGraph(void)
|
|||
|
||||
if ((list = NEWLISTGRAPH) == NULL) {
|
||||
internalerror("can't allocate a listgraph");
|
||||
return((GRAPH *) NULL);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
pgraph = &list->graph;
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,7 @@ plotit(wordlist *wl, char *hcopy, char *devname)
|
|||
if (devname && eq(devname, "blt")) {
|
||||
/* Just send the pairs to Tcl/Tk */
|
||||
for (d = vecs; d; d = d->v_link2) {
|
||||
blt_plot(d, oneval ? (struct dvec *) NULL : d->v_scale,(d==vecs?1:0));
|
||||
blt_plot(d, oneval ? NULL : d->v_scale, (d == vecs) ? 1 : 0);
|
||||
}
|
||||
rtn = TRUE;
|
||||
goto quit;
|
||||
|
|
@ -1041,7 +1041,7 @@ plotit(wordlist *wl, char *hcopy, char *devname)
|
|||
|
||||
pname = plot_cur->pl_typename;
|
||||
|
||||
if (!gr_init(xlims, ylims, (oneval ? (char *) NULL : xn),
|
||||
if (!gr_init(xlims, ylims, (oneval ? NULL : xn),
|
||||
title ? title : vecs->v_plot->pl_title, hcopy, i,
|
||||
xdelta ? *xdelta : 0.0, ydelta ? *ydelta : 0.0, gtype,
|
||||
ptype, xlabel, ylabel, xt, j, pname, cline))
|
||||
|
|
@ -1049,7 +1049,7 @@ plotit(wordlist *wl, char *hcopy, char *devname)
|
|||
|
||||
/* Now plot all the graphs. */
|
||||
for (d = vecs; d; d = d->v_link2)
|
||||
ft_graf(d, oneval ? (struct dvec *) NULL : d->v_scale, FALSE);
|
||||
ft_graf(d, oneval ? NULL : d->v_scale, FALSE);
|
||||
|
||||
gr_clean();
|
||||
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ handle_wm_messages(Widget w, XtPointer client_data, XEvent *ev, Boolean *cont)
|
|||
|
||||
/* Recover from bad NewViewPort call. */
|
||||
#define RECOVERNEWVIEWPORT() tfree(graph);\
|
||||
graph = (GRAPH *) NULL;
|
||||
graph = NULL;
|
||||
/* need to do this or else DestroyGraph will free it again */
|
||||
|
||||
/* NewViewport is responsible for filling in graph->viewport */
|
||||
|
|
@ -1025,8 +1025,8 @@ X11_Input(REQUEST *request, RESPONSE *response)
|
|||
FD_SET(ConnectionNumber(display), &rfds);
|
||||
select (nfds + 1,
|
||||
&rfds,
|
||||
(fd_set *)NULL,
|
||||
(fd_set *)NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
/* handle X events first */
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ char* copyword;
|
|||
/* Fill in the SPICE accounting structure... */
|
||||
|
||||
if (wl && (eq(wl->wl_word, "everything") || eq(wl->wl_word, "all"))) {
|
||||
printres((char *) NULL);
|
||||
printres(NULL);
|
||||
} else if (wl) {
|
||||
for (; wl; wl = wl->wl_next) {
|
||||
/* printres(cp_unquote(wl->wl_word)); DG: bad, memory leak*/
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ ft_dorun(char *file)
|
|||
if (file)
|
||||
return dosim("run", &wl);
|
||||
else
|
||||
return dosim("run", (wordlist *) NULL);
|
||||
return dosim("run", NULL);
|
||||
}
|
||||
|
||||
/* ARGSUSED */ /* until the else clause gets put back */
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ com_resume(wordlist *wl)
|
|||
|
||||
/*end saj*/
|
||||
|
||||
err = if_run(ft_curckt->ci_ckt, "resume", (wordlist *) NULL,
|
||||
err = if_run(ft_curckt->ci_ckt, "resume", NULL,
|
||||
ft_curckt->ci_symtab);
|
||||
|
||||
/*close rawfile saj*/
|
||||
|
|
@ -189,7 +189,7 @@ com_rset(wordlist *wl)
|
|||
}
|
||||
ft_curckt->ci_vars = NULL;
|
||||
|
||||
inp_dodeck(ft_curckt->ci_deck, ft_curckt->ci_name, (wordlist *) NULL,
|
||||
inp_dodeck(ft_curckt->ci_deck, ft_curckt->ci_name, NULL,
|
||||
TRUE, ft_curckt->ci_options, ft_curckt->ci_filename);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ next:
|
|||
ptemp.iValue = 1;
|
||||
error = ft_sim->setAnalysisParm (ckt,
|
||||
senseJob, ft_sim->analyses[save]->
|
||||
analysisParms[i].id,&ptemp,(IFvalue*)NULL);
|
||||
analysisParms[i].id, &ptemp, NULL);
|
||||
if(error) current->error = INPerrCat(
|
||||
current->error, INPerror(error));
|
||||
}
|
||||
|
|
@ -316,7 +316,7 @@ next:
|
|||
dataType,tab);
|
||||
error = ft_sim->setAnalysisParm (ckt,
|
||||
senseJob, ft_sim->analyses[save]->
|
||||
analysisParms[i].id,parm,(IFvalue*)NULL);
|
||||
analysisParms[i].id, parm, NULL);
|
||||
if(error) current->error = INPerrCat(
|
||||
current->error, INPerror(error));
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ if_inpdeck(struct line *deck, INPtables **tab)
|
|||
|
||||
/*CDHW Create a task DDD with a new UID. ci_defTask will point to it CDHW*/
|
||||
|
||||
err = IFnewUid(ckt, &taskUid, (IFuid)NULL, "default", UID_TASK, NULL);
|
||||
err = IFnewUid(ckt, &taskUid, NULL, "default", UID_TASK, NULL);
|
||||
if(err) {
|
||||
ft_sperror(err,"newUid");
|
||||
return(NULL);
|
||||
|
|
@ -136,7 +136,7 @@ if_inpdeck(struct line *deck, INPtables **tab)
|
|||
}
|
||||
|
||||
if(which != -1) {
|
||||
err = IFnewUid(ckt,&optUid,(IFuid)NULL,"options",UID_ANALYSIS,
|
||||
err = IFnewUid(ckt, &optUid, NULL, "options", UID_ANALYSIS,
|
||||
NULL);
|
||||
if(err) {
|
||||
ft_sperror(err,"newUid");
|
||||
|
|
@ -245,7 +245,7 @@ if_run(CKTcircuit *t, char *what, wordlist *args, INPtables *tab)
|
|||
/*CDHW Create an interactive task AAA with a new UID.
|
||||
ci_specTask will point to it CDHW*/
|
||||
|
||||
err = IFnewUid(ft_curckt->ci_ckt,&specUid,(IFuid)NULL,"special",
|
||||
err = IFnewUid(ft_curckt->ci_ckt, &specUid, NULL, "special",
|
||||
UID_TASK,NULL);
|
||||
if(err) {
|
||||
ft_sperror(err,"newUid");
|
||||
|
|
@ -273,7 +273,7 @@ ci_specTask will point to it CDHW*/
|
|||
}
|
||||
}
|
||||
if(which != -1) { /*CDHW options are available CDHW*/
|
||||
err = IFnewUid(ft_curckt->ci_ckt,&optUid,(IFuid)NULL,"options",
|
||||
err = IFnewUid(ft_curckt->ci_ckt, &optUid, NULL, "options",
|
||||
UID_ANALYSIS,NULL);
|
||||
if(err) {
|
||||
ft_sperror(err,"newUid");
|
||||
|
|
@ -496,12 +496,12 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value)
|
|||
#if (0)
|
||||
if ((err = ft_sim->setAnalysisParm (cc, ft_curckt->ci_curOpt,
|
||||
ft_sim->analyses[which]->analysisParms[i].id, &pval,
|
||||
(IFvalue *)NULL)) != OK)
|
||||
NULL)) != OK)
|
||||
ft_sperror(err, "setAnalysisParm(options) ci_curOpt");
|
||||
#else /*CDHW*/
|
||||
if ((err = ft_sim->setAnalysisParm (cc, ft_curckt->ci_defOpt,
|
||||
ft_sim->analyses[which]->analysisParms[i].id, &pval,
|
||||
(IFvalue *)NULL)) != OK)
|
||||
NULL)) != OK)
|
||||
ft_sperror(err, "setAnalysisParm(options) ci_curOpt");
|
||||
return 1;
|
||||
#endif
|
||||
|
|
@ -591,14 +591,14 @@ finddev_special(
|
|||
return(type);
|
||||
}
|
||||
type = -1;
|
||||
*devptr = (GENinstance *)NULL;
|
||||
*devptr = NULL;
|
||||
err = ft_sim->findModel (ck, &type, modptr, name);
|
||||
if(err == OK)
|
||||
{
|
||||
*device_or_model=1;
|
||||
return(type);
|
||||
}
|
||||
*modptr = (GENmodel *)NULL;
|
||||
*modptr = NULL;
|
||||
*device_or_model=2;
|
||||
return(-1);
|
||||
|
||||
|
|
@ -615,8 +615,8 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod
|
|||
IFvalue *pv;
|
||||
IFparm *opt;
|
||||
int typecode, i, modelo_dispositivo;
|
||||
GENinstance *dev=(GENinstance *)NULL;
|
||||
GENmodel *mod=(GENmodel *)NULL;
|
||||
GENinstance *dev = NULL;
|
||||
GENmodel *mod = NULL;
|
||||
IFdevice *device;
|
||||
|
||||
NG_IGNORE(do_model);
|
||||
|
|
@ -753,8 +753,8 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model)
|
|||
IFvalue *pv;
|
||||
IFparm *opt;
|
||||
int typecode, i;
|
||||
GENinstance *dev=(GENinstance *)NULL;
|
||||
GENmodel *mod=(GENmodel *)NULL;
|
||||
GENinstance *dev = NULL;
|
||||
GENmodel *mod = NULL;
|
||||
IFdevice *device;
|
||||
|
||||
/* fprintf(cp_err, "Calling if_getparam(%s, %s)\n", *name, param); */
|
||||
|
|
@ -820,11 +820,11 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model)
|
|||
void
|
||||
if_setparam_model(CKTcircuit *ckt, char **name, char *val )
|
||||
{
|
||||
GENinstance *dev = (GENinstance *)NULL;
|
||||
GENinstance *prevDev = (GENinstance *)NULL;
|
||||
GENmodel *curMod = (GENmodel *) NULL;
|
||||
GENmodel *newMod = (GENmodel *) NULL;
|
||||
INPmodel *inpmod = (INPmodel *) NULL;
|
||||
GENinstance *dev = NULL;
|
||||
GENinstance *prevDev = NULL;
|
||||
GENmodel *curMod = NULL;
|
||||
GENmodel *newMod = NULL;
|
||||
INPmodel *inpmod = NULL;
|
||||
GENinstance *iter;
|
||||
GENmodel *mods, *prevMod;
|
||||
int typecode;
|
||||
|
|
@ -902,8 +902,8 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_
|
|||
{
|
||||
IFparm *opt;
|
||||
IFdevice *device;
|
||||
GENmodel *mod=(GENmodel *)NULL;
|
||||
GENinstance *dev=(GENinstance *)NULL;
|
||||
GENmodel *mod = NULL;
|
||||
GENinstance *dev = NULL;
|
||||
int typecode;
|
||||
|
||||
/* PN */
|
||||
|
|
@ -924,7 +924,7 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_
|
|||
}
|
||||
if (do_model && !mod) {
|
||||
mod = dev->GENmodPtr;
|
||||
dev = (GENinstance *)NULL;
|
||||
dev = NULL;
|
||||
}
|
||||
doset(ckt, typecode, dev, mod, opt, val);
|
||||
|
||||
|
|
@ -1078,10 +1078,10 @@ doask(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op
|
|||
typecode, dev, mod, opt); */
|
||||
if (dev)
|
||||
err = ft_sim->askInstanceQuest (ckt, dev,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
opt->id, &pv, NULL);
|
||||
else
|
||||
err = ft_sim->askModelQuest (ckt, mod,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
opt->id, &pv, NULL);
|
||||
if (err != OK) {
|
||||
ft_sperror(err, "if_getparam");
|
||||
return (NULL);
|
||||
|
|
@ -1163,10 +1163,10 @@ doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op
|
|||
|
||||
if (dev)
|
||||
err = ft_sim->setInstanceParm (ckt, dev,
|
||||
opt->id, &nval, (IFvalue *)NULL);
|
||||
opt->id, &nval, NULL);
|
||||
else
|
||||
err = ft_sim->setModelParm (ckt, mod,
|
||||
opt->id, &nval, (IFvalue *)NULL);
|
||||
opt->id, &nval, NULL);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
@ -1186,10 +1186,10 @@ finddev(CKTcircuit *ck, char *name, GENinstance **devptr, GENmodel **modptr)
|
|||
err = ft_sim->findInstance (ck, &type, devptr, name, NULL, NULL);
|
||||
if(err == OK) return(type);
|
||||
type = -1;
|
||||
*devptr = (GENinstance *)NULL;
|
||||
*devptr = NULL;
|
||||
err = ft_sim->findModel (ck, &type, modptr, name);
|
||||
if(err == OK) return(type);
|
||||
*modptr = (GENmodel *)NULL;
|
||||
*modptr = NULL;
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
|
@ -1203,7 +1203,7 @@ if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm)
|
|||
if(strcmp(ft_sim->analyses[which]->analysisParms[i].keyword,name)==0) {
|
||||
return( ft_sim->askAnalysisQuest (ckt, anal,
|
||||
ft_sim->analyses[which]->analysisParms[i].id,parm,
|
||||
(IFvalue *)NULL) );
|
||||
NULL) );
|
||||
}
|
||||
}
|
||||
return(E_BADPARM);
|
||||
|
|
@ -1232,11 +1232,11 @@ if_tranparams(struct circ *ci, double *start, double *stop, double *step)
|
|||
}
|
||||
if(which == -1) return(FALSE);
|
||||
|
||||
err = IFnewUid(ci->ci_ckt,&tranUid,(IFuid)NULL,"Transient Analysis",
|
||||
err = IFnewUid(ci->ci_ckt, &tranUid, NULL, "Transient Analysis",
|
||||
UID_ANALYSIS, NULL);
|
||||
if(err != OK) return(FALSE);
|
||||
err = ft_sim->findAnalysis (ci->ci_ckt, &which, &anal, tranUid,
|
||||
ci->ci_curTask,(IFuid )NULL);
|
||||
ci->ci_curTask, NULL);
|
||||
if(err != OK) return(FALSE);
|
||||
err = if_analQbyName(ci->ci_ckt,which,anal,"tstart",&tmp);
|
||||
if(err != OK) return(FALSE);
|
||||
|
|
@ -1281,7 +1281,7 @@ if_getstat(CKTcircuit *ckt, char *name)
|
|||
return (NULL);
|
||||
if (ft_sim->askAnalysisQuest (ckt, &(ft_curckt->ci_curTask->taskOptions),
|
||||
ft_sim->analyses[which]->analysisParms[i].id, &parm,
|
||||
(IFvalue *)NULL) == -1) {
|
||||
NULL) == -1) {
|
||||
fprintf(cp_err,
|
||||
"if_getstat: Internal Error: can't get %s\n",
|
||||
name);
|
||||
|
|
@ -1295,7 +1295,7 @@ if_getstat(CKTcircuit *ckt, char *name)
|
|||
}
|
||||
if (ft_sim->askAnalysisQuest (ckt, &(ft_curckt->ci_curTask->taskOptions),
|
||||
ft_sim->analyses[which]->analysisParms[i].id,
|
||||
&parm, (IFvalue *)NULL) == -1) {
|
||||
&parm, NULL) == -1) {
|
||||
fprintf(cp_err,
|
||||
"if_getstat: Internal Error: can't get %s\n",
|
||||
name);
|
||||
|
|
@ -1553,7 +1553,7 @@ do {\
|
|||
fprintf(cp_err,"error in CKTnames\n");
|
||||
return;
|
||||
}
|
||||
SPfrontEnd->IFnewUid (ckt, &timeUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &timeUid, NULL,
|
||||
"time", UID_OTHER, NULL);
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob,
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ doit(struct line *deck)
|
|||
{
|
||||
struct line *c, *last, *lc, *lcc;
|
||||
struct line *savenext;
|
||||
struct subs *sssfree = (struct subs *) NULL, *sss = (struct subs *) NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */
|
||||
struct subs *sssfree = NULL, *sss = NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */
|
||||
char *s, *t, *scname, *subname;
|
||||
int nest, numpasses = MAXNEST, i;
|
||||
bool gotone;
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ plot_add(struct plot *pl)
|
|||
pl->pl_typename = copy(buf);
|
||||
plot_new(pl);
|
||||
cp_addkword(CT_PLOT, buf);
|
||||
pl->pl_ccom = cp_kwswitch(CT_VECTOR, (char *) NULL);
|
||||
pl->pl_ccom = cp_kwswitch(CT_VECTOR, NULL);
|
||||
plot_setcur(pl->pl_typename);
|
||||
|
||||
return;
|
||||
|
|
@ -707,7 +707,7 @@ plot_alloc(char *name)
|
|||
pl->pl_typename = copy(buf);
|
||||
cp_addkword(CT_PLOT, buf);
|
||||
/* va: create a new, empty keyword tree for class CT_VECTOR, s=old tree */
|
||||
s = cp_kwswitch(CT_VECTOR, (char *) NULL);
|
||||
s = cp_kwswitch(CT_VECTOR, NULL);
|
||||
cp_addkword(CT_VECTOR, "all");
|
||||
pl->pl_ccom = cp_kwswitch(CT_VECTOR, s);
|
||||
/* va: keyword tree is old tree again, new tree is linked to pl->pl_ccom */
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ app_rl_readlines(void)
|
|||
/* History gets written in ../fte/misccoms.c com_quit */
|
||||
|
||||
#else
|
||||
while (cp_evloop((char *) NULL) == 1) ;
|
||||
while (cp_evloop(NULL) == 1) ;
|
||||
#endif /* defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) */
|
||||
}
|
||||
|
||||
|
|
@ -1216,7 +1216,7 @@ bot:
|
|||
} /* --- if (!ft_servermode && !ft_nutmeg) --- */
|
||||
|
||||
if (!gotone && ft_batchmode && !ft_nutmeg)
|
||||
inp_spsource(circuit_file, FALSE, (char *) NULL);
|
||||
inp_spsource(circuit_file, FALSE, NULL);
|
||||
|
||||
evl:
|
||||
if (ft_batchmode) {
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
|
|||
(void)sprintf(message,
|
||||
"singular matrix: check nodes %s and %s\n",
|
||||
NODENAME(ckt,i),NODENAME(ckt,j));
|
||||
SPfrontEnd->IFerror (ERR_WARNING, message, (IFuid *)NULL);
|
||||
SPfrontEnd->IFerror (ERR_WARNING, message, NULL);
|
||||
FREE(message);
|
||||
ckt->CKTstat->STATnumIter += iterno;
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ spFactor(MatrixPtr eMatrix)
|
|||
|
||||
if (Matrix->NeedsOrdering)
|
||||
{
|
||||
return spOrderAndFactor( eMatrix, (RealVector)NULL,
|
||||
return spOrderAndFactor( eMatrix, NULL,
|
||||
0.0, 0.0, DIAG_PIVOTING_AS_DEFAULT );
|
||||
}
|
||||
if (!Matrix->Partitioned) spPartition( eMatrix, spDEFAULT_PARTITION );
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ SMPcReorder(SMPmatrix *Matrix, double PivTol, double PivRel,
|
|||
{
|
||||
*NumSwaps = 1;
|
||||
spSetComplex( Matrix );
|
||||
return spOrderAndFactor( Matrix, (spREAL*)NULL,
|
||||
return spOrderAndFactor( Matrix, NULL,
|
||||
(spREAL)PivRel, (spREAL)PivTol, YES );
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ SMPreorder(SMPmatrix *Matrix, double PivTol, double PivRel, double Gmin)
|
|||
{
|
||||
spSetReal( Matrix );
|
||||
LoadGmin( Matrix, Gmin );
|
||||
return spOrderAndFactor( Matrix, (spREAL*)NULL,
|
||||
return spOrderAndFactor( Matrix, NULL,
|
||||
(spREAL)PivRel, (spREAL)PivTol, YES );
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ SMPsolve(SMPmatrix *Matrix, double RHS[], double Spare[])
|
|||
{
|
||||
NG_IGNORE(Spare);
|
||||
|
||||
spSolve( Matrix, RHS, RHS, (spREAL*)NULL, (spREAL*)NULL );
|
||||
spSolve( Matrix, RHS, RHS, NULL, NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -556,7 +556,7 @@ void
|
|||
SMPcombine(SMPmatrix *Matrix, double RHS[], double Spare[])
|
||||
{
|
||||
spSetReal( Matrix );
|
||||
spCombine( Matrix, RHS, Spare, (spREAL*)NULL, (spREAL*)NULL );
|
||||
spCombine( Matrix, RHS, Spare, NULL, NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
* point...
|
||||
*/
|
||||
SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,(IFuid)NULL,IF_REAL,numNames,nameList,
|
||||
ckt->CKTcurJob->JOBname, NULL, IF_REAL, numNames, nameList,
|
||||
IF_REAL,&acPlot);
|
||||
tfree(nameList);
|
||||
|
||||
|
|
@ -154,14 +154,14 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
/* Dump operating point. */
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "AC Operating Point",
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
NULL, IF_REAL, numNames, nameList, IF_REAL, &plot);
|
||||
if(error) return(error);
|
||||
CKTdump(ckt,(double)0,plot);
|
||||
SPfrontEnd->OUTendPlot (plot);
|
||||
plot = NULL;
|
||||
}
|
||||
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ CKTclrBreak(CKTcircuit *ckt)
|
|||
|
||||
if(ckt->CKTbreakSize >2) {
|
||||
tmp = TMALLOC(double, ckt->CKTbreakSize - 1);
|
||||
if(tmp == (double *)NULL) return(E_NOMEM);
|
||||
if(tmp == NULL) return(E_NOMEM);
|
||||
for(j=1;j<ckt->CKTbreakSize;j++) {
|
||||
*(tmp+j-1) = *(ckt->CKTbreaks+j);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ CKTdestroy(CKTcircuit *inCkt)
|
|||
FREE(node);
|
||||
node = nnode;
|
||||
}
|
||||
ckt->CKTnodes = (CKTnode *)NULL;
|
||||
ckt->CKTlastNode = (CKTnode *)NULL;
|
||||
ckt->CKTnodes = NULL;
|
||||
ckt->CKTlastNode = NULL;
|
||||
FREE(ckt);
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ CKTground(CKTcircuit *inCkt, CKTnode **node, IFuid name)
|
|||
ckt->CKTnodes->name = name;
|
||||
ckt->CKTnodes->type = SP_VOLTAGE;
|
||||
ckt->CKTnodes->number = 0;
|
||||
ckt->CKTnodes->next = (CKTnode *)NULL;
|
||||
ckt->CKTnodes->next = NULL;
|
||||
ckt->CKTlastNode = ckt->CKTnodes;
|
||||
}
|
||||
if(node) *node = ckt->CKTnodes;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ CKTic(CKTcircuit *ckt)
|
|||
for(node = ckt->CKTnodes;node != NULL; node = node->next) {
|
||||
if(node->nsGiven) {
|
||||
node->ptr = SMPmakeElt(ckt->CKTmatrix,node->number,node->number);
|
||||
if(node->ptr == (double *)NULL) return(E_NOMEM);
|
||||
if(node->ptr == NULL) return(E_NOMEM);
|
||||
ckt->CKThadNodeset = 1;
|
||||
*(ckt->CKTrhs+node->number) = node->nodeset;
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ CKTic(CKTcircuit *ckt)
|
|||
if(! ( node->ptr)) {
|
||||
node->ptr = SMPmakeElt(ckt->CKTmatrix,node->number,
|
||||
node->number);
|
||||
if(node->ptr == (double *)NULL) return(E_NOMEM);
|
||||
if(node->ptr == NULL) return(E_NOMEM);
|
||||
}
|
||||
*(ckt->CKTrhs+node->number) = node->ic;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@ CKTlinkEq(CKTcircuit *ckt, CKTnode *node)
|
|||
{
|
||||
if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */
|
||||
ckt->CKTnodes = TMALLOC(CKTnode, 1);
|
||||
if(ckt->CKTnodes == (CKTnode *)NULL) return(E_NOMEM);
|
||||
ckt->CKTnodes->name = (char *)NULL;
|
||||
if(ckt->CKTnodes == NULL) return(E_NOMEM);
|
||||
ckt->CKTnodes->name = NULL;
|
||||
ckt->CKTnodes->type = SP_VOLTAGE;
|
||||
ckt->CKTnodes->number = 0;
|
||||
ckt->CKTlastNode = ckt->CKTnodes;
|
||||
}
|
||||
if(node == (CKTnode *)NULL) return(E_BADPARM);
|
||||
if(node == NULL) return(E_BADPARM);
|
||||
ckt->CKTlastNode->next = node;
|
||||
ckt->CKTlastNode = ckt->CKTlastNode->next;
|
||||
ckt->CKTlastNode->number = ckt->CKTmaxEqNum++;
|
||||
ckt->CKTlastNode->next = (CKTnode *)NULL;
|
||||
ckt->CKTlastNode->next = NULL;
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ CKTmapNode(CKTcircuit *ckt, CKTnode **node, IFuid name)
|
|||
if(error) return(error);
|
||||
error = SPfrontEnd->IFnewUid (ckt,
|
||||
&uid,
|
||||
(IFuid) NULL,
|
||||
NULL,
|
||||
name,
|
||||
UID_SIGNAL,
|
||||
&mynode); /* get a uid for it */
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
|
|||
error = CKTfndMod(ckt, &type, &mymodfast, name);
|
||||
if(error == E_NOMOD) {
|
||||
mymodfast = (GENmodel *) tmalloc((size_t) *(DEVices[type]->DEVmodSize));
|
||||
if(mymodfast == (GENmodel *)NULL) return(E_NOMEM);
|
||||
if(mymodfast == NULL) return(E_NOMEM);
|
||||
mymodfast->GENmodType = type;
|
||||
mymodfast->GENmodName = name;
|
||||
mymodfast->GENnextModel = ckt->CKThead[type];
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ CKTmkNode(CKTcircuit *ckt, CKTnode **node)
|
|||
NG_IGNORE(ckt);
|
||||
|
||||
mynode = TMALLOC(CKTnode, 1);
|
||||
if(mynode == (CKTnode *)NULL) return(E_NOMEM);
|
||||
mynode->next = (CKTnode *)NULL;
|
||||
if(mynode == NULL) return(E_NOMEM);
|
||||
mynode->next = NULL;
|
||||
mynode->name = (IFuid) 0;
|
||||
|
||||
if(node) *node = mynode;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ CKTnames(CKTcircuit *ckt, int *numNames, IFuid **nameList)
|
|||
int i;
|
||||
*numNames = ckt->CKTmaxEqNum-1;
|
||||
*nameList = TMALLOC(IFuid, *numNames);
|
||||
if ((*nameList) == (IFuid *)NULL) return(E_NOMEM);
|
||||
if ((*nameList) == NULL) return(E_NOMEM);
|
||||
i=0;
|
||||
for (here = ckt->CKTnodes->next; here; here = here->next) {
|
||||
*((*nameList)+i++) = here->name;
|
||||
|
|
|
|||
|
|
@ -25,19 +25,19 @@ CKTnewNode(CKTcircuit *inCkt, CKTnode **node, IFuid name)
|
|||
CKTcircuit *ckt = /* fixme, drop that */ inCkt;
|
||||
if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */
|
||||
ckt->CKTnodes = TMALLOC(CKTnode, 1);
|
||||
if(ckt->CKTnodes == (CKTnode *)NULL) return(E_NOMEM);
|
||||
ckt->CKTnodes->name = (char *)NULL;
|
||||
if(ckt->CKTnodes == NULL) return(E_NOMEM);
|
||||
ckt->CKTnodes->name = NULL;
|
||||
ckt->CKTnodes->type = SP_VOLTAGE;
|
||||
ckt->CKTnodes->number = 0;
|
||||
ckt->CKTlastNode = ckt->CKTnodes;
|
||||
}
|
||||
ckt->CKTlastNode->next = TMALLOC(CKTnode, 1);
|
||||
if(ckt->CKTlastNode->next == (CKTnode *)NULL) return(E_NOMEM);
|
||||
if(ckt->CKTlastNode->next == NULL) return(E_NOMEM);
|
||||
ckt->CKTlastNode = ckt->CKTlastNode->next;
|
||||
ckt->CKTlastNode->name = name;
|
||||
ckt->CKTlastNode->number = ckt->CKTmaxEqNum++;
|
||||
ckt->CKTlastNode->type = SP_VOLTAGE;
|
||||
ckt->CKTlastNode->next = (CKTnode *)NULL;
|
||||
ckt->CKTlastNode->next = NULL;
|
||||
|
||||
if(node) *node = ckt->CKTlastNode;
|
||||
return(OK);
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data)
|
|||
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
||||
|
||||
SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, "onoise_spectrum", UID_OTHER, NULL);
|
||||
NULL, "onoise_spectrum", UID_OTHER, NULL);
|
||||
|
||||
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
||||
|
||||
SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, "inoise_spectrum", UID_OTHER, NULL);
|
||||
NULL, "inoise_spectrum", UID_OTHER, NULL);
|
||||
|
||||
/* we've added two more plots */
|
||||
|
||||
|
|
@ -71,11 +71,11 @@ CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data)
|
|||
|
||||
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
||||
SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, "onoise_total", UID_OTHER, NULL);
|
||||
NULL, "onoise_total", UID_OTHER, NULL);
|
||||
|
||||
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
||||
SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, "inoise_total", UID_OTHER, NULL);
|
||||
NULL, "inoise_total", UID_OTHER, NULL);
|
||||
/* we've added two more plots */
|
||||
|
||||
data->outpVector =
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ CKTnum2nod(CKTcircuit *ckt, int node)
|
|||
return(here);
|
||||
}
|
||||
}
|
||||
return((CKTnode *)NULL);
|
||||
return(NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
ckt->CKTmode = firstmode;
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Starting dynamic gmin stepping", (IFuid *) NULL);
|
||||
"Starting dynamic gmin stepping", NULL);
|
||||
|
||||
NumNodes = 0;
|
||||
for (n = ckt->CKTnodes; n; n = n->next)
|
||||
|
|
@ -196,7 +196,7 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
if (converged == 0){
|
||||
ckt->CKTmode = continuemode;
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"One successful gmin step", (IFuid *) NULL);
|
||||
"One successful gmin step", NULL);
|
||||
|
||||
if (ckt->CKTdiagGmin <= gtarget){
|
||||
success = 1;
|
||||
|
|
@ -234,11 +234,11 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
failed = 1;
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"Last gmin step failed",
|
||||
(IFuid *) NULL);
|
||||
NULL);
|
||||
} else {
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"Further gmin increment",
|
||||
(IFuid *) NULL);
|
||||
NULL);
|
||||
factor = sqrt (sqrt (factor));
|
||||
ckt->CKTdiagGmin = OldGmin / factor;
|
||||
|
||||
|
|
@ -273,11 +273,11 @@ dynamic_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
if (converged != 0){
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"Dynamic gmin stepping failed",
|
||||
(IFuid *) NULL);
|
||||
NULL);
|
||||
} else {
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Dynamic gmin stepping completed",
|
||||
(IFuid *) NULL);
|
||||
NULL);
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - add convergence problem reporting flags */
|
||||
ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE;
|
||||
|
|
@ -310,7 +310,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
ckt->CKTmode = firstmode;
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Starting gmin stepping", (IFuid *) NULL);
|
||||
"Starting gmin stepping", NULL);
|
||||
|
||||
if (ckt->CKTgshunt == 0)
|
||||
ckt->CKTdiagGmin = ckt->CKTgmin;
|
||||
|
|
@ -329,7 +329,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
if (converged != 0){
|
||||
ckt->CKTdiagGmin = ckt->CKTgshunt;
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"gmin step failed", (IFuid *) NULL);
|
||||
"gmin step failed", NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
ckt->CKTmode = continuemode;
|
||||
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"One successful gmin step", (IFuid *) NULL);
|
||||
"One successful gmin step", NULL);
|
||||
}
|
||||
|
||||
ckt->CKTdiagGmin = ckt->CKTgshunt;
|
||||
|
|
@ -355,7 +355,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
if (converged == 0){
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"gmin stepping completed", (IFuid *) NULL);
|
||||
"gmin stepping completed", NULL);
|
||||
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - add convergence problem reporting flags */
|
||||
|
|
@ -365,7 +365,7 @@ spice3_gmin (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
} else {
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"gmin stepping failed", (IFuid *) NULL);
|
||||
"gmin stepping failed", NULL);
|
||||
}
|
||||
|
||||
return (converged);
|
||||
|
|
@ -397,7 +397,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
ckt->CKTmode = firstmode;
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Starting source stepping", (IFuid *) NULL);
|
||||
"Starting source stepping", NULL);
|
||||
|
||||
ckt->CKTsrcFact = 0;
|
||||
raise = 0.001;
|
||||
|
|
@ -451,7 +451,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode,
|
|||
if (converged != 0){
|
||||
ckt->CKTdiagGmin = ckt->CKTgshunt;
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"gmin step failed", (IFuid *) NULL);
|
||||
"gmin step failed", NULL);
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - add convergence problem reporting flags */
|
||||
ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE;
|
||||
|
|
@ -464,7 +464,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode,
|
|||
ckt->CKTmode = continuemode;
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"One successful gmin step",
|
||||
(IFuid *) NULL);
|
||||
NULL);
|
||||
}
|
||||
ckt->CKTdiagGmin = ckt->CKTgshunt;
|
||||
}
|
||||
|
|
@ -483,7 +483,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"One successful source step", (IFuid *) NULL);
|
||||
"One successful source step", NULL);
|
||||
ckt->CKTsrcFact = ConvFact + raise;
|
||||
}
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ gillespie_src (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"One successful source step",
|
||||
(IFuid *) NULL);
|
||||
NULL);
|
||||
|
||||
ckt->CKTsrcFact = ConvFact + raise;
|
||||
|
||||
|
|
@ -572,13 +572,13 @@ gillespie_src (CKTcircuit * ckt, long int firstmode,
|
|||
ckt->CKTsrcFact = 1;
|
||||
ckt->CKTcurrentAnalysis = DOING_TRAN;
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"source stepping failed", (IFuid *) NULL);
|
||||
"source stepping failed", NULL);
|
||||
return (E_ITERLIM);
|
||||
}
|
||||
else
|
||||
{
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Source stepping completed", (IFuid *) NULL);
|
||||
"Source stepping completed", NULL);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
|
@ -605,7 +605,7 @@ spice3_src (CKTcircuit * ckt, long int firstmode,
|
|||
|
||||
ckt->CKTmode = firstmode;
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Starting source stepping", (IFuid *) NULL);
|
||||
"Starting source stepping", NULL);
|
||||
|
||||
for (i = 0; i <= ckt->CKTnumSrcSteps; i++)
|
||||
{
|
||||
|
|
@ -622,7 +622,7 @@ spice3_src (CKTcircuit * ckt, long int firstmode,
|
|||
ckt->CKTsrcFact = 1;
|
||||
ckt->CKTcurrentAnalysis = DOING_TRAN;
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
"source stepping failed", (IFuid *) NULL);
|
||||
"source stepping failed", NULL);
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - add convergence problem reporting flags */
|
||||
ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE;
|
||||
|
|
@ -631,10 +631,10 @@ spice3_src (CKTcircuit * ckt, long int firstmode,
|
|||
return (converged);
|
||||
}
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"One successful source step", (IFuid *) NULL);
|
||||
"One successful source step", NULL);
|
||||
}
|
||||
SPfrontEnd->IFerror (ERR_INFO,
|
||||
"Source stepping completed", (IFuid *) NULL);
|
||||
"Source stepping completed", NULL);
|
||||
ckt->CKTsrcFact = 1;
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - add convergence problem reporting flags */
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ CKTpModName(char *parm, IFvalue *val, CKTcircuit *ckt, int type, IFuid name, GEN
|
|||
if(!strcmp(parm, DEVices[type]->DEVpublic.modelParms[i].keyword)) {
|
||||
error = CKTmodParam(ckt, *modfast,
|
||||
DEVices[type]->DEVpublic.modelParms[i].id, val,
|
||||
(IFvalue*)NULL);
|
||||
NULL);
|
||||
if(error) return(error);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ CKTpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, char *name, GENinst
|
|||
if(!strcmp(parm, DEVices[dev]->DEVpublic.instanceParms[i].keyword)) {
|
||||
error = CKTparam(ckt, *fast,
|
||||
DEVices[dev]->DEVpublic.instanceParms[i].id, val,
|
||||
(IFvalue *)NULL);
|
||||
NULL);
|
||||
if(error) return(error);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ CKTsetBreak(CKTcircuit *ckt, double time)
|
|||
|
||||
if(ckt->CKTtime > time) {
|
||||
SPfrontEnd->IFerror (ERR_PANIC, "breakpoint in the past - HELP!",
|
||||
(IFuid *)NULL);
|
||||
NULL);
|
||||
return(E_INTERN);
|
||||
}
|
||||
for(i=0;i<ckt->CKTbreakSize;i++) {
|
||||
|
|
@ -54,7 +54,7 @@ CKTsetBreak(CKTcircuit *ckt, double time)
|
|||
}
|
||||
/* fits in middle - new array & insert */
|
||||
tmp = TMALLOC(double, ckt->CKTbreakSize + 1);
|
||||
if(tmp == (double *)NULL) return(E_NOMEM);
|
||||
if(tmp == NULL) return(E_NOMEM);
|
||||
for(j=0;j<i;j++) {
|
||||
*(tmp+j) = *(ckt->CKTbreaks+j);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ DCop(CKTcircuit *ckt, int notused)
|
|||
if(error) return(error);
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, ckt->CKTcurJob->JOBname,
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
NULL, IF_REAL, numNames, nameList, IF_REAL, &plot);
|
||||
tfree(nameList); /* va: nameList not used any longer, it was a memory leak */
|
||||
if(error) return(error);
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ DCtran(CKTcircuit *ckt,
|
|||
|
||||
if(ckt->CKTbreaks) FREE(ckt->CKTbreaks);
|
||||
ckt->CKTbreaks = TMALLOC(double, 2);
|
||||
if(ckt->CKTbreaks == (double *)NULL) return(E_NOMEM);
|
||||
if(ckt->CKTbreaks == NULL) return(E_NOMEM);
|
||||
*(ckt->CKTbreaks) = 0;
|
||||
*(ckt->CKTbreaks+1) = ckt->CKTfinalTime;
|
||||
ckt->CKTbreakSize = 2;
|
||||
|
|
@ -142,7 +142,7 @@ DCtran(CKTcircuit *ckt,
|
|||
#endif
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
SPfrontEnd->IFnewUid (ckt, &timeUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &timeUid, NULL,
|
||||
"time", UID_OTHER, NULL);
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob,
|
||||
|
|
@ -350,7 +350,7 @@ DCtran(CKTcircuit *ckt,
|
|||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
/* get timeUiD again */
|
||||
SPfrontEnd->IFnewUid (ckt, &timeUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &timeUid, NULL,
|
||||
"time", UID_OTHER, NULL);
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,timeUid,IF_REAL,666,nameList,
|
||||
|
|
|
|||
|
|
@ -190,26 +190,26 @@ found:;
|
|||
|
||||
|
||||
if (cv->TRCVvType[i]==vcode)
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, NULL,
|
||||
"v-sweep", UID_OTHER, NULL);
|
||||
|
||||
else {
|
||||
if (cv->TRCVvType[i]==icode)
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, NULL,
|
||||
"i-sweep", UID_OTHER, NULL);
|
||||
|
||||
else {
|
||||
if (cv->TRCVvType[i]==TEMP_CODE)
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, NULL,
|
||||
"temp-sweep", UID_OTHER, NULL);
|
||||
|
||||
else {
|
||||
if (cv->TRCVvType[i]==rcode)
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, NULL,
|
||||
"res-sweep", UID_OTHER, NULL);
|
||||
|
||||
else
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, (IFuid )NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &varUid, NULL,
|
||||
"?-sweep", UID_OTHER, NULL);
|
||||
} /* icode */
|
||||
} /* TEMP_CODE */
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ time1 = SPfrontEnd->IFseconds();
|
|||
/* Dump operating point. */
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "Distortion Operating Point",
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&acPlot);
|
||||
NULL, IF_REAL, numNames, nameList, IF_REAL, &acPlot);
|
||||
if(error) return(error);
|
||||
CKTdump(ckt,(double)0,acPlot);
|
||||
SPfrontEnd->OUTendPlot (acPlot);
|
||||
|
|
@ -514,7 +514,7 @@ time1 = SPfrontEnd->IFseconds();
|
|||
if (! job->Df2wanted) {
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "DISTORTION - 2nd harmonic",
|
||||
|
|
@ -538,7 +538,7 @@ time1 = SPfrontEnd->IFseconds();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "DISTORTION - 3rd harmonic", freqUid, IF_REAL,
|
||||
|
|
@ -560,7 +560,7 @@ time1 = SPfrontEnd->IFseconds();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "DISTORTION - IM: f1+f2", freqUid, IF_REAL,
|
||||
|
|
@ -580,7 +580,7 @@ time1 = SPfrontEnd->IFseconds();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "DISTORTION - IM: f1-f2", freqUid, IF_REAL,
|
||||
|
|
@ -601,7 +601,7 @@ time1 = SPfrontEnd->IFseconds();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "DISTORTION - IM: 2f1-f2", freqUid, IF_REAL,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
code = CKTtypelook("Vsource");
|
||||
if (code != -1) {
|
||||
error = CKTfndDev(ckt, &code, &inst,
|
||||
job->input, (GENmodel *)NULL, (IFuid)NULL);
|
||||
job->input, NULL, NULL);
|
||||
if (!error && !((VSRCinstance *)inst)->VSRCacGiven) {
|
||||
errMsg = TMALLOC(char, strlen(noacinput) + 1);
|
||||
strcpy(errMsg,noacinput);
|
||||
|
|
@ -60,7 +60,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
code = CKTtypelook("Isource");
|
||||
if (code != -1 && inst==NULL) {
|
||||
error = CKTfndDev(ckt, &code, &inst,
|
||||
job->input, (GENmodel *)NULL, (IFuid)NULL);
|
||||
job->input, NULL, NULL);
|
||||
if (error) {
|
||||
/* XXX ??? */
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
|
|
@ -120,7 +120,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
/* the current front-end needs the namelist to be fully
|
||||
declared before an OUTpBeginplot */
|
||||
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &freqUid, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
|
||||
data->numPlots = 0; /* we don't have any plots yet */
|
||||
|
|
@ -279,7 +279,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
|
||||
SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob,
|
||||
"Integrated Noise - V^2 or A^2",
|
||||
(IFuid)NULL,(int)0,data->numPlots,data->namelist,IF_REAL,
|
||||
NULL, (int)0, data->numPlots, data->namelist, IF_REAL,
|
||||
&(data->NplotPtr));
|
||||
|
||||
error = CKTnoise(ckt,INT_NOIZ,N_CALC,data);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ PZan(CKTcircuit *ckt, int reset)
|
|||
if(error) return(error);
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt,
|
||||
ckt->CKTcurJob, "Distortion Operating Point",
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
NULL, IF_REAL, numNames, nameList, IF_REAL, &plot);
|
||||
if(error) return(error);
|
||||
CKTdump(ckt,(double)0,plot);
|
||||
SPfrontEnd->OUTendPlot (plot);
|
||||
|
|
@ -93,8 +93,8 @@ PZinit(CKTcircuit *ckt)
|
|||
if (i != -1 && ckt->CKThead[i] != NULL)
|
||||
MERROR(E_XMISSIONLINE, "Transmission lines not supported")
|
||||
|
||||
pzan->PZpoleList = (PZtrial *) NULL;
|
||||
pzan->PZzeroList = (PZtrial *) NULL;
|
||||
pzan->PZpoleList = NULL;
|
||||
pzan->PZzeroList = NULL;
|
||||
pzan->PZnPoles = 0;
|
||||
pzan->PZnZeros = 0;
|
||||
|
||||
|
|
@ -138,17 +138,17 @@ PZpost(CKTcircuit *ckt)
|
|||
j = 0;
|
||||
for (i = 0; i < pzan->PZnPoles; i++) {
|
||||
sprintf(name, "pole(%-u)", i+1);
|
||||
SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), NULL,
|
||||
name, UID_OTHER, NULL);
|
||||
}
|
||||
for (i = 0; i < pzan->PZnZeros; i++) {
|
||||
sprintf(name, "zero(%-u)", i+1);
|
||||
SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), NULL,
|
||||
name, UID_OTHER, NULL);
|
||||
}
|
||||
|
||||
SPfrontEnd->OUTpBeginPlot (ckt, (JOB *)pzan, pzan->JOBname,
|
||||
(IFuid)NULL, (int)0, pzan->PZnPoles + pzan->PZnZeros, namelist,
|
||||
NULL, (int)0, pzan->PZnPoles + pzan->PZnZeros, namelist,
|
||||
IF_COMPLEX, &pzPlotPtr);
|
||||
|
||||
j = 0;
|
||||
|
|
@ -189,7 +189,7 @@ PZpost(CKTcircuit *ckt)
|
|||
outData.v.numValue = pzan->PZnPoles + pzan->PZnZeros;
|
||||
outData.v.vec.cVec = out_list;
|
||||
|
||||
SPfrontEnd->OUTpData (pzPlotPtr, (IFvalue *) NULL, &outData);
|
||||
SPfrontEnd->OUTpData (pzPlotPtr, NULL, &outData);
|
||||
SPfrontEnd->OUTendPlot (pzPlotPtr);
|
||||
|
||||
return(OK);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
Vtype = CKTtypelook("Vsource");
|
||||
if(Itype != -1) {
|
||||
error = CKTfndDev(ckt,&Itype,&ptr,
|
||||
((TFan*)ckt->CKTcurJob)->TFinSrc, (GENmodel *)NULL, (IFuid)NULL);
|
||||
((TFan*)ckt->CKTcurJob)->TFinSrc, NULL, NULL);
|
||||
if(error ==0) {
|
||||
((TFan*)ckt->CKTcurJob)->TFinIsI = 1;
|
||||
((TFan*)ckt->CKTcurJob)->TFinIsV = 0;
|
||||
|
|
@ -61,8 +61,8 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
|
||||
if( (Vtype != -1) && (ptr==NULL) ) {
|
||||
error = CKTfndDev(ckt,&Vtype,&ptr,
|
||||
((TFan*)ckt->CKTcurJob)->TFinSrc, (GENmodel *)NULL,
|
||||
(IFuid)NULL);
|
||||
((TFan*)ckt->CKTcurJob)->TFinSrc, NULL,
|
||||
NULL);
|
||||
((TFan*)ckt->CKTcurJob)->TFinIsV = 1;
|
||||
((TFan*)ckt->CKTcurJob)->TFinIsI = 0;
|
||||
if(error !=0) {
|
||||
|
|
@ -92,7 +92,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
ckt->CKTrhs[0]=0;
|
||||
|
||||
/* make a UID for the transfer function output */
|
||||
SPfrontEnd->IFnewUid (ckt, &tfuid, (IFuid)NULL, "Transfer_function",
|
||||
SPfrontEnd->IFnewUid (ckt, &tfuid, NULL, "Transfer_function",
|
||||
UID_OTHER, NULL);
|
||||
|
||||
/* make a UID for the input impedance */
|
||||
|
|
@ -107,12 +107,12 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
name = TMALLOC(char, strlen(((TFan*)ckt->CKTcurJob)->TFoutName) + 22);
|
||||
(void)sprintf(name,"output_impedance_at_%s",
|
||||
((TFan*)ckt->CKTcurJob)->TFoutName);
|
||||
SPfrontEnd->IFnewUid (ckt, &outuid, (IFuid)NULL,
|
||||
SPfrontEnd->IFnewUid (ckt, &outuid, NULL,
|
||||
name, UID_OTHER, NULL);
|
||||
}
|
||||
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob,
|
||||
((TFan*)(ckt->CKTcurJob))->JOBname,(IFuid)NULL,(int)0,3,
|
||||
((TFan*)(ckt->CKTcurJob))->JOBname, NULL, (int)0, 3,
|
||||
uids,IF_REAL,&plotptr);
|
||||
if(error) return(error);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,13 +50,12 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
#define MY_TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number))\
|
||||
==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ BJTdestroy(GENmodel **inModel)
|
|||
for( ; mod ; mod = mod->BJTnextModel) {
|
||||
if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BJTinstance *)NULL;
|
||||
prev = NULL;
|
||||
for(here = mod->BJTinstances ; here ; here = here->BJTnextInstance) {
|
||||
if(prev){
|
||||
if(prev->BJTsens) FREE(prev->BJTsens);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ for (model=firstModel; model != NULL; model=model->BJTnextModel) {
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
|
|
@ -88,7 +88,7 @@ for (model=firstModel; model != NULL; model=model->BJTnextModel) {
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
(void)sprintf(name,"inoise_total_%s%s",
|
||||
|
|
@ -98,7 +98,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
|
|
@ -130,7 +130,7 @@ if (!data->namelist) return(E_NOMEM);
|
|||
ckt,SHOTNOISE,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode,
|
||||
*(ckt->CKTstate0 + inst->BJTcb) * inst->BJTm);
|
||||
|
||||
NevalSrc(&noizDens[BJTFLNOIZ],(double*)NULL,ckt,
|
||||
NevalSrc(&noizDens[BJTFLNOIZ], NULL, ckt,
|
||||
N_GAIN,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode,
|
||||
(double)0.0);
|
||||
noizDens[BJTFLNOIZ] *= inst->BJTm * model->BJTfNcoef *
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ matrixpointers:
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
TSTALLOC(BJTcolColPrimePtr,BJTcolNode,BJTcolPrimeNode)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ B1destroy(GENmodel **inModel)
|
|||
for( ; mod ; mod = mod->B1nextModel) {
|
||||
if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (B1instance *)NULL;
|
||||
prev = NULL;
|
||||
for(here = mod->B1instances ; here ; here = here->B1nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ if (!data->namelist) return(E_NOMEM);
|
|||
ckt,THERMNOISE,inst->B1dNodePrime,inst->B1sNodePrime,
|
||||
(2.0/3.0 * fabs(inst->B1gm * inst->B1m)));
|
||||
|
||||
NevalSrc(&noizDens[B1FLNOIZ],(double*)NULL,ckt,
|
||||
NevalSrc(&noizDens[B1FLNOIZ], NULL, ckt,
|
||||
N_GAIN,inst->B1dNodePrime, inst->B1sNodePrime,
|
||||
(double)0.0);
|
||||
noizDens[B1FLNOIZ] *= model->B1fNcoef * inst->B1m *
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ B2destroy(GENmodel **inModel)
|
|||
for( ; mod ; mod = mod->B2nextModel) {
|
||||
if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (B2instance *)NULL;
|
||||
prev = NULL;
|
||||
for(here = mod->B2instances ; here ; here = here->B2nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
|
|||
if (!data->namelist) return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid)NULL, name, UID_OTHER, NULL);
|
||||
NULL, name, UID_OTHER, NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ if (!data->namelist) return(E_NOMEM);
|
|||
ckt,THERMNOISE,inst->B2dNodePrime,inst->B2sNodePrime,
|
||||
(2.0/3.0 * fabs(inst->B2gm * inst->B2m)));
|
||||
|
||||
NevalSrc(&noizDens[B2FLNOIZ],(double*)NULL,ckt,
|
||||
NevalSrc(&noizDens[B2FLNOIZ], NULL, ckt,
|
||||
N_GAIN,inst->B2dNodePrime, inst->B2sNodePrime,
|
||||
(double)0.0);
|
||||
noizDens[B2FLNOIZ] *= model->B2fNcoef * inst->B2m *
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BSIM3model *oldmod = NULL;
|
|||
for (; mod ; mod = mod->BSIM3nextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3instance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -246,7 +246,7 @@ int i;
|
|||
* here->BSIM3rds))); /* bugfix */
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[BSIM3FLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[BSIM3FLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->BSIM3dNodePrime,
|
||||
here->BSIM3sNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -973,7 +973,7 @@ int nthreads;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ B4SOImodel *oldmod = NULL;
|
|||
for (; mod ; mod = mod->B4SOInextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (B4SOIinstance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->B4SOIinstances; here; here = here->B4SOInextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -412,7 +412,7 @@ int i;
|
|||
break;
|
||||
}
|
||||
|
||||
NevalSrc(&noizDens[B4SOIFLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[B4SOIFLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->B4SOIdNodePrime,
|
||||
here->B4SOIsNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -2493,7 +2493,7 @@ int nthreads;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ B3SOIDDmodel *oldmod = NULL;
|
|||
for (; mod ; mod = mod->B3SOIDDnextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (B3SOIDDinstance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ int i;
|
|||
* pParam->B3SOIDDleff))));
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[B3SOIDDFLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[B3SOIDDFLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->B3SOIDDdNodePrime,
|
||||
here->B3SOIDDsNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1219,7 +1219,7 @@ IFuid tmpName;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ B3SOIFDmodel *oldmod = NULL;
|
|||
for (; mod ; mod = mod->B3SOIFDnextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (B3SOIFDinstance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ int i;
|
|||
* pParam->B3SOIFDleff))));
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[B3SOIFDFLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[B3SOIFDFLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->B3SOIFDdNodePrime,
|
||||
here->B3SOIFDsNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1217,7 +1217,7 @@ IFuid tmpName;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ B3SOIPDmodel *oldmod = NULL;
|
|||
for (; mod ; mod = mod->B3SOIPDnextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (B3SOIPDinstance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ int i;
|
|||
(here->B3SOIPDrds / here->B3SOIPDm)))));
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[B3SOIPDFLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[B3SOIPDFLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->B3SOIPDdNodePrime,
|
||||
here->B3SOIPDsNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1351,7 +1351,7 @@ IFuid tmpName;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ BSIM3v0model *oldmod = NULL;
|
|||
for (; mod ; mod = mod->BSIM3v0nextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3v0instance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->BSIM3v0instances; here; here = here->BSIM3v0nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ int i;
|
|||
+ here->BSIM3v0gds) * here->BSIM3v0m));
|
||||
|
||||
}
|
||||
NevalSrc(&noizDens[BSIM3v0FLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[BSIM3v0FLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->BSIM3v0dNodePrime,
|
||||
here->BSIM3v0sNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ IFuid tmpName;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ BSIM3v1model *oldmod = NULL;
|
|||
for (; mod ; mod = mod->BSIM3v1nextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3v1instance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->BSIM3v1instances; here; here = here->BSIM3v1nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ int i;
|
|||
return(E_NOMEM);
|
||||
SPfrontEnd->IFnewUid (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
NULL, name, UID_OTHER,
|
||||
NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ int i;
|
|||
* pParam->BSIM3v1leff))));
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[BSIM3v1FLNOIZ], (double*) NULL,
|
||||
NevalSrc(&noizDens[BSIM3v1FLNOIZ], NULL,
|
||||
ckt, N_GAIN, here->BSIM3v1dNodePrime,
|
||||
here->BSIM3v1sNodePrime, (double) 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -907,7 +907,7 @@ IFuid tmpName;
|
|||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BSIM3v32model *oldmod = NULL;
|
|||
for (; mod ; mod = mod->BSIM3v32nextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3v32instance *)NULL;
|
||||
prev = NULL;
|
||||
for (here = mod->BSIM3v32instances; here; here = here->BSIM3v32nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue