Commit Graph

2734 Commits

Author SHA1 Message Date
rlar 3b2b130177 inpcom.c, inp_fix_ternary_operator_str(), use copy_substring() 2012-10-13 12:00:29 +02:00
rlar 680e45f7f3 inpcom.c, inp_fix_ternary_operator_str(), rewrite 2012-10-13 11:47:22 +02:00
rlar 9352a4b72d inpcom.c, get_instance_subckt(), more carefull when there is trailing whitespace 2012-10-13 11:31:37 +02:00
rlar f61f323be0 inpcom.c, get_instance_subckt(), rewrite 2012-10-13 11:31:37 +02:00
h_vogt 2754771a61 fourier.c: remove memory leaks 2012-10-13 11:21:29 +02:00
rlar 7f0065e7fb inpcom.c, make use of copy_substring() 2012-10-13 11:03:52 +02:00
rlar 69bf624097 inpcom.c, rewrite 2012-10-13 11:02:34 +02:00
rlar 3f4e2eed49 inpcom.c, bug fix in inp_get_subckt_name() 2012-10-13 10:45:09 +02:00
rlar 021a5dd871 inpcom.c, rewrite 2012-10-12 19:23:46 +02:00
rlar e0b796f3c5 inpcom.c, rewrite 2012-10-12 18:10:52 +02:00
rlar 3085c471ac inpcom.c, cleanup 2012-10-12 17:58:05 +02:00
rlar dbf288bae7 inpcom.c, fix a bug
which was introduced in commit
  skip-ws, #5/6, unify macro versions, obj not invariant
where the SKIP.*back.* macros have been unified

FIXME, the check for `\0' in the backwards direction if of course nonsense.
These backward functions either shall not check it at all (being optimistic),
or they shell check against a start of string pointer.
2012-10-11 19:33:32 +02:00
rlar caf50ba4d8 inpcom.c, cleanup 2012-10-10 20:48:42 +02:00
h_vogt 3ca1235602 gnuplot.c: improve scaling of y axis 2012-10-09 19:47:24 +02:00
rlar 2b72fbbc5e skip_ws(), #2/2, drop macros, obj-invariant 2012-10-08 17:48:27 +02:00
rlar 9f3f794ced skip_ws(), #1/2, use functions instead of macros 2012-10-08 17:28:52 +02:00
rlar 701942cebf skip-ws, #6/6, unify macro versions, obj-invariant
checked for object file invariance
2012-10-07 21:53:42 +02:00
rlar 532ff76dac skip-ws, #5/6, unify macro versions, obj not invariant 2012-10-07 21:53:29 +02:00
rlar 6a5f234519 skip-ws, #4/6, use macros, obj-invariant
checked for object file invariance
2012-10-07 21:52:54 +02:00
rlar 4bf52410fb skip-ws, #3/6, introduce macros, obj-invariant
checked for object file invariance
2012-10-07 21:52:35 +02:00
rlar e3b5ff94c5 skip-ws, #2/6, prepare for rewrite, obj-invariant
checked for object file invariance
2012-10-07 21:52:22 +02:00
rlar 841db86e00 skip-ws, #1/6, prepare for rewrite, obj-invariant
checked for object file invariance
2012-10-07 21:52:09 +02:00
h_vogt 996dedaa71 inpcom.c: remove cccs from F, ccvs from H source 2012-10-07 17:12:42 +02:00
h_vogt e69f50270d inpcom.c: correct replacement of vccs, vcvs in E, G-sources
search for 'par(' instead of 'par'
2012-10-07 15:19:28 +02:00
rlar 01ed0ac5d9 com_fft(), com_psd(), com_spec(), cleanup storage more thoroughly
use free_pnode() instead of free_pnode_o()
drop free_pnode_o()
2012-10-06 21:07:27 +02:00
rlar dfe8342b91 invoke com_remcirc() in com_quit() 2012-10-06 15:20:17 +02:00
rlar c7717e37fc cleanup, whitespace 2012-10-06 12:30:31 +02:00
rlar 7acc91157a cleanup, drop unused macros 2012-10-06 12:16:07 +02:00
rlar eb931dc01a cleanup, ngspice/config.h is already in ngspice/ngspice.h, #2/2 2012-10-06 12:12:17 +02:00
rlar 11579d9369 cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones) 2012-10-06 12:12:08 +02:00
h_vogt c336f5ec9d outif.c, typesdef.c, sim.h: correct labeling of cap, cur, and charge data 2012-10-03 15:01:36 +02:00
h_vogt 7d82367666 b3ld.c, b4ld.c, b3v32ld.c: enable capacitance calculation during dc sweep 2012-10-03 14:28:19 +02:00
h_vogt 705e130868 b3v32.c: make additional parameters accessible by @m1[par] 2012-10-01 23:03:41 +02:00
h_vogt c0bc0de4b5 prototype for controlled_exit() 2012-10-01 23:02:26 +02:00
rlar 7a65ea0318 com_write_sparam(), cleanup storage more thoroughly (`wl_sparam') 2012-10-01 21:28:48 +02:00
rlar 98b38556aa com_alter_common(), cleanup storage more thoroughly (on error) 2012-10-01 21:09:26 +02:00
rlar 124f0f4727 com_write(), com_write_sparam(), com_cross(), cleanup storage more thoroughly 2012-10-01 21:03:53 +02:00
rlar 7b2c9db809 com_psd(), cleanup storage more thoroughly (`win') 2012-10-01 19:59:43 +02:00
rlar a891e7dc9c com_print(), cleanup storage more thoroughly 2012-10-01 19:44:49 +02:00
rlar 0f089d2bd6 com_compose(), cleanup storage more thoroughly 2012-10-01 18:31:02 +02:00
rlar 35c0e9eca3 variable rename, unify the source
checked for object file invariance
2012-10-01 17:59:40 +02:00
rlar f95aaaafc1 com_print(), com_cross(), use for(;;) loops 2012-10-01 17:53:01 +02:00
h_vogt fe828c5081 bsim3, make additonal parameters accessible with @m[par] 2012-09-30 23:49:18 +02:00
rlar 44c1380281 variable rename, unify the source
checked for object file invariance
2012-09-30 23:26:26 +02:00
rlar bc89379aff fourier(), use for(;;) loops 2012-09-30 23:11:26 +02:00
rlar d06265142d variable rename, unify the source
checked for object file invariance
2012-09-30 23:10:49 +02:00
rlar e0d64e14cc bug fix, fourier(), prevent endless loop when processing unexpected vectors 2012-09-30 23:10:38 +02:00
rlar e712080579 com_compose(), use for(;;) loops 2012-09-30 22:50:23 +02:00
rlar 959b62e14d variable rename, unify the source
checked for object file invariance
2012-09-30 22:36:12 +02:00
rlar 5a58281e7b com_spec(), use for(;;) loops 2012-09-30 22:22:28 +02:00
rlar 5102735df9 variable rename, unify the source
checked for object file invariance
2012-09-30 22:22:20 +02:00
rlar 5826f3c0e6 com_fft(), com_psd(), use for(;;) loops 2012-09-30 21:44:28 +02:00
rlar 26bbb39a68 variable rename, unify the source
checked for object file invariance
2012-09-30 21:43:16 +02:00
rlar f52ae6eccd bug fix, invalid read when the title line is the empty 2012-09-30 18:38:36 +02:00
dwarning 2506fe3858 changed the #include order - ngspice.h must be first
because icc complains about declaration visibility of mmsghdr struct
2012-09-29 20:44:12 +02:00
dwarning ebfeaf72f1 bjttemp.c: prevent uninitialized variables 2012-09-29 17:57:35 +02:00
rlar 119be60fdc polish a very old and unused artifact in WANT_SENSE2 2012-09-27 20:43:27 +02:00
rlar ae5de92c69 cleanup db_print_pnode_tree() 2012-09-27 19:49:42 +02:00
rlar 44e7f7f7bd bug fix, dvec in a `define' can't be member of any plot 2012-09-27 19:46:06 +02:00
rlar 0280a49b69 bug fix, avoid segfault when the refered plot is still empty 2012-09-27 19:46:06 +02:00
h_vogt 986f9b7535 grid.c: prevent overflow of div_list 2012-09-26 21:12:26 +02:00
h_vogt e096101133 ifeval.c: reduce fudge factor for div and atanh 2012-09-26 21:00:40 +02:00
h_vogt 0bdc33db40 grid.c: prevent crash if real low and high values are close 2012-09-26 20:58:58 +02:00
h_vogt 68c4de76b7 new option noopac, don't do op simulation before ac if circuit is linear
May simplify ac simulation of passive RLC networks
(No need to add series resistors in Ls, allows to C inseries)
2012-09-26 16:59:59 +02:00
rlar 998c7f2934 disable some more cleanup code in com_quit()
destroy_ivars() is reported to freeze
2012-09-25 21:31:45 +02:00
rlar ee0b602dc4 subckt.c, cleanup, use `for' instead of `while' 2012-09-22 22:12:56 +02:00
rlar fe1acd3757 src/frontend/** remove superfluous `return' invocations 2012-09-22 19:33:55 +02:00
rlar ab98f03622 src/frontend/** whitespace, indentation, ...
checked for object file invariance on linux
2012-09-22 19:33:50 +02:00
rlar d1d4eb11a5 invoke cleanup functions in com_quit()
trying to get the valgrind reports down.
2012-09-22 10:53:05 +02:00
rlar 71240d19be free spice_init_devices() allocated memory in com_quit() 2012-09-21 21:19:44 +02:00
rlar 811bf5664a destroy `const' plot in com_quit() 2012-09-21 21:19:44 +02:00
rlar 7a5eeb2d9c drop a superfluous cast 2012-09-21 21:19:44 +02:00
dwarning fb23e1f024 correct the diode temperature model 2012-09-20 21:06:34 +02:00
rlar c0e2d4abef src/frontend/**, whitespace,
object files will change, due to __LINE__ usage
2012-09-20 20:32:02 +02:00
rlar 7454a6d486 src/frontend/**, whitespace, indentation, ...
untabify
delete-trailing-whitespace
braces
...

checked for object file invariance on linux
2012-09-20 20:30:53 +02:00
rlar f3b5336d3a cleanup some macros, try to be more careful 2012-09-19 20:16:27 +02:00
rlar ec1a71249a fix ownership of `cp_promptstring' and `cp_program' 2012-09-15 14:58:39 +02:00
rlar 198604f605 define.c, plug a memleak in com_undefine() 2012-09-13 21:52:03 +02:00
rlar 6a3c20706a define.c, cleanup 2012-09-13 21:21:46 +02:00
rlar b68259ff2d define.c, cleanup 2012-09-13 21:21:08 +02:00
rlar 1fbc4d62cc define.c, whitespace cleanup 2012-09-13 21:18:02 +02:00
rlar 38ce3b6142 define.c, bug fix, when undefining more than one udfunc 2012-09-13 21:05:56 +02:00
rlar adc9ee09ce api change for ngdirname() to fix a memory leak
ngdirname did `own' the returned string.
now the invoker is responsible for the returned string.

note, this is contrary to the POSIX dirname() implementation,
   which *might* return pointers to statical allocated memory.
2012-09-13 20:07:33 +02:00
h_vogt 7c9b90c9ea XSPICE lcouple: remove unused cm_analog_integrate 2012-09-11 21:29:16 +02:00
h_vogt cb220b2d6f XSPICE core: remove memory leak 2012-09-10 23:40:40 +02:00
h_vogt 8d374157fe XSPICE square: remove memory leak, initialize phase1 2012-09-10 22:52:10 +02:00
h_vogt d6698c5f6c XSPICE square: indentations 2012-09-10 22:20:41 +02:00
h_vogt 2379bd577a XSPICE triangle: remove memory leak remove initialization error for phase1 FIXME: there are still more initialization errors 2012-09-09 19:07:29 +02:00
h_vogt 8ece02a1cd XSPICE triangle: indentations 2012-09-09 17:56:12 +02:00
h_vogt feb545d8a7 XSPICE oneshot: remove memory leak remove using uninitialzed variable old_clock correct waveform shape by using permanent breakpoints 2012-09-09 16:55:10 +02:00
h_vogt 36898f9921 indentations 2012-09-09 16:44:58 +02:00
h_vogt bcbd506ccc XSPICE sine: out-of-bounds removed 2012-09-08 01:38:25 +02:00
h_vogt 10d97d222e XSPICE sine source: memory leak removed (bug no. 3564166) 2012-09-08 00:45:59 +02:00
h_vogt 9f8c73d271 cktdest.c: reset for XSPICE allocated memory (not yet complete) 2012-09-07 23:50:38 +02:00
h_vogt 5ce51f148e XSPICE filesource: remove segfault with op before tran 2012-09-07 23:48:09 +02:00
h_vogt 9de9336581 cktload.c, indentations 2012-09-02 16:11:46 +02:00
h_vogt 4e45f4cba0 inp.c: unify syntax of .save and save commands: allow node1 and v(node1), v2#branch and i(v2), @dev[param] 2012-08-30 11:03:48 +02:00
h_vogt 0efaeac8b4 evtqueue.c: plug memory leak 2012-08-27 10:42:12 +02:00
h_vogt 417d109764 resask.c: avoid segfault if @R[i] is asked before analysis is run 2012-08-27 00:12:14 +02:00
h_vogt 9eaff645f5 vectors.c, resask.c: indentation 2012-08-26 23:32:21 +02:00
h_vogt a5a1029998 d_source: Use STATIC_VAR_TABLE to save memory 2012-08-25 13:39:27 +02:00
rlar 3d7ab6a297 cleanup keyword databases on proram termination 2012-08-23 21:19:15 +02:00
rlar 80bc975e33 plug a memory leak in inp_spsource/inp_nutsource (deck title string) 2012-08-23 21:13:44 +02:00
rlar 84283b43d4 cleanup ivars() related globals on program termination 2012-08-23 21:09:25 +02:00
h_vogt f4ad29a17c d_source: allow multiple instances 2012-08-22 23:14:26 +02:00
rlar 83c99bece4 cleanup wallace arrays on program termination 2012-08-22 22:21:33 +02:00
rlar 590fc543f8 avoid error messages when finally closing the display device.
these messages creeped in with commit
  2012-08-19 18:58:31
  "plug memory leak in x11.c"

when the "printf" device Close and Update
 functions might be invoked on program termination.

use the silent "nop" implementation
instead of the error reporting "nodev" implementation
2012-08-20 21:26:08 +02:00
h_vogt 7191fdce63 d_source cfunc.mod: plug memory leaks 2012-08-20 08:54:26 +02:00
h_vogt 488bc6a8c8 bug no. 3456221: new d_source model 2012-08-19 21:36:33 +02:00
rlar b5b0ec7302 cleanup, white space changes 2012-08-19 21:36:31 +02:00
rlar 6c01089be1 plug memory leak in x11.c
try to obey the Xt toolkit protocol when closing widgets and application
2012-08-19 19:18:34 +02:00
h_vogt cb42989204 mifgetvalue.c: need a copy to allow freeing token 2012-08-19 15:49:24 +02:00
rlar 789edee376 rewrite inp_list() avoid duplicate code 2012-08-19 14:04:37 +02:00
rlar c9e2a21a9c reimplement tcl_vfprintf() 2012-08-19 12:53:55 +02:00
rlar c4d0feb6cc bug fix, out_send() erroneously interpreting printf %-style sequences 2012-08-19 12:20:33 +02:00
rlar b9b9f6fd1c cleanup (checked for code invariance) 2012-08-19 12:14:22 +02:00
dwarning 5ca213b481 part of temperature level=3 model 2012-08-18 21:10:48 +02:00
rlar 67132108ad out_printf() is not supposed to be a preprocessor macro 2012-08-18 18:40:45 +02:00
h_vogt 0af75f3bd9 subckt.c, mif_inp2.c: plug XSPICE setup memory leaks 2012-08-18 18:31:23 +02:00
rlar d4ced47e8e drop out_pbuf, which was an ancient workaround
obviously an old implementation of out_printf()
  has been unreliable.
2012-08-18 18:27:13 +02:00
rlar 0825c10471 bug fix, print complex yet real valued frequency
when printing a complex frequency vector, yet with real value
  some left over nonsens was printed instead of the actual real value.

this bug was introduced in commit:
  Date:   Thu Jan 15 21:08:09 2009 +0000

  Improvements in vector derivative computation and new functions to
  compute group delay and moving average. From espice (A. Roldan).
2012-08-18 17:10:06 +02:00
h_vogt b02a497490 mif_inp2.c, subckt.c: plug memory leaks at XSPICE setup 2012-08-15 23:11:07 +02:00
rlar 9390a9a9ec rewrite com_quit()
emphasize user confirmation

and if we are going to remove dangling circuits,
then do so unconditionally
2012-08-15 20:15:15 +02:00
rlar be183407cd cleanup (checked for code invariance) 2012-08-15 19:18:15 +02:00
rlar ae6a16e3e4 plug a memory leak when executing `shell' 2012-08-14 21:00:21 +02:00
rlar fa81e9d007 plug a memory leak when (un)setting variables 2012-08-14 20:39:11 +02:00
rlar 64139a243c spiceif.c, cleanup (checked for code invariance) 2012-08-14 20:38:25 +02:00
rlar 0c230b2970 spiceif.c, cleanup (checked for code invariance) 2012-08-12 20:28:42 +02:00
rlar 10a9ae32c5 options.c cleanup 2012-08-12 12:48:27 +02:00
rlar a2f58da0d0 options.c, whitespace 2012-08-12 12:43:09 +02:00
rlar e93960f9ed cleanup, if_options() will copy() anyway 2012-08-12 12:25:00 +02:00
rlar 7126dd6f1d display.c, cleanup 2012-08-08 18:54:52 +02:00
rlar 0beb95757f cancer of the semicolon 2012-08-07 21:20:36 +02:00
rlar d50ffdd987 swallow warnings 2012-08-06 19:50:23 +02:00
rlar 1a2477bdcc avoid `meas' syntax error causing segfault
Invalid meas crashes ngspice with SIGSEV - ID: 3554330
http://sourceforge.net/tracker/?func=detail&aid=3554330&group_id=38962&atid=423915
2012-08-06 19:42:49 +02:00
rlar 46980f2cc6 plotit.c #9/9, whitespace 2012-08-05 21:41:25 +02:00
rlar 4803d8bba2 plotit.c #8/9, braces 2012-08-05 21:41:25 +02:00
rlar 6a334da2b4 plotit.c #7/9, braces 2012-08-05 21:41:25 +02:00
rlar f587553217 plotit.c #6/9, braces 2012-08-05 21:41:25 +02:00
rlar 088e88d9b2 plotit.c #5/9, localize 2012-08-05 21:41:25 +02:00
rlar 5f1387892c plotit.c #4/9, line wrap 2012-08-05 21:41:25 +02:00
rlar ed4ad1c0dd plotit.c #3/9, drop some comments 2012-08-05 21:41:25 +02:00
rlar 5c43e8f2fc plotit.c #2/9, emphasize maximize/minimize 2012-08-05 21:41:25 +02:00
rlar 406fc29007 plotit.c #1/9, think positive 2012-08-05 21:41:25 +02:00
h_vogt 11ae043c3d com_measure2.c: enable 'meas dc' without 'from' and 'to' given
measure.c: no error printout during autostop
2012-08-05 20:03:00 +02:00
rlar d6ba5e5b3f cleanup free_struct_variable() 2012-08-05 12:22:47 +02:00
rlar 75c59a26fa variable.c, cleanup (mostly whitespace) 2012-08-05 12:22:47 +02:00
dwarning 99b167b272 correct alter of mos geometries for binned models 2012-08-05 12:11:16 +02:00
rlar 51271d2a0b cp_oddcomm(), plug a memory leak 2012-08-04 22:27:04 +02:00
h_vogt acfc7a2a27 remove memory leaks 2012-08-04 19:09:13 +02:00
dwarning 2516a118a3 indentation 2012-08-04 16:24:38 +02:00
rlar 713091ea22 wlist #3/3, whitespace 2012-08-04 11:40:35 +02:00
rlar fe5ac28b92 wlist #2/3, cleanup 2012-08-04 11:40:35 +02:00
rlar 406dcc3519 wlist #1/3, cleanup 2012-08-04 11:40:35 +02:00
h_vogt 05437b1d48 inpcom.c: safely uncomment unused subcircuits (top level only)
if they contain further nested subcircuits
2012-08-03 22:42:33 +02:00
rlar 9ed7ce4e9e wlist.c, `const' ness 2012-08-03 21:46:13 +02:00
rlar e4c7a8df32 use wl_find() 2012-08-03 20:48:11 +02:00
rlar cf2a0f3df3 cleanup, linewrap 2012-08-03 20:43:12 +02:00
rlar 191ae9ea90 cleanup, char 0 2012-08-03 20:43:10 +02:00
rlar 5a69b9efc4 cleanup, void return 2012-08-03 20:43:06 +02:00
rlar ef37252155 lexical, use wl_append_word() 2012-08-03 20:24:58 +02:00
rlar 62a4ee77d5 lexical #6/6, whitespace 2012-08-03 20:20:18 +02:00
rlar ea558fbc7f lexical #5/6, cleanup 2012-08-03 20:18:17 +02:00
rlar aa188c0766 lexical #4/6, parentheses and braces 2012-08-03 20:16:47 +02:00
rlar c73c0f4318 lexical #3/6, rewrite 2012-08-03 20:12:58 +02:00
rlar 5656203a6c lexical #2/6, linewrap 2012-08-03 20:12:19 +02:00
rlar 5d245c9dab lexical #1/6, cleanup 2012-08-03 20:09:34 +02:00
h_vogt 96d2ff96e0 alloc.c: exlude controlled_exit if not MS Windows
not available in some tests in cmaths and executable like ngproc2mod
2012-08-03 08:28:50 +02:00
rlar 64d00a6b43 lexical #3/3, collapse append(NULL) into cp_ccom()
the sequence
   orig_wlist = wlist;
   append(NULL);
   cp_ccom(wlist, ...);
 is transformed.

 expressions to care about in cp_ccom()
    C1 :=  (wlist->wl_next != NULL)
    C2 :=  (wlist->wl_word != NULL)
    C3 :=  wl_length(wlist)

    D1 :=  (orig_wlist != NULL)
    D2 :=  (orig_wlist->wl_word != NULL)
    D3 :=  wl_length(orig_wlist);

 cases and their significance in cp_ccom():
    orig_wlist = NULL;
    wlist = wl_cons(NULL, NULL);
      C1 == false
      D1 == false
      C2,C3 dont care

    orig_wlist = wl_cons(E1, wl_cons(E2, ... wl_cons(En, NULL)))
    wlist = wl_cons(E1, wl_cons(E2, .... wl_cons(En, wl_cons(NULL, NULL))))
     C1 == true
     D1 == true
     C2 === D2
     C3 === D3 + 1
2012-08-02 18:55:54 +02:00
rlar fec5b00a0d lexical #2/3, fix memory leaks 2012-08-02 18:55:54 +02:00
rlar 042311d0c3 lexical #1/3, move append(NULL) invokations into position 2012-08-02 18:55:54 +02:00
h_vogt 67e0cf0608 undo controlled_exit: not compatible with ancient tests in cmath under LINUX 2012-08-01 22:10:13 +02:00
rlar 1195498978 lexical #19/19, rewrite 2012-07-31 20:49:34 +02:00
rlar 5b67ecda79 lexical #18/19, rewrite
`cw' won't be looked at, thus the append + removal can be dropped
  `wl_word' is already NULL
2012-07-31 20:49:34 +02:00
rlar f990e517b5 lexical #17/19, rewrite 2012-07-31 20:49:34 +02:00
rlar fa9be4336a lexical #16/19, transform append --> append(word) 2012-07-31 20:49:34 +02:00
rlar 43a6d59c72 lexical #15/19, drop `delayed' which is never zero ... 2012-07-31 20:49:33 +02:00
rlar 47b5e9576d lexical #14/19, drop `delayed = 0' wherever its effect isn't visible
without effect, because we return or will overwrite it anyway
2012-07-31 20:49:33 +02:00
rlar 01df4e9437 lexical #13/19, delay `append'
delay its execution, until
    either `wlist' or `cw' will be accessed,
  or
    a return or goto nloop is inevitable
2012-07-31 20:49:33 +02:00
rlar cff6188fe3 lexical #12/19, use `append'
some `assumption' are no longer valid
2012-07-31 20:49:32 +02:00
rlar 5ad8382cf1 lexical #11/19, aproach `append' here 2012-07-31 20:49:32 +02:00
rlar d61f3c10a0 lexical #10/19, split off `append' from `newword' 2012-07-31 20:49:32 +02:00
rlar af0a0c2c03 lexical #9/19, aproach the `append'
cw has never been NULL here,
   because we used to survive an update of cw->wl_next here

wlist hasn't been NULL either,
  because there is no place where wlist becomes NULL without
  setting cw to NULL as well. yet cw isn't NULL (see above)
aproach the `append'
2012-07-31 20:49:31 +02:00
rlar 74cc38f67a lexical #8/19, express where `wlist' and `cw' start being != NULL 2012-07-31 20:49:31 +02:00
rlar 3cbc4b0773 lexical #7/19, express verbosely where `wlist' and `cw' are NULL 2012-07-31 20:49:31 +02:00
rlar ecb2eec279 lexical #6/19, express cp_ccom() property 2012-07-31 20:49:31 +02:00
rlar 3b575d5e3d lexical #5/19, collapse into `newword' 2012-07-31 20:49:30 +02:00
rlar 348dc2d7d1 lexical #4/19, the `else' can take that job (unconditionally) 2012-07-31 20:49:30 +02:00
rlar 80191f3d44 lexical #3/19, attach and instantly remove a NULL wl_word here
this modification is faithful iff cw != NULL  and  cw->wl_next == NULL
  cw != NULL because we have just survived an update of cw->wl_word
  cw->wl_next == NULL is witnessed by:
    1) cw either NULL or pointing to a wl_cons(,NULL)
    2) cw not being modified, and no wl_next being modified
    3) check of all function invocations with wlist/cw argument
         not to modify any wl_next slot
which are:
  1) cp_ccom(wlist, ...)
  2) wl_free() always followed by goto nloop, which does a cw = wl_cons(,NULL)

and cp_ccom() doesn't modify any wl_next slot

the first part of the patch is intentionally similar to newword
`i' and `buf' can be modified here, because we will inevitably `goto done'
attach and instantly remove a NULL wl_word here
2012-07-31 20:49:30 +02:00
rlar ddebb63425 lexical #2/19, rewrite the `else if' 2012-07-31 20:49:29 +02:00
rlar f2f43bcce7 lexical #1/19, use wl_cons 2012-07-31 20:49:29 +02:00
rlar f36772419a Revert "cleanup, use wl_cons()"
This reverts parts of commit 7a7250cdbd.
There is a cleaner way to rewrite lexical.c
2012-07-31 20:48:01 +02:00
h_vogt b85f6bbc7d controlled_exit() instead of exit() 2012-07-31 17:54:51 +02:00
h_vogt 207adefcda evtprint.c: no node data: error message instead of seg fault 2012-07-30 23:32:54 +02:00
rlar 64b8dfc570 use wl_delete_slice() 2012-07-29 13:11:43 +02:00
rlar cdef8aa10e implement wl_delete_slice() 2012-07-29 13:11:42 +02:00
h_vogt d793dd6a61 variable xtrtol may override the XSPICE reduction of trtol 2012-07-29 12:53:31 +02:00
rlar 26468839d4 plotit(), cleanup wordlist processing 2012-07-28 19:55:09 +02:00
rlar 608e0473d3 copy(), allow NULL argument 2012-07-28 19:53:55 +02:00
rlar b808fcec8a fix typo in the commit `use wl_find()' 2012-07-28 14:52:17 +02:00
dwarning 3c3ba4c731 inpgmod.c: correct the range check to prevent overlap 2012-07-28 13:44:33 +02:00
dwarning fd85e8fd42 indentation 2012-07-28 13:39:00 +02:00
rlar 891d99497d use wl_find() 2012-07-28 12:29:23 +02:00
rlar e2be942b72 implement wl_find() 2012-07-28 12:29:22 +02:00
rlar 60398d113c plotit.c, prepare for usage of wl_find() 2012-07-28 12:29:19 +02:00
rlar 7a7250cdbd cleanup, use wl_cons() 2012-07-27 21:50:05 +02:00
h_vogt 1754427bee enhtrans.c: indentations 2012-07-25 23:05:28 +02:00
h_vogt 20429eec4d message "OpenMP: %d threads are requested..." removed 2012-07-25 23:04:13 +02:00
h_vogt 9b122d30a3 enhtrans.c, improved error meassage upon non 'Exxx poly' line bug 2012-07-24 22:04:31 +02:00
h_vogt 12e60822fb measure.c: indentations 2012-07-23 23:26:20 +02:00
h_vogt ed5491c179 measure.c: Update on error message for .meas 2012-07-23 23:23:42 +02:00
h_vogt d1d2ff94e4 measure, error message updated and return(NAN) in case of measure failure
test for failure with isnan()
2012-07-23 22:57:32 +02:00
rlar 05e5854268 plotit.c, whitespace cleanup 2012-07-23 19:17:25 +02:00
rlar 512644ca34 rewrite using wl_ functions 2012-07-22 11:58:29 +02:00
rlar cd2cab2a94 bug fix, cp_ioreset(): fclosing an already closed stream
causing memory corruption when using `>&' stderr redirection
2012-07-22 11:56:25 +02:00
h_vogt 4d0d0fafb9 repair broken ternary function in B-Source
failed if parameters were included in function.
fixed by finding nested parens in gettok_char()
2012-07-21 22:23:49 +02:00
h_vogt c3141d94e0 table: prevent crashes upon wrong inputs, allow time, temper, hertz as part of device or node name (e.g. Rtime), remove some memory leaks 2012-07-21 21:18:24 +02:00
rlar 1e65ea9e80 rewrite using wl_ functions
this fixed following bug as well:
   echo "echo abra ; ; echo kadabra" | ngspice -p
building a circular list and looping forever
2012-07-21 18:22:10 +02:00
rlar 561d30e5bf implement wl_chop() 2012-07-21 14:42:18 +02:00
h_vogt 87c80b842c gettok_char(), return(NULL) if substring not found 2012-07-19 23:16:15 +02:00
rlar fee664bc19 untabify 2012-07-19 20:26:13 +02:00
rlar 31ee05ceef mw_coms.c, fix the cleanup using wl_cons() 2012-07-19 20:25:06 +02:00
rlar 8d0306c27a cpif.c, whitespace, indentation, cleanups 2012-07-19 20:15:33 +02:00
rlar 75d6f6da5e cpitf.c, cleanup using wl_ functions 2012-07-19 20:15:30 +02:00
rlar 3062e25184 mw_comms.c, whitespace, indentation, cleanups 2012-07-19 18:49:27 +02:00
rlar 95978d3697 mw_coms.c, cleanup using wl_cons() 2012-07-19 18:49:25 +02:00
rlar 2b859633a1 fix the fix wl_reverse() for empty lists 2012-07-15 19:42:09 +02:00
rlar a890a55937 fix wl_reverse() for empty lists 2012-07-14 12:39:13 +02:00
rlar 5859f1a61d comments for wl_cons(), wl_append_word() and wl_chop_rest() 2012-07-14 12:39:02 +02:00
rlar 9655b9885a cleanup, use wl_cons(), wl_append_word() and wl_chop_rest() 2012-07-14 10:23:51 +02:00
rlar d9ddaec784 implement wl_cons(), wl_append_word() and wl_chop_rest() 2012-07-14 09:18:39 +02:00
h_vogt 8defa56cf6 remove second call to tmpfile() 2012-07-14 00:10:21 +02:00
rlar 2a22c1b23c bug fix, missing update of a wordlist's wl_prev pointer 2012-07-12 20:44:53 +02:00
rlar e1f8033f1c bug fix, incorrect update of a wordlist's wl_prev pointer 2012-07-12 18:49:01 +02:00
h_vogt 4ca6e56863 printf() ---> out_printf(): allow output redirection into file 2012-07-11 18:56:19 +02:00
rlar 9b34d99e51 emphasize the adms3 `U' device hijack 2012-07-07 20:13:05 +02:00
rlar 84b58ebd3b don't mess with libtools --enable-static / --enable-shared
tie libspice to -shared
    ngspice et al to -static

and use $(STATIC) elsewhere
  which is governed by configure.ac
2012-07-07 14:51:43 +02:00
rlar cb0a48801d introduce AM_CFLAGS = $(STATIC) 2012-07-07 14:51:39 +02:00
h_vogt a0b64a8624 spfactor.c, indentations 2012-07-07 10:04:21 +02:00
h_vogt 2bff8985e3 Adding TD to the fopen() is sufficient in MS Windows
to reliably unlink the temporary file
2012-07-07 09:53:35 +02:00
dwarning c9b729032d no double count of area for capacitances 2012-07-04 22:41:56 +02:00
dwarning dcc22ada60 new scalable diode model including tunnel component 2012-07-04 08:14:33 +02:00
h_vogt cc44d34f70 tmpfile() on MS Windows
create temporary files with Microsoft specific fopen() flags "TD"
and (propably redundant) remove them with an atexit() handler

see bug report #3535348
  "sp*.tmp file created, but not deleted when Windows UAC is en"
  https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3535348&group_id=38962
2012-07-03 18:38:30 +02:00
h_vogt 3a603cf17c Visual Studio: isatty --> _isatty 2012-07-02 19:45:43 +02:00
h_vogt 14914025c0 measure_at(), allow real valued data for meas ac 2012-06-26 23:43:50 +02:00
h_vogt 0207dc7239 no exchange of ' ' by { } inside .control section 2012-06-26 23:28:31 +02:00
h_vogt 188acd0060 correct usage of `unlink()' error return value -1 2012-06-25 15:13:02 +02:00
dwarning 4a75ce744d dioload.c, diosetup.c, correct knee current parameter defaults 2012-06-25 07:43:27 +02:00
dwarning a7ffb7d69f dio/dioload.c, whitespace change 2012-06-25 07:31:03 +02:00
rlar f661a1032d bug fix, ltra and tra, (initial conditions)
reported in
  https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3535544&group_id=38962

bug was introduced in this commit:
  Date:   Wed Dec 31 17:02:46 2003 +0000
  Cleaned up LTRA, TRA and URC code and updated DEVICES file.
2012-06-16 13:06:28 +02:00
dwarning 9648238ed7 call omp_set_num_threads once in central place instead in model routines 2012-06-15 23:14:08 +02:00
rlar b398d39772 xpsice, use the CFLAGS when linking .cm code models 2012-06-13 19:15:28 +02:00
dwarning 9ea4897d06 use unified macro USE_OMP and nthreads is set in setup once - not in load as clause 2012-06-13 19:15:27 +02:00
h_vogt fde8c46356 add ac and dc simulation to memristor model 2012-06-13 19:15:25 +02:00
h_vogt f53eb5cf78 memristor code model in extradev 2012-06-13 19:15:24 +02:00
h_vogt 7bfd4edefc FABS() --> fabs() 2012-06-13 19:15:23 +02:00
h_vogt ff11ccda20 In B source the argument to 'log' may be 0 upon start of simulation, allow recovery like in function 'ln' 2012-06-13 19:15:22 +02:00
h_vogt 0a087a47c8 enable B source debugging in behavioral models, exit on error if variable strict_errorhandling is set 2012-06-13 19:15:21 +02:00
h_vogt 07727f74f0 commands.c: 'options' equivalent to 'option' and allow 'loadsnap' and 'savesnap'
which have been EXPERIMENTAL_CODE so far
2012-06-13 19:15:14 +02:00
dwarning 1c4f960b45 update `bsim3soi' aka `b4soi' 2012-06-13 19:15:07 +02:00
rlar 5bb4c56165 outitf.c, cleanup 2012-06-12 21:26:31 +02:00
rlar 05fd5a03d6 outitf.c, cleanup cancer of the semicolon 2012-06-12 21:26:31 +02:00
rlar 4202354704 outitf.c, cleanup comment 2012-06-12 21:26:31 +02:00
rlar ccea57570e outitf.c, cleanup return 2012-06-12 21:26:31 +02:00
rlar 486ffc9429 outitf.c, whitespace 2012-06-12 21:26:31 +02:00
h_vogt c78d71c363 .nodeset all = value added to set all voltage nodes at once 2012-06-12 21:26:31 +02:00
rlar a34cbdbeab tiny cleanup 2012-06-12 21:26:30 +02:00
rlar b1cbebaa99 fix tcl module compilation
test programs don't compile when compiling for TCL_MODULE
due to redefinition of fprintf()
2012-06-12 21:26:30 +02:00
rlar 6ae6223250 misccoms.c, com_quit(), implement exitcode 2012-06-12 21:26:30 +02:00
rlar 5436de5bab misccoms.c, tiny rewrite 2012-06-12 21:26:30 +02:00
rlar 8dcf132199 misccoms.c, shrink scope 2012-06-12 21:26:30 +02:00
rlar cc32eae60b misccoms.c, collect byemessage() 2012-06-12 21:26:30 +02:00
rlar b9c0159cd6 misccoms.c, noask 2012-06-12 21:26:30 +02:00
rlar 41de8d95ff misccoms.c, collapse strings 2012-06-12 21:26:30 +02:00
rlar 11878ee4ad misccoms.c, use strncasecmp() 2012-06-12 21:26:30 +02:00
rlar 5f3b453a30 misccoms.c, indentation and whitespace cleanup 2012-06-12 21:26:30 +02:00
rlar f65cdd2f84 Changed line ending of several files from DOS to UNIX 2012-06-12 21:26:29 +02:00
rlar 3d34b22ebf fix file modes 2012-06-12 21:26:29 +02:00
h_vogt a212be67bc Exit with error if file not found: fgets() cannot read from NULL 2012-06-12 21:26:29 +02:00
rlar 14f884729c raw_write() always fopen("wb"), even on windows use "\n" line termination 2012-06-12 21:26:29 +02:00
rlar 10e5dbfbcc raw_read() always fopen("rb") even on windows, always swallow "\r" 2012-06-12 21:26:29 +02:00
rlar e598598d70 Reverting "NUMDdump(): add binary mode"
This reverts commit 40e8f868da
2012-06-12 21:26:29 +02:00
rlar d8105873db remove error.h, use fteext.h for controlled_exit() 2012-06-12 21:26:29 +02:00
rlar a9eb96e164 avoid `ambiguous else' Warning 2012-06-12 21:26:29 +02:00
h_vogt 023374fa79 update `making xspice' within actual ngspice 2012-06-12 21:26:27 +02:00
h_vogt 40e8f868da NUMDdump(): add binary mode
fopen() with wb
write operating point (external state) for true binary output
2012-06-12 21:26:27 +02:00
h_vogt 80ca57eb76 beautify code 2012-06-12 21:26:27 +02:00
h_vogt d65259fd45 error return only if variable `error' is set 2012-06-12 21:26:27 +02:00
h_vogt ca8e9b2d2d prevent false outputs of @dev[param], when not defined in ac simulation 2012-06-12 21:26:27 +02:00
h_vogt fe86d3d5c7 Enable ctrl-c to interrupt a simulation also for Windows GUI 2012-06-12 21:26:27 +02:00
h_vogt a820a7cba8 Independent variable `temper' now returns the temperature in degree C 2012-06-12 21:26:27 +02:00
h_vogt a51953d93e allow `time', `temper', and `hertz' in expressions of behavioral R,L,C devices 2012-06-12 21:26:27 +02:00
rlar bde3536ecc subckt.c, doit(): fix another memory leak 2012-06-12 21:26:27 +02:00
rlar e3402554f0 subckt.c, doit(): fix a memory leak 2012-06-12 21:26:27 +02:00
h_vogt dcde15afd2 exclude circuits with XSPICE 'A' devices from using 'savesnap'
XSPICE data storage is not yet implemented
2012-06-12 21:26:26 +02:00
rlar 58b0614467 fix memory leaks in ASRC and in INPgetTree()
implement a reference counter `usecnt' for the elements
  of the `INPparseTree'
2012-06-12 21:26:26 +02:00
rlar 4fb75fbd51 INPgetTree(), express the live range of some globals 2012-06-12 21:26:26 +02:00
rlar d21b3a3cd5 mkfnode(), minor rewrite 2012-06-12 21:26:26 +02:00
rlar e889c821d1 configure.ac, fix `NO_X' and `has_no_help'
drop configure options `--enable-x' and `--disable-x'
use `--with-x' and `--without-x' provided by AC_PATH_X

bug tracker item:
  [ngspice-Bugs-3515015] Startup error message without x11
  https://sourceforge.net/tracker/index.php?func=detail&aid=3515015&group_id=38962&atid=423915
2012-04-06 16:19:49 +02:00
rlar 7641450b29 inpptree.c, fix differentiation of PTF_FLOOR PTF_CEIL and PTF_POW 2012-04-05 21:55:44 +02:00