~kicad/+git/ngspice-mirror-sourceforge:fix-CKTunsetup-3

Last commit made on 2017-03-13
Get this branch:
git clone -b fix-CKTunsetup-3 https://git.launchpad.net/~kicad/+git/ngspice-mirror-sourceforge
Members of KiCad can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
fix-CKTunsetup-3
Repository:
lp:~kicad/+git/ngspice-mirror-sourceforge

Recent commits

57c7965... by rlar <rlar>

fix spelling, too much / too many

f39669f... by rlar <rlar>

bug fix for commit "inp2q.c, #17/23, rewrite, using a 'for' loop"

d4773b7... by rlar <rlar>

untabify commit "Fixed file_source. See the example.cir,"

b772d05... by rlar <rlar>

xspice/icm/analog/file_source/cfunc.mod, use CALLBACK to free and fclose

876c25c... by rlar <rlar>

xspice, implement "CALLBACK"

Allow to register a callback function in the cfunc.mod files,
  which will be invoked in MIFdestroy.
Usefull to "free" memory which has been allocated locally in a cfunc.mod file.

8ae174f... by Marcel Hendrix

Fixed file_source. See the example.cir,

It exercises most parameters and supports ALTER.
Fixme, the data file is opened, but never closed!

760a30b... by rlar <rlar>

mifsetup.c, MIFunsetup(), #3/3 now invoke CKTdltNNum()

94044a1... by rlar <rlar>

mifsetup.c, MIFunsetup(), #2/3 copy paste from MIFsetup()

d4ad598... by rlar <rlar>

mifsetup.c, MIFunsetup(), #1/3 delete broken code

85e9422... by rlar <rlar>

src/spicelib/devices/*/*set.c, XXXunsetup(), reset local node variables unconditionally

and use a more robust test for local node numbers.

That is, transform this pattern :
  if (here->Node && ...) {
     CKTdltNNum(ckt, here->Node);
     here->Node = 0;
  }
into this :
  if (here->Node > 0 && ...)
     CKTdltNNum(ckt, here->Node);
  here->Node = 0;

The change of "!= 0" ==> "> 0" accounts for rare cases where "Node"
   might have been set to -1, (meaning "unconnected")
The unconditional execution of the zero assignment is for those cases
  where "Node" might have been assigned to some external or other local Node.
If so, the variable would not be set to zero, confusing the "guarding" if's
  in the corresponding XXXsetup() routine.

The Pattern to follow is:
  1) unset and delete *all* local Nodes in XXXunsetup()
  2) allocate all of them again in a re-invocation of XXXsetup(),
       exactly the same way as in the very first invocation.