summaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2005-06-27 16:20:21 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2005-06-27 16:20:21 +0800
commit317f688730d9463cb5d2ab3e544db18c2899417b (patch)
tree440ea7b2e0daca58a346d10d5768cee3d83a32c3 /math
parent2efa0cbb516fb3c543d2615fe9ad31e6ac74e1f3 (diff)
downloadmarcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.tar
marcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.tar.gz
marcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.tar.bz2
marcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.tar.lz
marcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.tar.xz
marcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.tar.zst
marcuscom-ports-317f688730d9463cb5d2ab3e544db18c2899417b.zip
Fix the build on 4.X.
Sbumitted by: mjl on #freebsd-gnome git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4122 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'math')
-rw-r--r--math/gcalctool/files/patch-gcalctool-functions.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/math/gcalctool/files/patch-gcalctool-functions.c b/math/gcalctool/files/patch-gcalctool-functions.c
new file mode 100644
index 000000000..e51f656f5
--- /dev/null
+++ b/math/gcalctool/files/patch-gcalctool-functions.c
@@ -0,0 +1,23 @@
+--- gcalctool/functions.c.orig Mon Jun 27 20:14:54 2005
++++ gcalctool/functions.c Mon Jun 27 20:16:22 2005
+@@ -570,9 +570,6 @@
+ do_tfunc(int s[MP_SIZE], int t[MP_SIZE], enum trig_func tfunc)
+ {
+ // Assumes the SIN=0, COS=1, TAN=2
+-
+- assert(tfunc < 3);
+-
+ enum trig_func conv_table[3][4] = {
+ {sin_t, asin_t, sinh_t, asinh_t},
+ {cos_t, acos_t, cosh_t, acosh_t},
+@@ -582,7 +579,9 @@
+ int inverse = (v->inverse) ? 1 : 0;
+ int hyperbolic = (v->hyperbolic) ? 2 : 0;
+ int mode = (inverse | hyperbolic);
+-
++
++ assert(tfunc < 3);
++
+ if (!v->current) return -EINVAL;
+
+ calc_trigfunc(conv_table[tfunc][mode], s, t);