Holger Vogt
a9f83f3445
remove two small memory leaks
6 years ago
Holger Vogt
7ae76f0f51
update to the .measure and meas error messages:
remove crash uipon buggy inputs
add buggy example input file
unify fcn returns: 0 is OK, 1 is bad
Improve on error message for bad syntax
6 years ago
Holger Vogt
85e0a08cff
error message even if pNAME is not defined
6 years ago
Holger Vogt
94d5ad312e
Improve error messages for the 'meas' command.
6 years ago
Jim Monte
068df274bf
Made ft_numparse() thread-safe (no internal static variables) and prepared to support ngspice variable type CP_NUM.
6 years ago
Jim Monte
f086fd3bef
[PATCH #61 ] Removed unnecessary check for null pointer. There would have
been several access violations before the check if it were invalid.
7 years ago
h_vogt
b0da1f2a0f
com_measure2.c, write a fft vector (sp plot) with complex data
and real frequency to file and load it again, frequency now has become
a complex number as well. This was not recognized, thus ngspice crashed
(see https://sourceforge.net/p/ngspice/discussion/127605/thread/8cccd69c/
by Michal Janik - 2014-11-04
9 years ago
dwarning
5380c3f4da
prevent a small memory leak
8 years ago
rlar
dc6e1cb064
use strchr() instead of strstr()
9 years ago
rlar
40a0cea0d2
swap some `SWAP' arguments for readability
10 years ago
rlar
bd0bc3038b
use `SWAP' macro
10 years ago
Marcel Hendrix
f9432cb3da
frontend/com_measure2.c, bug fix for "meas AVG"
meas "AVG" did merely the average of the given values,
without consideration of their spacing on the "scale" axis.
now use trapezoidal summing to calculate the AVG
note, there is "meas INTEG"
which goes beyond trapezoidal summing
11 years ago
rlar
64da5a99bf
src/frontend/com_measure2.c, cleanup, rewrite `correct_vec()'
11 years ago
rlar
27aae75ade
src/frontend/com_measure2.c, bug fix, typo when setting `m_vectype2'
this doesn't change anything, because m_vectype2 is nowhere used.
11 years ago
rlar
c5e0bcde04
cleanup using `hypot()'
11 years ago
rlar
6050e2e0ea
cleanup some extra parentheses
13 years ago
h_vogt
8f44839f3e
com_measure.c, measure.c: remove memory leaks
13 years ago
rlar
11579d9369
cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones)
14 years ago
rlar
fe1acd3757
src/frontend/** remove superfluous `return' invocations
14 years ago
rlar
ab98f03622
src/frontend/** whitespace, indentation, ...
checked for object file invariance on linux
14 years ago
rlar
7454a6d486
src/frontend/**, whitespace, indentation, ...
untabify
delete-trailing-whitespace
braces
...
checked for object file invariance on linux
14 years ago
h_vogt
11ae043c3d
com_measure2.c: enable 'meas dc' without 'from' and 'to' given
measure.c: no error printout during autostop
14 years ago
h_vogt
d1d2ff94e4
measure, error message updated and return(NAN) in case of measure failure
test for failure with isnan()
14 years ago
h_vogt
14914025c0
measure_at(), allow real valued data for meas ac
14 years ago
rlar
d8105873db
remove error.h, use fteext.h for controlled_exit()
14 years ago
rlar
a1ea1b3193
round to next nearest integer for the rise, fall and cross arguments of `measure'
Simon Guan reported
Bug item #3509528 , `Meas goes wrong when put in a while loop'
In a .control block a `let' variable was passed to the `measure' command.
The value of this variable would have been a plain integer,
yet it was converted internally to an internal ascii representation
with exponential representation (203 ==> 2.03e2)
and then processed by `ft_numparse()' where it was converted back to
double floating point.
Because the intermediate 2.03 has
no exact representation in the space of double floating point numbers
this conversion was lossy and resulted in a non-integer value.
This non-integer was then truncated towards minus infinity in com_measure
yielding an error of -1
This commit implements round to nearest in com_measure2
to avoid the problem.
FIXME,
the internal intermediate conversion of double floating point machine
values to ascii representations must be dropped,
or replaced with an exact/lossless ascii representation.
(for example GNU printf/scanf %a or 64bit hexadecimal representation)
14 years ago
rlar
4ca58067a2
#2/6 config.h --> ngspice/config.h, #include's
14 years ago
rlar
0b5042e7da
remove CVS `Id',`log' etc. keyword incantations
14 years ago
rlar
10346e055c
#1/4 #include <ngspice/...> --> #include "ngspice/..."
15 years ago
h_vogt
893fbe1264
warning 'real ac' removed
15 years ago
rlar
d26015586c
#1/7 use a subdirectory "ngspice" for includes to create a uniq namespace
15 years ago
rlar
7dfe20bb21
surpress warnings, disable currently unused functions
15 years ago
rlar
6ab91f2e9f
com_measure2.c, uninitialized variable warning
15 years ago
rlar
b778c50bd6
code cleanup, some warnings, some casts, ...
15 years ago
h_vogt
ebda0af288
update FIND ... WHEN measurements
15 years ago
h_vogt
8b4edf1a0c
fix bug. no 3165634
15 years ago
rlar
05441d5823
Nr 5/5 (x = ...) == NULL , swallow warnings
16 years ago
rlar
e6c30efe46
Nr 4/5 (x = ...) != NULL , swallow warnings
16 years ago
rlar
abb87a6115
rename `IGNORE()' --> `NG_IGNORE()'
16 years ago
rlar
80286e0032
pour `IGNORE()' all over the source
16 years ago
rlar
b4ffca60c4
(int) casts for some `strlen()' expressions
16 years ago
rlar
7b3960506f
wrap tmalloc MALLOC etc, into two macros TMALLOC and TREALLOC
16 years ago
rlar
196262dd1b
move the com_*() prototypes around.
16 years ago
rlar
3c3b31fa60
declare some functions `static'
16 years ago
h_vogt
590bf0a677
meas ac: remove seg fault
16 years ago
h_vogt
4f45e4aa7f
remove seg fault
16 years ago
dwarning
586acbe45c
fallback for not handled enumeration values in switch
16 years ago
h_vogt
e07486df2a
patch B. Swartz 2010-07-04
16 years ago
h_vogt
fe2d079b31
par('expression')
16 years ago
rlar
c178bdb059
cosmetical changes
16 years ago