aboutsummaryrefslogtreecommitdiffstats
path: root/cad/spice/files
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2010-02-12 03:40:33 +0800
committerpgollucci <pgollucci@FreeBSD.org>2010-02-12 03:40:33 +0800
commite57177d0c2705472394e658a1ee979e7878a29f5 (patch)
treefc0a8783399848bd68e346d0985782341ae38078 /cad/spice/files
parentc6d3c67c71aa2d9640d6e7d83080b7d8b82b9c11 (diff)
downloadfreebsd-ports-gnome-e57177d0c2705472394e658a1ee979e7878a29f5.tar.gz
freebsd-ports-gnome-e57177d0c2705472394e658a1ee979e7878a29f5.tar.zst
freebsd-ports-gnome-e57177d0c2705472394e658a1ee979e7878a29f5.zip
-Clean some warnings by using string.h instead of strings.h
Applied several patches from this website: http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/secD.html specifically fixes for: - Where command causes crashes - Recognition of scale factors in arbitrary source - Current Controlled Switch in subckt, parsing error - Noise analysis bug - Save segmentation faults - BSIM1 model xpart parameter random - Tran analysis default TSTEP PR: ports/143727 Submitted by: "Pedro F. Giffuni" <giffunip@tutopia.com>
Diffstat (limited to 'cad/spice/files')
-rw-r--r--cad/spice/files/patch-src_include_os_bsd_h7
-rw-r--r--cad/spice/files/patch-src_lib_ckt_noisean_c25
-rw-r--r--cad/spice/files/patch-src_lib_ckt_traninit_c14
-rw-r--r--cad/spice/files/patch-src_lib_dev_bsim1_bimpar_c11
-rw-r--r--cad/spice/files/patch-src_lib_dev_mos6_mos6load_c11
-rw-r--r--cad/spice/files/patch-src_lib_fte_outitf_c11
-rw-r--r--cad/spice/files/patch-src_lib_fte_subckt_c22
-rw-r--r--cad/spice/files/patch-src_lib_fte_where_c18
-rw-r--r--cad/spice/files/patch-src_lib_inp_inpgtok_c41
-rw-r--r--cad/spice/files/patch-src_lib_inp_inpptree_c13
10 files changed, 167 insertions, 6 deletions
diff --git a/cad/spice/files/patch-src_include_os_bsd_h b/cad/spice/files/patch-src_include_os_bsd_h
index bb30f55ce85c..95d2db43250f 100644
--- a/cad/spice/files/patch-src_include_os_bsd_h
+++ b/cad/spice/files/patch-src_include_os_bsd_h
@@ -1,6 +1,6 @@
---- src/include/os_bsd.h.orig Sat Apr 24 18:09:46 1993
-+++ src/include/os_bsd.h Mon Nov 12 03:14:36 2007
-@@ -8,18 +8,35 @@
+--- src/include/os_bsd.h.orig 1993-04-24 23:09:46.000000000 +0000
++++ src/include/os_bsd.h 2010-02-09 16:25:54.000000000 +0000
+@@ -8,18 +8,34 @@
#include "os_unix.h"
@@ -8,7 +8,6 @@
+#define HAS_STDLIB /* #include <stdlib.h> for libc defs */
+#define HAS_SYSVDIRS /* <sys/dirent.h> */
+#define HAS_INTWAITSTATUS /* wait(2) takes an int *, not a union */
-+#define HAS_STRINGS /* use <strings.h> instead of <string.h> */
+#define HAS_STRCHR /* strchr(3) instead of index(3) */
+#define HAS_ATRIGH /* acosh(3), asinh(3), atanh(3) */
+#define HAS_FLOAT_H /* float.h */
diff --git a/cad/spice/files/patch-src_lib_ckt_noisean_c b/cad/spice/files/patch-src_lib_ckt_noisean_c
new file mode 100644
index 000000000000..a23651be23bc
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_ckt_noisean_c
@@ -0,0 +1,25 @@
+--- src/lib/ckt/noisean.c.orig 2010-02-10 00:07:14.000000000 +0000
++++ src/lib/ckt/noisean.c 2010-02-10 00:11:12.000000000 +0000
+@@ -2,6 +2,9 @@
+ Copyright 1990 Regents of the University of California. All rights reserved.
+ Author: 1987 Gary W. Ng
+ **********/
++/* Patch to noisean.c by Richard D. McRoberts.
++ *
++ */
+
+ #include "spice.h"
+ #include <stdio.h>
+@@ -107,8 +110,12 @@
+ error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT,
+ (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT,
+ ckt->CKTdcMaxIter);
++ if (error) return(error);
+
++ ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG;
++ error = CKTload(ckt);
+ if (error) return(error);
++
+ data = (Ndata*)MALLOC(sizeof(Ndata));
+ step = 0;
+ data->freq = job->NstartFreq;
diff --git a/cad/spice/files/patch-src_lib_ckt_traninit_c b/cad/spice/files/patch-src_lib_ckt_traninit_c
new file mode 100644
index 000000000000..e600a2101c51
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_ckt_traninit_c
@@ -0,0 +1,14 @@
+--- src/lib/ckt/traninit.c.orig 2010-02-09 23:52:59.000000000 +0000
++++ src/lib/ckt/traninit.c 2010-02-09 23:57:48.000000000 +0000
+@@ -22,7 +22,10 @@
+ ckt->CKTinitTime = ((TRANan*)job)->TRANinitTime;
+ ckt->CKTmaxStep = ((TRANan*)job)->TRANmaxStep;
+ if(ckt->CKTmaxStep == 0) {
+- ckt->CKTmaxStep = (ckt->CKTfinalTime-ckt->CKTinitTime)/50;
++ if ( ckt->CKTstep < (ckt->CKTfinalTime - ckt->CKTinitTime)/50.0) {
++ ckt->CKTmaxStep = ckt->CKTstep; }
++ else
++ { ckt->CKTmaxStep = (ckt->CKTfinalTime - ckt->CKTinitTime)/50.0; }
+ }
+ ckt->CKTdelmin = 1e-9*ckt->CKTmaxStep; /* XXX */
+ ckt->CKTmode = ((TRANan*)job)->TRANmode;
diff --git a/cad/spice/files/patch-src_lib_dev_bsim1_bimpar_c b/cad/spice/files/patch-src_lib_dev_bsim1_bimpar_c
new file mode 100644
index 000000000000..ea59563335aa
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_dev_bsim1_bimpar_c
@@ -0,0 +1,11 @@
+--- src/lib/dev/bsim1/b1mpar.c.orig 2010-02-09 16:02:41.000000000 +0000
++++ src/lib/dev/bsim1/b1mpar.c 2010-02-09 16:03:44.000000000 +0000
+@@ -287,7 +287,7 @@
+ mod->B1gateBulkOverlapCapGiven = TRUE;
+ break;
+ case BSIM1_MOD_XPART :
+- mod->B1channelChargePartitionFlag = value->iValue;
++ mod->B1channelChargePartitionFlag = value->rValue;
+ mod->B1channelChargePartitionFlagGiven = TRUE;
+ break;
+ case BSIM1_MOD_RSH :
diff --git a/cad/spice/files/patch-src_lib_dev_mos6_mos6load_c b/cad/spice/files/patch-src_lib_dev_mos6_mos6load_c
new file mode 100644
index 000000000000..664f58498a76
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_dev_mos6_mos6load_c
@@ -0,0 +1,11 @@
+--- src/lib/dev/mos6/mos6load.c.orig 2010-02-09 16:16:28.000000000 +0000
++++ src/lib/dev/mos6/mos6load.c 2010-02-09 16:16:53.000000000 +0000
+@@ -509,7 +509,7 @@
+ }
+ vdshere = vds * here->MOS6mode;
+ von=(here->MOS6tVbi*model->MOS6type)+model->MOS6gamma*sarg
+- - model->MOS6gamma1 * vbsvbd;
++ - model->MOS6gamma1 * vbsvbd
+ - model->MOS6sigma * vdshere;
+ vgon = (here->MOS6mode==1?vgs:vgd) - von;
+
diff --git a/cad/spice/files/patch-src_lib_fte_outitf_c b/cad/spice/files/patch-src_lib_fte_outitf_c
new file mode 100644
index 000000000000..dda84bc00665
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_fte_outitf_c
@@ -0,0 +1,11 @@
+--- src/lib/fte/outitf.c.orig 2010-02-09 15:49:01.000000000 +0000
++++ src/lib/fte/outitf.c 2010-02-09 15:49:55.000000000 +0000
+@@ -353,7 +353,7 @@
+
+ data->name = copy(name);
+
+- unique = devname;
++ unique = copy(devname);
+ INPinsert(&unique, (INPtables *) ft_curckt->ci_symtab);
+ data->specName = unique;
+
diff --git a/cad/spice/files/patch-src_lib_fte_subckt_c b/cad/spice/files/patch-src_lib_fte_subckt_c
new file mode 100644
index 000000000000..0604c39db8d3
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_fte_subckt_c
@@ -0,0 +1,22 @@
+--- src/lib/fte/subckt.c.orig 2010-02-09 15:25:54.000000000 +0000
++++ src/lib/fte/subckt.c 2010-02-09 15:57:52.000000000 +0000
+@@ -648,6 +648,9 @@
+ case 'f':
+ case 'H':
+ case 'h':
++ /* 2 lines here to fix w bug, NCF 1/31/95 */
++ case 'W':
++ case 'w':
+ return (1);
+
+ default:
+@@ -944,7 +947,8 @@
+ case 't': return (4);
+ case 'u': return (3);
+ case 'v': return (2);
+- case 'w': return (3);
++ /* change 3 to 2 here to fix w bug, NCF 1/31/95 */
++ case 'w': return (2);
+ case 'z': return (3);
+
+ default:
diff --git a/cad/spice/files/patch-src_lib_fte_where_c b/cad/spice/files/patch-src_lib_fte_where_c
new file mode 100644
index 000000000000..bc3bc04eb299
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_fte_where_c
@@ -0,0 +1,18 @@
+--- src/lib/fte/where.c.orig 2010-02-09 15:32:23.000000000 +0000
++++ src/lib/fte/where.c 2010-02-09 15:35:36.000000000 +0000
+@@ -17,6 +17,15 @@
+ {
+ char *msg;
+
++ /*CDHW typing where with no current circuit caused crashes CDHW*/
++ if (!ft_curckt) {
++ fprintf(cp_err, "There is no current circuit\n");
++ return;
++ }
++ else if (ft_curckt->ci_ckt != "") {
++ fprintf(cp_err, "No unconverged node found.\n");
++ return;
++ }
+ msg = (*ft_sim->nonconvErr)((GENERIC *) (ft_curckt->ci_ckt), 0);
+
+ printf("%s", msg);
diff --git a/cad/spice/files/patch-src_lib_inp_inpgtok_c b/cad/spice/files/patch-src_lib_inp_inpgtok_c
new file mode 100644
index 000000000000..29bce2b1f7b7
--- /dev/null
+++ b/cad/spice/files/patch-src_lib_inp_inpgtok_c
@@ -0,0 +1,41 @@
+--- src/lib/inp/inpgtok.c.orig 2010-02-09 15:39:09.000000000 +0000
++++ src/lib/inp/inpgtok.c 2010-02-09 15:43:10.000000000 +0000
+@@ -27,6 +27,7 @@
+ int gobble; /* eat non-whitespace trash AFTER token? */
+ {
+ char * point;
++ int signstate;
+
+ /* scan along throwing away garbage characters */
+ for(point = *line;*point != '\0' ; point++ ) {
+@@ -41,6 +42,7 @@
+ /* mark beginning of token */
+ *line = point;
+ /* now find all good characters */
++ signstate = 0;
+ for(point = *line;*point!='\0';point++) {
+ if(*point == ' ') break;
+ if(*point == '\t') break;
+@@ -48,6 +50,22 @@
+ if(*point == '(') break;
+ if(*point == ')') break;
+ if(*point == ',') break;
++ /* This is not complex enough to catch all errors, but it will
++ get the "good" parses */
++ if(*point == '+' && (signstate == 1 || signstate == 3)) break;
++ if(*point == '-' && (signstate == 1 || signstate == 3)) break;
++ if(*point == '*') break;
++ if(*point == '/') break;
++ if(*point == '^') break;
++ if (isdigit(*point) || *point == '.') {
++ if (signstate > 1)
++ signstate = 3;
++ else
++ signstate = 1;
++ } else if (tolower(*point) == 'e' && signstate == 1)
++ signstate = 2;
++ else
++ signstate = 3;
+ }
+ if (point == *line && *point) /* Weird items, 1 char */
+ point++;
diff --git a/cad/spice/files/patch-src_lib_inp_inpptree_c b/cad/spice/files/patch-src_lib_inp_inpptree_c
index 0819cac1407d..289c1026772f 100644
--- a/cad/spice/files/patch-src_lib_inp_inpptree_c
+++ b/cad/spice/files/patch-src_lib_inp_inpptree_c
@@ -1,5 +1,5 @@
---- src/lib/inp/inpptree.c.orig Mon May 3 02:16:54 1993
-+++ src/lib/inp/inpptree.c Sun May 14 09:34:56 2006
+--- src/lib/inp/inpptree.c.orig 1993-05-03 09:16:54.000000000 +0000
++++ src/lib/inp/inpptree.c 2010-02-09 15:45:52.000000000 +0000
@@ -1,6 +1,8 @@
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
@@ -32,3 +32,12 @@
}
break;
+@@ -977,7 +971,7 @@
+ break;
+ }
+
+- td = INPevaluate(&sbuf, &err, 0);
++ td = INPevaluate(&sbuf, &err, 1);
+ if (err == OK) {
+ el.token = TOK_VALUE;
+ el.type = TYP_NUM;