Jim Monte
ad970ae4e7
Made cp_enqvar() mode modular by adding a separate function to handle the case of a vector. Lists are more efficiently handled by moving common comparisons out of the loop over elements. The first argument of cp_enqvar() is changed from char * to const char * since the name of the variable being found is not altered by the function.
2020-03-15 08:50:53 +01:00
Jim Monte
72801b1ab1
Fixed buffer resizing, made string utilities more modular, and added several new utilities, some which do not require a null termination, potentially avoiding the need to copy a string. Also some substring utilities using the Rabin-Karp algorithm were added.
2020-03-15 08:50:52 +01:00
Jim Monte
81fa829b7d
Fixed potential infinite loop (until memory is exhausted) and added several utility functions for processing strings.
2020-03-15 08:50:52 +01:00
Jim Monte
068df274bf
Made ft_numparse() thread-safe (no internal static variables) and prepared to support ngspice variable type CP_NUM.
2020-03-15 08:50:52 +01:00
Jim Monte
873e4a8db0
Added no_histsubst option and related fixes
2020-03-15 08:50:52 +01:00
Jim Monte
b7d8c61cd9
Cleaned up code to locate a vector in a plot by name. The code was made more modular, and special names like allv are handled more efficiently
2020-03-15 08:50:51 +01:00
Jim Monte
89efe5aeae
Dynamic string (dstring) rework
2020-03-15 08:50:51 +01:00
Holger Vogt
7983b0d16a
macOS: Do not use deprecated finite, but isfinite
2019-11-30 11:35:44 +01:00
Holger Vogt
afdd0fe85e
comments added
...
White spaces according to clang format
2019-09-14 11:24:05 +02:00
Holger Vogt
6669cbc17c
add function inp_rem_unused_models().
...
checking for unused models now also removes models
that are out of scope.
2019-09-14 11:23:24 +02:00
rlar
96bb0dd941
inpcom.c, introduce inp_add_levels(), add scope to decks
2019-09-14 11:22:24 +02:00
Jim Monte
8ed7080227
[PATCH #70 ] Made parameter const and reduced excess allocation.
2019-08-13 23:32:01 +02:00
Jim Monte
e208aab4cd
[PATCH #69 ] Changed vector type from to the enum assigned to it.
2019-08-13 23:31:37 +02:00
Jim Monte
73379f4146
[PATCH #66 ] Removed definition of macro MAXWORDS since it is unused.
2019-08-13 23:31:28 +02:00
Jim Monte
e92e2c7362
[PATCH #62 ] Fixed buffer overrun. Reworked to not use dstring for more
...
efficient parsing.
2019-08-13 23:30:31 +02:00
Jim Monte
1665b53b84
[PATCH #59 ] Made INP*Cat() functions more modular and efficient. Also
...
eliminated the possibility of a buffer overrun in INPstrCat() due to an error
in the calling funciton.
2019-08-13 23:29:41 +02:00
Jim Monte
1c5176282b
[PATCH #52 ] General cleanup of word list processing, such as adding
...
comments and const. Also added a new function wl_from_string() to convert a
single word into a word list. This function can be useful when calling a
function taking a single-word word list.
2019-08-13 23:28:49 +02:00
Jim Monte
10474a06a8
[PATCH #50 ] Ensured no buffer overrun for long namess and improved
...
efficiency of compare. Also made more modular.
2019-08-13 23:28:41 +02:00
Holger Vogt
9a9b7c68d0
unify the numerical constants
2019-08-13 23:28:05 +02:00
Holger Vogt
b9901a2569
[PATCH 47] Refactored ft_getnames() and used the new function in
...
com_let().
2019-08-13 23:27:49 +02:00
Jim Monte
b66412f517
[PATCH] Changed prototypes of some functions having parameters that
...
should not be changed to const and added assorted comments. Also two very
minor efficiency improvements.
2019-08-13 23:20:21 +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
61039c2736
add a new function gettok_model to consider {...} expressions
...
in VDMOS .model statements
2019-08-13 23:17:14 +02:00
Jim Monte
0ddd4a8456
Fixed excess buffer allocation and converted wordlist to string more efficiently
...
Signed-off-by: Holger Vogt <holger.vogt@uni-due.de>
2019-08-13 23:14:27 +02:00
Holger Vogt
40411197e0
add function get_plot(name) to return address of named plot
2019-03-21 20:17:21 +01:00
Holger Vogt
be6eca1dbb
add 'option norefvalue' to suppress printing the reference value.
2019-03-21 16:07:12 +01:00
Holger Vogt
56701e3d10
add rotation angle to text output, currently used only by postscript,
...
ignored by all others
2018-11-18 15:50:56 +01:00
h_vogt
87be5b9a41
Do not set Bit 8 in an ANSI char, when \ or ^ occured in a string. Thus the full ANSI set is now available in ngspice strings. The setting of Bit 8 was not exploitet anywhere, but did not allow using the characters from extended ANSI.
2018-11-18 15:49:31 +01:00
Holger Vogt
19380903cc
add missing evtshared.h to the distribution
2018-10-27 16:37:33 +02:00
Holger Vogt
25cdf95262
replace deprecated sys_errlist[errno] by call to strerror(errno)
2018-10-14 12:21:02 +02:00
Holger Vogt
3930e27501
New compatibility modes (set ngbehavior=??): PS LT LTPS PSA LTA LTPSA
...
PS: PSPICE comp. in .include files., LT: LTSPICE comp. in .include files.
LTPS: both, PSA: PSPICE comp. in complete input deck,
LTA and LTPSA: comp. in complete input deck for LT or both.
Add functions uplim, dnlim, uplim_tanh, dnlim_tanh.
Replace
D1 A K SDMOD
.MODEL SDMOD D (Roff=1000 Ron=0.7 Rrev=0.2 Vfwd=1 Vrev=10 Revepsilon=0.2 Epsilon=0.2 Ilimit=7 Revilimit=7)
by
ad1 a k asmod
.model asmod sidiode(Roff=1000 Ron=0.7 Rrev=0.2 Vfwd=1 Vrev=10 Revepsilon=0.2 Epsilon=0.2 Ilimit=7 Revilimit=7)
2018-10-13 18:19:58 +02:00
Holger Vogt
d636f7899b
cp_enqvar() returns freshly malloced variables as well
...
as variables owned by somebody else, e.g. from ft_curckt->ci_vars.
The new function parameter tbfreed notifies the caller if the
variable is malloced here and may be freed safely.
2018-10-13 18:19:31 +02:00
Holger Vogt
800c9711f2
add a flag 'type of the union' to safely free model->param[i]->element,
...
if it contain a malloced string
2018-08-28 21:29:05 +02:00
Holger Vogt
d3b7619754
add a flag timezero to trnoise_state
...
falg is true as long as time = 0. Allows
to detect the change from time == 0 to time > 0
only then the 1/f data may be created anew (e.g.
due to multiple 'run' commands
2018-08-22 22:36:35 +02:00
Holger Vogt
d1a8637a29
store deck for command mc_source for each circuit in ft_curckt->ci_mcdeck
...
remove this storage during remcirc
keep most recent deck in recent_deck
2018-08-18 11:26:42 +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
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
824ac4fbc9
make functions static or add function prototypes
2018-07-21 23:56:14 +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
417dbfef72
undo the previous commits dealing with snprintf,
...
use the C99 compliant function also with MS Visual Studio
2018-05-31 11:37:51 +02:00
Holger Vogt
7153891293
raise buffer size by 1 to retain previous resolution
2018-05-31 10:58:52 +02:00
h_vogt
1066bf0a7b
Store the numparam dicoS structure for each circuit in a list.
...
Functions to add, remove, retrive dicoS from the list
and to update dicoS, if the circuit has been changed.
Keeping dicoS is necessary because it may be used by measure.
This patch prevents (huge) memory leaks by overwriting
dicoS if multiple calls to the 'source' command are executed.
2018-05-19 17:45:45 +02:00
h_vogt
7198056a41
patch no. 16 by Thomy add a function cm_get_circuit to allow accessing the circuit structure ckt from within an XSPICE code model. This is a change to the interface and requires recopiling all code models!
2018-05-19 17:37:42 +02:00
h_vogt
11bafd70ea
update to callback functions SendEvtData, SendInitEvtData
2018-05-19 16:46:16 +02:00
h_vogt
c890435383
clarify pointers to data structures for event nodes
2018-05-19 16:44:57 +02:00
h_vogt
b5f31ec2b1
version conflict rersolved in sharedspice.c
2018-05-19 16:44:46 +02:00
h_vogt
e36b028cdb
add wantevtdata if event output should be sent to caller
2018-05-19 16:43:48 +02:00
h_vogt
b621875abf
sharedspice.h, .c, prepare adding callback functions: new ngSpice_Init_Evt() and function pointers
2018-05-19 16:43:19 +02:00
h_vogt
fc42cef878
New functions for XSPICE event node data exported from shared ngspice: ngGet_Evt_NodeInfo(char*) and ngSpice_AllEvtNodes(void)
2018-05-19 16:42:18 +02:00
rlar
1a39d3f59d
spicelib/parser, support instance parameter defaults on .model lines
2018-05-19 15:40:20 +02:00
h_vogt
d4adb027d2
avoid retrace in output graph by adding label 'noretraceplot'
...
to the plot command, that creates a lin plot trying to avoid retracing
2018-05-18 17:08:27 +02:00
Holger Vogt
c1a64d9f49
make inp_compat_mode glabal
2018-05-18 16:54:52 +02:00
h_vogt
5c3a6a3829
new command 'mc_source' to internally reload circuit
...
We store a copy of the whole deck in 'mc_deck'.
'mc_source' can be used to re-read this copy.
2018-05-15 22:45:29 +02:00
Holger Vogt
c0c3470dff
add the simple vdmos capacitance model instead of Meyer's model
2018-05-04 20:34:06 +02:00
rlar
45a70b3a53
rewrite, use enum instead of #define sequences
...
see branch "rewrite-defines2enum"
2018-04-30 19:23:18 +02:00
rlar
a729c2860c
sensitivity, drop redundant #defines SENS_LIN/OCT/DEC/DEFPERT
...
use SENS_LINEAR/OCTAVE/DECADE/DEFPERTUB instead
2018-04-15 15:05:02 +02:00
rlar
b803b294b4
frontend/parser/lexical.c, cp_lexer(), allow # and * comment
...
Both, whether interactive or not.
Especially for command scripts.
2018-02-26 19:41:04 +01:00
rlar
4ec2717079
struct card, #5/6, rewrite from type "card" to "struct card"
2018-02-17 19:15:53 +01:00
rlar
10a353ebf4
struct card, #4/6, drop typedef card
...
For readability and to allow variables to have the name "card"
(avoid name collision with typedef "card")
2018-02-17 19:15:53 +01:00
rlar
511cdd7188
struct card, #3/6, rename members from struct line to struct card
2018-02-17 19:15:53 +01:00
rlar
981fed70ca
struct card, #2/6, drop struct line
...
struct line is an overlay of struct card.
2018-02-17 19:15:53 +01:00
rlar
8d93511a96
struct card, #1/6, minor cleanup
2018-02-17 19:15:53 +01:00
rlar
41c0ee45a2
introduce GENinstanceFree() and GENmodelFree()
...
To abstract away the business of releasing the memory
of a struct GENmodel or struct GENinstance.
2018-02-17 11:53:07 +01:00
rlar
8c7d7051ae
GENmodel, GENinstance, change layout, #4/4, complete the change
...
currently each and every device specific instance and model structure
duplicates the memory layout of a struct GENmodel / GENinstance
further the first structure elements behind a GENinstance header
are reinterpreted as a sort of a generic "node" array.
This business is very error prone, and makes it difficult to
extend struct GENmodel / struct GENinstance.
This patch makes this business much more bearable.
2018-02-17 11:53:06 +01:00
rlar
2c9bfecbad
GENmodel, GENinstance, change layout, #3/4, coccinelle semantic patch
2018-02-17 11:53:05 +01:00
rlar
4748c92de9
DEVdestroy(), change API, #2/2, complete the change, inclusive CKTdestroy()
...
loop over DEVmodDelete() and DEVdelete() in CKTdestroy()
instead of doing this business in the DEVdestroy() functions.
As a consequence, most DEVdestroy() functions
collapse completely.
2018-02-17 11:52:59 +01:00
rlar
3cd81295a8
DEVmodDelete(), change API, #2/2, complete the change
...
Instead of searching and then deleting a given device-model,
just delete the given model.
The search shall be done somewhere else.
Don't free the model struct itself,
this shall be done by the invoker himself.
Don't free the device instrance list,
this shall be done by the invoker himself.
As a consequence, most DEVmodDelete() functions
collapse almost completely.
This change is of no consequence,
because DEVmodDelete() is currently nowhere used.
2018-02-17 11:52:53 +01:00
rlar
c3ed42f486
DEVdelete(), change API, #2/2, complete the change
...
Instead of searching and then deleting a given device-instance,
just delete the given instance.
The search shall be done somewhere else.
Don't free the instance struct itself,
this shall be done by the invoker.
As a consequence most DEVdelete() functions
collapse almost completely.
This change is of no consequence,
because DEVdelete() is currently nowhere used.
2018-02-17 11:52:46 +01:00
rlar
e311096429
gendef.h, get rid of awkward counted GENnode macros
2018-02-03 11:46:24 +01:00
rlar
018a2d0e2f
devices/*, unify, add missing instance struct member 'GENstate'
...
to the generic part of all instance structs, even when actually unused.
see GENstate in "gendefs.h"
2018-02-03 11:46:24 +01:00
Holger Vogt
560cb6e970
plotting/grid.c, bug fix, avoid string buffer overflow
...
Prevent a crash of example/FFT_test.cir.
Buffer 'buf' in function drawlingrid() has been too small.
Increase 'buf' size, and add some protection.
The example file examples/plot/test-small-plot.cir
shows the limits of plotting:
difference in two numbers at digit 14 is plotted well.
at digit 15 is plotted with bugs.
at digit 16 is reduced to integer.
consider compiling with
-O1 -D_FORTIFY_SOURCE=2
for gcc, and
/GS
for visual studio.
2018-01-27 21:58:15 +01:00
rlar
c900cc8824
drop ngspice internal implementation of erfc()
...
which these days is guaranteed to be provided by <math.h>
note,
our own implementation was incorrect anyway.
it evaluated to
erfc_ngspice(x) = erfc(fabs(x))
2017-10-28 12:38:32 +02:00
dwarning
a1d27b4257
dio, introduce qd as an alias for diode charge to get the right unit in plotting
2017-08-03 17:03:10 +02:00
rlar
a7cc37b2e2
ifparm, fix numdev too
2017-04-19 19:18:13 +02:00
h_vogt
c82ee9d949
introduce option "epsmin"
...
To define a minimum argument for some log() function invocations.
(most notably for the diode saturation current 'is')
2017-04-19 18:56:00 +02:00
rlar
2f329bd8b4
N_MXVLNTH, drop noise variable name limitation
2017-04-15 17:21:24 +02:00
rlar
7afb798a6f
check for illegal DEVsetup() DEVunsetup() patterns.
...
Consider the following silent contracts:
1)
CKTsetup() invocations must be separated by a CKTunsetup() invocation
But CKTsetup() has an internal flag,
which will prevent re-invocation of DEVsetup()
But DEVsetup() will be called during sensitivity analysis,
bypassing this precaution. It is fatal if this will
cause another node allocation (CKTmk..()).
This commit tries to detect such cases.
(Note: many DEVsetup routines (all ?) have their CKTmk..() invocations
guarded to avoid reallocation of local nodes,
see commit f7f454c0a1
bug fix, fix the guard for device generated internal nodes (via CKTmkVolt())
)
FIXME:
DEVsetup() is seriously obfuscated by these guards.
If would be far better, if the sensitivity analysis
wouldn't sidestep into DEVsetup()
consider a device local variant of the CKTisSetup flag
2)
DEVunsetup() must delete all, each and every,
local allocated node in DEVsetup()
Otherwise CKTmk..() invocations in a following CKTsetup() will
return duplicate node numbers, effectively shorting device nodes.
This commit tries to detect incomplete CKTdltNNum() invocations.
3)
DEVunsetup() must not delete a netlist node.
This can easily happen in those devices which have optional ports,
which have code in DEVsetup() which copies node numbers to
local node variables.
This commit tries to detect such errors.
2017-04-12 21:32:51 +02:00
rlar
58874cc65e
xspice, implement "CALLBACK"
...
Allow to register a callback function in the cfunc.mod files,
which will be invoked in MIFdestroy.
Usefull to "free" memory which has been allocated locally in a cfunc.mod file.
2017-04-12 20:02:35 +02:00
rlar
d32a32bdc8
ifparm, #14/16, res.c, missing IF_ORQUERY|IF_REDUNDANT, introduce IOPQOR
2017-04-09 15:29:42 +02:00
rlar
cefb65507f
ifparm, #13/16, res.c, missing IF_SETQUERY in an alias entry, introduce IOPQR
2017-04-09 15:29:41 +02:00
rlar
8d3acddc7b
ifparm, #12/16, res.c, missing IF_PRINCIPAL in an alias entry, introduce IOPPR
2017-04-09 15:29:40 +02:00
rlar
614eebe944
ifparm, #11/16, res.c, missing IF_CHKQUERY for some alias entries, introduce IOPZR
2017-04-09 15:29:40 +02:00
rlar
102a6b7c77
ifparm, #7/16, missing IF_UNINTERESTING for some aliases, introduce IOPUR
2017-04-09 15:29:36 +02:00
rlar
4fc33eb656
ifparm, #6/16, missing IF_NONSENSE for some aliases, introduce IOPXR
2017-04-09 15:29:35 +02:00
rlar
b56c2a2504
ifparm, #5/16, missing IF_AC for some aliases, introduce IOPAR
2017-04-09 15:29:34 +02:00
rlar
eac26d741c
ifparm, #4/16, missing IF_REDUNDANT for some aliases, introduce IOPAPR
2017-04-09 15:29:33 +02:00
rlar
511389ad10
inpcom.c, introduce find_back_assignment()
2017-04-09 14:14:06 +02:00
rlar
5238f0b1cb
inpcom.c, find_assignment(), const'ify and declare extern
2017-04-09 14:12:22 +02:00
rlar
2809ccaa13
shrink scope of expr_w_temper
2017-04-09 14:06:27 +02:00
rlar
e35429a222
inpcom.c, introduce rem_tlist()
2017-04-09 14:03:11 +02:00
rlar
c600312d01
deploy devtlist/modtlist in struct circ
2017-04-09 13:59:53 +02:00
rlar
f2f2b3b09a
inp_evaluate_temper(), add struct circ argument
2017-04-09 13:49:43 +02:00
rlar
ab409ad62e
protect vec_free() and free_pnode() macro for use in non braced blocks
...
if ()
vec_free()
2017-03-25 19:54:40 +01:00
rlar
c7811a76df
ngspice/fteext.h, whitespace and spelling
2017-03-25 19:41:32 +01:00
rlar
cc15853b4f
ngspice/ftedefs.h, whitespace and spelling
2017-03-25 19:11:33 +01:00
h_vogt
d84387d449
CIDER, use controlled_exit(1) instead of exit(1)
2017-03-25 18:44:00 +01:00
rlar
33788f7052
remove excessive inp_evaluate_temper() prototypes
2017-03-22 21:47:43 +01:00
rlar
bd50814677
drop 'depreciated_skip..()'
2017-03-19 20:13:11 +01:00
rlar
7a42510cc0
const'ify some 'skip'ing functions
2017-03-19 20:12:25 +01:00
rlar
45ad60b738
rename gettok_nc() --> nexttok(), and functionalize it
2017-03-19 20:11:01 +01:00
Francesco Lannutti
43f24d6f22
rewrite cktsens.c in terms of the 'SMP' matrix interface
2017-03-17 18:22:36 +01:00
rlar
fb4f462388
SMPnewMatrix(), add 'size' to the function arguments
2017-03-17 18:12:48 +01:00
rlar
c3a92e2bb3
xspice, cleanup, move typedef over to the other ones
2017-03-12 12:18:09 +01:00
rlar
239780ebef
cleanup, use an array for struct GENinstance.GENnode
2017-03-04 16:04:32 +01:00
h_vogt
78ea2e1523
winmain.c, remove of fcn 'read' in Windows
2017-02-22 19:36:34 +01:00
rlar
2bafe98f17
winmain.c, etc, cleanup
2017-02-22 18:50:40 +01:00
rlar
90a205d36d
winmain.c, etc, whitespace cleanup
2017-02-22 18:50:03 +01:00
rlar
3a9ace82bb
winmain.c, etc, cleanup, rewrite obfuscated symbols
...
substitute in the whole source code:
"__stream" --> "stream"
"__pos" --> "pos"
"__s" --> "s"
"__n" --> "n"
"__c" --> "c"
"__format" --> "format"
"__ptr" --> "ptr"
"__size" --> "size"
"__path" --> "path"
"__mode" --> "mode"
"__offset" --> "offset"
"__whence" --> "whence"
"__arglist" --> "arglist"
"__buf" --> "buf"
"__fp" --> "fp"
"f_c_l_o_s_e" --> "win_x_fclose"
"f_e_o_f" --> "win_x_feof"
"f_e_r_r_o_r" --> "win_x_ferror"
"f_f_l_u_s_h" --> "win_x_fflush"
"fg_e_t_c" --> "win_x_fgetc"
"f_g_e_t_p_o_s" --> "win_x_fgetpos"
"fg_e_t_s" --> "win_x_fgets"
"fp_r_i_n_t_f" --> "win_x_fprintf"
"fp_u_t_c" --> "win_x_fputc"
"fp_u_t_char" --> "win_x_fputchar"
"fp_u_t_s" --> "win_x_fputs"
"f_r_e_a_d" --> "win_x_fread"
"f_r_e_o_p_e_n" --> "win_x_freopen"
"fs_c_a_n_f" --> "win_x_fscanf"
"f_s_e_e_k" --> "win_x_fseek"
"f_s_e_t_p_o_s" --> "win_x_fsetpos"
"f_t_e_l_l" --> "win_x_ftell"
"f_w_r_i_t_e" --> "win_x_fwrite"
"g_e_t_c" --> "win_x_getc"
"g_e_t_char" --> "win_x_getchar"
"g_e_t_s" --> "win_x_gets"
"p_e_r_r_o_r" --> "win_x_perror"
"p_r_i_n_t_f" --> "win_x_printf"
"p_u_t_c" --> "win_x_putc"
"p_u_t_char" --> "win_x_putchar"
"p_u_t_s" --> "win_x_puts"
"r_e_a_d" --> "win_x_read"
"s_c_a_n_f" --> "win_x_scanf"
"ung_e_t_c" --> "win_x_ungetc"
"vfp_r_i_n_t_f" --> "win_x_vfprintf"
"vfs_c_a_n_f" --> "win_x_vfscanf"
"vp_r_i_n_t_f" --> "win_x_vprintf"
"vs_c_a_n_f" --> "win_x_vscanf"
2017-02-10 19:50:42 +01:00
rlar
93d040703d
winmain.c, drop artefact "fgetchar", cleanup/emphasise disabled "freopen"
2017-02-10 18:44:44 +01:00
rlar
b5ccfca24b
implement option 'indverbosity' to control check of inductive systems
...
default is 2, maximum verbosity
option indverbosity=1
can be used to prevent check for
"incomplete set of couplings"
option indverbosity=0
can be used to avoid the check altogether
set indverbosity=INTEGER
or
.option indverbosity=INTEGER
works as well
2017-01-02 20:03:25 +01:00
rlar
97cdaae19f
variables, cp_usrvars(), be more explicit
...
lift uv2 return value up to the invoker of cp_usrvars()
2016-10-15 15:57:26 +02:00
rlar
ac336c9920
options.c, cleanup inp_getoptsc()
2016-10-15 15:06:20 +02:00
h_vogt
6a0a6071a0
gettok_nc(&line): like gettok(), move pointer beyond next token in line, but without returning a string, without TMALLOC. Replaces constructs like tfree(gettok(&line)).
2016-10-15 15:06:20 +02:00
rlar
b4119b94e3
xspice, cm.h, swallow warnings
2016-10-15 15:06:18 +02:00
rlar
9c2733db48
macros.h, cleanup SGN() macro
2016-10-15 15:06:18 +02:00
rlar
4c2e4d0c2f
drop SIGN(), SIGN(1.0,x) --> SGN(x)
2016-10-15 15:06:18 +02:00
rlar
ea5ad6b0e7
drop DC_ABS() and FTEcabs()
2016-10-15 15:06:18 +02:00
rlar
15f2c67968
use M_PI
2016-10-15 15:06:17 +02:00
rlar
9dcf62e1cd
drop home grown mathematical constants
2016-10-15 15:06:17 +02:00
rlar
cbf31c50c2
multi_line.h, drop some excess macros
2016-10-15 15:06:17 +02:00
h_vogt
ae80067fef
cmath2.c, new function stddev to calculate the standard deviation of all elements of a vector
2016-10-15 15:06:17 +02:00
h_vogt
0d50547ac1
commands.c: allow 10000 tokens for 'echo' and 'wrdata'
2016-10-15 15:06:16 +02:00
rlar
0d1b4d54c0
**/Makefile.am, fix "make dist"
2016-10-15 15:06:16 +02:00
rlar
ceed247131
src/Makefile.am, bug #327 , "fix install path for include files"
...
install in $includedir/ngspice
which is by default $prefix/include/ngspice
Thanks to Maciej Suminski who reported the issue in
#327 Header files are installed in /usr/share/ngspice/include/ngspice
https://sourceforge.net/p/ngspice/bugs/327/
2016-10-15 15:06:16 +02:00
rlar
b302dbe975
inp.c, cleanup using new function `line_nconc()'
2016-10-15 15:06:16 +02:00
h_vogt
c28c5d307a
inp.c, remove bug with handling of options: options stemming from a command file are kept, options from sourced circuit are removed with ckt
2016-10-15 15:06:03 +02:00
rlar
00e571dc00
frontend/inpcom.c, declare search_identifier() non static
2016-10-15 12:58:56 +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
c4cd2270ed
com_history.c, static declaration for 'cp_hprint()'
2016-08-15 11:27:15 +02:00
rlar
6156ebd930
fteext.h, remove prototype for nonexistant 'zigset()'
2016-08-15 11:27:03 +02:00
rlar
d298d5cc2f
use memset() instead of deprecated bzero()
2016-07-30 20:58:33 +02:00
rlar
141ed61ec8
use memcpy() instead of deprecated bcopy()
2016-07-30 20:58:19 +02:00
rlar
994bec7859
declare free() / realloc() arguments `const void *'
...
to avoid extra casting when freeing `const' strings
2016-07-17 11:19:34 +02:00
h_vogt
f66e76fb5f
implement option 'xmu' to control trapezoidal integration method
...
default is 0.5
option xmu=0.49
can be used to add some damping to reduce trap ringing
set xmu=0.49
or
.option xmu=0.49
works as well
2016-07-16 15:21:27 +02:00
rlar
4c60783e4d
xspice, implement EVTdest() to fix xspice memory leaks
2016-05-07 15:50:34 +02:00
rlar
af93d79675
ngspice/mifparse.h, ngspice/mifcmdat.t, reduce scope of these include files
2016-05-07 15:44:50 +02:00
rlar
97cc400efb
ngspice/evt.h, ngspice/enh.t, reduce scope of these include files
2016-05-07 15:36:43 +02:00
rlar
cff23b8d38
fix commit "ngspice.h, cm.h, cleanup NAN defines"
2016-04-02 18:01:17 +02:00
rlar
5299f8cdb6
ngspice.h, cm.h, cleanup NAN defines
2016-04-01 18:03:38 +02:00
rlar
f3e61b838e
frontend/inpcom.c, use "stringskip.h"
2016-03-22 15:26:21 +01:00
rlar
b1d8b99018
skip-ws, #6/6, rename to match inpcom.c
2016-03-22 15:26:10 +01:00
rlar
22875d056b
skip-ws, #5/6, use functional style
2016-03-22 15:26:09 +01:00
rlar
d12679fccd
skip-ws, #4/6, drop `TEMPORARY_SKIP_WS_X0'
...
use TEMPORARY_SKIP_WS_X1 instead of TEMPORARY_SKIP_WS_X0
2016-03-22 15:26:08 +01:00
rlar
6d1171ad6f
skip-ws, #2/6, introduce "ngspice/stringskip.h"
...
with some temporary macros to skip whitespace
2016-03-22 15:26:05 +01:00
rlar
b36385e333
improve `SWAP' macro
2016-03-22 13:03:59 +01:00
rlar
273be42cfd
improve `ABORT' macro
2016-03-21 21:22:26 +01:00
rlar
6342bec8ec
everywhere, drop `MALLOC()' and `REALLOC()'
2016-03-21 21:22:15 +01:00
rlar
4c1c95e20f
everywhere, use `TMALLOC()' instead of `alloc()'
2016-03-21 21:22:07 +01:00
h_vogt
7d8e287fa3
enable backquote substitution for Visual Studio console apps
2016-03-09 20:24:37 +01:00
h_vogt
25264b3980
memory.h: hrealloc not used anywhere
2016-03-09 20:24:37 +01:00
rlar
d0c5a495ca
ngspice.h, cm.h, cmpp.h, introduce char variants of the <ctype.h> family
2016-03-09 20:24:36 +01:00
rlar
07aba2e2ae
frontend/variable.c, used `isalnum()' instead of homegrown `isalphanum()'
2016-03-09 20:24:36 +01:00
h_vogt
356a262f7f
cktdefs.h, some parameter descriptions added
2016-01-22 22:41:30 +01:00
rlar
885e7df8a5
xspice, introduce cm_message_printf()
2016-01-07 16:55:09 +01:00
Krzysztof Blaszkowski
03b47b3e34
src/frontend/outif.c, plotAddRealValue() etc, rallocate more coarsely
...
reallocate in chunks, instead of once per time step.
2016-01-07 09:05:00 +01:00
rlar
df70661c3a
dvec abstraction, #11/11, introduce `dvec_realloc()'
2015-12-28 20:34:42 +01:00
rlar
c2a7821449
dvec abstraction, #10/11, introduce `dvec_trunc()'
2015-12-28 20:34:42 +01:00
rlar
3962453739
dvec abstraction, #9/11, introduce `dvec_free()'
2015-12-28 20:34:42 +01:00
rlar
8243696338
dvec abstraction, #8/11, upgrade `dvec_alloc()'
2015-12-28 20:34:42 +01:00
rlar
9d99a06bcd
dvec abstraction, #2/11, introduce `dvec_alloc()'
2015-12-28 20:34:42 +01:00
Krzysztof Blaszkowski
0bfee6575b
ngspice/dvec.h, struct member `v_rlength', improve comment
2015-12-27 12:58:52 +01:00
h_vogt
a18ac9c474
include/ngspice/cm.h, xspice, introduce NAN for visual studio
2015-12-23 14:04:23 +01:00
rlar
d37f18d777
misc/string.c, sprinkle some const'ness
2015-12-22 16:47:42 +01:00
rlar
9473ec575f
drop some remaining `NEW*' macros, use TMALLOC instead
2015-12-19 19:39:29 +01:00
rlar
9546b178fb
drop macro `NEW', use TMALLOC instead
2015-12-19 19:38:55 +01:00
h_vogt
0b92d8cfe1
src/sharedspice.c, add vfprintf to interface for transferring messages
2015-12-15 22:16:47 +01:00
rlar
18426c755d
harmonise `struct circ' variables, `ckt' --> `ci'
2015-12-15 18:36:59 +01:00
rlar
f826ff82f8
introduce `ATTRIBUTE_NORETURN' for `controlled_exit()' and `sp_shutdown()'
2015-12-15 18:10:18 +01:00
h_vogt
df846346a1
visualc, cope with `bool' and `isnan()' in visual studio 2015
...
now they have isnan(),
(presumably in math.h)
now they have a C99 `bool',
(maybe even though not asked for with <stdbool.h>)
2015-11-15 15:09:27 +01:00
rlar
29dde7206a
frontend/parse.c, introduce `alloc_pnode()'
2015-11-12 18:32:39 +01:00
rlar
e609c7411d
src/frontend/vectors.c, abstraction, introduce `vec_iszero()'
2015-05-02 12:27:35 +02:00
rlar
8be0829b9b
frontend/breakp.c, bug fix, "#306 Deleting breakpoint causes Internal Error in status"
...
The "delete" command destroyed the whole list of stored breakpoints
instead of just the specified one.
Thanks to "jpcgt", who reported this in
"#306 Deleting breakpoint causes Internal Error in status"
http://sourceforge.net/p/ngspice/bugs/306/
2015-04-16 19:58:58 +02:00
rlar
232debc6ec
drop `NEWN', use `TMALLOC'
2015-04-12 20:10:07 +02:00
rlar
be283109dc
numconst.h, fix pi
2015-03-28 12:57:03 +01:00
rlar
7d92eae124
noisean, introduce a .control variable "sqrnoise" to deliver noise data in squared representation
...
use "set srqrnoise" (and "unset sqrnoise") to control this.
2015-03-23 19:32:33 +01:00
rlar
8d6726f0f4
noisean, deliver results in V/sqrt(Hz) and A/sqrt(Hz)
2015-03-22 21:44:50 +01:00
rlar
bcda90e258
src/frontend, cleanup, drop `GENcircuit'
2015-03-21 13:56:57 +01:00
rlar
07ee771a96
noise analysis, bug fix, override ac magnitude of all vsrc/isrc devices
...
Bug report due to Hartmut Henkel in
>> [Ngspice-users] Noise analysis depends on ac parameter
The noise analysis internally depends on an ac analysis
to derive "inoise" from "onoise"
("onoise" is multiplied with the inverse ac gain from input to output)
This AC analysis used all the given ac magnitudes for all vsrc/isrc
devices in the deck.
This fix overrides all ac magnitudes with zero,
except for the given input device,
whose magnitude is set to one.
2015-03-09 20:02:36 +01:00
rlar
73d581f9a6
graph.h, struct graph, remove unused elements
2015-03-08 19:38:33 +01:00
rlar
2b3220086d
graph.h, grid.c, enforce consistent string buffer size (plot "units", LABEL_CHARS)
2015-03-08 19:36:46 +01:00
rlar
c5e0bcde04
cleanup using `hypot()'
2014-12-06 20:41:11 +01:00
rlar
e08dcafbe9
cleanup, signature of CKTacDump() and CKTdump(), void* --> runDesc*
2014-10-12 22:07:28 +02:00
rlar
c6a8429258
src/maths/cmaths, implement `nint()' (.control language)
2014-09-20 17:15:10 +02:00
rlar
9e72296e40
src/spicelib/parse, implement `nint()' (`B' language)
2014-09-20 17:15:09 +02:00
rlar
99eade8ec9
cleanup, rename cx_ln --> cx_log (.control language)
2014-09-12 19:09:52 +02:00
rlar
c926f46986
cleanup, rename rename cx_log --> cx_log10 (.control language)
2014-09-12 19:09:42 +02:00
rlar
bdf70bd2b0
cleanup, rename PTln --> PTlog, PTF_LN --> PTF_LOG (`B' language)
2014-09-12 19:09:30 +02:00
rlar
93a212ca3c
cleanup, rename PTlog --> PTlog10, PTF_LOG --> PTF_LOG10 (`B' language)
2014-09-12 19:05:56 +02:00
rlar
f5d05af51d
inpgmod.c, INPgetModBin(), use model_name_match()
2014-08-09 18:17:51 +02:00
rlar
b663731379
rewrite model_bin_match(), rename --> model_name_match()
2014-08-09 18:17:34 +02:00
rlar
aa7a7606c7
avoid multiple declarations of controlled_exit(), add 'noreturn' attribute
2014-05-14 21:36:18 +02:00
rlar
80dd41451f
introduce tvprintf()
2014-04-12 21:01:36 +02:00
rlar
03f0ef778f
bug fix, need va_copy() when reusing a va_list
2014-04-12 20:37:36 +02:00
rlar
a4780f8e34
string.c, introduce tprintf()
2014-04-05 18:44:27 +02:00
rlar
ea7372efe7
rewrite, useing IFerrorf()
...
OUTerror() and IFerror() are no more used,
but kept for compatibility
2014-04-04 21:22:48 +02:00
rlar
f26c1b71f9
introduce OUTerrorf() and IFerrorf()
...
a varargs variant of the older variants OUTerror() and IFerror()
2014-04-04 21:22:47 +02:00
Henrik Forsten
3794c1eb20
mark end of struct GENmodel overlay
2014-01-19 17:38:32 +01:00
h_vogt
0a17d46509
new callback function cm_get_path, which makes the global
...
ngspice variable Infile_Path available to XSPICE code models
2014-01-18 19:14:42 +01:00
h_vogt
1f5de32512
global variable Infile_Path, which contains the
...
input netlist file path
2014-01-18 19:10:29 +01:00