Holger Vogt
5f059abdca
Improve debugging using shared ngspice:
print out each command received.
2 years ago
Holger Vogt
295be20859
Remove sourceinfo upon shared ngspice reset.
Remove memory leaks.
2 years ago
Holger Vogt
a6240eed87
Stop the worker thread when running
Delete mutexes only after all other resets and delets.
2 years ago
Holger Vogt
d0ae65accf
Add function ngSpice_Reset(void) to completely reset shared ngspice,
so that it may be restartet again by ngSpice_Init
2 years ago
Holger Vogt
8f2f0088f2
Add a new exported function ngSpice_nospinit() to set
variable no_spinit.
2 years ago
Holger Vogt
5154fd3fd7
Allways export function ngCM_Input_Path, independently from XSPICE
Update comment
2 years ago
Holger Vogt
dd58b07949
Initialize the new mutex vecreallocMutex
2 years ago
Holger Vogt
1849a8d220
Add functions ngSpice_LockRealloc and ngSpice_UnlockRealloc
to lock reallocing output vectors, e.g. during reading the
vecs for plotting.
2 years ago
Holger Vogt
3619041e26
Add new lock for realloc of vectors
2 years ago
Holger Vogt
9944a4869f
typo
3 years ago
Holger Vogt
87f0db6f50
Prevent crash when ControlledExit* is not initialized
in ngspice shared library.
3 years ago
Holger Vogt
d2fb3fb16b
Prevent memory leak.
Remove use controls.
Safeguard against NULL.
3 years ago
Holger Vogt
1280e199a3
Add boolean variables as flags when XSPICE and/or OSDI are enabled
3 years ago
Holger Vogt
eb70d81dab
Add function
char* ngCM_Input_Path(const char* path);
to shared ngspice API
to send file path for code model input files (e.g. dsource).
Such path cannot be extracted automatically when netlist has
been sent by ngSpice_Circ
3 years ago
Holger Vogt
7f486febe9
Search for .spiceinit (or spice.rc) firstly in a user defined directory,
when the directory path is set in the environmental variable
SPICE_USERINIT_DIR.
If not found then search in the current directory, then in HOME, then
in USERPROFILE.
4 years ago
Holger Vogt
9a2d968577
When transferring boolean data over the ABI, keep them as boolean types, not integer
Replace the type of all boolean variables around the ABI by NG_BOOL.
NG_BOOL is typedefed to _Bool, when compiling shared ngspice. When
sharedspice.h is use externally NG_BOOL is typdefed to bool
5 years ago
Holger Vogt
14402ffc96
Update to
6034c2bcd ("Internal global variable Infile_Path
is a file search path made available for the code models.
It is set when command 'source' is used.", 2021-04-17)
Correct path to variable.h
5 years ago
Holger Vogt
ba262eaa5f
Internal global variable Infile_Path is a file search path made
available for the code models. It is set when command 'source' is used.
This patch makes the first entry in var 'sourcepath' available to
the code models as well by setting Infile_Path, when 'sourcepath'
is set in .spiceinit.
5 years ago
Holger Vogt
99a7bfd8fe
Move version info from sharedspice.c to sharedspice.h
5 years ago
Holger Vogt
65a47d3276
Remove compiler warnings: CIDER debug flags are used as int
FIXME: Why arer they defined as BOOLEAN in main.c
without generating a warning?
5 years ago
Holger Vogt
8de513e8e9
ngspice.exe and .dll (.so): seperate the main files:
main.c now belongs to exe, sharedspice.c to dll (so)
5 years ago
Holger Vogt
eedb5b9027
Update for ngspice-34
5 years ago
Holger Vogt
89f0fb6d74
sharedspice: make reading .spiceinit as robust as in
the standard executable.
5 years ago
Holger Vogt
83fef9306f
re-enable .end with leading spaces
a fix to bug #534
5 years ago
Holger Vogt
87751ad073
Make the ngSpice_Circ(char** circa) more robust:
Error message when .end card is missing
Reset if .end card is missing, to allow loading
a netlist again.
NULL as last element is no longer required, but .end card
(this has been implicitedly assumed).
Remove a bug that skippoed the last line (the .end card).
5 years ago
Holger Vogt
d14e53b0dd
Prepare ngspice-33
6 years ago
Holger Vogt
f9f8174cb8
enable debug output, taking into account that there may be two threads
accessing fcn SetAnalyse()
6 years ago
Holger Vogt
ce69e8d70c
Don't send the empty line to create_circbyline(),
it is not used anymore and may cause a crash
6 years ago
holger
061e48253b
definitely exclude command completion in shared ngspice
6 years ago
Holger Vogt
ce72667fcd
shared lib version 32
6 years ago
Holger Vogt
0cd33d3fbb
correct zeroing of allplots array
6 years ago
Holger Vogt
b3fdff7bc0
Spice_Build_Date is never NULL
6 years ago
Holger Vogt
2f31bd5c2a
avoid compiler warning
6 years ago
Holger Vogt
9edc436ef7
remove SIGINT handling which was not functional
add SIGSEGV handler which may be excluded by
set nosighandling
6 years ago
Holger Vogt
c86cd740d6
fix a bug: re-enable reading vecs with length 1
Bug reported by LM
6 years ago
Holger Vogt
ded0092ad6
If ngSpice_Command(NULL) is sent to shared ngspice,
the internal control structure memory is freed.
6 years ago
Holger Vogt
0ad7acadec
remove unreachable code warning, add const
6 years ago
Holger Vogt
eb667118cf
If there are no controls, just skip creating the controls thread.
7 years ago
Holger Vogt
a4402f1da7
prevent potential false reads if 'controlswait' is set.
7 years ago
Holger Vogt
840d00c4ca
no actions if controls thread tid2 is not set
7 years ago
Holger Vogt
9e427a1a1e
Better thread handling
Embed thread tid2 into tid1
Avoid spurious thread collisions
7 years ago
Holger Vogt
cf752bf730
Revert "encapsulate fcn calls to cp_evloop into a mutex"
This reverts commit 2426a037db .
7 years ago
Holger Vogt
acd0c7156c
return immediately if empty commands are sent
7 years ago
Holger Vogt
2426a037db
encapsulate fcn calls to cp_evloop into a mutex
thus preventing thread collisions
7 years ago
Holger Vogt
0b92a15ae8
safeguard against vectors with 0 length
7 years ago
Holger Vogt
c35879d3cf
prepare ngspice-30
7 years ago
Holger Vogt
2c7860361d
Prevent segfault if SendStat is NULL and HAVE_FTIME is undefined.
Patch no. 28 offered by Liang Chang
7 years ago
Holger Vogt
3f816d7f1b
add comment
7 years ago
Holger Vogt
a98f6ac69b
proper initialization of OldAn, callback only
if output has changed
7 years ago
Holger Vogt
0f552fc4f8
sharedspice.c, prevent crash, if controlswait is set
and a next bg_run before controls are ready.
7 years ago