code cleanup, some warnings, some casts, ...
This commit is contained in:
parent
23056573d8
commit
b778c50bd6
12
ChangeLog
12
ChangeLog
|
|
@ -1,3 +1,15 @@
|
|||
2011-04-27 Robert Larice
|
||||
* src/main.c ,
|
||||
* src/frontend/com_measure2.c ,
|
||||
* src/frontend/inpcom.c ,
|
||||
* src/spicelib/analysis/noisean.c ,
|
||||
* src/spicelib/analysis/pzan.c ,
|
||||
* src/spicelib/analysis/tfanal.c ,
|
||||
* src/spicelib/devices/cpl/cplsetup.c ,
|
||||
* src/spicelib/devices/isrc/isrcacct.c ,
|
||||
* src/spicelib/devices/vsrc/vsrcacct.c :
|
||||
code cleanup, some warnings, some casts, ...
|
||||
|
||||
2011-04-27 Robert Larice
|
||||
* */** :
|
||||
code cleanup, drop NULL pointer casts
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ static void com_measure_when(
|
|||
if ((first > 1) && (dc_check && (meas->m_td == scaleValue)))
|
||||
first = 1;
|
||||
|
||||
if (first == 1)
|
||||
if (first == 1) {
|
||||
if (has_d2) {
|
||||
// initialise
|
||||
crossCnt =0;
|
||||
|
|
@ -515,6 +515,7 @@ static void com_measure_when(
|
|||
}
|
||||
fflush( stdout ) ;
|
||||
}
|
||||
}
|
||||
|
||||
if (first > 1) {
|
||||
if (has_d2) {
|
||||
|
|
|
|||
|
|
@ -1205,7 +1205,7 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
|
|||
/* only the last title line remains valid */
|
||||
if (new_title != NULL) tfree(new_title);
|
||||
new_title = copy(s);
|
||||
if (s=strstr(new_title, "\n"))
|
||||
if ((s = strstr(new_title, "\n")) != NULL)
|
||||
*s = ' ';
|
||||
*buffer = '*'; /* change .TITLE line to comment line */
|
||||
}
|
||||
|
|
|
|||
31
src/main.c
31
src/main.c
|
|
@ -760,8 +760,6 @@ main(int argc, char **argv)
|
|||
#endif /* HAS_WINDOWS */
|
||||
{
|
||||
int c, err;
|
||||
unsigned int rseed;
|
||||
time_t acttime;
|
||||
bool gotone = FALSE;
|
||||
char* copystring;
|
||||
bool addctrlsect = TRUE; /* PN: for autorun */
|
||||
|
|
@ -1111,21 +1109,26 @@ bot:
|
|||
#ifdef SIMULATOR
|
||||
#ifdef FastRand
|
||||
// initialization and seed for FastNorm Gaussian random generator
|
||||
initnorm (0, 0);
|
||||
rseed = 66;
|
||||
if (!cp_getvar("rndseed", CP_NUM, (char *) &rseed)) {
|
||||
acttime = time(NULL);
|
||||
rseed = (int)acttime;
|
||||
{
|
||||
unsigned int rseed = 66;
|
||||
initnorm (0, 0);
|
||||
if (!cp_getvar("rndseed", CP_NUM, &rseed)) {
|
||||
time_t acttime = time(NULL);
|
||||
rseed = (int) acttime;
|
||||
}
|
||||
initnorm (rseed, 2);
|
||||
fprintf (cp_out, "SoS %f, seed value: %ld\n", renormalize(), rseed);
|
||||
}
|
||||
initnorm (rseed, 2);
|
||||
fprintf (cp_out, "SoS %f, seed value: %ld\n", renormalize(), rseed);
|
||||
#elif defined (WaGauss)
|
||||
if (!cp_getvar("rndseed", CP_NUM, (char *) &rseed)) {
|
||||
acttime = time(NULL);
|
||||
rseed = (int)acttime;
|
||||
{
|
||||
unsigned int rseed = 66;
|
||||
if (!cp_getvar("rndseed", CP_NUM, &rseed)) {
|
||||
time_t acttime = time(NULL);
|
||||
rseed = (int) acttime;
|
||||
}
|
||||
srand(rseed);
|
||||
initw();
|
||||
}
|
||||
srand(rseed);
|
||||
initw();
|
||||
#endif
|
||||
if (!ft_servermode && !ft_nutmeg) {
|
||||
/* Concatenate all non-option arguments into a temporary file
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
|
||||
SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob,
|
||||
"Integrated Noise - V^2 or A^2",
|
||||
NULL, (int)0, data->numPlots, data->namelist, IF_REAL,
|
||||
NULL, 0, data->numPlots, data->namelist, IF_REAL,
|
||||
&(data->NplotPtr));
|
||||
|
||||
error = CKTnoise(ckt,INT_NOIZ,N_CALC,data);
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ PZpost(CKTcircuit *ckt)
|
|||
}
|
||||
|
||||
SPfrontEnd->OUTpBeginPlot (ckt, (JOB *)pzan, pzan->JOBname,
|
||||
NULL, (int)0, pzan->PZnPoles + pzan->PZnZeros, namelist,
|
||||
NULL, 0, pzan->PZnPoles + pzan->PZnZeros, namelist,
|
||||
IF_COMPLEX, &pzPlotPtr);
|
||||
|
||||
j = 0;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
}
|
||||
|
||||
error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob,
|
||||
((TFan*)(ckt->CKTcurJob))->JOBname, NULL, (int)0, 3,
|
||||
((TFan*)(ckt->CKTcurJob))->JOBname, NULL, 0, 3,
|
||||
uids,IF_REAL,&plotptr);
|
||||
if(error) return(error);
|
||||
|
||||
|
|
|
|||
|
|
@ -1291,8 +1291,8 @@ coupled(int dim)
|
|||
loop_ZY(dim, 0.0);
|
||||
eval_frequency(dim, deg_o);
|
||||
eval_Si_Si_1(dim, 0.0);
|
||||
store_SiSv_1(dim, (int) 0);
|
||||
store(dim, (int) 0);
|
||||
store_SiSv_1(dim, 0);
|
||||
store(dim, 0);
|
||||
|
||||
/*** Step 1 ***/
|
||||
/*** Step 2 ***/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ Author: 1985 Thomas L. Quarles
|
|||
extern int fftInit(long M);
|
||||
extern void fftFree(void);
|
||||
extern void rffts(float *data, long M, long Rows);
|
||||
extern double exprand(double);
|
||||
|
||||
#define SAMETIME(a,b) (fabs((a)-(b))<= TIMETOL * PW)
|
||||
#define TIMETOL 1e-7
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ Author: 1985 Thomas L. Quarles
|
|||
extern int fftInit(long M);
|
||||
extern void fftFree(void);
|
||||
extern void rffts(float *data, long M, long Rows);
|
||||
extern double exprand(double);
|
||||
|
||||
#define SAMETIME(a,b) (fabs((a)-(b))<= TIMETOL * PW)
|
||||
#define TIMETOL 1e-7
|
||||
|
|
|
|||
Loading…
Reference in New Issue