Add a new exported function ngSpice_nospinit() to set

variable no_spinit.
This commit is contained in:
Holger Vogt 2024-04-03 17:05:37 +02:00
parent 38c989dda9
commit 51ab1499ba
2 changed files with 17 additions and 1 deletions

View File

@ -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
}

View File

@ -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