mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
Add boolean variables as flags when XSPICE and/or OSDI are enabled
This commit is contained in:
+12
@@ -824,6 +824,8 @@ int main(int argc, char **argv)
|
||||
bool iflag = FALSE; /* flag for interactive mode */
|
||||
bool qflag = FALSE; /* flag for command completion */
|
||||
|
||||
bool t = TRUE;
|
||||
|
||||
FILE * volatile circuit_file;
|
||||
bool volatile oflag = FALSE;
|
||||
bool srflag = FALSE;
|
||||
@@ -866,6 +868,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ivars(argv[0]); /* Create internal variables */
|
||||
|
||||
/* Set default data sources */
|
||||
@@ -895,6 +898,15 @@ int main(int argc, char **argv)
|
||||
cp_vset("rndseed", CP_NUM, &ii);
|
||||
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 --- */
|
||||
for (;;) {
|
||||
enum { soa_log = 1001, };
|
||||
|
||||
@@ -899,6 +899,15 @@ ngSpice_Init(SendChar* printfcn, SendStat* statusfcn, ControlledExit* ngspiceexi
|
||||
bool sm = TRUE;
|
||||
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 */
|
||||
if_getparam = spif_getparam_special;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user