summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorAlexander Nedotsukov <bland@FreeBSD.org>2003-12-24 15:33:19 +0000
committerAlexander Nedotsukov <bland@FreeBSD.org>2003-12-24 15:33:19 +0000
commit43b1b3b25396b4afd1a517467beb616ec6c78914 (patch)
treec42602355b5caf610d2083d413ce11b4f361bce2 /math
parentFix a couple of typos. (diff)
Bugfix. For locales with non "." radix constants list wasn't properly
initialized.
Notes
Notes: svn path=/head/; revision=96537
Diffstat (limited to 'math')
-rw-r--r--math/gcalctool/Makefile1
-rw-r--r--math/gcalctool/files/patch-gcalctool::get.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/math/gcalctool/Makefile b/math/gcalctool/Makefile
index 8ba7023c7107..7aa141797e4c 100644
--- a/math/gcalctool/Makefile
+++ b/math/gcalctool/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gcalctool
PORTVERSION= 4.3.31
+PORTREVISION= 1
CATEGORIES= math gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/4.3
diff --git a/math/gcalctool/files/patch-gcalctool::get.c b/math/gcalctool/files/patch-gcalctool::get.c
new file mode 100644
index 000000000000..b1e79fa4b480
--- /dev/null
+++ b/math/gcalctool/files/patch-gcalctool::get.c
@@ -0,0 +1,27 @@
+--- gcalctool/get.c.orig Thu Dec 25 00:15:16 2003
++++ gcalctool/get.c Thu Dec 25 00:22:50 2003
+@@ -242,6 +242,7 @@
+ init_vars() /* Setup default values for various variables. */
+ {
+ int acc, i, n, size;
++ char *loc_radix;
+
+ v->accuracy = 9; /* Initial accuracy. */
+ v->show_zeroes = FALSE; /* Don't show trailing zeroes. */
+@@ -264,6 +265,8 @@
+
+ read_str(&v->iconlabel, _("calculator")); /* Default icon label. */
+
++ loc_radix = v->radix;
++ v->radix = ".";
+ MPstr_to_num("0.621", DEC, v->MPcon_vals[0]); /* kms/hr <=> miles/hr. */
+ MPstr_to_num("1.4142135623", DEC, v->MPcon_vals[1]); /* square root of 2 */
+ MPstr_to_num("2.7182818284", DEC, v->MPcon_vals[2]); /* e */
+@@ -274,6 +277,7 @@
+ MPstr_to_num("0.0353", DEC, v->MPcon_vals[7]); /* grams <=> ounce. */
+ MPstr_to_num("0.948", DEC, v->MPcon_vals[8]); /* Kjoules <=> BTU's. */
+ MPstr_to_num("0.0610", DEC, v->MPcon_vals[9]); /* cms3 <=> inches3. */
++ v->radix = loc_radix;
+
+ n = 0;
+ for (i = 0; i < MAXREGS; i++) {