rlar
aa5afccf15
INPparseNumMod(), #12/14, use 'info' instead of 'lastType'
...
to signify having read a cardName
2016-07-17 18:26:41 +02:00
rlar
c4d39d66de
INPparseNumMod(), #11/14, remove unused 'cardType'
2016-07-17 18:26:27 +02:00
rlar
521fd16c11
INPparseNumMod(), #10/14, don't fall through into the 'default:'
...
instead, duplicate the code of the 'default:' and break
2016-07-17 18:26:21 +02:00
rlar
6b305744d9
INPparseNumMod(), #9/14, invert the 'if' statement
2016-07-17 18:26:16 +02:00
rlar
1483e2df9a
INPparseNumMod(), #8/14, move the 'default:' body out of the 'switch'
...
this body is inevitable, as there is no other break out of the 'switch'
2016-07-17 18:25:44 +02:00
rlar
1a9bcf6b33
INPparseNumMod(), #7/14, use 'lastType' instead of the identical 'cardType'
...
there is no further access to cardType
thus can drop the reduntandant assignments to cardType
2016-07-17 18:25:41 +02:00
rlar
110f16b361
INPparseNumMod(), #6/14, again, assign 'lastType' sooner
...
in the block in-between those two positions
there is no access to lastType
there is no 'continue'
there is no 'break' out of the enclosing switch
thus the assignment is inevitable
there is one position where cardType is modified,
need to assign to lastType there too to keep it in sync
2016-07-17 18:25:29 +02:00
rlar
18d6679c02
INPparseNumMod(), #5/14, use 'lastType' instead of the identical 'cardType'
2016-07-17 18:25:26 +02:00
rlar
11f3907139
INPparseNumMod(), #4/14, assign 'lastType' sooner
...
in the block in-between those two positions
there is no access to lastType or cardType
there is no 'continue'
there is no 'break' out of the enclosing 'switch'
thus the assignment is inevitable
2016-07-17 18:25:20 +02:00
rlar
7862a4f59f
INPparseNumMod(), #3/14, `continue' the loop instead of
...
'break'ing out of the `switch'
this is equivalent because the 'switch' is the last statement in the loop body
2016-07-17 18:24:35 +02:00
rlar
c1c7b5305e
INPparseNumMod(), #2/14, transform the `while' loop into a `for' loop
...
there was no 'continue' for this loop
there was no 'break' out of this loop
there was no assignment to txtCard, thus txtCard can't be NULL
2016-07-17 18:24:30 +02:00
rlar
e824cbd193
INPparseNumMod(), #1/14, return sooner
...
setting txtCard to 0 and cardType to E_MISSING (which is < 0)
caused the following `if (cardType >= 0)' to be skipped
and then broke out of the enclosing 'while' loop
in this case, there where no other statements executed
2016-07-17 18:24:20 +02:00
h_vogt
77380219d8
breakp2.c, prevent crash in `save' command if no circuit is loaded
2016-07-17 18:12:53 +02:00
rlar
34f8841805
cpl/cplsetup.c, cleanup
2016-07-17 11:49:42 +02:00
h_vogt
7ea4e99842
numparam/general.h, remove redundant memory management functions
2016-07-17 11:45:22 +02:00
rlar
a6f530b95c
USE_OMP, cleanup initialisation of local variable `model'
2016-07-17 11:36:47 +02:00
rlar
5b2fa579f1
USE_OMP, rename variables, `good' --> `error'
...
to express the actual meaning of these variables
2016-07-17 11:35:58 +02:00
rlar
fddbb7d9eb
USE_OMP, fix type of local variables `idx' and `InstCount'
2016-07-17 11:32:56 +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
6a7895fbc1
frontend/options.c, fix memory leak (pl_name, pl_title, pl_date)
2016-07-17 11:12:24 +02:00
rlar
1c565a1a89
frontend/rawfile.c, raw_write(), fix memory ownership for pl_title and pl_date
...
avoid assigning cloned strings
to pl_date/pl_title fields of multiple plots
avoid excess allocation
2016-07-17 11:12:22 +02:00
h_vogt
236b99f2b1
cktdest.c, xspice, set g_mif_info.ckt = NULL
...
when destroying/remcirc'ing a circuit
to avoid a crash in EVTfindvec()
which might try to access fields in the destroyed CKTcircuit
( excercise: tran, remcirc, load rawfile, plot something_nonexistant )
2016-07-17 10:57:49 +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
Francesco Lannutti
ef0dcfe5f2
avoid bison dependency `version >= 2.7'
2016-07-09 20:58:17 +02:00
Francesco Lannutti
99a20162d5
bsimsoi/b4soiset.c, bug fix, don't allocate `B4SOIEbPtr' twice
2016-06-14 19:38:43 +02:00
h_vogt
b14e7cb040
sharedspice.c, remove meory leaks
2016-05-28 16:52:50 +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
h_vogt
efcd8584f1
error.c, ft_sperror(), memory leak, free memory returned by `if_errstring()'
2016-04-03 18:50:28 +02:00
rlar
5611ca4f10
harmonise all incarnations of `if_errstring()' to return malloced memory
2016-04-03 18:44:48 +02:00
h_vogt
50bd157349
parser/inppas3.c, fix memory leak
2016-04-03 11:26:41 +02:00
h_vogt
ffee2a6b5f
parser/inppas3.c, fix memory ownership
...
`INPgetTok()' creates `nodename' which is then committed to `INPtermInsert()'
2016-04-03 11:26:40 +02:00
rlar
ddf01dbe3f
parser/inppas3.c, shrink scope of local variable `name'
2016-04-03 11:26:38 +02:00
rlar
cff23b8d38
fix commit "ngspice.h, cm.h, cleanup NAN defines"
2016-04-02 18:01:17 +02:00
rlar
d58fd306f3
input.c, inchar(), cleanup
2016-04-01 20:05:37 +02:00
rlar
1aab43dd1a
xspice/cmpp/*.l, flex file cleanup and use %option noinput, nounput
2016-04-01 19:36:51 +02:00
h_vogt
9154ab103a
inp2dot.c, dot_tran(), fix a memory leak
2016-04-01 19:36:36 +02:00
h_vogt
0443a2690c
glob.c, brac1(), fix a memory leak
2016-04-01 18:25:10 +02:00
h_vogt
841f2846fe
plotit.c, properly free a reversed wordlist
2016-04-01 18:05:40 +02:00
rlar
5299f8cdb6
ngspice.h, cm.h, cleanup NAN defines
2016-04-01 18:03:38 +02:00
h_vogt
8480898399
frontend/variable.c, remove memory leak
2016-04-01 17:40:17 +02:00
rlar
ac726f0cf4
struct variable, #18/18, clean
2016-04-01 17:39:53 +02:00
rlar
a6cd5eea45
struct variable, #17/18, clean
2016-04-01 17:39:22 +02:00
rlar
af81e6810e
struct variable, #16/18, drop intermediate variable
2016-04-01 17:37:27 +02:00
rlar
212121d373
struct variable, #15/18, rewrite in terms of `var_alloc_xxx()' (do-3)
2016-04-01 17:36:57 +02:00
rlar
57f56f53a6
struct variable, #14/18, introduce `var_alloc_xxx()'
2016-04-01 17:34:55 +02:00
rlar
bf5acda362
struct variable, #13/18, reorder var_alloc() invocation
2016-04-01 17:34:25 +02:00
rlar
eb53b4d703
struct variable, #12/18, rewrite in terms of `var_alloc()' (do-2)
2016-04-01 17:34:03 +02:00
rlar
8691368a81
struct variable, #11/18, introduce `var_alloc()'
2016-04-01 17:32:36 +02:00
rlar
68042b3d1b
struct variable, #10/18, rewrite in terms of `var_set_xxx()' (do-1)
2016-04-01 17:32:12 +02:00
rlar
bbbd531d8d
struct variable, #9/18, introduce `var_set_xxx()'
2016-04-01 17:29:58 +02:00
rlar
cc3a124120
struct variable, #8/18, collect struct variable operations
2016-04-01 17:29:36 +02:00
rlar
41b5f17906
struct variable, #7/18, reorder struct variable operations
2016-04-01 17:28:57 +02:00
rlar
f4f0ae3f61
struct variable, #6/18, collect struct variable operations
2016-04-01 17:27:29 +02:00
rlar
e0ae0bcff1
struct variable, #5/18, reorder struct variable initialisation
2016-04-01 17:26:51 +02:00
rlar
b748f2d6d0
struct variable, #4/18, shrink scope of local variables
2016-04-01 17:26:22 +02:00
rlar
830b4f443f
struct variable, #3/18, cleanup struct variable field initialisation
2016-04-01 17:25:46 +02:00
rlar
01a0449420
struct variable, #2/18, reorder struct variable field initialisation
2016-04-01 17:24:50 +02:00
rlar
cb4c07b7f0
struct variable, #1/18, cleanup for loops
2016-04-01 17:23:14 +02:00
rlar
a9aca09320
frontend/ftesopt.c, getFTEstat(), collect struct variable operations
2016-04-01 17:22:13 +02:00
rlar
cdf2b69a38
frontend/ftesopt.c, getFTEstat(), prepare for rewrite
2016-04-01 17:22:12 +02:00
rlar
1d15f6bfce
fix struct variable initialisation
2016-04-01 17:22:07 +02:00
rlar
698cbe20dd
frontend/options.c, fix `cp_enqvar(char *word)', missing `copy()'
2016-04-01 17:22:05 +02:00
rlar
81bf9fb9ba
frontend/ftesopt.c, ft_getstat(), cleanup
2016-04-01 17:22:02 +02:00
rlar
371bbf487b
frontend/ftesopt.c, getFTEstat(), include struct variable initialisation
2016-04-01 17:22:00 +02:00
rlar
53531da715
frontend/ftesopt.c, getFTEstat(), add `next' to the function arguments
2016-04-01 17:21:59 +02:00
rlar
a98dde245c
frontend/ftesopt.c, shrink scope of local variables
2016-04-01 17:21:58 +02:00
rlar
413ae5784c
frontend/ftesopt.c, ft_getstat(), cleanup for loop variable consing
2016-04-01 17:21:56 +02:00
rlar
44de319c34
frontend/ftesopt.c, getFTEstat(), cleanup signature
2016-04-01 17:21:55 +02:00
rlar
a8d96c0d17
frontend/ftesopt.c, getFTEstat(), cleanup signature
2016-04-01 17:21:53 +02:00
h_vogt
e60f2f63e1
frontend/cpitf.c, cp_istrue(), cleanup comments
2016-03-26 22:48:49 +01:00
h_vogt
f52a12a95a
cktsetup.c, invoke `SetAnalyse("Device Setup",...)' only once
2016-03-26 22:24:54 +01:00
h_vogt
494a58cca9
main.c, add variable 'batchmode'
...
which is set when command line option `-b' is active
2016-03-26 22:14:11 +01:00
h_vogt
8b709a394f
cpitf.c, cp_istrue(), avoid surplus Warning Message when an `if' condition expands to nothing
...
When in expression
if $var ...
the variable `var' was undefined, then
ngspice printed a surplus warning message
> Warning: NULL arithmetic expression
in addition to the error message
> Error: var: no such variable.
ngspice continues to process the conditional construct
and evaluates the condition as "FALSE"
2016-03-26 21:58:39 +01:00
rlar
059f2b6c0d
fix garbage collection of vectors returned by ft_evaluate()
2016-03-26 18:48:50 +01:00
rlar
9652cc46c8
plotting/graf.c, cleanup
2016-03-23 17:04:55 +01:00
h_vogt
c332b33d23
parser/lexical.c, #10/10, add some comments
2016-03-22 15:51:58 +01:00
rlar
a551f87652
parser/lexical.c, #9/10, use dynamic buffer allocation
2016-03-22 15:51:48 +01:00
rlar
2d480637c9
parser/lexical.c, #8/10, use a struct to store the buffer state
2016-03-22 15:51:36 +01:00
rlar
615b8a4598
parser/lexical.c, #7/10, use `copy_substring()'
2016-03-22 15:51:13 +01:00
rlar
9a7e915a9f
parser/lexical.c, #6/10, cleanup
2016-03-22 15:51:04 +01:00
rlar
8f09c35c5a
parser/lexical.c, #5/10, change buf/linebuf usage
...
properly '\0' terminate the buffers where needed
instead of an unspecific bzero() invocation
2016-03-22 15:50:52 +01:00
rlar
b7f3dbc0fe
parser/lexical.c, #4/10, rename `cw' --> `wlist_tail'
2016-03-22 15:50:48 +01:00
rlar
4cabf8fa6c
parser/lexical.c, #3/10, move the `wlist' and `cw' resetting
...
to the label `nloop'
2016-03-22 15:50:09 +01:00
rlar
a0f5111436
parser/lexical.c, #2/10, move the `wlist' and `cw' resetting
...
nearer to the `goto nloop'
2016-03-22 15:50:03 +01:00
rlar
a2af93685f
parser/lexical.c, #1/10, this condition is allways true
2016-03-22 15:26:33 +01:00
rlar
521db88eff
frontend/rawfile.c, use "stringskip.h"
2016-03-22 15:26:28 +01:00
rlar
f3e61b838e
frontend/inpcom.c, use "stringskip.h"
2016-03-22 15:26:21 +01:00
rlar
5e04924890
cleanup `skip_ws()' usage
2016-03-22 15:26:11 +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
a86f2068c8
skip-ws, #3/6, use TEMPORARY macros, obj-invariant
2016-03-22 15:26:06 +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
1ad65120d5
skip-ws, #1/6, prepare for rewrite, obj-invariant
2016-03-22 15:26:04 +01:00
rlar
deeb06b063
inpcom.c, inline and rename the `skip' family, depreciate some of them
2016-03-22 15:26:02 +01:00
rlar
88983b079b
numparam/spicenum.c, prevent memory access beyond end of string
2016-03-22 15:25:47 +01:00
rlar
1578348fdf
frontend/inp.c, inp_evaluate_temper(), fix memory hole
2016-03-22 15:25:43 +01:00
rlar
cc8f84ab84
frontend/inp.c, inp_parse_temper(), bug fix, prevent multiple free'ed memory
2016-03-22 15:25:39 +01:00