From ab5bf36f1ca6b54256b2964ba89e264a4c8348d5 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 7 Jan 2017 19:58:18 +0100 Subject: [PATCH] FIXME, worst case, can'T fit GENnodes[] usage at all ! this device has a completely variable number of ports, and those are not at all at the expected GENnodes[] place. perhaps this can be worked around by saying it has zero ports, together with special code in INP2..c --- src/spicelib/devices/cpl/cpl.c | 4 ++-- src/spicelib/devices/cpl/cpldefs.h | 4 ++++ src/spicelib/devices/cpl/cplinit.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/spicelib/devices/cpl/cpl.c b/src/spicelib/devices/cpl/cpl.c index 58838ac65..e0acbe8ff 100644 --- a/src/spicelib/devices/cpl/cpl.c +++ b/src/spicelib/devices/cpl/cpl.c @@ -27,8 +27,8 @@ IFparm CPLmPTable[] = { /* model parameters */ }; char *CPLnames[] = { - "P+", - "P-" + "P+", /* 1 */ /* doesn't fit either ! */ + "P-" /* 2 */ /* doesn't fit either ! */ }; int CPLnSize = NUMELEMS(CPLnames); diff --git a/src/spicelib/devices/cpl/cpldefs.h b/src/spicelib/devices/cpl/cpldefs.h index ad833fb32..aa8ed1d9a 100644 --- a/src/spicelib/devices/cpl/cpldefs.h +++ b/src/spicelib/devices/cpl/cpldefs.h @@ -23,8 +23,12 @@ typedef struct sCPLinstance { IFuid CPLname; /* pointer to character string naming this instance */ int CPLstate; /* not used */ + /* GENnode[] { */ int *CPLposNodes; int *CPLnegNodes; + // FIXME, worst case, two array here within GENnode[] ! + /* } */ + int dimension; double CPLlength; int *CPLibr1; diff --git a/src/spicelib/devices/cpl/cplinit.c b/src/spicelib/devices/cpl/cplinit.c index 34f1bc43c..4d06cd6bd 100644 --- a/src/spicelib/devices/cpl/cplinit.c +++ b/src/spicelib/devices/cpl/cplinit.c @@ -11,8 +11,8 @@ SPICEdev CPLinfo = { "CplLines", "Simple Coupled Multiconductor Lines", - &CPLnSize, - &CPLnSize, + &CPLnSize, /* FIXME, should be say 0 here for this special case ? */ + &CPLnSize, /* FIXME, should be say 0 here for this special case ? */ CPLnames, &CPLpTSize,