Add boolean variables as flags when XSPICE and/or OSDI are enabled
This commit is contained in:
parent
19ae6bdce7
commit
4dd137c3da
12
src/main.c
12
src/main.c
|
|
@ -824,6 +824,8 @@ int main(int argc, char **argv)
|
||||||
bool iflag = FALSE; /* flag for interactive mode */
|
bool iflag = FALSE; /* flag for interactive mode */
|
||||||
bool qflag = FALSE; /* flag for command completion */
|
bool qflag = FALSE; /* flag for command completion */
|
||||||
|
|
||||||
|
bool t = TRUE;
|
||||||
|
|
||||||
FILE * volatile circuit_file;
|
FILE * volatile circuit_file;
|
||||||
bool volatile oflag = FALSE;
|
bool volatile oflag = FALSE;
|
||||||
bool srflag = FALSE;
|
bool srflag = FALSE;
|
||||||
|
|
@ -866,6 +868,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ivars(argv[0]); /* Create internal variables */
|
ivars(argv[0]); /* Create internal variables */
|
||||||
|
|
||||||
/* Set default data sources */
|
/* Set default data sources */
|
||||||
|
|
@ -895,6 +898,15 @@ int main(int argc, char **argv)
|
||||||
cp_vset("rndseed", CP_NUM, &ii);
|
cp_vset("rndseed", CP_NUM, &ii);
|
||||||
com_sseed(NULL);
|
com_sseed(NULL);
|
||||||
|
|
||||||
|
/* set a boolean variable when XSPICE and/or OSDI is enabled,
|
||||||
|
to be used in spinit etc. */
|
||||||
|
#if defined(SIMULATOR) && defined(XSPICE)
|
||||||
|
cp_vset("xspice_enabled", CP_BOOL, &t);
|
||||||
|
#endif
|
||||||
|
#if defined(SIMULATOR) && defined(OSDI)
|
||||||
|
cp_vset("osdi_enabled", CP_BOOL, &t);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* --- Process command line options --- */
|
/* --- Process command line options --- */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
enum { soa_log = 1001, };
|
enum { soa_log = 1001, };
|
||||||
|
|
|
||||||
|
|
@ -899,6 +899,15 @@ ngSpice_Init(SendChar* printfcn, SendStat* statusfcn, ControlledExit* ngspiceexi
|
||||||
bool sm = TRUE;
|
bool sm = TRUE;
|
||||||
cp_vset("sharedmode", CP_BOOL, &sm);
|
cp_vset("sharedmode", CP_BOOL, &sm);
|
||||||
|
|
||||||
|
/* set a boolean variable when XSPICE and/or OSDI is enabled,
|
||||||
|
to be used in spinit etc. */
|
||||||
|
#if defined(XSPICE)
|
||||||
|
cp_vset("xspice_enabled", CP_BOOL, &sm);
|
||||||
|
#endif
|
||||||
|
#if defined(OSDI)
|
||||||
|
cp_vset("osdi_enabled", CP_BOOL, &sm);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*parameter fetcher, used in show, alter, altermod */
|
/*parameter fetcher, used in show, alter, altermod */
|
||||||
if_getparam = spif_getparam_special;
|
if_getparam = spif_getparam_special;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue