diff --git a/src/include/ngspice/sharedspice.h b/src/include/ngspice/sharedspice.h index 2b9ac5b5f..111aaae9b 100644 --- a/src/include/ngspice/sharedspice.h +++ b/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 } diff --git a/src/sharedspice.c b/src/sharedspice.c index 54bdc5b90..30680fed3 100644 --- a/src/sharedspice.c +++ b/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