summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>1998-03-10 10:17:16 +0000
committerThomas Gellekum <tg@FreeBSD.org>1998-03-10 10:17:16 +0000
commit35ce506e64ce4dbaeda637df02ae1cb9ca3f08bd (patch)
tree1214db9865616640302c3add7f736efc13d99ea1 /math
parentBuild and install Mesaaux and Mesatk libs. (diff)
Fix bad math.
PR: 5935 Submitted by: Pedro Giffuni <giffunip@asme.org>
Notes
Notes: svn path=/head/; revision=10094
Diffstat (limited to 'math')
-rw-r--r--math/femlab/files/patch-aa6
-rw-r--r--math/femlab/files/patch-ab77
2 files changed, 58 insertions, 25 deletions
diff --git a/math/femlab/files/patch-aa b/math/femlab/files/patch-aa
index 95ee4e5cb5fb..a55693fcdcd9 100644
--- a/math/femlab/files/patch-aa
+++ b/math/femlab/files/patch-aa
@@ -1,5 +1,5 @@
-*** source/Imakefile.orig Tue Sep 2 10:38:18 1997
---- source/Imakefile Tue Sep 2 10:39:42 1997
+*** source/Imakefile.orig Tue Sep 19 02:22:29 1995
+--- source/Imakefile Fri Mar 6 22:03:52 1998
***************
*** 17,29 ****
@@ -19,7 +19,7 @@
OBJS = $(SRCS:.c=.o)
-! CC = gcc -O2
+! CC = gcc -O $(CFLAGS)
CDEBUGFLAGS =
EXTRA_INCLUDES = -I../include
#
diff --git a/math/femlab/files/patch-ab b/math/femlab/files/patch-ab
index 2dd2078f1569..5c3bc76ecc41 100644
--- a/math/femlab/files/patch-ab
+++ b/math/femlab/files/patch-ab
@@ -1,5 +1,19 @@
-*** source/graph.c.orig Sat Sep 13 16:23:18 1997
---- source/graph.c Sat Sep 13 16:39:13 1997
+*** source/graph.c.orig Thu Sep 14 08:42:13 1995
+--- source/graph.c Sat Mar 7 00:14:42 1998
+***************
+*** 14,21 ****
+--- 14,24 ----
+ */
+
+ #include <stdio.h>
++ #ifdef __STDC__
+ #include <stdlib.h>
++ #else
+ #include <malloc.h>
++ #endif
+ #include <math.h>
+
+
***************
*** 608,614 ****
void getDrawingScale()
@@ -9,7 +23,7 @@
int width, height;
int ww;
int nx, ny, id;
---- 608,614 ----
+--- 611,617 ----
void getDrawingScale()
{
float xoff, yoff;
@@ -18,7 +32,7 @@
int ww;
int nx, ny, id;
***************
-*** 630,645 ****
+*** 630,654 ****
width = width / nx;
height = height / ny;
@@ -26,30 +40,49 @@
! scl = 1./max(xmax-xmin,ymax-ymin);
! xoff = -scl*(xmin+.5*(xmax-xmin)-.5/scl);
! yoff = -scl*(ymin+.5*(ymax-ymin)-.5/scl);
-
+!
! xoff = - xmin*scl*.85;
! yoff = - ymin*scl*.85;
-
- ww = min(width, height);
+!
+! ww = min(width, height);
! Xscl = (int) ((float)ww * 0.85 * scl);
- Xxoff = (int) ww * xoff ;
- Xyoff = (int) ww * yoff;
- Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
---- 630,646 ----
+! Xxoff = (int) ww * xoff ;
+! Xyoff = (int) ww * yoff;
+! Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
+! Xyoff += (int) (height - ( Xscl*ymax +Xyoff))/2 + (int)(id/(nx+.5)) *height;
+! }
+
+ SetDrawArea(drawWindow);
+ if(device == PS)
+ psGetScale();
+ }
+
+ void getBoundaryScale(Widget w, void *data)
+--- 633,659 ----
width = width / nx;
height = height / ny;
! iscl = max(xmax-xmin,ymax-ymin);
-
-! if((state > HAVE_NOTHING) && (iscl != 0.0)){
+! if (iscl != 0.0) {
+! if(state > HAVE_NOTHING) {
+! /* These are recalculated ??
! xoff = .5-(xmin+.5*(xmax-xmin))/iscl;
! yoff = .5-(ymin+.5*(ymax-ymin))/iscl;
-!
-! xoff = - xmin*.85/iscl;
-! yoff = - ymin*.85/iscl;
-
- ww = min(width, height);
-! Xscl = (int) ((float)ww * 0.85 / iscl);
- Xxoff = (int) ww * xoff ;
- Xyoff = (int) ww * yoff;
- Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
+! */
+! xoff = - xmin*.85/iscl;
+! yoff = - ymin*.85/iscl;
+! ww = min(width, height);
+! Xscl = (int) ((float)ww * 0.85 / iscl);
+! Xxoff = (int) ww * xoff ;
+! Xyoff = (int) ww * yoff;
+! Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
+! Xyoff += (int) (height - ( Xscl*ymax +Xyoff))/2 + (int)(id/(nx+.5)) *height;
+! }
+
+ SetDrawArea(drawWindow);
+ if(device == PS)
+ psGetScale();
++ }
+ }
+
+ void getBoundaryScale(Widget w, void *data)