Commit Graph

2567 Commits

Author SHA1 Message Date
rlar 6ca0c74cbf getword(), pass s_end instead of s 2018-02-17 19:15:54 +01:00
rlar 3f24aa4ea0 getword(), cleanup 2018-02-17 19:15:54 +01:00
rlar d17bcbc276 getword(), change signature 2018-02-17 19:15:54 +01:00
rlar d3d966b027 getword(), cleanup 2018-02-17 19:15:54 +01:00
rlar 52ec0a262c getword(), fix lvalue 2018-02-17 19:15:54 +01:00
rlar 2514664f7a getword(), ls ==> ls_ptr - (const) s 2018-02-17 19:15:54 +01:00
rlar d5893cd1cb getword(), fix lvalues 2018-02-17 19:15:54 +01:00
rlar 51dc7037d3 getword(), i ==> iptr - (const) s 2018-02-17 19:15:54 +01:00
rlar 051c3f4137 getword(), third argument, `char **pi' instead of `int *pi' 2018-02-17 19:15:54 +01:00
rlar 6ba5a05905 getword(), drop `after' argument which is identical to `*pi' 2018-02-17 19:15:54 +01:00
rlar cf9c3fc4f8 getword(), express some constness 2018-02-17 19:15:54 +01:00
rlar 6a72c09b5f insertnumber(), return char pointer instead of integer index 2018-02-17 19:15:54 +01:00
rlar 34e37f393c insertnumber(), rename s_ ==> s 2018-02-17 19:15:54 +01:00
rlar 1f15329745 insertnumber(), drop second argument 2018-02-17 19:15:54 +01:00
rlar 9f6173cd0b insertnumber(), add second arg on invocation 2018-02-17 19:15:54 +01:00
rlar a2ddc6bf2a insertnumber(), express some constness 2018-02-17 19:15:54 +01:00
rlar b41b8e7138 insertnumber(), add `i' on invocation 2018-02-17 19:15:54 +01:00
rlar 160529cf59 insertnumber(), express some constness 2018-02-17 19:15:54 +01:00
rlar e8bc7df5c3 insertnumber(), emphasize return i + ... 2018-02-17 19:15:54 +01:00
rlar 06501162e5 nupa_substitute(), make use of the transformations 2018-02-17 19:15:54 +01:00
rlar 2a446c2119 nupa_substitute(), use `strncasecmp()' 2018-02-17 19:15:54 +01:00
rlar c036fa0519 nupa_substitute(), cleanup 2018-02-17 19:15:54 +01:00
rlar 81cb1ed674 nupa_substitute(), drop s_ 2018-02-17 19:15:54 +01:00
rlar 5416ecaab9 nupa_substitute(), rename iptr --> s 2018-02-17 19:15:54 +01:00
rlar 18f69116e8 nupa_substitute(), verify `s' beeing unused now 2018-02-17 19:15:54 +01:00
rlar 03abdc65f5 nupa_substitute(), cleanup 2018-02-17 19:15:54 +01:00
rlar 53b23cf4b6 nupa_substitute(), transform pscopy(,x,y,) --> pscopy(,x+y,y-y,) (requirement strlen(x) >= y to be verified later) 2018-02-17 19:15:54 +01:00
rlar 8e69f7e70a nupa_substitute(), cleanup 2018-02-17 19:15:54 +01:00
rlar 0bea4987c4 nupa_substitute(), fix lvalues 2018-02-17 19:15:54 +01:00
rlar b47123ac6a nupa_substitute(), i ==> iptr - (const) s 2018-02-17 19:15:54 +01:00
rlar b832578f0e nupa_substitute(), fix lvalues 2018-02-17 19:15:54 +01:00
rlar ccf34637b3 nupa_substitute(), k ==> kptr - (const) s 2018-02-17 19:15:54 +01:00
rlar 551aae4b05 nupa_substitute(), drop ls 2018-02-17 19:15:54 +01:00
rlar 4af5a78bb5 nupa_substitute(), ls ==> s_end - (const) s 2018-02-17 19:15:54 +01:00
rlar fb3a1be6a5 nupa_substitute(), express some constness 2018-02-17 19:15:54 +01:00
rlar aa5d48da3b nupa_substitute(), drop unused argument `err' 2018-02-17 19:15:54 +01:00
rlar e212566176 evaluate_variable(), change signature, pass substring instead of string
side effect:
  string `t' is no longer globally upcased, which is is of no consequence
  for the single place where evaluate_variable() is invoked
2018-02-17 19:15:54 +01:00
rlar 3f7951d187 evaluate_expr(), change signature, pass substring instead of string 2018-02-17 19:15:54 +01:00
rlar 7aa3664157 numparam, drop some typedefs 2018-02-17 19:15:54 +01:00
rlar fa14255fc9 numparam, use `strtoupper()', drop `stupcase()' 2018-02-17 19:15:54 +01:00
rlar a0a3f48227 numparam/xpressn.c, remove an artifact 2018-02-17 19:15:54 +01:00
rlar 7b175dd1c4 numparam, drop unused `srcfile' 2018-02-17 19:15:54 +01:00
rlar 4f8bef997d numparam, nupa_signal(), drop useless return value 2018-02-17 19:15:54 +01:00
rlar 5b194f1679 numparam, drop unused stuff 2018-02-17 19:15:54 +01:00
rlar 15e8fab975 numparam, use `trunc()' 2018-02-17 19:15:54 +01:00
rlar 31ca73a6f0 numparam, use `isdigit_c()' 2018-02-17 19:15:54 +01:00
rlar e88e75a8d4 numparam, use `toupper_c()' 2018-02-17 19:15:54 +01:00
rlar 6d5b968464 numparam, use `tolower_c()' 2018-02-17 19:15:54 +01:00
rlar 3b0a595ecf numparam/mystring.c, drop defect and unused `ccopy()' 2018-02-17 19:15:54 +01:00
rlar db8f8fc062 numparam/mystring.c, fix `pscopy()' and `pscopy_up()' 2018-02-17 19:15:54 +01:00
rlar 6a328ef609 numparam, drop `length()' 2018-02-17 19:15:54 +01:00
rlar 15dd80c0e7 numparam, drop `cpos()' 2018-02-17 19:15:54 +01:00
rlar e324e4aac3 numparam/spicenum.c, use type `bool' 2018-02-17 19:15:54 +01:00
rlar cd260cf45a numparam/spicenum.c, stripsomespace(), cleanup 2018-02-17 19:15:54 +01:00
rlar a9a8afa12d numparam/xpressn.c, split `evaluate()' into two functions 2018-02-17 19:15:54 +01:00
rlar 6da961c3f1 numparam/xpressn.c, evaluate(), drop local `numeric'
and return instantly when formula() reports an error
2018-02-17 19:15:54 +01:00
rlar 7549b3409e numparam/xpressn.c, abstraction, introduce `double_to_string()' 2018-02-17 19:15:54 +01:00
rlar 6d4fc501bd numparam/xpressn.c, evaluate_variable(), cleanup `for' loop 2018-02-17 19:15:54 +01:00
rlar fdfaf0c84a numparam/xpressn.c, don't mess the case of quoted strings
and drop `dico_t.option' which is nowhere set
2018-02-17 19:15:54 +01:00
rlar 23f6d51c67 numparam/xpressn.c, evaluate(), drop local `done' and `lq'
no longer limit the length of a quoted string parameter
2018-02-17 19:15:54 +01:00
rlar e970e8c4ea numparam/xpressn.c, evaluate(), drop `dt' 2018-02-17 19:15:54 +01:00
rlar 00c3d2f79e numparam/xpressn.c, drop `getidtype()' 2018-02-17 19:15:54 +01:00
rlar 34040a592d numparam, #3/3, remove global `nupa_inst_name' 2018-02-17 19:15:54 +01:00
rlar 1bf2590caa numparam, #2/3, avoid global `nupa_inst_name' 2018-02-17 19:15:53 +01:00
rlar ca4278685d numparam, #1/3, avoid global `nupa_inst_name' 2018-02-17 19:15:53 +01:00
rlar 495eef349d numparam/xpressn.c, nupa_subcktcall(), drop unused `err' argument 2018-02-17 19:15:53 +01:00
rlar 979175fbc6 numparam/xpressn.c, findsubckt(), drop unused `subname' argument 2018-02-17 19:15:53 +01:00
rlar f42c8d60b4 numparam/spicenum.c, use `copy_substring()' 2018-02-17 19:15:53 +01:00
rlar 49e03cdcb2 numparam, entry_type, #5/5, rewrite to get rid of 'NUPA_SPACE'
use fact: 'entry' !== NULL
2018-02-17 19:15:53 +01:00
rlar c761c74a22 numparam, entry_type, #4/5, drop 'nolookup' which has known value here 2018-02-17 19:15:53 +01:00
rlar b7b6d9ace3 numparam, entry_type, #3/5, drop unused 'NUPA_POINTER'
'NUPA_POINTER' is nowhere assigned to storage
  thus 'nupa_type' variables can never have this value
2018-02-17 19:15:53 +01:00
rlar 09d92ba692 numparam, entry_type, #2/5, use a type-checked enum for 'nupa_type' 2018-02-17 19:15:53 +01:00
rlar 6a1c9f934c numparam, entry_type, #1/5, introduce typedef 'nupa_type' 2018-02-17 19:15:53 +01:00
rlar 21f2187530 numparam/xpressn.c, #5/5, drop unused assignment 2018-02-17 19:15:53 +01:00
rlar 1820f5547f numparam/xpressn.c, #4/5, use a local 'c' instead of 'dt' 2018-02-17 19:15:53 +01:00
rlar 85f48726ea numparam/xpressn.c, #3/5, whitespace 2018-02-17 19:15:53 +01:00
rlar 146ca72153 numparam/xpressn.c, #2/5, cleanup, drop 'err' and return early 2018-02-17 19:15:53 +01:00
rlar 303d78f616 numparam/xpressn.c, #1/5, cleanup, rewrite upside down
and use known variable values to instantly 'return'
instead of skipping some 'if' bodies
2018-02-17 19:15:53 +01:00
rlar bc0782aba1 numparam, #4/4, defsubckt(), use struct card * argument 2018-02-17 19:15:53 +01:00
rlar 2a149d7541 numparam, #3/4, nupa_scan(), use struct card * argument 2018-02-17 19:15:53 +01:00
rlar 77da3c6f26 numparam, #2/2, nupa_copy(), use struct card * argument 2018-02-17 19:15:53 +01:00
rlar 19dfaf03f3 numparam, #1/2, nupa_eval(), use struct card * argument 2018-02-17 19:15:53 +01:00
rlar ee489599cb struct card, #6/6, drop some redundant casts 2018-02-17 19:15:53 +01:00
rlar 4ec2717079 struct card, #5/6, rewrite from type "card" to "struct 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 8d93511a96 struct card, #1/6, minor cleanup 2018-02-17 19:15:53 +01:00
rlar 121a46f9cb frontend/com_alias.c, asubst(), bug fix
wl_word can not be incremented,
  this is a pointer to malloc'ed space
  and will eventually be free'ed
2018-02-17 15:30:06 +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
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 f0159cbd0b numparam/spicenum.c, stripbraces(), bug fix
overwriting SPICE_DSTRING `dstr_p' may invalidate `s'

This bug was injected with the introduction of SPICE_DSTRING in :
> commit 76feebbbfa
> Date:   Thu Feb 25 21:43:03 2010 +0000
>     various bug fixes
2017-11-13 20:36:49 +01:00
rlar 91c60c28df whitespace change, avoid gcc warnings due to missleading indentation 2017-09-16 20:38:27 +02:00
h_vogt b3827f6488 gnuplot.c, correct the setting of limits in log plots 2017-09-16 20:37:24 +02:00
dwarning 2fd3c4d94f fix the still existing wrong array access in psd smooth routine 2017-09-05 11:28:14 +02:00
h_vogt ca3a9bb648 com_fft.c, correct scaling and filtering for PSD 2017-09-01 23:16:25 +02:00
dwarning 0ef666ea26 com_psd: Correct the special handling of dc and nyquist component in fftw branch 2017-08-26 17:20:19 +02:00
dwarning 2377d3a64f fix wrong write and read in not allocated memory 2017-08-22 11:53:20 +02:00
dwarning b8a9ca9df4 correct the fft scaling for real input and complex output vector 2017-08-16 21:35:41 +02:00
rlar 0db861e4a6 device.c, bug fix commit "device.c, #8/19, use parent wordlist ..."
This commit did rely on the existence of a parent 'wordlist' element,
  usually guranteed by a leading "alter" or "altermod" command word.
But 'inp_evaluate_temper()' passes a wordlist without any parent word
  when invoking 'com_altermod()'
2017-07-30 12:17:43 +02:00
rlar 043d3b4f6d device.c, #19/19, whitespace 2017-07-06 17:56:23 +02:00
rlar aa50718573 device.c, #18/19, polish comments 2017-07-06 17:56:22 +02:00
rlar b4b32e2b93 device.c, #17/19, drop unused assignment to 'eqword' 2017-07-06 17:56:22 +02:00
rlar fac04193e5 device.c, #16/19, shrink scope of variable 'p' 2017-07-06 17:56:22 +02:00
rlar 3eda944db5 device.c, #15/19, make use of 'wl_find()' 2017-07-06 17:56:22 +02:00
rlar 20c303eb8b device.c, #14/19, drop variable 'wl2', can use 'wl' instead 2017-07-06 17:56:22 +02:00
rlar e8ebfb115e device.c, #13/19, drop artificial rewind to the beginning of the list 2017-07-06 17:56:22 +02:00
rlar 79cc996a93 device.c, #12/19, shrink scope of variable 'wlen' and 'maxelem' 2017-07-06 17:56:22 +02:00
rlar c2c4683b4b device.c, #11/19, shrink scope of variable 'wlin' 2017-07-06 17:56:22 +02:00
rlar b817ca8cf7 device.c, #10/19, drop unused assignment to 'wl2' 2017-07-06 17:56:21 +02:00
rlar 9085084ccb device.c, #9/19, drop variable 'rhs' 2017-07-06 17:56:21 +02:00
rlar 1ff0500117 device.c, #8/19, use parent wordlist to restore beginning of the list 2017-07-06 17:56:21 +02:00
rlar 01039f81a2 device.c, #7/19, use a local wordlist *wn 2017-07-06 17:56:21 +02:00
rlar 50dd15093e device.c, #6/19, this 'wl2' wont be used anywhere 2017-07-06 17:56:21 +02:00
rlar 26f7a0e04e device.c, #5/19, drop 'eqfound', equivalent to 'wl != NULL' 2017-07-06 17:56:21 +02:00
rlar 3f09ab6634 device.c, #4/19, loop wont be executed, and 'step' wont be used any more 2017-07-06 17:56:21 +02:00
rlar 3baaa57d18 device.c, #3/19, move some code up 2017-07-06 17:56:21 +02:00
rlar 670d87a589 device.c, #2/19, 'wl' will not be used any more 2017-07-06 17:56:21 +02:00
rlar 1eca384a94 device.c, #1/19, can 'break' here, because 'wl' is NULL 2017-07-06 17:56:04 +02:00
h_vogt 761f3915f5 device.c, 'alter', don't insert empty "" token
when entering ' =' or '= ' in interactive mode
2017-07-06 17:55:06 +02:00
h_vogt d06f39f67d device.c, bug #342, prevent crash when using 'alter'
#342 SegFault alter command
https://sourceforge.net/p/ngspice/bugs/342/
2017-07-06 17:55:02 +02:00
rlar 2b17f3292d inpcom.c, inp_add_control_section(), upside down for readability 2017-06-25 14:37:13 +02:00
rlar 76bbaf4ac3 inpcom.c, inp_sort_params(), use insert_deck() 2017-06-25 14:37:13 +02:00
rlar a26ec804cb inpcom.c, inp_reorder_params_subckt(), introduce insert_deck() 2017-06-25 14:37:13 +02:00
rlar c285602105 inpcom.c, inp_reorder_params_subckt(), reorder 2017-06-25 14:37:13 +02:00
rlar bc62407226 inpcom.c, drop unused artefact xx_new_line() 2017-06-25 13:40:01 +02:00
rlar 1afa04b2d1 inpcom.c, insert_new_line(), inline xx_new_line() 2017-06-25 13:39:56 +02:00
rlar 5c7c278c3d inpcom.c, inp_fix_subckt(), #4/4, drop redundant initialisations 2017-06-25 13:39:48 +02:00
rlar c3e2c920ef inpcom.c, inp_fix_subckt(), #3/4, drop 'last_param_card' 2017-06-25 13:39:41 +02:00
rlar 2aafc50608 inpcom.c, inp_fix_subckt(), #2/4, use insert_new_line() 2017-06-25 13:39:34 +02:00
rlar dda35ef2a5 inpcom.c, inp_fix_subckt(), #1/4, rewrite 'append' 2017-06-25 13:39:27 +02:00
rlar e75f48d91f inpcom.c, insert_new_line(), allow NULL head 2017-06-25 13:00:39 +02:00
rlar 5ff5839296 inpcom.c, inp_stitch_continuation_lines(), rewrite for the following commit 2017-06-25 12:58:50 +02:00
rlar 420c023f56 inpcom.c, introduce insert_new_line()
use it to replace this pattern
  foo = bar->li_next = xx_new_line(bar->li_next, ...);
with
  foo = insert_newline(bar, ...);
2017-06-25 12:57:18 +02:00
rlar 38183b6167 inpcom.c, expand_section_ref(), #7/7, cleanup 2017-06-25 12:10:01 +02:00
rlar dd155dd83e inpcom.c, expand_section_ref(), #6/7, drop 'rest' 2017-06-25 12:09:21 +02:00
rlar 0f8fb4cf51 inpcom.c, expand_section_ref(), #5/7, drop 'newl' 2017-06-25 12:04:16 +02:00
rlar a77db80a85 inpcom.c, expand_section_ref(), #4/7, drop 'cend', use 'c' instead 2017-06-25 12:03:39 +02:00
rlar 0c94a651ee inpcom.c, expand_section_ref(), #3/7, simplify 2017-06-25 12:02:26 +02:00
rlar 26d878748d inpcom.c, expand_section_ref(), #2/7, t == section_def ==> cend == c 2017-06-25 12:01:34 +02:00
rlar 7f2cf192b6 inpcom.c, expand_section_ref(), #1/7, cend != NULL === t != section_def 2017-06-25 12:00:07 +02:00
rlar a51c1aba2c inpcom.c, inp_read(), #2/2, rewrite xx_new_line() insertion
using the fact
  end->li_next === NULL
2017-06-24 22:03:03 +02:00
rlar 5c3dac41d9 inpcom.c, inp_read(), #1/2, rewrite 'append' to 'end' 2017-06-24 22:01:03 +02:00
rlar ed39305da0 inpcom.c, inp_add_series_resistor(), simplify xx_new_line() insertion 2017-06-24 20:30:04 +02:00
rlar 9eddd1d80f inpcom.c, inp_add_control_section(), #2/2, rewrite xx_new_line() insertion 2017-06-24 20:15:02 +02:00
rlar 4ad53f0de8 inpcom.c, inp_add_control_section(), #1/2, emphasise two assertions 2017-06-24 20:12:55 +02:00
rlar 4ff9c0c166 inpcom.c, inp_chk_for_multi_in_vcvs(), #6/6, drop 'model_card' 2017-06-24 19:44:35 +02:00
rlar d773b73f76 inpcom.c, inp_chk_for_multi_in_vcvs(), #5/6, drop 'next_card', deploy its value temporarily in the new line's li_next slot 2017-06-24 19:44:11 +02:00
rlar 3b55d2af40 inpcom.c, inp_chk_for_multi_in_vcvs(), #4/6, drop 'a_card', reuse the unused 'c' instead 2017-06-24 19:43:34 +02:00
rlar 634b012492 inpcom.c, inp_chk_for_multi_in_vcvs(), #3/6, xx_new_line() shall fill the li_next slot 2017-06-24 19:40:48 +02:00
rlar e9e9e5d55e inpcom.c, inp_chk_for_multi_in_vcvs(), #2/6, move code downwards 2017-06-24 19:40:38 +02:00
rlar c83b0544de inpcom.c, inp_chk_for_multi_in_vcvs(), #1/6, skip lines 2017-06-24 19:40:27 +02:00
rlar e81560de1a inpcom.c, drop the local 'new_line' variable 2017-06-24 19:11:22 +02:00
rlar b21b4170b2 inpcom.c, simplify the insertion of new lines/decks quite a bit 2017-06-24 19:11:21 +02:00
rlar 2972953336 inpcom.c, reorder initialisation
initialise param_beg and param_end before they will be used,
  instead of "afterwards" in preparation for the next following usage.
and move the "comment out" up some lines, think that way:
  comment out original line, append new line, ...
2017-06-24 18:16:48 +02:00
h_vogt 5d82d1b04a misccoms.c, com_quit(), don't free memory, unless shared ngspice
Traversing all linked memory structures to free their memory
  can be a somewhat lengthy business, especially in xspice,
  which is not worth the effort when we simply want to exit()
Long delays have been reported in certain cases.

For developers and for the usage of such tools as valgrind,
  we still free all the memory if 'set ngdebug' is given.
2017-06-24 17:55:26 +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
h_vogt 306ada7dd0 inpcom.c, get_model_type(), use gettok_noparens() to extract model type
Takes care of model descriptions in parentheses like
  d(...)
2017-04-12 22:00:07 +02:00
h_vogt 1ffb957e6c inpcom.c, inp_fix_subckt_multiplier(), cleanup, using strchr() 2017-04-12 21:48:13 +02:00
h_vogt 0bf381e01d cpitf.c, for Windows, introduce csh variable "win_console"
to reflect whether this .exe is a "console" build
2017-04-12 21:11:13 +02:00
h_vogt 670880086f cpitf.c, MS Visual Studio, introduce csh variable "pg_config"
reflecting .exe compilation for
  32/64 bit
  with/without NGDEBUG
2017-04-12 21:01:57 +02:00
h_vogt d7a1899210 runcoms.c, rawfile.c, include filename in the 'ASCII/binary raw file' printout 2017-04-12 20:45:51 +02:00
rlar 46ab21dca9 inpcom.c, is_a_modelname(), don't accept "1E2" 2017-04-09 20:19:35 +02:00
h_vogt 847a09fd37 inpcom.c, get_number_terminals(), ignore "save" and "print" when CIDER 2017-04-09 18:33:12 +02:00
h_vogt e5d70d0821 gnuplot.c, bug fix, allow gnuplot with MINGW 2017-04-09 17:53:40 +02:00
rlar ccfcc056ad inpcom.c, bug fix, allow leading '_' in parameter identifiers 2017-04-09 15:38:15 +02:00
rlar c6896cf338 accept .para shortcut for .param 2017-04-09 15:37:46 +02:00
rlar 1e6b809af8 introduce command "check_ifparm" to check consistency of the device IFparm sets
For developing purpose only, and bound to HAVE_TSEARCH, HAVE_TDESTROY

IFparm descriptors must obey certain contracts,
  1) aliases must be grouped together with their associated main descriptor,
       and all must have flag IF_REDUNDANT set
  2) there shall be no duplicated .id fields except for aliases.
  3) aliased entries shall have consistent .dataType fields

check_ifparm will traverse all IFparm sets and report violations
2017-04-09 14:40:51 +02:00
h_vogt cf9dbff890 inpcom.c, cleanup, use strchr() 2017-04-09 14:14:45 +02:00
rlar 2df8f433f8 inp.c, inp_parse_temper(), rewrite, using search_idenifier and find_assignment
try to make it more robust with regard to
  '!=' '<=' '=='         don't misinterpret as '='
  "atemperaticvariable"  don't misinterpret as 'temper'
  multiple temper in one expression
2017-04-09 14:14:36 +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 4c44027cd2 inp.c, inp_parse_temper(), cleanup 2017-04-09 14:12:13 +02:00
rlar 2809ccaa13 shrink scope of expr_w_temper 2017-04-09 14:06:27 +02:00
rlar 872ceeedc7 inp_temper_compat(), return expr_w_temper 2017-04-09 14:06:15 +02:00
rlar 2c35eebb0b invoke in_parse_temper_trees() and inp_evaluate_temper() unconditionally 2017-04-09 14:06:02 +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 2a50316304 inp_parse_temper(), add modtlist_p/devtlist_p arguments 2017-04-09 13:59:46 +02:00
rlar f78d8e21f0 inp_parse_temper_trees(), add struct circ argument 2017-04-09 13:59:38 +02:00
rlar f2f2b3b09a inp_evaluate_temper(), add struct circ argument 2017-04-09 13:49:43 +02:00
rlar fa13e422cd inpcom.c, bug fix, always reset expr_w_temper 2017-04-09 13:49:32 +02:00
rlar 5513d8bdf3 inpcom.c, bug fix, expr_w_temper missing reset 2017-04-09 13:49:22 +02:00
rlar c920946c73 inp.c, bug fix, need to reset modtlist/devtlist unconditionally 2017-04-09 13:49:13 +02:00
rlar 12de713ff5 inp.c, bug fix, commit "allow 'temper' keyword in .param, .model and device instance lines ..."
don't overwrite struct pt_temper.expression,
  to allow free'ing this string.
2017-04-09 13:49:05 +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 2142cfdcce subckt.c, cleanup 2017-03-25 18:17:08 +01:00
rlar 9b01dbae95 subckt.c, numnodes(), #4/4, drop 'buf' 2017-03-25 18:17:07 +01:00
rlar 66b8b3de54 subckt.c, numnodes(), #3/4, rename argument 'name' --> 'line' 2017-03-25 18:17:04 +01:00
rlar 7b6070e6b9 subckt.c, numnodes(), #2/4, cleanup 2017-03-25 18:00:43 +01:00
rlar b18c06c441 subckt.c, numnodes(), #1/4, cleanup 2017-03-25 18:00:41 +01:00
rlar 33788f7052 remove excessive inp_evaluate_temper() prototypes 2017-03-22 21:47:43 +01:00
rlar 0fb21eaf4a subckt.c, translate(), #8/8 whitespace and comments 2017-03-22 21:25:46 +01:00
rlar f19a6c6390 subckt.c, translate(), #7/8 cleanup 2017-03-22 21:25:46 +01:00
rlar 49947e0279 subckt.c, translate(), #6/8 cleanup 2017-03-22 21:25:46 +01:00
rlar 2a4c34c401 subckt.c, translate(), #5/8 trailing 's' is never used 2017-03-22 21:25:46 +01:00
rlar 7169ad4bfa subckt.c, translate(), #4/8 don't append trailing whitespace 2017-03-22 21:25:46 +01:00
rlar 1f31f73295 subckt.c, translate(), #3/8 simplify 2017-03-22 21:25:45 +01:00
rlar e40485b8a3 subckt.c, translate(), #2/8 cleanup 2017-03-22 21:25:45 +01:00
rlar 476c41f436 subckt.c, translate(), #1/8 cleanup 2017-03-22 21:25:45 +01:00
rlar 405c6f6f02 subckt.c, introduce translate_mod_name() 2017-03-22 21:25:45 +01:00
rlar db213fd8d2 subckt.c, devmodtranslate(), dupplicate code from above
and drop a redundant piece
2017-03-22 21:25:45 +01:00
rlar c653161666 subckt.c, introduce translate_inst_name()
to abstract the instance name translation during netlist flattening
2017-03-22 21:25:45 +01:00
rlar a54a535dd5 subckt.c, introduce translate_node_name() 2017-03-22 21:25:45 +01:00
rlar bab59844ff subckt.c, emphasize instance_name translation
When translating an instance_name in a subcircuit instance 'xfoo'
undconditionally express the exception for 'x' instances, which is:
  x42 --> xsub.x42
but for all others the first char (the devtype) is prepended
  r42 --> r.xsub.r42
2017-03-22 21:25:45 +01:00
rlar e3b3cc502a subckt.c, translate(), emphasize instance_name translation 2017-03-22 21:25:45 +01:00
rlar a03a57c9f9 subckt.c, emphasize token separator insertion 2017-03-22 21:25:44 +01:00
rlar 6b78ed4367 subckt.c, devmodtranslate(), rewrite using bxx_ facility 2017-03-22 21:25:44 +01:00
rlar 4d69002144 subckt.c, translate(), rewrite using bxx facility 2017-03-22 21:25:39 +01:00
rlar 13b6daae2f subckt.c, translate(), cleanup while() loop 2017-03-22 20:53:22 +01:00
rlar a5dd826d19 subckt.c, finishLine(), #9/9, unconditionally transform instance name in i() expressions 2017-03-22 20:53:14 +01:00
rlar dc092c4ebc subckt.c, finishLine(), #8/9, fuse two if's with the same conditional expr 2017-03-22 20:52:10 +01:00
rlar 99d788cd12 subckt.c, finishLine(), #7/9, drop condition which is always true 2017-03-22 20:50:59 +01:00
rlar 253cf5b75a subckt.c, finishLine(), #6/9, drop condition which is always false 2017-03-22 20:50:38 +01:00
rlar ff4805c023 subckt.c, finishLine(), #5/9, move/duplicate code behind if/else into the if/else 2017-03-22 20:49:53 +01:00
rlar 735e7700ce subckt.c, finishline(), #4/9, reorder 2017-03-21 20:27:20 +01:00
rlar 8ab28df4ec subckt.c, finishline(), #3/9, here *src === '(' 2017-03-21 20:27:19 +01:00
rlar 5d3896c388 subckt.c, finishline(), #2/9, rewrite 2017-03-21 20:27:18 +01:00
rlar 0502e83fba subckt.c, finishline(), #1/9, trivial cleanup 2017-03-21 20:27:17 +01:00
rlar dc6e1cb064 use strchr() instead of strstr() 2017-03-19 20:24:49 +01:00
rlar bd50814677 drop 'depreciated_skip..()' 2017-03-19 20:13:11 +01:00
rlar 45ad60b738 rename gettok_nc() --> nexttok(), and functionalize it 2017-03-19 20:11:01 +01:00
rlar f338dfe27e subckt.c, undo a bogous hunk from commit "beautify code", Dec 16 2011 2017-03-19 20:07:34 +01:00
h_vogt 4eb32ab566 com_sysinfo.c, add recent Windows versions to info printout 2017-02-22 19:36:38 +01:00
h_vogt 7c06cb2d12 don't mess with WINVER
not necessairy for current Windows versions
2017-02-22 19:36:37 +01:00
h_vogt 31dca54eba input.c, don't use read() in __MINGW32__ 2017-02-22 19:28:22 +01:00
rlar d9e7ab2759 input.c, simplify #ifdef for the broken visual studio _read()
If we have _MSC_VER so we have either CONSOLE HAS_WINGUI or SHARED_MODULE
If we have SHARED_MODULE, then we most certainly don't need
  the unbuffered read(), which isn't unbuffered on _MSC_VER anyway.
Thus _MSC_VER is sufficient.
2017-02-22 19:26:48 +01:00
rlar 1475df2aa4 input.c, try to work around microsofts broken _read()
concerning the visual sudio variant of the "console" build.

Their _read() returns 0 when a linfeed is read.
Ironically the linefeed seems to be stored into the buffer nontheless.

Because the filehandle is in linebuffered mode anyway,
  (the read won't return up until the terminating newline is entered)
we can just as well use getc(), which doesn't seem to suffer
  from the same problem in their implementation.
2017-02-22 19:25:01 +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 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
Francesco Lannutti 0c5196e773 signal_handler.c, ft_sigintr(), exit after three SIGINT requests 2016-11-01 20:33:13 +01:00
rlar 4778b48592 inpcom.c, inp_fix_inst_calls_for_numparam(), drop redundant condition `num_subckt_params == 0'
found_mult_param() can already cope with that
2016-11-01 11:56:48 +01:00
dwarning 24dbbc393d remove the ancient nobjthack option to fake 3-terminal bjt's 2016-11-01 11:56:48 +01:00
dwarning 6827495a75 correct the comment for 5-terminal bjt's in get_number_terminals 2016-11-01 11:56:48 +01:00
dwarning 1e880deff4 allow 5-terminal bjt's in subckt expansion 2016-11-01 11:56:48 +01:00
h_vogt e4e24f74e6 breakp2.c, copynode(), prevent segfault if missing ')'
invoking 'save' with an erronous node, for example
  save v(thing
This can happen unexpectedly for long 'save' lines,
  which will silently be truncated.
2016-11-01 11:56:25 +01:00
rlar 7fc6609821 breakp2.c, settrace(), cleanup #2/2 2016-11-01 11:06:45 +01:00
rlar 004e49aabf breakp2.c, settrace(), cleanup #1/2
"save" command,
  reduce complexity from O(2) to O(1)
2016-11-01 11:05:59 +01:00
rlar 939555115d variables, cp_vprint, fix a memory leak 2016-10-15 15:57:59 +02:00
rlar bc325b17c5 variables, lift plot_cur->pl_env up to the invoker of cp_usrvars() 2016-10-15 15:57:54 +02:00
rlar e0db4aa665 variables, cp_vprint(), reorder for similarity 2016-10-15 15:57:52 +02:00
rlar a33876ff59 variables, variables, cp_getvar, rewrite 2016-10-15 15:57:50 +02:00
rlar 97c5e1567f variables, cp_getvar(), beware of retval == NULL 2016-10-15 15:57:48 +02:00
rlar 20b666e2d5 variables, clean up 2016-10-15 15:57:45 +02:00
rlar b2fb4e20bf variables, drop 'found', use identity found == (*p != NULL) 2016-10-15 15:57:43 +02:00
rlar 0784f76e51 variables, cleanup the for loops 2016-10-15 15:57:40 +02:00
rlar e39119c1c8 variables, use identity v == *p (and u == *p) 2016-10-15 15:57:38 +02:00
rlar d14ee053d7 variables, use a pointer to the anchor of the variable instead of 'lv' 2016-10-15 15:57:35 +02:00
rlar b13125ac84 variables, explicit processing of ft_curckt->ci_vars, drop uv2 2016-10-15 15:57:33 +02:00
rlar 7483ff9d8c variables, cp_remvar(), cleanup 2016-10-15 15:57:30 +02:00
rlar 485fba7548 variables, add some comments, add explicit case US_NOSIMVAR 2016-10-15 15:57:28 +02:00