Commit Graph

3047 Commits

Author SHA1 Message Date
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 6cd13e0475 pll-xspice-fstep.cir: pll with ref frequency steps 2012-07-31 18:05:10 +02:00
h_vogt b85f6bbc7d controlled_exit() instead of exit() 2012-07-31 17:54:51 +02:00
h_vogt c31fc334f6 pll-xspice.cir: save command added 2012-07-31 17:31:28 +02:00
h_vogt 207adefcda evtprint.c: no node data: error message instead of seg fault 2012-07-30 23:32:54 +02:00
h_vogt c0b5a78097 new XSPICE example: use trtol=1
less ripple, but longer simulation time
2012-07-30 00:01:56 +02:00
h_vogt 85ece25a3a new XSPICE example: mixed mode pll circuit 2012-07-29 13:52:23 +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