From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 10 14:50:10 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015251065694 for ; Wed, 10 Feb 2010 14:50:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B8A4C8FC1A for ; Wed, 10 Feb 2010 14:50:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o1AEo92m033722 for ; Wed, 10 Feb 2010 14:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1AEo9ui033721; Wed, 10 Feb 2010 14:50:09 GMT (envelope-from gnats) Resent-Date: Wed, 10 Feb 2010 14:50:09 GMT Resent-Message-Id: <201002101450.o1AEo9ui033721@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Pedro F. Giffuni" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A331A106566B for ; Wed, 10 Feb 2010 14:44:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 91E2E8FC1D for ; Wed, 10 Feb 2010 14:44:59 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o1AEiwET047281 for ; Wed, 10 Feb 2010 14:44:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o1AEiwgX047280; Wed, 10 Feb 2010 14:44:58 GMT (envelope-from nobody) Message-Id: <201002101444.o1AEiwgX047280@www.freebsd.org> Date: Wed, 10 Feb 2010 14:44:58 GMT From: "Pedro F. Giffuni" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/143727: Fixes for cad/spice X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 14:50:10 -0000 >Number: 143727 >Category: ports >Synopsis: Fixes for cad/spice >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 10 14:50:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Pedro F. Giffuni >Release: 8.0-RELEASE >Organization: >Environment: FreeBSD mogwai.giffuni.net 8.0-RELEASE FreeBSD 8.0-RELEASE #13: Sat Jan 9 20:39:47 UTC 2010 pedro@mogwai.giffuni.net:/usr/src/sys/i386/compile/GENERIC i386 $ >Description: -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 >How-To-Repeat: >Fix: diff -ruN spice.orig/files/patch-src_include_os_bsd_h spice/files/patch-src_include_os_bsd_h --- spice.orig/files/patch-src_include_os_bsd_h 2010-02-09 15:07:21.000000000 +0000 +++ spice/files/patch-src_include_os_bsd_h 2010-02-09 16:27:40.000000000 +0000 @@ -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 for libc defs */ +#define HAS_SYSVDIRS /* */ +#define HAS_INTWAITSTATUS /* wait(2) takes an int *, not a union */ -+#define HAS_STRINGS /* use instead of */ +#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 -ruN spice.orig/files/patch-src_lib_ckt_noisean_c spice/files/patch-src_lib_ckt_noisean_c --- spice.orig/files/patch-src_lib_ckt_noisean_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_ckt_noisean_c 2010-02-10 00:12:11.000000000 +0000 @@ -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 +@@ -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 -ruN spice.orig/files/patch-src_lib_ckt_traninit_c spice/files/patch-src_lib_ckt_traninit_c --- spice.orig/files/patch-src_lib_ckt_traninit_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_ckt_traninit_c 2010-02-09 23:58:52.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_dev_bsim1_bimpar_c spice/files/patch-src_lib_dev_bsim1_bimpar_c --- spice.orig/files/patch-src_lib_dev_bsim1_bimpar_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_dev_bsim1_bimpar_c 2010-02-09 16:04:45.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_dev_mos6_mos6load_c spice/files/patch-src_lib_dev_mos6_mos6load_c --- spice.orig/files/patch-src_lib_dev_mos6_mos6load_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_dev_mos6_mos6load_c 2010-02-09 16:17:43.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_fte_outitf_c spice/files/patch-src_lib_fte_outitf_c --- spice.orig/files/patch-src_lib_fte_outitf_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_fte_outitf_c 2010-02-09 15:51:06.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_fte_subckt_c spice/files/patch-src_lib_fte_subckt_c --- spice.orig/files/patch-src_lib_fte_subckt_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_fte_subckt_c 2010-02-09 16:00:11.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_fte_where_c spice/files/patch-src_lib_fte_where_c --- spice.orig/files/patch-src_lib_fte_where_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_fte_where_c 2010-02-09 15:37:59.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_inp_inpgtok_c spice/files/patch-src_lib_inp_inpgtok_c --- spice.orig/files/patch-src_lib_inp_inpgtok_c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_inp_inpgtok_c 2010-02-09 15:44:58.000000000 +0000 @@ -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 -ruN spice.orig/files/patch-src_lib_inp_inpptree_c spice/files/patch-src_lib_inp_inpptree_c --- spice.orig/files/patch-src_lib_inp_inpptree_c 2010-02-09 15:07:21.000000000 +0000 +++ spice/files/patch-src_lib_inp_inpptree_c 2010-02-09 15:46:17.000000000 +0000 @@ -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; >Release-Note: >Audit-Trail: >Unformatted: