[kaffe] CVS kaffe (guilhem): Fixes for configure + java.text.DecimalFormat + java.text.SimpleDateFormat
Kaffe CVS
cvs-commits at kaffe.org
Fri May 14 11:52:04 PDT 2004
PatchSet 4728
Date: 2004/05/14 18:47:59
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Fixes for configure + java.text.DecimalFormat + java.text.SimpleDateFormat
* libraries/javalib/java/text/DecimalFormat.java
(parse): Fixed parsing of decimal strings. Number of maximum digits
to be read should now work.
* libraries/javalib/java/text/SimpleDateFormat.java:
(SimpleDateFormat): Set maximumFractionDigit to 0 for the number
formatter. This fixes DateFormatTest.
* configure.ac: Fixed jvmpi, xprof and sound extension.
* configure: Regenerated.
Members:
ChangeLog:1.2302->1.2303
configure:1.316->1.317
configure.ac:1.15->1.16
libraries/javalib/java/text/DecimalFormat.java:1.28->1.29
libraries/javalib/java/text/SimpleDateFormat.java:1.33->1.34
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2302 kaffe/ChangeLog:1.2303
--- kaffe/ChangeLog:1.2302 Thu May 13 19:18:19 2004
+++ kaffe/ChangeLog Fri May 14 18:47:59 2004
@@ -1,4 +1,20 @@
-2004-05-13 Guilhem Lavaux <guilhem at kaffe.org>
+2004-05-14 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * libraries/javalib/java/text/DecimalFormat.java
+ (parse): Fixed parsing of decimal strings. Number of maximum digits
+ to be read should now work.
+
+ * libraries/javalib/java/text/SimpleDateFormat.java:
+ (SimpleDateFormat): Set maximumFractionDigit to 0 for the number
+ formatter. This fixes DateFormatTest.
+
+2004-05-14 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * configure.ac: Fixed jvmpi, xprof and sound extension.
+
+ * configure: Regenerated.
+
+2004-05-13 Guilhem Lavaux <guilhem at kaffe.org>
* libraries/javalib/java/text/RuleBasedCollator.java
(CollationElement, CollationSorter): Made static.
Index: kaffe/configure
diff -u kaffe/configure:1.316 kaffe/configure:1.317
--- kaffe/configure:1.316 Thu May 13 18:59:23 2004
+++ kaffe/configure Fri May 14 18:48:01 2004
@@ -26292,7 +26292,7 @@
-if test x"$enable_jvmpi" = x"yes"; then
+if test x"$enable_jvmpi" != x"no"; then
ENABLE_JVMPI_TRUE=
ENABLE_JVMPI_FALSE='#'
else
@@ -26343,7 +26343,7 @@
esac
-if test x"$enable_xprofiling" = x"yes"; then
+if test x"$xprofiling" = x"yes"; then
ENABLE_XPROF_TRUE=
ENABLE_XPROF_FALSE='#'
else
@@ -26352,7 +26352,7 @@
fi
-if test x"$enable_xprofiling" = x"yes"; then
+if test x"$xprofiling" = x"yes"; then
if test -f "$srcdir/config/$Khost_cpu/$Khost_os/xprofile-md.h"; then
CONFIG_XPROFILE_MD_H="\$(top_srcdir)/config/$Khost_cpu/$Khost_os/xprofile-md.h"
@@ -52035,7 +52035,7 @@
*)
if test x"$alsa_found" = x"yes"; then
ALSA_DIR=alsa
- ALSA_LIB="\$(top_builddir)/libraries/extensions/sound/alsa/libtritonusalsa.la"
+ ALSA_LIB="\$(top_builddir)/libraries/clib/sound/alsa/libtritonusalsa.la"
fi
;;
esac
@@ -52054,7 +52054,7 @@
*)
if test x"$esd_found" = x"yes"; then
ESD_DIR=esd
- ESD_LIB="\$(top_builddir)/libraries/extensions/sound/esd/libtritonusesd.la"
+ ESD_LIB="\$(top_builddir)/libraries/clib/sound/esd/libtritonusesd.la"
fi
;;
esac
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.15 kaffe/configure.ac:1.16
--- kaffe/configure.ac:1.15 Thu May 13 18:59:28 2004
+++ kaffe/configure.ac Fri May 14 18:48:03 2004
@@ -455,7 +455,7 @@
fi;;
esac
-AM_CONDITIONAL(ENABLE_JVMPI, test x"$enable_jvmpi" = x"yes")
+AM_CONDITIONAL(ENABLE_JVMPI, test x"$enable_jvmpi" != x"no")
dnl =========================================================================
dnl Allow user to specify a dnsjava.jar file for class file testing.
@@ -490,9 +490,9 @@
*) xprofiling=yes; need_libxprof=yes; CPPFLAGS="$CPPFLAGS -DKAFFE_XPROFILER";;
esac
dnl ENABLE_XPROF controls installation of xprof scripts in kaffe/scripts/Makefile.am
-AM_CONDITIONAL(ENABLE_XPROF, test x"$enable_xprofiling" = x"yes")
+AM_CONDITIONAL(ENABLE_XPROF, test x"$xprofiling" = x"yes")
-if test x"$enable_xprofiling" = x"yes"; then
+if test x"$xprofiling" = x"yes"; then
if test -f "$srcdir/config/$Khost_cpu/$Khost_os/xprofile-md.h"; then
CONFIG_XPROFILE_MD_H="\$(top_srcdir)/config/$Khost_cpu/$Khost_os/xprofile-md.h"
AC_SUBST(CONFIG_XPROFILE_MD_H)
@@ -1495,7 +1495,7 @@
*)
if test x"$alsa_found" = x"yes"; then
ALSA_DIR=alsa
- ALSA_LIB="\$(top_builddir)/libraries/extensions/sound/alsa/libtritonusalsa.la"
+ ALSA_LIB="\$(top_builddir)/libraries/clib/sound/alsa/libtritonusalsa.la"
fi
;;
esac
@@ -1513,7 +1513,7 @@
*)
if test x"$esd_found" = x"yes"; then
ESD_DIR=esd
- ESD_LIB="\$(top_builddir)/libraries/extensions/sound/esd/libtritonusesd.la"
+ ESD_LIB="\$(top_builddir)/libraries/clib/sound/esd/libtritonusesd.la"
fi
;;
esac
Index: kaffe/libraries/javalib/java/text/DecimalFormat.java
diff -u kaffe/libraries/javalib/java/text/DecimalFormat.java:1.28 kaffe/libraries/javalib/java/text/DecimalFormat.java:1.29
--- kaffe/libraries/javalib/java/text/DecimalFormat.java:1.28 Sun May 2 05:55:30 2004
+++ kaffe/libraries/javalib/java/text/DecimalFormat.java Fri May 14 18:48:04 2004
@@ -847,7 +847,7 @@
// FIXME: handle Inf and NaN.
// FIXME: do we have to respect minimum digits?
- // What about leading zeros? What about multiplier?
+ // What about multiplier?
StringBuffer buf = int_buf;
StringBuffer frac_buf = null;
@@ -855,7 +855,13 @@
int start_index = index;
int max = str.length();
int exp_index = -1;
- int last = index + MAXIMUM_INTEGER_DIGITS;
+ int last = index + maximumIntegerDigits;
+
+ if (maximumFractionDigits > 0)
+ last += maximumFractionDigits + 1;
+
+ if (useExponentialNotation)
+ last += minExponentDigits + 1;
if (last > 0 && max > last)
max = last;
Index: kaffe/libraries/javalib/java/text/SimpleDateFormat.java
diff -u kaffe/libraries/javalib/java/text/SimpleDateFormat.java:1.33 kaffe/libraries/javalib/java/text/SimpleDateFormat.java:1.34
--- kaffe/libraries/javalib/java/text/SimpleDateFormat.java:1.33 Fri Apr 23 17:35:12 2004
+++ kaffe/libraries/javalib/java/text/SimpleDateFormat.java Fri May 14 18:48:04 2004
@@ -189,6 +189,7 @@
numberFormat = NumberFormat.getInstance(locale);
numberFormat.setGroupingUsed (false);
numberFormat.setParseIntegerOnly (true);
+ numberFormat.setMaximumFractionDigits (0);
}
/**
@@ -216,6 +217,7 @@
numberFormat = NumberFormat.getInstance(locale);
numberFormat.setGroupingUsed (false);
numberFormat.setParseIntegerOnly (true);
+ numberFormat.setMaximumFractionDigits (0);
}
/**
@@ -234,6 +236,7 @@
numberFormat = NumberFormat.getInstance();
numberFormat.setGroupingUsed (false);
numberFormat.setParseIntegerOnly (true);
+ numberFormat.setMaximumFractionDigits (0);
}
// What is the difference between localized and unlocalized? The
More information about the kaffe
mailing list