aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorbland <bland@FreeBSD.org>2004-01-03 13:24:47 +0800
committerbland <bland@FreeBSD.org>2004-01-03 13:24:47 +0800
commit62aa2673b156bfb7555ee1873a45abf5c2a9672f (patch)
tree0cb6f7ba488cad3df8d68388d75d19a387ece83b /math
parentdff51856e3d8af2aa2ea52f3908631b2a2e1a9eb (diff)
downloadfreebsd-ports-gnome-62aa2673b156bfb7555ee1873a45abf5c2a9672f.tar.gz
freebsd-ports-gnome-62aa2673b156bfb7555ee1873a45abf5c2a9672f.tar.zst
freebsd-ports-gnome-62aa2673b156bfb7555ee1873a45abf5c2a9672f.zip
Fix thousands separator handling bug.
Reported by: Franz Klammer <klammer@webonaut.com>
Diffstat (limited to 'math')
-rw-r--r--math/gcalctool/Makefile2
-rw-r--r--math/gcalctool/files/patch-gcalctool::display.c13
-rw-r--r--math/gcalctool/files/patch-gcalctool::get.c13
3 files changed, 25 insertions, 3 deletions
diff --git a/math/gcalctool/Makefile b/math/gcalctool/Makefile
index 7aa141797e4c..8cbf10b0aeea 100644
--- a/math/gcalctool/Makefile
+++ b/math/gcalctool/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gcalctool
PORTVERSION= 4.3.31
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= math gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/4.3
diff --git a/math/gcalctool/files/patch-gcalctool::display.c b/math/gcalctool/files/patch-gcalctool::display.c
new file mode 100644
index 000000000000..93ce235da0b7
--- /dev/null
+++ b/math/gcalctool/files/patch-gcalctool::display.c
@@ -0,0 +1,13 @@
+--- gcalctool/display.c.orig Sat Jan 3 13:44:50 2004
++++ gcalctool/display.c Sat Jan 3 14:01:31 2004
+@@ -88,8 +88,8 @@
+ * definitions are potentially in read-only memory, and shouldn't be adjusted.
+ */
+
+- if (strstr(str, v->tsep) != NULL) {
+- tsep_len = strlen(v->tsep);
++ tsep_len = strlen(v->tsep);
++ if (tsep_len && strstr(str, v->tsep) != NULL) {
+ while (*srcp != '\0') {
+ if (memcmp(srcp, v->tsep, tsep_len) == 0) {
+ srcp += tsep_len;
diff --git a/math/gcalctool/files/patch-gcalctool::get.c b/math/gcalctool/files/patch-gcalctool::get.c
index b1e79fa4b480..a67e74d437a0 100644
--- a/math/gcalctool/files/patch-gcalctool::get.c
+++ b/math/gcalctool/files/patch-gcalctool::get.c
@@ -1,5 +1,14 @@
---- gcalctool/get.c.orig Thu Dec 25 00:15:16 2003
-+++ gcalctool/get.c Thu Dec 25 00:22:50 2003
+--- gcalctool/get.c.orig Tue Dec 23 23:21:12 2003
++++ gcalctool/get.c Sat Jan 3 13:18:24 2004
+@@ -230,7 +230,7 @@
+ setlocale(LC_NUMERIC, "");
+ tsep = nl_langinfo(THOUSEP);
+
+- if (tsep == NULL || tsep[0] == '\0') {
++ if (tsep == NULL) {
+ return(",");
+ } else {
+ return(tsep);
@@ -242,6 +242,7 @@
init_vars() /* Setup default values for various variables. */
{