various cleanups
This commit is contained in:
parent
1d3bd15c5c
commit
55638c8023
|
|
@ -1,3 +1,11 @@
|
||||||
|
2011-04-30 Robert Larice
|
||||||
|
* **/* :
|
||||||
|
various cleanups
|
||||||
|
- usage of cp_getvar(), receives a void* in the third arg, thus remove casts
|
||||||
|
FIXME, this function signature is error prone
|
||||||
|
- use NG_IGNORE()
|
||||||
|
- casts and prototypes
|
||||||
|
|
||||||
2011-04-29 Robert Larice
|
2011-04-29 Robert Larice
|
||||||
* src/spicelib/devices/hisimhv/hsmhvnoi.c ,
|
* src/spicelib/devices/hisimhv/hsmhvnoi.c ,
|
||||||
* src/spicelib/devices/hisimhv/hsmhvset.c :
|
* src/spicelib/devices/hisimhv/hsmhvset.c :
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ com_ghelp(wordlist *wl)
|
||||||
hlp_titlefontname = copy(buf);
|
hlp_titlefontname = copy(buf);
|
||||||
if (cp_getvar("helpbuttonfont", CP_STRING, buf))
|
if (cp_getvar("helpbuttonfont", CP_STRING, buf))
|
||||||
hlp_buttonfontname = copy(buf);
|
hlp_buttonfontname = copy(buf);
|
||||||
if (cp_getvar("helpinitxpos", CP_NUM, (char *) &i))
|
if (cp_getvar("helpinitxpos", CP_NUM, &i))
|
||||||
hlp_initxpos = i;
|
hlp_initxpos = i;
|
||||||
if (cp_getvar("helpinitypos", CP_NUM, (char *) &i))
|
if (cp_getvar("helpinitypos", CP_NUM, &i))
|
||||||
hlp_initypos = i;
|
hlp_initypos = i;
|
||||||
if (cp_getvar("helpbuttonstyle", CP_STRING, buf)) {
|
if (cp_getvar("helpbuttonstyle", CP_STRING, buf)) {
|
||||||
if (cieq(buf, "left"))
|
if (cieq(buf, "left"))
|
||||||
|
|
@ -63,7 +63,7 @@ com_ghelp(wordlist *wl)
|
||||||
fprintf(cp_err, "Warning: no such button style %s\n",
|
fprintf(cp_err, "Warning: no such button style %s\n",
|
||||||
buf);
|
buf);
|
||||||
}
|
}
|
||||||
if (cp_getvar("width", CP_NUM, (char *) &i))
|
if (cp_getvar("width", CP_NUM, &i))
|
||||||
hlp_width = i;
|
hlp_width = i;
|
||||||
if (cp_getvar("display", CP_STRING, buf))
|
if (cp_getvar("display", CP_STRING, buf))
|
||||||
hlp_displayname = copy(buf);
|
hlp_displayname = copy(buf);
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ all_show(wordlist *wl, int mode)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cp_getvar("width", CP_NUM, (char *) &screen_width))
|
if (!cp_getvar("width", CP_NUM, &screen_width))
|
||||||
screen_width = DEF_WIDTH;
|
screen_width = DEF_WIDTH;
|
||||||
count = (screen_width - LEFT_WIDTH) / (DEV_WIDTH + 1);
|
count = (screen_width - LEFT_WIDTH) / (DEV_WIDTH + 1);
|
||||||
count = 1;
|
count = 1;
|
||||||
|
|
@ -243,7 +243,7 @@ all_show_old(wordlist *wl, int mode)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cp_getvar("width", CP_NUM, (char *) &screen_width))
|
if (!cp_getvar("width", CP_NUM, &screen_width))
|
||||||
screen_width = DEF_WIDTH;
|
screen_width = DEF_WIDTH;
|
||||||
count = (screen_width - LEFT_WIDTH) / (DEV_WIDTH + 1);
|
count = (screen_width - LEFT_WIDTH) / (DEV_WIDTH + 1);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,11 @@ com_diff(wordlist *wl)
|
||||||
wordlist *tw;
|
wordlist *tw;
|
||||||
char numbuf[BSIZE_SP],numbuf2[BSIZE_SP] ,numbuf3[BSIZE_SP], numbuf4[BSIZE_SP]; /* For printnum */
|
char numbuf[BSIZE_SP],numbuf2[BSIZE_SP] ,numbuf3[BSIZE_SP], numbuf4[BSIZE_SP]; /* For printnum */
|
||||||
|
|
||||||
if (!cp_getvar("diff_vntol", CP_REAL, (char *) &vntol))
|
if (!cp_getvar("diff_vntol", CP_REAL, &vntol))
|
||||||
vntol = 1.0e-6;
|
vntol = 1.0e-6;
|
||||||
if (!cp_getvar("diff_abstol", CP_REAL, (char *) &abstol))
|
if (!cp_getvar("diff_abstol", CP_REAL, &abstol))
|
||||||
abstol = 1.0e-12;
|
abstol = 1.0e-12;
|
||||||
if (!cp_getvar("diff_reltol", CP_REAL, (char *) &reltol))
|
if (!cp_getvar("diff_reltol", CP_REAL, &reltol))
|
||||||
reltol = 0.001;
|
reltol = 0.001;
|
||||||
|
|
||||||
/* Let's try to be clever about defaults. This code is ugly. */
|
/* Let's try to be clever about defaults. This code is ugly. */
|
||||||
|
|
|
||||||
|
|
@ -62,13 +62,11 @@ fourier(wordlist *wl, struct plot *current_plot)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!cp_getvar("nfreqs", CP_NUM, (char *) &nfreqs)) || (nfreqs < 1))
|
if (!cp_getvar("nfreqs", CP_NUM, &nfreqs) || nfreqs < 1)
|
||||||
nfreqs = 10;
|
nfreqs = 10;
|
||||||
if ((!cp_getvar("polydegree", CP_NUM, (char *) &polydegree)) ||
|
if (!cp_getvar("polydegree", CP_NUM, &polydegree) || polydegree < 0)
|
||||||
(polydegree < 0))
|
|
||||||
polydegree = 1;
|
polydegree = 1;
|
||||||
if ((!cp_getvar("fourgridsize", CP_NUM, (char *) &fourgridsize)) ||
|
if (!cp_getvar("fourgridsize", CP_NUM, &fourgridsize) || fourgridsize < 1)
|
||||||
(fourgridsize < 1))
|
|
||||||
fourgridsize = DEF_FOURGRIDSIZE;
|
fourgridsize = DEF_FOURGRIDSIZE;
|
||||||
|
|
||||||
time = current_plot->pl_scale;
|
time = current_plot->pl_scale;
|
||||||
|
|
|
||||||
|
|
@ -513,7 +513,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
cp_vset("pretemp", CP_REAL, &temperature_value );
|
cp_vset("pretemp", CP_REAL, &temperature_value );
|
||||||
}
|
}
|
||||||
if (ft_ngdebug) {
|
if (ft_ngdebug) {
|
||||||
cp_getvar( "pretemp", CP_REAL, (double *) &testemp );
|
cp_getvar("pretemp", CP_REAL, &testemp);
|
||||||
printf("test temperature %f\n", testemp);
|
printf("test temperature %f\n", testemp);
|
||||||
}
|
}
|
||||||
/* We are done handling the control stuff. Now process remainder of deck.
|
/* We are done handling the control stuff. Now process remainder of deck.
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ inp_pathopen(char *name, char *mode)
|
||||||
* do an fopen.
|
* do an fopen.
|
||||||
*/
|
*/
|
||||||
if (index(name, DIR_TERM)
|
if (index(name, DIR_TERM)
|
||||||
|| !cp_getvar("sourcepath", CP_LIST, (char *) &v))
|
|| !cp_getvar("sourcepath", CP_LIST, &v))
|
||||||
return (fopen(name, mode));
|
return (fopen(name, mode));
|
||||||
|
|
||||||
while (v) {
|
while (v) {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ int length(char * s);
|
||||||
bool steq(char * s, char * t);
|
bool steq(char * s, char * t);
|
||||||
bool stne(char * s, char * t);
|
bool stne(char * s, char * t);
|
||||||
void stri(long n, SPICE_DSTRINGPTR s);
|
void stri(long n, SPICE_DSTRINGPTR s);
|
||||||
int posi (char *sub, char *s, int opt);
|
|
||||||
|
|
||||||
char upcase(char c);
|
char upcase(char c);
|
||||||
char lowcase(char c);
|
char lowcase(char c);
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,10 @@ ft_agraf(double *xlims, double *ylims, struct dvec *xscale, struct plot *plot, s
|
||||||
if ((xscale->v_gridtype == GRID_YLOG) ||
|
if ((xscale->v_gridtype == GRID_YLOG) ||
|
||||||
(xscale->v_gridtype == GRID_LOGLOG))
|
(xscale->v_gridtype == GRID_LOGLOG))
|
||||||
ylogscale = TRUE;
|
ylogscale = TRUE;
|
||||||
if (!cp_getvar("width", CP_NUM, (char *) &maxy)) {
|
if (!cp_getvar("width", CP_NUM, &maxy)) {
|
||||||
maxy = DEF_WIDTH;
|
maxy = DEF_WIDTH;
|
||||||
}
|
}
|
||||||
if (!cp_getvar("height", CP_NUM, (char *) &height))
|
if (!cp_getvar("height", CP_NUM, &height))
|
||||||
height = DEF_HEIGHT;
|
height = DEF_HEIGHT;
|
||||||
if (ft_nopage)
|
if (ft_nopage)
|
||||||
nobreakp = TRUE;
|
nobreakp = TRUE;
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ gr_init(double *xlims, double *ylims, /* The size of the screen. */
|
||||||
if (!cp_getvar("pointchars", CP_STRING, pointchars))
|
if (!cp_getvar("pointchars", CP_STRING, pointchars))
|
||||||
(void) strcpy(pointchars, DEFPOINTCHARS);
|
(void) strcpy(pointchars, DEFPOINTCHARS);
|
||||||
|
|
||||||
if (!cp_getvar("ticmarks", CP_NUM, (char *) &graph->ticmarks)) {
|
if (!cp_getvar("ticmarks", CP_NUM, &graph->ticmarks)) {
|
||||||
if (cp_getvar("ticmarks", CP_BOOL, NULL))
|
if (cp_getvar("ticmarks", CP_BOOL, NULL))
|
||||||
graph->ticmarks = 10;
|
graph->ticmarks = 10;
|
||||||
else
|
else
|
||||||
|
|
@ -313,7 +313,7 @@ gr_point(struct dvec *dv,
|
||||||
break;
|
break;
|
||||||
case PLOT_POINT:
|
case PLOT_POINT:
|
||||||
/* Here, gi_linestyle is the character used for the point. */
|
/* Here, gi_linestyle is the character used for the point. */
|
||||||
pointc[0] = dv->v_linestyle;
|
pointc[0] = (char) dv->v_linestyle;
|
||||||
pointc[1] = '\0';
|
pointc[1] = '\0';
|
||||||
DevDrawText(pointc, (int) (tox - currentgraph->fontwidth / 2),
|
DevDrawText(pointc, (int) (tox - currentgraph->fontwidth / 2),
|
||||||
(int) (toy - currentgraph->fontheight / 2));
|
(int) (toy - currentgraph->fontheight / 2));
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ ft_graf(struct dvec *v, struct dvec *xs, bool nostart)
|
||||||
if (nostart) {
|
if (nostart) {
|
||||||
degree = currentgraph->degree;
|
degree = currentgraph->degree;
|
||||||
} else {
|
} else {
|
||||||
if (!cp_getvar("polydegree", CP_NUM, (char *) °ree))
|
if (!cp_getvar("polydegree", CP_NUM, °ree))
|
||||||
degree = 1;
|
degree = 1;
|
||||||
currentgraph->degree = degree;
|
currentgraph->degree = degree;
|
||||||
}
|
}
|
||||||
|
|
@ -53,7 +53,7 @@ ft_graf(struct dvec *v, struct dvec *xs, bool nostart)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cp_getvar("gridsize", CP_NUM, (char *) &gridsize))
|
if (!cp_getvar("gridsize", CP_NUM, &gridsize))
|
||||||
gridsize = 0;
|
gridsize = 0;
|
||||||
if ((gridsize < 0) || (gridsize > 10000)) {
|
if ((gridsize < 0) || (gridsize > 10000)) {
|
||||||
fprintf(cp_err, "Error: bad grid size %d\n", gridsize);
|
fprintf(cp_err, "Error: bad grid size %d\n", gridsize);
|
||||||
|
|
@ -318,7 +318,7 @@ plotinterval(struct dvec *v, double lo, double hi, register double *coeffs, int
|
||||||
/* This is a problem -- how do we know what granularity to use? If
|
/* This is a problem -- how do we know what granularity to use? If
|
||||||
* the guy cares about this he will use gridsize.
|
* the guy cares about this he will use gridsize.
|
||||||
*/
|
*/
|
||||||
if (!cp_getvar("polysteps", CP_NUM, (char *) &steps))
|
if (!cp_getvar("polysteps", CP_NUM, &steps))
|
||||||
steps = GRANULARITY;
|
steps = GRANULARITY;
|
||||||
|
|
||||||
incr = (hi - lo) / (double) (steps + 1);
|
incr = (hi - lo) / (double) (steps + 1);
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ com_print(wordlist *wl)
|
||||||
} //end if (v->v_rlength == 1)
|
} //end if (v->v_rlength == 1)
|
||||||
}
|
}
|
||||||
} else { /* Print in columns. */
|
} else { /* Print in columns. */
|
||||||
if (cp_getvar("width", CP_NUM, (char *) &i))
|
if (cp_getvar("width", CP_NUM, &i))
|
||||||
width = i;
|
width = i;
|
||||||
if (width < 40)
|
if (width < 40)
|
||||||
width = 40;
|
width = 40;
|
||||||
|
|
@ -223,7 +223,7 @@ com_print(wordlist *wl)
|
||||||
buf = TREALLOC(char, buf, width + 1);
|
buf = TREALLOC(char, buf, width + 1);
|
||||||
buf2 = TREALLOC(char, buf2, width + 1);
|
buf2 = TREALLOC(char, buf2, width + 1);
|
||||||
}
|
}
|
||||||
if (cp_getvar("height", CP_NUM, (char *) &i))
|
if (cp_getvar("height", CP_NUM, &i))
|
||||||
height = i;
|
height = i;
|
||||||
if (height < 20)
|
if (height < 20)
|
||||||
height = 20;
|
height = 20;
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,9 @@ out_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!xsize)
|
if (!xsize)
|
||||||
(void) cp_getvar("width", CP_NUM, (char *) &xsize);
|
(void) cp_getvar("width", CP_NUM, &xsize);
|
||||||
if (!ysize)
|
if (!ysize)
|
||||||
(void) cp_getvar("height", CP_NUM, (char *) &ysize);
|
(void) cp_getvar("height", CP_NUM, &ysize);
|
||||||
|
|
||||||
if (!xsize)
|
if (!xsize)
|
||||||
xsize = DEF_SCRWIDTH;
|
xsize = DEF_SCRWIDTH;
|
||||||
|
|
|
||||||
|
|
@ -821,7 +821,7 @@ int WIN_Text( char * text, int x, int y)
|
||||||
if (!cp_getvar("wfont", CP_STRING, lf.lfFaceName)) {
|
if (!cp_getvar("wfont", CP_STRING, lf.lfFaceName)) {
|
||||||
(void) lstrcpy(lf.lfFaceName, DEF_FONTW);
|
(void) lstrcpy(lf.lfFaceName, DEF_FONTW);
|
||||||
}
|
}
|
||||||
if (!cp_getvar("wfont_size", CP_NUM, (char *) &(lf.lfHeight))) {
|
if (!cp_getvar("wfont_size", CP_NUM, &(lf.lfHeight))) {
|
||||||
lf.lfHeight = (int) (1.1 * currentgraph->fontheight) ;
|
lf.lfHeight = (int) (1.1 * currentgraph->fontheight) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ cx_interpolate(void *data, short int type, int length, int *newlength, short int
|
||||||
*newlength = ns->v_length;
|
*newlength = ns->v_length;
|
||||||
d = alloc_d(ns->v_length);
|
d = alloc_d(ns->v_length);
|
||||||
|
|
||||||
if (!cp_getvar("polydegree", CP_NUM, (void *) °ree))
|
if (!cp_getvar("polydegree", CP_NUM, °ree))
|
||||||
degree = 1;
|
degree = 1;
|
||||||
|
|
||||||
for (base = 0; base < length; base += grouping) {
|
for (base = 0; base < length; base += grouping) {
|
||||||
|
|
@ -241,7 +241,7 @@ cx_deriv(void *data, short int type, int length, int *newlength, short int *newt
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cp_getvar("dpolydegree", CP_NUM, (void *) °ree))
|
if (!cp_getvar("dpolydegree", CP_NUM, °ree))
|
||||||
degree = 2; /* default quadratic */
|
degree = 2; /* default quadratic */
|
||||||
|
|
||||||
n = degree + 1;
|
n = degree + 1;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM3_W:
|
{ case BSIM3_W:
|
||||||
|
|
|
||||||
|
|
@ -1014,7 +1014,7 @@ if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef USE_OMP3
|
#ifdef USE_OMP3
|
||||||
if (!cp_getvar("num_threads", CP_NUM, (char *) &nthreads))
|
if (!cp_getvar("num_threads", CP_NUM, &nthreads))
|
||||||
nthreads = 2;
|
nthreads = 2;
|
||||||
|
|
||||||
omp_set_num_threads(nthreads);
|
omp_set_num_threads(nthreads);
|
||||||
|
|
|
||||||
|
|
@ -2671,7 +2671,7 @@ if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_OMP4SOI
|
#ifdef USE_OMP4SOI
|
||||||
if (!cp_getvar("num_threads", CP_NUM, (char *) &nthreads))
|
if (!cp_getvar("num_threads", CP_NUM, &nthreads))
|
||||||
nthreads = 2;
|
nthreads = 2;
|
||||||
|
|
||||||
omp_set_num_threads(nthreads);
|
omp_set_num_threads(nthreads);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ BSIM3v0param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM3v0_W:
|
{ case BSIM3v0_W:
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ BSIM3v1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM3v1_W:
|
{ case BSIM3v1_W:
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ BSIM3v32param (int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM3v32_W:
|
{ case BSIM3v32_W:
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM4_W:
|
{ case BSIM4_W:
|
||||||
|
|
|
||||||
|
|
@ -2386,7 +2386,7 @@ if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
||||||
} /* end of loop through all the BSIM4 device models */
|
} /* end of loop through all the BSIM4 device models */
|
||||||
|
|
||||||
#ifdef USE_OMP4
|
#ifdef USE_OMP4
|
||||||
if (!cp_getvar("num_threads", CP_NUM, (char *) &nthreads))
|
if (!cp_getvar("num_threads", CP_NUM, &nthreads))
|
||||||
nthreads = 2;
|
nthreads = 2;
|
||||||
|
|
||||||
omp_set_num_threads(nthreads);
|
omp_set_num_threads(nthreads);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM4v2_W:
|
{ case BSIM4v2_W:
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM4v3_W:
|
{ case BSIM4v3_W:
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM4v4_W:
|
{ case BSIM4v4_W:
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ IFvalue *select)
|
||||||
|
|
||||||
NG_IGNORE(select);
|
NG_IGNORE(select);
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
switch(param)
|
switch(param)
|
||||||
{ case BSIM4v5_W:
|
{ case BSIM4v5_W:
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ Author: 1985 Thomas L. Quarles
|
||||||
* bind a node of the specified device of the given type to its place
|
* bind a node of the specified device of the given type to its place
|
||||||
* in the specified circuit. */
|
* in the specified circuit. */
|
||||||
|
|
||||||
|
#include "ngspice.h"
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <devdefs.h>
|
#include <devdefs.h>
|
||||||
|
|
@ -18,6 +19,8 @@ Author: 1985 Thomas L. Quarles
|
||||||
int
|
int
|
||||||
CKTbindNode(CKTcircuit *ckt, GENinstance *fast, int term, CKTnode *node)
|
CKTbindNode(CKTcircuit *ckt, GENinstance *fast, int term, CKTnode *node)
|
||||||
{
|
{
|
||||||
|
NG_IGNORE(ckt);
|
||||||
|
|
||||||
int mappednode;
|
int mappednode;
|
||||||
SPICEdev **devs;
|
SPICEdev **devs;
|
||||||
GENinstance *instance = /*fixme*/ fast;
|
GENinstance *instance = /*fixme*/ fast;
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
* HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
|
* HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
|
||||||
* ENHANCEMENTS, OR MODIFICATIONS. */
|
* ENHANCEMENTS, OR MODIFICATIONS. */
|
||||||
|
|
||||||
|
#include "ngspice.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
|
||||||
|
|
@ -483,6 +484,7 @@ int load_opus(char *name){
|
||||||
|
|
||||||
void *dlopen(const char *name,int type)
|
void *dlopen(const char *name,int type)
|
||||||
{
|
{
|
||||||
|
NG_IGNORE(type);
|
||||||
return LoadLibrary(name);
|
return LoadLibrary(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,8 @@ INPgetModBin( CKTcircuit* ckt, char* name, INPmodel** model, INPtables* tab, cha
|
||||||
int error;
|
int error;
|
||||||
double scale;
|
double scale;
|
||||||
|
|
||||||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1;
|
if (!cp_getvar("scale", CP_REAL, &scale))
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
*model = NULL;
|
*model = NULL;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue