Holger Vogt
e27f093fb7
Prevent error: implicit declaration of function ‘get_local_home’
...
[-Werror=implicit-function-declaration], if editline is selected.
2024-03-16 23:18:13 +01:00
Holger Vogt
adb38ecb17
Upon error, bail out when strict_error is set.
2024-03-10 21:58:56 +01:00
Giles Atkinson
597268cc26
Treat input files names passed a start-up the same as those entered
...
as commands or called as scripts: search for them using $sourcepath.
2023-11-27 17:16:55 +00:00
Giles Atkinson
07ce9c788e
Recognise *ng_script_with_params" in the first line of the first
...
program input file to mean that the file is a pure interpreter
script that receives any remaining command arguments.
In winmain.c ensure that the argv array is NULL-terminated
and tidy some code.
2023-11-27 17:06:39 +00:00
Giles Atkinson
41c61604c5
Handle SIGTTIN and SIGTTOU on Unix-like OSs with X11 graphics.
...
That makes it possible to push ngspice into the background while
plot windows are open: the windows remain responsive.
Discussion on ngspice-users, starting 2023-09-01,
title: "`quit` in Interactive Mode."
Also restore terminal state when forcing exit with SIGINT (control-C).
2023-09-23 17:03:24 +02:00
Holger Vogt
d74e43f0f0
Move extern declaration to the top, out of any function.
...
Thus remove VC2022 compiler warnings.
2023-07-15 11:33:11 +02:00
Brian Taylor
159e185bfe
Tidy up sp_shutdown with Cider.
2023-07-15 11:32:52 +02:00
Brian Taylor
51b361bbf0
When Cider models are present, a normal batch mode sp_shutdown (for example, ngspice -b cmosinv.cir) will call com_quit(NULL). This cleans up so that valgrind will find no leaks in Cider devices after sp_shutdown. To disable this feature, set the environment variable CIDER_COM_QUIT="OFF". Even though it really does not matter that Cider memory is cleared just before exit, it makes it cleaner for valgrind checks.
2023-07-15 11:32:37 +02:00
Giles Atkinson
762b131bb3
Fix Bug #635 - "Starting ngspice with HOME env variable unset causes segfault".
2023-07-15 11:22:13 +02:00
Holger Vogt
0e6b785728
Remove the error message when a simulation has been started via the .control section.
2023-07-15 11:21:40 +02:00
Holger Vogt
1280e199a3
Add boolean variables as flags when XSPICE and/or OSDI are enabled
2023-01-20 15:07:57 +01:00
Holger Vogt
cc8b651562
re-enable making old app nutmeg
2022-12-11 15:47:22 +01:00
Holger Vogt
d4fcef9bf6
Repair the broken --enable-oldapps option
2022-12-11 15:47:05 +01:00
Giles Atkinson
73e8fed0fc
Fix warnings from gcc 10.2.1.
2022-12-11 15:35:14 +01:00
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.
2022-10-09 10:21:39 +02:00
Giles Atkinson
e67261be29
Fix a crash that sometimes occurs on Linux when interrupting from
...
the terminal a simulation that was started directly from the command
line. A gdb backtrace showed rl_cleanup_after_signal() calling
fwrite() with a NULL file pointer.
2022-10-08 16:58:26 +02:00
Holger Vogt
6b83a57a18
Exit when executing the input fails,
...
if -o option (log file) is set and not in interactive mode.
Enables running the paranoia suite without hanging if
something goes wrong.
2022-10-07 11:36:31 +02:00
Giles Atkinson
23e9df0181
Fix for ticket #570 : Interactive prompting is always active.
...
Control prompting with variable "interactive" and stop setting it by default.
Add code in main.c to set it for an interactve session.
2022-01-12 15:22:19 +01:00
Holger Vogt
8de513e8e9
ngspice.exe and .dll (.so): seperate the main files:
...
main.c now belongs to exe, sharedspice.c to dll (so)
2021-01-26 18:17:59 +01:00
Holger Vogt
55359e36e0
if SHARED_MODULE, exclude some unused function from build.
...
Finally complete main.c should be removed in shared ngspice.
2021-01-24 17:40:18 +01:00
dwarning
c5b5ad67db
only one place for version and copyright message
2020-12-22 17:56:18 +01:00
Holger Vogt
9defcae963
Do not compile in fcn main() when shared ngspice is made
2020-08-20 15:38:29 +02:00
Holger Vogt
8143fb67c2
comment, missing \n
2020-05-13 22:05:31 +02:00
Holger Vogt
db91e19e36
enable making ngnutmeg, when --enable-oldapps is set
2020-05-05 11:59:23 +02:00
Jim Monte
41819a7226
FALLTHROUGH
2020-04-27 10:21:32 +02:00
Holger Vogt
7f085144a9
remove all the remains of quote() and strip() that had been
...
used to modify the eigths bit of a character or string.
The functions had been switched off some time ago.
We now need all bits of a char for extended ascii or utf8
2020-03-15 08:51:12 +01:00
Holger Vogt
51f80abe00
if inp_spsource() returns with an error code, emit a message
2020-03-15 08:50:57 +01:00
Jim Monte
d4088c896a
Restored command arguments accidentally deleted.
2020-03-15 08:50:56 +01:00
Jim Monte
06ebf80983
Modified search for init file so that it searches both <HOME> and <USERPROFILE> if both are defined.
2020-03-15 08:50:55 +01:00
Jim Monte
2068c4fffb
Added -D/--define option to define a variable from the command line.
2020-03-15 08:50:55 +01:00
Holger Vogt
ceea40e012
Revert "enable compiling with readline for macOS"
...
This reverts commit 11df2b7719 .
2019-11-30 11:36:09 +01:00
Holger Vogt
11df2b7719
enable compiling with readline for macOS
...
which has a very simple readline header only
2019-09-20 20:43:36 +02:00
Holger Vogt
1c8992bf15
Enable the file input as search path for .include files
...
also for non-Wondows OSs
2019-09-14 11:25:34 +02:00
Jim Monte
0183964d6f
[PATCH #41 ] Made constants agree across ngspice simulator. File const.h
...
is the source of the values with all other files referencing it.
2019-08-13 23:20:00 +02:00
Holger Vogt
d6f5a32c93
Add a comment to the editline #ifdef
2018-12-31 12:03:19 +01:00
Holger Vogt
a3f2c38eb6
upstream editline development at
...
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline/readline.h?sortby=date#rev1.42.2.1
have added two lines to readline.h:
typedef int rl_hook_func_t(void);
extern rl_hook_func_t *rl_event_hook;
ngspice rl_event_hook had originally been defined of type void. The patch
redefines the return type to be int.
2018-12-31 12:02:52 +01:00
Holger Vogt
ff2304625f
allows to start ngspice WinGUI by double click on an input file, if
...
the file extension has been associated with ngspice.exe
2018-10-18 21:37:50 +02:00
Holger Vogt
2786fcb86e
New .option seed=[val|random]
2018-07-22 15:11:44 +02:00
Holger Vogt
7ca61b3c98
New command 'setseed' with function com_sseed
...
to set the random number generator
2018-07-22 15:06:19 +02:00
Holger Vogt
8fbcb16a57
add fourth parameter to cp_getvar(), in functions missing so far
2018-07-22 14:58:25 +02:00
Holger Vogt
09c876550f
prevent string overflow by adding the string length
...
to the cp_getvar parameters. Used only with CP_STRING
2018-07-22 14:57:49 +02:00
Holger Vogt
a98d01e5f8
Use only internal memory functions, replace
...
free->tfree, malloc->tmalloc, realloc->trealloc
2018-07-21 23:54:43 +02:00
Holger Vogt
0cb71b21bb
move ngspice_compat_mode(void) to inpcom.c and make it static
2018-05-21 01:09:13 +02:00
h_vogt
8762f6551d
main.c free argv after its use (Win GUI only)
2018-05-19 18:15:23 +02:00
Holger Vogt
8aff70036a
Put variable wantevtdata into the right place,
...
also available for standard executable, to be
modified in sharedspice.c only.
2018-05-19 16:52:08 +02:00
rlar
511cdd7188
struct card, #3/6, rename members from struct line to struct card
2018-02-17 19:15:53 +01:00
h_vogt
060e0037f8
main.c, add USERPROFILE to search path for .spiceinit
...
search sequence: current directory, HOME, USERPROFILE
2017-08-12 18:27:11 +02:00
h_vogt
bbd7edad72
xspice, two new commands, edisplay and eprvcd
...
'edisplay' will show a list of all event nodes
'eprvcd' will print all event nodes in vcd format
usage: eprvcd a0 a1 a2 b0 b1 b2 clk > myvcd.vcd
2016-08-15 19:24:11 +02:00
h_vogt
9f62057973
introduce include file "ngspice/randnumb.h"
2016-08-15 11:30:26 +02:00
rlar
5611ca4f10
harmonise all incarnations of `if_errstring()' to return malloced memory
2016-04-03 18:44:48 +02:00