diff --git a/src/ciderlib/oned/onedest.c b/src/ciderlib/oned/onedest.c index cc19c1acf..56a544ed2 100644 --- a/src/ciderlib/oned/onedest.c +++ b/src/ciderlib/oned/onedest.c @@ -12,6 +12,8 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "onedext.h" #include "oneddefs.h" +extern void CiderLoaded(int); + void ONEdestroy(ONEdevice *pDevice) { @@ -86,7 +88,6 @@ ONEdestroy(ONEdevice *pDevice) FREE(pDevice); { - extern void CiderLoaded(int); CiderLoaded(-1); } } diff --git a/src/ciderlib/oned/onemesh.c b/src/ciderlib/oned/onemesh.c index 62766e7f0..45f8fc911 100644 --- a/src/ciderlib/oned/onemesh.c +++ b/src/ciderlib/oned/onemesh.c @@ -12,6 +12,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "onedext.h" #include "oneddefs.h" +extern void CiderLoaded(int); /* Forward Declarations */ /* static void ONEresetEvalFlag(ONEdevice *); sjb - not used */ @@ -195,7 +196,6 @@ ONEbuildMesh(ONEdevice *pDevice, ONEcoord *pCoord, ONEdomain *pDomain, FREE(nodeArray); { - extern void CiderLoaded(int); CiderLoaded(1); } diff --git a/src/ciderlib/twod/twodest.c b/src/ciderlib/twod/twodest.c index 35c7ecf9a..232c39867 100644 --- a/src/ciderlib/twod/twodest.c +++ b/src/ciderlib/twod/twodest.c @@ -12,6 +12,8 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "twoddefs.h" #include "twodext.h" +extern void CiderLoaded(int); + void TWOdestroy(TWOdevice *pDevice) { @@ -108,7 +110,6 @@ TWOdestroy(TWOdevice *pDevice) FREE( pDevice ); { - extern void CiderLoaded(int); CiderLoaded(-1); } } diff --git a/src/ciderlib/twod/twomesh.c b/src/ciderlib/twod/twomesh.c index cbc058346..4eddd4d87 100644 --- a/src/ciderlib/twod/twomesh.c +++ b/src/ciderlib/twod/twomesh.c @@ -19,6 +19,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group static void doMobCoeffs(TWOelem *, int); static void resetEvalFlag(TWOdevice *pDevice); +extern void CiderLoaded(int); void TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, @@ -459,7 +460,6 @@ TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, FREE(edgeArrayH); { - extern void CiderLoaded(int); CiderLoaded(1); } /* diff --git a/src/main.c b/src/main.c index 3c36990cc..653d3ddcb 100644 --- a/src/main.c +++ b/src/main.c @@ -107,6 +107,8 @@ FILE *flogp = NULL; /* log file ('-o logfile' command line option) */ bool orflag = FALSE; /* global for -o option */ #endif +extern int IsCiderLoaded(void); + FILE *slogp = NULL; /* soa log file ('--soa-log file' command line option) */ /* Frontend and circuit options */ @@ -535,7 +537,7 @@ sp_shutdown(int exitval) { #ifdef CIDER { - extern int IsCiderLoaded(void); + char *cider_quit_s = NULL; bool cider_com_quit = TRUE; if (exitval != EXIT_BAD) { diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index 398771048..063bbd5f9 100644 --- a/src/spicelib/parser/inpptree.c +++ b/src/spicelib/parser/inpptree.c @@ -1167,12 +1167,20 @@ INPparseNode *PT_mkfnode(const char *fname, INPparseNode * arg) p->function = funcs[i].funcptr; p->data = NULL; - if(p->funcnum == PTF_PWL) + if (p->funcnum == PTF_PWL) { p = prepare_PTF_PWL(p); + if (p == NULL) { + fprintf(stderr, "Error while parsing function '%s'\n", buf); + if (ft_stricterror) + controlled_exit(EXIT_BAD); + return mkfirst(NULL, arg); + } + } if (p->funcnum == PTF_DDT) p = prepare_PTF_DDT(p); + return (p); }