diff options
author | krion <krion@FreeBSD.org> | 2004-10-12 17:51:53 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-10-12 17:51:53 +0800 |
commit | 25770664eca7eca5e2bc98794f63719dbf02b30a (patch) | |
tree | 0cf99f1e2aa221bba416f9dc5c0479f15519628e /editors/MathPlanner | |
parent | 5d33b5813db8879dc6cea54673c7c9557b51193f (diff) | |
download | freebsd-ports-graphics-25770664eca7eca5e2bc98794f63719dbf02b30a.tar.gz freebsd-ports-graphics-25770664eca7eca5e2bc98794f63719dbf02b30a.tar.zst freebsd-ports-graphics-25770664eca7eca5e2bc98794f63719dbf02b30a.zip |
Fix build on 4-stable
Fix pkg-plist
PR: ports/71875
Submitted by: Ports Fury
Diffstat (limited to 'editors/MathPlanner')
-rw-r--r-- | editors/MathPlanner/Makefile | 17 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Complex.cpp | 13 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Exp_object.cpp | 22 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Function_header_object.cpp | 20 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Function_object.cpp | 35 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Integer.cpp | 15 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-MathHeaders.h | 17 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Math_functions.cpp | 215 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Maxmin.cpp | 15 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Parenthesis.cpp | 11 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Sigma.cpp | 81 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Sqrt.cpp | 23 | ||||
-rw-r--r-- | editors/MathPlanner/files/patch-Trigono.cpp | 47 | ||||
-rw-r--r-- | editors/MathPlanner/pkg-plist | 1 |
14 files changed, 520 insertions, 12 deletions
diff --git a/editors/MathPlanner/Makefile b/editors/MathPlanner/Makefile index 021a55f8231..4d2b4e6614b 100644 --- a/editors/MathPlanner/Makefile +++ b/editors/MathPlanner/Makefile @@ -8,8 +8,10 @@ PORTNAME= MathPlanner PORTVERSION= 3.1.3 +PORTREVISION= 1 CATEGORIES= editors -MASTER_SITES= http://koti.mbnet.fi/jarmonik/ +MASTER_SITES= http://koti.mbnet.fi/jarmonik/ \ + http://fresh.t-systems-sfr.com/unix/src/privat2/ MAINTAINER= ports@FreeBSD.org COMMENT= A mathematical design and publishing application @@ -20,18 +22,11 @@ GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ENV= QTDIR="${QT_PREFIX}" -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 500000 -BROKEN= "Does not compile with gcc 2.95.x" -.endif - -.if ${OSVERSION} >= 502126 -BROKEN= "Broken pkg-plist" -.endif +QTCPPFLAGS+= ${PTHREAD_CFLAGS} +QTCFGLIBS+= ${PTHREAD_LIBS} post-patch: @${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \ -e "s|malloc\.h|stdlib.h|" -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/editors/MathPlanner/files/patch-Complex.cpp b/editors/MathPlanner/files/patch-Complex.cpp new file mode 100644 index 00000000000..48a4170927b --- /dev/null +++ b/editors/MathPlanner/files/patch-Complex.cpp @@ -0,0 +1,13 @@ +--- src/Complex.cpp.orig Fri Oct 11 20:26:22 2002 ++++ src/Complex.cpp Sun Sep 12 00:18:04 2004 +@@ -26,8 +26,8 @@ + + if (value.type!=MN_REAL) Error_flag=true,AppControl->AddError(QObject::tr("Value type is not supported by this function")); + +- if (Mode==1) value.SetComplex(mpl_cang(value.R)); +- if (Mode==0) value.SetComplex(mpl_cang(mpl_rad(value.R))); ++ if (Mode==1) value.SetComplex(mpl_cang(value.mpl.m.R)); ++ if (Mode==0) value.SetComplex(mpl_cang(mpl_rad(value.mpl.m.R))); + return(value); + } + diff --git a/editors/MathPlanner/files/patch-Exp_object.cpp b/editors/MathPlanner/files/patch-Exp_object.cpp new file mode 100644 index 00000000000..76a2aa51fd6 --- /dev/null +++ b/editors/MathPlanner/files/patch-Exp_object.cpp @@ -0,0 +1,22 @@ +--- src/Exp_object.cpp.orig Thu Dec 12 11:37:52 2002 ++++ src/Exp_object.cpp Sun Sep 12 00:20:21 2004 +@@ -28,7 +28,7 @@ + + if (Opr==0) { + if (val.type==MN_REAL && eval.type==MN_REAL) +- { value.SetReal(pow(val.R,eval.R)); return(value); } ++ { value.SetReal(pow(val.mpl.m.R,eval.mpl.m.R)); return(value); } + else + if ((val.type==MN_COMPLEX || val.type==MN_REAL) && (eval.type==MN_COMPLEX || eval.type==MN_REAL)) + { value.SetComplex(mpl_cnpower(val.Complex(),eval.Complex())); return(value); } +@@ -46,8 +46,8 @@ + eval=Inner->Calculate(); + + if (eval.type==MN_REAL) { +- if (Opr==1) { value.SetReal(pow(NEPER,eval.R)); return(value); } +- if (Opr==2) { value.SetReal(pow(10,eval.R)); return(value); } ++ if (Opr==1) { value.SetReal(pow(NEPER,eval.mpl.m.R)); return(value); } ++ if (Opr==2) { value.SetReal(pow(10,eval.mpl.m.R)); return(value); } + } + if (eval.type==MN_COMPLEX) { + if (Opr==1) { value.SetComplex(mpl_ce(eval.Complex())); return(value); } diff --git a/editors/MathPlanner/files/patch-Function_header_object.cpp b/editors/MathPlanner/files/patch-Function_header_object.cpp new file mode 100644 index 00000000000..f9a8d312b51 --- /dev/null +++ b/editors/MathPlanner/files/patch-Function_header_object.cpp @@ -0,0 +1,20 @@ +--- src/Function_header_object.cpp.orig Mon Sep 2 01:57:32 2002 ++++ src/Function_header_object.cpp Sun Sep 12 00:21:56 2004 +@@ -229,7 +229,7 @@ + math_node function_defination_object::Calculate() + { + +-value.R=0; ++value.mpl.m.R=0; + value.type=MN_REAL; + + return(value); +@@ -256,7 +256,7 @@ + AssignLo.Init(AppControl); + + math_node zero; +-zero.R=0; zero.type=MN_REAL; ++zero.mpl.m.R=0; zero.type=MN_REAL; + + pointer=false; + diff --git a/editors/MathPlanner/files/patch-Function_object.cpp b/editors/MathPlanner/files/patch-Function_object.cpp new file mode 100644 index 00000000000..8e12973fe9b --- /dev/null +++ b/editors/MathPlanner/files/patch-Function_object.cpp @@ -0,0 +1,35 @@ +--- src/Function_object.cpp.orig Tue Nov 19 19:34:04 2002 ++++ src/Function_object.cpp Sun Sep 12 00:23:42 2004 +@@ -436,9 +436,9 @@ + + if (real_dp) { + +- if (value.type==MN_REAL) ss=true,v=value.R,img=QString(""); +- if (value.type==MN_COMPLEX) ss=false,v=value.R,img=QString(""); +- if (value.type==MN_VECTOR) ss=false,v=value.I,img=AppControl->Prefs->String("Vector_I"); ++ if (value.type==MN_REAL) ss=true,v=value.mpl.m.R,img=QString(""); ++ if (value.type==MN_COMPLEX) ss=false,v=value.mpl.m.R,img=QString(""); ++ if (value.type==MN_VECTOR) ss=false,v=value.mpl.m.I,img=AppControl->Prefs->String("Vector_I"); + + if (v<0) str=QString("-"); + else if (!first && may_have_plus) str=QString("+"); +@@ -454,8 +454,8 @@ + + if (complex_dp) { + +- if (value.type==MN_COMPLEX) ss=false,v=value.I,img=AppControl->Prefs->String("ImaginaryUnit"); +- if (value.type==MN_VECTOR) ss=false,v=value.J,img=AppControl->Prefs->String("Vector_J"); ++ if (value.type==MN_COMPLEX) ss=false,v=value.mpl.m.I,img=AppControl->Prefs->String("ImaginaryUnit"); ++ if (value.type==MN_VECTOR) ss=false,v=value.mpl.m.J,img=AppControl->Prefs->String("Vector_J"); + + if (first && value.type==MN_COMPLEX) ss=true; + +@@ -474,7 +474,7 @@ + + if (vector_dp) { + +- if (value.type==MN_VECTOR) ss=false,v=value.K,img=AppControl->Prefs->String("Vector_K"); ++ if (value.type==MN_VECTOR) ss=false,v=value.mpl.m.K,img=AppControl->Prefs->String("Vector_K"); + + if (first) ss=true; + diff --git a/editors/MathPlanner/files/patch-Integer.cpp b/editors/MathPlanner/files/patch-Integer.cpp new file mode 100644 index 00000000000..b5b130b0905 --- /dev/null +++ b/editors/MathPlanner/files/patch-Integer.cpp @@ -0,0 +1,15 @@ +--- src/Integer.cpp.orig Fri Oct 11 21:30:32 2002 ++++ src/Integer.cpp Sun Sep 12 00:24:57 2004 +@@ -34,10 +34,10 @@ + + DeleteAllIntegers(); + +-zero.R=0; zero.I=0; zero.J=0; zero.K=0; ++zero.mpl.m.R=0; zero.mpl.m.I=0; zero.mpl.m.J=0; zero.mpl.m.K=0; + zero.type=MN_REAL; + +-pii.R=PI; ++pii.mpl.m.R=PI; + pii.type=MN_REAL; + + } diff --git a/editors/MathPlanner/files/patch-MathHeaders.h b/editors/MathPlanner/files/patch-MathHeaders.h new file mode 100644 index 00000000000..adcf3644fec --- /dev/null +++ b/editors/MathPlanner/files/patch-MathHeaders.h @@ -0,0 +1,17 @@ +--- src/MathHeaders.h.orig Sun Dec 8 04:58:58 2002 ++++ src/MathHeaders.h Sun Sep 12 00:15:42 2004 +@@ -63,12 +63,12 @@ + public: + + union { +- struct { mpl_real R,I,J,K; }; ++ struct { mpl_real R,I,J,K; } m; + mpl_real real; + mpl_vector vector; + mpl_complex complex; + mpl_rational rational; +- }; ++ } mpl; + + int type; + char pwrs[COUNT]; // Used in unit calculation diff --git a/editors/MathPlanner/files/patch-Math_functions.cpp b/editors/MathPlanner/files/patch-Math_functions.cpp new file mode 100644 index 00000000000..4a16242cfa9 --- /dev/null +++ b/editors/MathPlanner/files/patch-Math_functions.cpp @@ -0,0 +1,215 @@ +--- src/Math_functions.cpp.orig Sun Dec 8 05:04:06 2002 ++++ src/Math_functions.cpp Sun Sep 12 01:04:56 2004 +@@ -15,9 +15,9 @@ + + math_node mpl_neg(math_node a) + { +- if (a.type==MN_REAL) a.R=-a.R; +- if (a.type==MN_COMPLEX) a.R=-a.R, a.I=-a.I; +- if (a.type==MN_VECTOR) a.I=-a.I, a.J=-a.J, a.K=-a.K; ++ if (a.type==MN_REAL) a.mpl.m.R=-a.mpl.m.R; ++ if (a.type==MN_COMPLEX) a.mpl.m.R=-a.mpl.m.R, a.mpl.m.I=-a.mpl.m.I; ++ if (a.type==MN_VECTOR) a.mpl.m.I=-a.mpl.m.I, a.mpl.m.J=-a.mpl.m.J, a.mpl.m.K=-a.mpl.m.K; + return(a); + } + +@@ -28,17 +28,17 @@ + ans.type=MN_NULL; + + if (a.type==MN_REAL) { +- if (b.type==MN_REAL) ans.R=a.R+b.R, ans.type=MN_REAL; +- else if (b.type==MN_COMPLEX) ans.R=a.R+b.R, ans.I=b.I, ans.type=MN_COMPLEX; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R+b.mpl.m.R, ans.type=MN_REAL; ++ else if (b.type==MN_COMPLEX) ans.mpl.m.R=a.mpl.m.R+b.mpl.m.R, ans.mpl.m.I=b.mpl.m.I, ans.type=MN_COMPLEX; + } + else + if (a.type==MN_COMPLEX) { +- if (b.type==MN_REAL) ans.R=a.R+b.R, ans.I=a.I, ans.type=MN_COMPLEX; +- else if (b.type==MN_COMPLEX) ans.R=a.R+b.R, ans.I=a.I+b.I, ans.type=MN_COMPLEX; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R+b.mpl.m.R, ans.mpl.m.I=a.mpl.m.I, ans.type=MN_COMPLEX; ++ else if (b.type==MN_COMPLEX) ans.mpl.m.R=a.mpl.m.R+b.mpl.m.R, ans.mpl.m.I=a.mpl.m.I+b.mpl.m.I, ans.type=MN_COMPLEX; + } + else + if (a.type==MN_VECTOR) { +- if (b.type==MN_VECTOR) ans.I=a.I+b.I, ans.J=a.J+b.J, ans.K=a.K+b.K, ans.type=MN_VECTOR; ++ if (b.type==MN_VECTOR) ans.mpl.m.I=a.mpl.m.I+b.mpl.m.I, ans.mpl.m.J=a.mpl.m.J+b.mpl.m.J, ans.mpl.m.K=a.mpl.m.K+b.mpl.m.K, ans.type=MN_VECTOR; + } + + return(ans); +@@ -51,17 +51,17 @@ + ans.type=MN_NULL; + + if (a.type==MN_REAL) { +- if (b.type==MN_REAL) ans.R=a.R-b.R, ans.type=MN_REAL; +- else if (b.type==MN_COMPLEX) ans.R=a.R-b.R, ans.I=0-b.I, ans.type=MN_COMPLEX; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R-b.mpl.m.R, ans.type=MN_REAL; ++ else if (b.type==MN_COMPLEX) ans.mpl.m.R=a.mpl.m.R-b.mpl.m.R, ans.mpl.m.I=0-b.mpl.m.I, ans.type=MN_COMPLEX; + } + else + if (a.type==MN_COMPLEX) { +- if (b.type==MN_REAL) ans.R=a.R-b.R, ans.I=a.I, ans.type=MN_COMPLEX; +- else if (b.type==MN_COMPLEX) ans.R=a.R-b.R, ans.I=a.I-b.I, ans.type=MN_COMPLEX; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R-b.mpl.m.R, ans.mpl.m.I=a.mpl.m.I, ans.type=MN_COMPLEX; ++ else if (b.type==MN_COMPLEX) ans.mpl.m.R=a.mpl.m.R-b.mpl.m.R, ans.mpl.m.I=a.mpl.m.I-b.mpl.m.I, ans.type=MN_COMPLEX; + } + else + if (a.type==MN_VECTOR) { +- if (b.type==MN_VECTOR) ans.I=a.I-b.I, ans.J=a.J-b.J, ans.K=a.K-b.K, ans.type=MN_VECTOR; ++ if (b.type==MN_VECTOR) ans.mpl.m.I=a.mpl.m.I-b.mpl.m.I, ans.mpl.m.J=a.mpl.m.J-b.mpl.m.J, ans.mpl.m.K=a.mpl.m.K-b.mpl.m.K, ans.type=MN_VECTOR; + } + + return(ans); +@@ -73,19 +73,19 @@ + ans.type=MN_NULL; + + if (a.type==MN_REAL) { +- if (b.type==MN_REAL) ans.R=a.R*b.R, ans.type=MN_REAL; +- else if (b.type==MN_COMPLEX) ans.R=a.R*b.R, ans.I=a.R*b.I, ans.type=MN_COMPLEX; +- else if (b.type==MN_VECTOR) ans.I=a.R*b.I, ans.J=a.R*b.J, ans.K=a.R*b.K, ans.type=MN_VECTOR; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R*b.mpl.m.R, ans.type=MN_REAL; ++ else if (b.type==MN_COMPLEX) ans.mpl.m.R=a.mpl.m.R*b.mpl.m.R, ans.mpl.m.I=a.mpl.m.R*b.mpl.m.I, ans.type=MN_COMPLEX; ++ else if (b.type==MN_VECTOR) ans.mpl.m.I=a.mpl.m.R*b.mpl.m.I, ans.mpl.m.J=a.mpl.m.R*b.mpl.m.J, ans.mpl.m.K=a.mpl.m.R*b.mpl.m.K, ans.type=MN_VECTOR; + } + else + if (a.type==MN_COMPLEX) { +- if (b.type==MN_REAL) ans.R=a.R*b.R, ans.I=a.I*b.R, ans.type=MN_COMPLEX; +- else if (b.type==MN_COMPLEX) ans.R=a.R*b.R-a.I*b.I, ans.I=a.R*b.I+a.I*b.R, ans.type=MN_COMPLEX; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R*b.mpl.m.R, ans.mpl.m.I=a.mpl.m.I*b.mpl.m.R, ans.type=MN_COMPLEX; ++ else if (b.type==MN_COMPLEX) ans.mpl.m.R=a.mpl.m.R*b.mpl.m.R-a.mpl.m.I*b.mpl.m.I, ans.mpl.m.I=a.mpl.m.R*b.mpl.m.I+a.mpl.m.I*b.mpl.m.R, ans.type=MN_COMPLEX; + } + else + if (a.type==MN_VECTOR) { // Dot product +- if (b.type==MN_VECTOR) ans.R=a.I*b.I+a.J*b.J+a.K*b.K, ans.type=MN_REAL; +- else if (b.type==MN_REAL) ans.I=a.I*b.R, ans.J=a.J*b.R, ans.K=a.K*b.R, ans.type=MN_VECTOR; ++ if (b.type==MN_VECTOR) ans.mpl.m.R=a.mpl.m.I*b.mpl.m.I+a.mpl.m.J*b.mpl.m.J+a.mpl.m.K*b.mpl.m.K, ans.type=MN_REAL; ++ else if (b.type==MN_REAL) ans.mpl.m.I=a.mpl.m.I*b.mpl.m.R, ans.mpl.m.J=a.mpl.m.J*b.mpl.m.R, ans.mpl.m.K=a.mpl.m.K*b.mpl.m.R, ans.type=MN_VECTOR; + } + + return(ans); +@@ -99,19 +99,19 @@ + ans.type=MN_NULL; + + if (a.type==MN_REAL) { +- if (b.type==MN_REAL) ans.R=a.R/b.R, ans.type=MN_REAL; // ok +- else if (b.type==MN_COMPLEX) { opz=mpl_opz(b.Complex()); ans.R=a.R*opz.R, ans.I=a.R*opz.I, ans.type=MN_COMPLEX; } +- else if (b.type==MN_VECTOR) ans.I=a.R/b.I, ans.J=a.R/b.J, ans.K=a.R/b.K, ans.type=MN_VECTOR; ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R/b.mpl.m.R, ans.type=MN_REAL; // ok ++ else if (b.type==MN_COMPLEX) { opz=mpl_opz(b.Complex()); ans.mpl.m.R=a.mpl.m.R*opz.mpl.m.R, ans.mpl.m.I=a.mpl.m.R*opz.mpl.m.I, ans.type=MN_COMPLEX; } ++ else if (b.type==MN_VECTOR) ans.mpl.m.I=a.mpl.m.R/b.mpl.m.I, ans.mpl.m.J=a.mpl.m.R/b.mpl.m.J, ans.mpl.m.K=a.mpl.m.R/b.mpl.m.K, ans.type=MN_VECTOR; + } + else + if (a.type==MN_COMPLEX) { +- if (b.type==MN_REAL) ans.R=a.R*(1/b.R), ans.I=a.I*(1/b.R), ans.type=MN_COMPLEX; +- else if (b.type==MN_COMPLEX) { opz=mpl_opz(b.Complex()); ans.R=a.R*opz.R-a.I*opz.I, ans.I=a.R*opz.I+a.I*opz.R, ans.type=MN_COMPLEX; } ++ if (b.type==MN_REAL) ans.mpl.m.R=a.mpl.m.R*(1/b.mpl.m.R), ans.mpl.m.I=a.mpl.m.I*(1/b.mpl.m.R), ans.type=MN_COMPLEX; ++ else if (b.type==MN_COMPLEX) { opz=mpl_opz(b.Complex()); ans.mpl.m.R=a.mpl.m.R*opz.mpl.m.R-a.mpl.m.I*opz.mpl.m.I, ans.mpl.m.I=a.mpl.m.R*opz.mpl.m.I+a.mpl.m.I*opz.mpl.m.R, ans.type=MN_COMPLEX; } + } + else + if (a.type==MN_VECTOR) { +- if (b.type==MN_VECTOR) ans.I=a.I/b.I, ans.J=a.J/b.J, ans.K=a.K/b.K, ans.type=MN_VECTOR; +- else if (b.type==MN_REAL) ans.I=a.I/b.R, ans.J=a.J/b.R, ans.K=a.K/b.R, ans.type=MN_VECTOR; ++ if (b.type==MN_VECTOR) ans.mpl.m.I=a.mpl.m.I/b.mpl.m.I, ans.mpl.m.J=a.mpl.m.J/b.mpl.m.J, ans.mpl.m.K=a.mpl.m.K/b.mpl.m.K, ans.type=MN_VECTOR; ++ else if (b.type==MN_REAL) ans.mpl.m.I=a.mpl.m.I/b.mpl.m.R, ans.mpl.m.J=a.mpl.m.J/b.mpl.m.R, ans.mpl.m.K=a.mpl.m.K/b.mpl.m.R, ans.type=MN_VECTOR; + } + + return(ans); +@@ -135,28 +135,28 @@ + + math_node::math_node(mpl_real r) + { +-real=r; ++mpl.real=r; + type=MN_REAL; + } + + + math_node::math_node(mpl_complex z) + { +-complex=z; ++mpl.complex=z; + type=MN_COMPLEX; + } + + + math_node::math_node(mpl_rational r) + { +-rational=r; ++mpl.rational=r; + type=MN_RATIONAL; + } + + + math_node::math_node(mpl_vector v) + { +-vector=v; ++mpl.vector=v; + type=MN_VECTOR; + } + +@@ -166,7 +166,7 @@ + + void math_node::Clear() + { +-R=I=K=J=0.0; ++mpl.m.R=mpl.m.I=mpl.m.K=mpl.m.J=0.0; + type=MN_REAL; + } + +@@ -180,48 +180,48 @@ + + void math_node::SetReal(mpl_real x) + { +-real=x; ++mpl.real=x; + type=MN_REAL; + } + + + void math_node::SetComplex(mpl_complex z) + { +-complex=z; ++mpl.complex=z; + type=MN_COMPLEX; + } + + + void math_node::SetRational(mpl_rational r) + { +-rational=r; ++mpl.rational=r; + type=MN_RATIONAL; + } + + + mpl_real math_node::Real() + { +- if (type==MN_RATIONAL) return(R/I); +- return(real); ++ if (type==MN_RATIONAL) return(mpl.m.R/mpl.m.I); ++ return(mpl.real); + } + + + mpl_complex math_node::Complex() + { +- if (type==MN_REAL) complex.i=0; +- return(complex); ++ if (type==MN_REAL) mpl.complex.i=0; ++ return(mpl.complex); + } + + + mpl_rational math_node::Rational() + { +- return(rational); ++ return(mpl.rational); + } + + + mpl_vector math_node::Vector() + { +- return(vector); ++ return(mpl.vector); + } + + diff --git a/editors/MathPlanner/files/patch-Maxmin.cpp b/editors/MathPlanner/files/patch-Maxmin.cpp new file mode 100644 index 00000000000..e70aff79ee2 --- /dev/null +++ b/editors/MathPlanner/files/patch-Maxmin.cpp @@ -0,0 +1,15 @@ +--- src/Maxmin.cpp.orig Fri Oct 11 19:16:00 2002 ++++ src/Maxmin.cpp Sun Sep 12 00:26:29 2004 +@@ -26,10 +26,10 @@ + b=Outer->Calculate(); + + if (a.type==MN_REAL && b.type==MN_REAL) { +- if (Opr==0) if (a.R<b.R) value=a; ++ if (Opr==0) if (a.mpl.m.R<b.mpl.m.R) value=a; + else value=b; + +- if (Opr==1) if (a.R>b.R) value=a; ++ if (Opr==1) if (a.mpl.m.R>b.mpl.m.R) value=a; + else value=b; + } + else { Error_flag=true; AppControl->AddError(QObject::tr("Only Real numbers are supported")); } diff --git a/editors/MathPlanner/files/patch-Parenthesis.cpp b/editors/MathPlanner/files/patch-Parenthesis.cpp new file mode 100644 index 00000000000..17141823d21 --- /dev/null +++ b/editors/MathPlanner/files/patch-Parenthesis.cpp @@ -0,0 +1,11 @@ +--- src/Parenthesis.cpp.orig Fri Oct 11 20:25:46 2002 ++++ src/Parenthesis.cpp Sun Sep 12 00:28:02 2004 +@@ -23,7 +23,7 @@ + value=Inner->Calculate(); + + if (Opr==3) { +- if (value.type==MN_REAL) value.SetReal(fabs(value.R)); ++ if (value.type==MN_REAL) value.SetReal(fabs(value.mpl.m.R)); + else if (value.type==MN_COMPLEX) value.SetReal(mpl_cmodul(value.Complex())); + else if (value.type==MN_VECTOR) value.SetReal(mpl_length(value.Vector())); + else Error_flag=true,AppControl->AddError(QObject::tr("Value type is not supported")); diff --git a/editors/MathPlanner/files/patch-Sigma.cpp b/editors/MathPlanner/files/patch-Sigma.cpp new file mode 100644 index 00000000000..c0dd4da5952 --- /dev/null +++ b/editors/MathPlanner/files/patch-Sigma.cpp @@ -0,0 +1,81 @@ +--- src/Sigma.cpp.orig Tue Nov 26 20:47:24 2002 ++++ src/Sigma.cpp Sun Sep 12 00:30:15 2004 +@@ -75,9 +75,9 @@ + + if (uv.type!=MN_REAL && Opr!=2) Error_flag=true,AppControl->AddError("Upper value must be integer"); + +-if (Opr==0 && uv.R>10000) Error_flag=true,AppControl->AddError(QObject::tr("Sigma: Count is too high")); +-if (Opr==1 && uv.R>10000) Error_flag=true,AppControl->AddError(QObject::tr("Pii: Count is too high")); +-if (Opr==3 && uv.R>10000) Error_flag=true,AppControl->AddError(QObject::tr("Loop: Count is too high")); ++if (Opr==0 && uv.mpl.m.R>10000) Error_flag=true,AppControl->AddError(QObject::tr("Sigma: Count is too high")); ++if (Opr==1 && uv.mpl.m.R>10000) Error_flag=true,AppControl->AddError(QObject::tr("Pii: Count is too high")); ++if (Opr==3 && uv.mpl.m.R>10000) Error_flag=true,AppControl->AddError(QObject::tr("Loop: Count is too high")); + + } + +@@ -90,7 +90,7 @@ + + math_node zero,sum,val; + +-zero.R=0; ++zero.mpl.m.R=0; + zero.type=MN_REAL; + + integer=NULL; +@@ -109,8 +109,8 @@ + + if (integer) AppControl->integer_server->Protect(int_no); + +- lv=Lower->Calculate().R; +- uv=Upper->Calculate().R; ++ lv=Lower->Calculate().mpl.m.R; ++ uv=Upper->Calculate().mpl.m.R; + + n=floor(uv); + +@@ -121,7 +121,7 @@ + if (Opr==0) { // SIGMA + sum=Inner->Calculate(); + for(i=0;i<(n-1);i++) { +- if (integer) (*integer).R+=1; ++ if (integer) (*integer).mpl.m.R+=1; + sum=mpl_add(sum,Inner->Calculate()); + } + } +@@ -136,7 +136,7 @@ + if (Opr==1) { // PII + sum=Inner->Calculate(); + for(i=0;i<(n-1);i++) { +- if (integer) (*integer).R+=1; ++ if (integer) (*integer).mpl.m.R+=1; + sum=mpl_mul(sum,Inner->Calculate()); + + } +@@ -148,23 +148,23 @@ + int count=100; + double h=(uv-lv) / ( 2 * (double)count ); + +- (*integer).R=lv; ++ (*integer).mpl.m.R=lv; + sum=Inner->Calculate(); + + for(i=0;i<count;i++) { + +- (*integer).R=lv+2*k*h-h; ++ (*integer).mpl.m.R=lv+2*k*h-h; + val.SetReal(4.0); + sum=mpl_add(sum,mpl_mul(Inner->Calculate(),val)); + +- (*integer).R=lv+2*k*h; ++ (*integer).mpl.m.R=lv+2*k*h; + val.SetReal(2.0); + sum=mpl_add(sum,mpl_mul(Inner->Calculate(),val)); + + k=k+1.0; + } + +- (*integer).R=uv; ++ (*integer).mpl.m.R=uv; + sum=mpl_sub(sum,Inner->Calculate()); + val.SetReal(h/3.0); + sum=mpl_mul(sum,val); diff --git a/editors/MathPlanner/files/patch-Sqrt.cpp b/editors/MathPlanner/files/patch-Sqrt.cpp new file mode 100644 index 00000000000..7fe5d579890 --- /dev/null +++ b/editors/MathPlanner/files/patch-Sqrt.cpp @@ -0,0 +1,23 @@ +--- src/Sqrt.cpp.orig Fri Aug 13 04:51:58 2004 ++++ src/Sqrt.cpp Sun Sep 12 00:32:59 2004 +@@ -37,15 +37,15 @@ + + if (uv.type==MN_REAL && lv.type==MN_REAL) { + +- if (lv.R<0) { +- if ((((int)uv.R)&1)==1) { //negative, odd +- value.SetReal(-pow(-lv.R,(1.0/uv.R))); ++ if (lv.mpl.m.R<0) { ++ if ((((int)uv.mpl.m.R)&1)==1) { //negative, odd ++ value.SetReal(-pow(-lv.mpl.m.R,(1.0/uv.mpl.m.R))); + return(value); + } +- else lv.type=MN_COMPLEX, lv.I=0; //negative, even ++ else lv.type=MN_COMPLEX, lv.mpl.m.I=0; //negative, even + } + else { +- value.SetReal(pow(lv.R,(1.0/uv.R))); ++ value.SetReal(pow(lv.mpl.m.R,(1.0/uv.mpl.m.R))); + return(value); + } + } diff --git a/editors/MathPlanner/files/patch-Trigono.cpp b/editors/MathPlanner/files/patch-Trigono.cpp new file mode 100644 index 00000000000..c7881314b24 --- /dev/null +++ b/editors/MathPlanner/files/patch-Trigono.cpp @@ -0,0 +1,47 @@ +--- src/Trigono.cpp.orig Thu Dec 12 11:58:58 2002 ++++ src/Trigono.cpp Sun Sep 12 00:34:27 2004 +@@ -37,28 +37,28 @@ + + if (type==MN_REAL) { + +- if (!deg_rad) re=mpl_rad(val.R); +- else re=val.R; ++ if (!deg_rad) re=mpl_rad(val.mpl.m.R); ++ else re=val.mpl.m.R; + + switch(Opr) { + case 0: real=mpl_sin(re); break; + case 1: real=mpl_cos(re); break; + case 2: real=mpl_tan(re); break; + case 3: real=1.0/mpl_tan(re); break; +- case 4: real=asin(val.R); if (!deg_rad) real=mpl_deg(real); break; +- case 5: real=acos(val.R); if (!deg_rad) real=mpl_deg(real); break; +- case 6: real=atan(val.R); if (!deg_rad) real=mpl_deg(real); break; +- case 9: real=floor(val.R); break; +- case 10: real=val.R-floor(val.R); break; +- case 12: real=atan(1.0/val.R); if (deg_rad==0) real=mpl_deg(real); break; +- case 13: real=sinh(val.R); break; +- case 14: real=cosh(val.R); break; +- case 15: real=tanh(val.R); break; +- case 16: real=mpl_coth(val.R); break; +- case 17: real=mpl_asinh(val.R); break; +- case 18: real=mpl_acosh(val.R); break; +- case 19: real=mpl_atanh(val.R); break; +- case 20: real=mpl_acoth(val.R); break; ++ case 4: real=asin(val.mpl.m.R); if (!deg_rad) real=mpl_deg(real); break; ++ case 5: real=acos(val.mpl.m.R); if (!deg_rad) real=mpl_deg(real); break; ++ case 6: real=atan(val.mpl.m.R); if (!deg_rad) real=mpl_deg(real); break; ++ case 9: real=floor(val.mpl.m.R); break; ++ case 10: real=val.mpl.m.R-floor(val.mpl.m.R); break; ++ case 12: real=atan(1.0/val.mpl.m.R); if (deg_rad==0) real=mpl_deg(real); break; ++ case 13: real=sinh(val.mpl.m.R); break; ++ case 14: real=cosh(val.mpl.m.R); break; ++ case 15: real=tanh(val.mpl.m.R); break; ++ case 16: real=mpl_coth(val.mpl.m.R); break; ++ case 17: real=mpl_asinh(val.mpl.m.R); break; ++ case 18: real=mpl_acosh(val.mpl.m.R); break; ++ case 19: real=mpl_atanh(val.mpl.m.R); break; ++ case 20: real=mpl_acoth(val.mpl.m.R); break; + default: Error_flag=true; AppControl->AddError(QObject::tr("Real numbers are not supported by this function")); + break; + } diff --git a/editors/MathPlanner/pkg-plist b/editors/MathPlanner/pkg-plist index 31dc1f5da1f..7e27ce07337 100644 --- a/editors/MathPlanner/pkg-plist +++ b/editors/MathPlanner/pkg-plist @@ -43,7 +43,6 @@ bin/MathPlanner3 %%DATADIR%%/pixmaps/frame_graph.png %%DATADIR%%/pixmaps/frame_image.png %%DATADIR%%/pixmaps/frame_text.png -%%DATADIR%%/pixmaps/gimp.png %%DATADIR%%/pixmaps/mathplannerapp.png %%DATADIR%%/pixmaps/reload.png %%DATADIR%%/pixmaps/text_block.png |