Browse Source

Add a new exported function ngSpice_nospinit() to set

variable no_spinit.
pre-master-46
Holger Vogt 2 years ago
parent
commit
8f2f0088f2
  1. 9
      src/include/ngspice/sharedspice.h
  2. 9
      src/sharedspice.c

9
src/include/ngspice/sharedspice.h

@ -1,9 +1,13 @@
/* header file for shared ngspice */
/* Copyright 2021 Holger Vogt */
/* Copyright 2021-2024 Holger Vogt */
/* Modified BSD license */
/*
Interface between a calling program (caller) and ngspice.dll (ngspice.so)
**
ngSpice_nospinit(void)
Set variable no_spinit, if reading the initialization file 'spinit' is not wanted.
To be called before ngSpice_Init()
**
ngSpice_Init(SendChar*, SendStat*, ControlledExit*,
@ -441,6 +445,9 @@ NG_BOOL ngSpice_running(void);
IMPEXP
NG_BOOL ngSpice_SetBkpt(double time);
/* Set variable no_spinit, if reading 'spinit' is not wanted. */
IMPEXP
int ngSpice_nospinit(void);
#ifdef __cplusplus
}

9
src/sharedspice.c

@ -788,6 +788,15 @@ ngSpice_running (void)
}
#endif
/* Set variable no_spinit, if reading 'spinit' is not wanted. */
IMPEXP
int
ngSpice_nospinit(void)
{
bool t = TRUE;
cp_vset("no_spinit", CP_BOOL, &t);
return 0;
}
/* Initialise external voltage source and synchronization */
IMPEXP

Loading…
Cancel
Save