aboutsummaryrefslogtreecommitdiffstats
path: root/science/gchemutils/files
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-03-21 02:03:38 +0800
committerpav <pav@FreeBSD.org>2006-03-21 02:03:38 +0800
commitce589b71672d2bbab47fe6a44a893dd7f98bab1c (patch)
tree46fbe0ed30ca3dd5eda18a3b3f3f4cd15a79d681 /science/gchemutils/files
parent6c4bf33473361575c1561fd9bac1abd19a6ea8a6 (diff)
downloadfreebsd-ports-gnome-ce589b71672d2bbab47fe6a44a893dd7f98bab1c.tar.gz
freebsd-ports-gnome-ce589b71672d2bbab47fe6a44a893dd7f98bab1c.tar.zst
freebsd-ports-gnome-ce589b71672d2bbab47fe6a44a893dd7f98bab1c.zip
- Update to 0.6.0
Diffstat (limited to 'science/gchemutils/files')
-rw-r--r--science/gchemutils/files/patch-gcu-formula.cc31
-rw-r--r--science/gchemutils/files/patch-programs-gchemcalc.cc11
-rw-r--r--science/gchemutils/files/patch-programs-gchemtable-main.cc10
3 files changed, 52 insertions, 0 deletions
diff --git a/science/gchemutils/files/patch-gcu-formula.cc b/science/gchemutils/files/patch-gcu-formula.cc
new file mode 100644
index 000000000000..2b301b6edb0e
--- /dev/null
+++ b/science/gchemutils/files/patch-gcu-formula.cc
@@ -0,0 +1,31 @@
+--- gcu/formula.cc.orig Thu Feb 9 13:24:54 2006
++++ gcu/formula.cc Mon Mar 20 18:17:25 2006
+@@ -31,6 +31,19 @@
+ #include <glib/gi18n.h>
+ #include <sstream>
+
++/* XXX Implement strndup for FreeBSD. */
++static char *
++strndup(const char *str, size_t len) {
++ char *ret;
++
++ if ((str == NULL || len < 0)) return(NULL);
++ ret = (char *)malloc(len + 1);
++ if (ret == NULL) return(NULL);
++ strncpy(ret, str, len);
++ ret[len] = '\0';
++ return(ret);
++}
++
+ using namespace gcu;
+
+ parse_error::parse_error(const string& __arg, int start, int length)
+@@ -448,7 +461,7 @@
+ atom_weight = Element::GetElement ((*i).first)->GetWeight (atom_prec);
+ if (atom_prec == 0)
+ m_Artificial = true;
+- delta += pow10 (-atom_prec) * (*i).second;
++ delta += pow (10, -atom_prec) * (*i).second;
+ m_Weight += atom_weight * (*i).second;
+ }
+ m_WeightPrec = (int) ceil (-log10 (delta) - 1e-5);
diff --git a/science/gchemutils/files/patch-programs-gchemcalc.cc b/science/gchemutils/files/patch-programs-gchemcalc.cc
new file mode 100644
index 000000000000..01cabccf18d3
--- /dev/null
+++ b/science/gchemutils/files/patch-programs-gchemcalc.cc
@@ -0,0 +1,11 @@
+--- programs/gchemcalc.cc.orig Sat Feb 25 18:35:50 2006
++++ programs/gchemcalc.cc Mon Mar 20 18:22:41 2006
+@@ -140,7 +140,7 @@
+ } else {
+ if (prec < 0) {
+ // round the value to replace not significant figures by 0s.
+- double offs = pow10 (prec);
++ double offs = pow (10, prec);
+ weight = rint (weight * offs) / offs;
+ }
+ format = artificial? g_strdup ("(%.0f)"): g_strdup ("%.0f");
diff --git a/science/gchemutils/files/patch-programs-gchemtable-main.cc b/science/gchemutils/files/patch-programs-gchemtable-main.cc
new file mode 100644
index 000000000000..7a6329b80d47
--- /dev/null
+++ b/science/gchemutils/files/patch-programs-gchemtable-main.cc
@@ -0,0 +1,10 @@
+--- programs/gchemtable-main.cc.orig Thu Feb 9 13:24:54 2006
++++ programs/gchemtable-main.cc Mon Mar 20 18:30:41 2006
+@@ -27,6 +27,7 @@
+ #include <goffice/goffice.h>
+ #include <goffice/app/go-plugin.h>
+ #include <goffice/app/go-plugin-loader-module.h>
++#include <libintl.h>
+
+ using namespace gcu;
+