pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cad/simian Get this going with sunpro compilers. Gets...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/16c2a9b263d5
branches:  trunk
changeset: 524279:16c2a9b263d5
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Mon Jan 22 17:41:17 2007 +0000

description:
Get this going with sunpro compilers.  Gets rid of
Error: An integer constant expression is required within the array subscript operator.
VS: ----------------------------------------------------------------------

diffstat:

 cad/simian/distinfo         |   5 +++--
 cad/simian/patches/patch-ac |  43 ++++++++++++++++++++++++++++++++++++++++---
 cad/simian/patches/patch-ai |  12 ++++++++++++
 3 files changed, 55 insertions(+), 5 deletions(-)

diffs (94 lines):

diff -r e6987f31ecbf -r 16c2a9b263d5 cad/simian/distinfo
--- a/cad/simian/distinfo       Mon Jan 22 17:25:31 2007 +0000
+++ b/cad/simian/distinfo       Mon Jan 22 17:41:17 2007 +0000
@@ -1,13 +1,14 @@
-$NetBSD: distinfo,v 1.4 2005/11/03 19:56:36 rillig Exp $
+$NetBSD: distinfo,v 1.5 2007/01/22 17:41:17 dmcmahill Exp $
 
 SHA1 (simian_12_98.tar.gz) = c7d57087a397970b05195f497c98a058cea1a93a
 RMD160 (simian_12_98.tar.gz) = 3eecb229dd1fb3c761ee30c9d053673a45782170
 Size (simian_12_98.tar.gz) = 18474 bytes
 SHA1 (patch-aa) = 25b5b63e26478b31956f902eaffd4976d09e1448
 SHA1 (patch-ab) = 46c10535420ac625b7548e3b663ef9174d9c34b2
-SHA1 (patch-ac) = 06440a4718542b0c97079d2d47a00a917016510a
+SHA1 (patch-ac) = 8f9785a688235689060ec504bc7f24a1f73b117f
 SHA1 (patch-ad) = e94d69600ef57e16a4d552e2c7e5d152f710c122
 SHA1 (patch-ae) = fe34cacf05054a3e8465815aab67eda2e07d9432
 SHA1 (patch-af) = 75830be229798faa340f4db9f3fdc2effe30420b
 SHA1 (patch-ag) = eb94c6b84b55a4a5441953a6031354732f0a5b6c
 SHA1 (patch-ah) = 853f89961f53b3bd1605d6e9ec15790ef09ca3a6
+SHA1 (patch-ai) = 46046596daeb7f3fd6cb2e8dc9435626e049d430
diff -r e6987f31ecbf -r 16c2a9b263d5 cad/simian/patches/patch-ac
--- a/cad/simian/patches/patch-ac       Mon Jan 22 17:25:31 2007 +0000
+++ b/cad/simian/patches/patch-ac       Mon Jan 22 17:41:17 2007 +0000
@@ -1,6 +1,8 @@
-$NetBSD: patch-ac,v 1.3 2005/11/03 19:56:36 rillig Exp $
+$NetBSD: patch-ac,v 1.4 2007/01/22 17:41:17 dmcmahill Exp $
 
---- src/plane.cc.orig  1998-12-07 08:28:51.000000000 +0000
+sunpro compilers do not like non-constant array sizes in declarations.
+
+--- src/plane.cc.orig  1998-12-07 03:28:51.000000000 -0500
 +++ src/plane.cc
 @@ -1,6 +1,7 @@
  /* Ribbon segmentation on ground plane */
@@ -10,7 +12,42 @@
  #include "weeks.h"
  #include "plane.h"
  #include "../include/linear.h"
-@@ -334,11 +335,11 @@ void filplane(Conductor *c)
+@@ -100,8 +101,11 @@ void filplane(Conductor *c)
+   y1=new double[sis->pc+1];
+   y2=new double[sis->pc+1]; 
+   int j,i,k;
+-  struct line line[sis->lc+1];
+-  struct Plane Plane[sis->pc+2];
++  struct line *line;
++  struct Plane *Plane;
++  line = new struct line[sis->lc+1];
++  Plane = new struct Plane[sis->pc+2];
++
+   for (i=0;i<=sis->lc;i++) line[i].h1=line[i].h2=0.;
+   i=1; j=1;
+   double *sort;
+@@ -213,8 +217,18 @@ void filplane(Conductor *c)
+     for (j=1;j<=l[i];j++) LX[i][j]=b[j];
+   }
+ 
+-  struct space su[sis->pc+1][sis->lc+2];
+-  struct space sl[sis->pc+1][sis->lc+2];
++  struct space **su;
++  struct space **sl;
++  su = new  struct space *[sis->pc+1];
++  sl = new  struct space *[sis->pc+1];
++
++  if (su != NULL && sl != NULL) {
++    for (int i = 0; i < sis->pc+1; i++) {
++      su[i] = new struct space[sis->lc+2];
++      sl[i] = new struct space[sis->lc+2];
++    }
++  } 
++
+   for (i=1;i<=sis->pc;i++) {
+     for (j=1;j<=u[i]/2;j++) su[i][j].hl=su[i][j].hr=0.;
+     for (j=1;j<=l[i]/2;j++) sl[i][j].hl=sl[i][j].hr=0.;
+@@ -334,11 +348,11 @@ void filplane(Conductor *c)
    for (i=1;i<=sis->pc;i++) {
      for (j=1;j<=l[i];j++) {
        if (l[i]!=2) 
diff -r e6987f31ecbf -r 16c2a9b263d5 cad/simian/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cad/simian/patches/patch-ai       Mon Jan 22 17:41:17 2007 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ai,v 1.1 2007/01/22 17:41:17 dmcmahill Exp $
+
+fix prototype to match what the function actually is.  Without this
+linking fails on sunpro
+
+--- src/incident.h.orig        1998-12-07 03:28:51.000000000 -0500
++++ src/incident.h
+@@ -1,3 +1,3 @@
+ complex **Zequ(Conductor *c,int numsgn,int Nc);
+-complex **ysort(int Nc,int n,int m);
++void ysort(int Nc,int n,int m);
+ 



Home | Main Index | Thread Index | Old Index