Commit Graph

5398 Commits

Author SHA1 Message Date
rlar f78f03e6df spicelib/parser, support instance parameter defaults on .model lines 2018-01-21 21:39:48 +01:00
rlar c680b28486 DEVdestroy(), collapse this function
move the model and instance iteration to the CKTdestroy() function.
The device specific DEVdestroy() implementation is empty now
  in almost every case.
2018-01-21 12:37:07 +01:00
rlar daca48a117 DEVdestroy(), cleanup memory maintenance
move the cleanup business over to
  DEVmodDelete() and DEVdelete()
and invoke them to do the job.
2018-01-21 12:37:05 +01:00
rlar f25b7e2f08 DEVmodDelete(), change API
instead of searching and then deleting a device-model,
  just delete a given model.
drop the loop to remove all instances too.
Both, search and instance removal, shall be done somewhere else.

right now nowhere,
  because DEVmodDelete() currently isn't used anyway.
2018-01-21 12:37:04 +01:00
rlar 174b424d13 DEVdelete(), change API
instead of searching and then deleting a device-instance,
  just delete a given instance.
The search shall be done somewhere else.

right now nowhere,
  because DEVdelete() currently isn't used anyway.
2018-01-21 12:37:01 +01:00
rlar d7abe962e0 devices/*, USE_OMP, cleanup 'InstanceArray' usage
store 'InstanceArray' in the very first module only,
  NULL it in any other.

FREE() it in every module to treat them all the same in XXXdestroy()
2018-01-21 11:42:37 +01:00
rlar 79919ed069 devices/bsimsoi, USE_OMP, add missing FREE(...InstanceArray) 2018-01-21 11:41:02 +01:00
rlar 80d5614f49 devices/os6, introduce missing files mos6del.c and mos6mdel.c
For unknown reason, mos6 is missing
  MOS6mDelete() aka DEVmodDelete()
and
  MOS6delete() aka DEVdelete()
2018-01-21 11:39:48 +01:00
rlar c59983c5fc introduce GENinstanceFree(), GENmodelFree() 2018-01-12 22:16:43 +01:00
rlar f2a92f0347 parser/inpdpar.c, cleanup, introduce find_instance_parameter() 2018-01-10 17:33:39 +01:00
rlar 95b2694f04 parser/inpdpar.c, cleanup, use a local `IFparm *' 2018-01-10 17:31:58 +01:00
rlar f27211489d parser/inpdpar.c, cleanup, use a local `IFdevice *' 2018-01-10 17:31:46 +01:00
rlar 1a9ec558af parser/inpdpar.c, cleanup, almost whitespace 2018-01-10 17:31:12 +01:00
rlar 00e7af3c61 parser/inpdpar.c, cleanup, use a 'switch' 2018-01-10 17:31:10 +01:00
rlar 81f7b6f40d parser/inpdpar.c, cleanup, for(;;) search, break then process 2018-01-10 17:31:09 +01:00
rlar 8cf4f16ec0 analysis/cktpname.c, cleanup, use a local `IFparm *' 2018-01-10 17:31:06 +01:00
rlar 38c317ad8f analysis/cktpname.c, cleanup, use a local `IFdevice *' 2018-01-10 17:30:26 +01:00
rlar 42aef28418 analysis/cktpname.c, cleanup obfuscated loop termination 2018-01-10 17:26:03 +01:00
rlar c3a26e3cd2 analysis/cktpname.c, cleanup, mostly whitespace 2018-01-10 17:26:03 +01:00
rlar ba6eff6e13 parser/inpgmod.c, cleanup, introduce find_model_parameter() 2018-01-10 17:26:03 +01:00
rlar 4416dda847 parser/inpgmod.c, cleanup, loop with a `IFparm *' 2018-01-10 17:26:03 +01:00
rlar c094a52b5f parser/inpgmod.c, cleanup, use a local `IFdevice *' 2018-01-10 17:26:03 +01:00
rlar 527fbf78c8 parser/inpgmod.c, drop obfuscated 'txl' exceptional processing
dependent on given R and L parameter values,
txl models might be transformed to cpl models in inpdomod.c
This would cause a "unknown parameter" warning in inpgmod.c,
  when searching for the "txl" flag in a "cpl" model,
  which is avoided with some awkward special handling in inpgmod.c

This commit removes the special handling for this situation
by addition of an "alias" parameter "txl" to the "cpl" module parameter
  description in cpl/cpl.c

Note,
  the setModelParm() invocation is a noop for both "cpl" and "txl",
  see code in
     cplmpar.c function CPLmParam() and
     txlmpar.c function TXLmParam()
2018-01-10 17:26:00 +01:00
rlar 8e77d740fc parser/inpgmod.c, cleanup, local variables 2018-01-10 16:41:58 +01:00
rlar c2e0c944a6 parser/inpgmod.c, cleanup, fuse the if's 2018-01-10 16:41:52 +01:00
rlar 9bab8cf0f9 parser/inpgmod.c, cleanup, for(;;) search, break then process 2018-01-10 16:41:19 +01:00
rlar 5bc1a4163c parser/inpgmod.c, fix an almost bug, (level=...)
When 'level' was a valid model parameter,
  it was processed like any other parameter,
but additionally the
  ´if (strcmp(parm. "level"))'
invoked INPgetValue() a second time.

This didn't cause harm, merely because the next token after the
  level=number
almost necessarily is a string (the bginning parameter= of the next assignment)
thus not a parse-able number, and
thus the second INPgetValue didn't modify the 'line' pointer.

For clarity invoke the "level" skipping only if "level"
  is not a valid model parameter.
2018-01-10 16:41:05 +01:00
rlar 408e3239f0 fix commit: devices/**/*defs*.h, fix adms too 2018-01-10 10:27:35 +01:00
rlar b335282094 devices/**/*defs*.h, fix adms too 2018-01-09 20:34:42 +01:00
rlar 43dacbc1bf devices/**/*defs*.h, use a struct GENinstance slot 2018-01-09 20:34:19 +01:00
rlar bc84b06b24 make struct GENinstance truly generic
drop the GENnode struct member, which is actually part of
  the derived instance structs
2018-01-09 20:12:02 +01:00
rlar 315990688c gendef.h, get rid of the awkward counted GENnode macros 2018-01-09 20:12:02 +01:00
rlar 566520cef5 unify, add missing GENstate struct member
for all instance structs, even when actually unused.
2018-01-09 20:11:59 +01:00
rlar 39800df3fb rename ancient misspelled struct members 2018-01-09 19:45:06 +01:00
rlar b511a9179a extend commit: spicelib/devcies/*dest.c, rewrite DEVdestroy() functions 2018-01-09 19:42:57 +01:00
rlar dcd96634f7 devices/**/*defs*.h, fix adms too 2018-01-09 19:42:55 +01:00
rlar 9b45dbbbba devices/**/*defs*.h, use a struct GENmodule slot 2018-01-09 19:42:53 +01:00
rlar 8c4ae60189 nbjtdefs.h, fix /* --- end of generic struct GENmodel --- */ 2018-01-09 18:41:51 +01:00
rlar 8ba1999d15 devices/**/XXXmdel.c, fix adms too 2018-01-07 22:09:43 +01:00
rlar 982ba45bab devices/**/XXXmdel.c, drop goto 2018-01-07 22:07:45 +01:00
rlar ae45e5cac9 devices/**/XXXmdel.c, cleanup model loop 2018-01-07 22:07:22 +01:00
rlar 07fa2411ea devices/**/XXXmdel.c, cleanup instance loop 2018-01-07 22:01:22 +01:00
rlar 12dfa082ce devices/**/XXXmdel.c, use GENmodel and GENinstance 2018-01-07 21:42:01 +01:00
rlar a0e8c91d89 devices/**/XXXmdel.c, unify variable and argument names 2018-01-07 21:39:49 +01:00
rlar 58f745f57f devices/**/XXXmdel.c, cleanup linewrap 2018-01-07 21:39:01 +01:00
rlar 3095330565 devices/**/XXXmdel.c, cleanup whitespace 2018-01-07 21:37:41 +01:00
rlar bee207ccd9 devices/**/XXXmdel.c, cleanup braces 2018-01-07 21:28:02 +01:00
rlar eaa1fb7521 devices/**/XXXdel.c, fix adms too 2018-01-07 20:32:25 +01:00
rlar 5ecf02796b devices/**/XXXdel.c, use GENmodel and GENinstance 2018-01-07 20:04:28 +01:00
rlar b7c2cf709a devices/**/XXXdel.c, unify, rename variables
rename  model, modPtr, instPtr --> inModel, model, fast
  rename  inst --> here
2018-01-07 20:04:28 +01:00