[kaffe] CVS kaffe (dalibor): Partially resynced with GNU Classpath
Kaffe CVS
cvs-commits at kaffe.org
Sun Nov 23 12:43:02 PST 2003
PatchSet 4170
Date: 2003/11/23 20:41:03
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Partially resynced with GNU Classpath
Among unsyncable differences at the moment, a new one has appeared as GNU Classpath's
font class starts to implement some new methods kaffe doesn't have yet.
Members:
ChangeLog:1.1762->1.1763
libraries/javalib/java/text/DecimalFormatSymbols.java:1.12->1.13
libraries/javalib/java/text/FormatCharacterIterator.java:1.2->1.3
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1762 kaffe/ChangeLog:1.1763
--- kaffe/ChangeLog:1.1762 Sun Nov 23 18:26:57 2003
+++ kaffe/ChangeLog Sun Nov 23 20:41:03 2003
@@ -1,4 +1,15 @@
-2003-11-23 Atsushi Nemoto <anemo at mba.ocn.ne.jp>
+2003-11-23 Dalibor Topic <robilad at kaffe.org>
+
+ Partially re-synced with GNU Classpath. Detailed ChangeLog follows.
+
+ 2003-11-22 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * java/text/DecimalFormatSymbols.java (locale): New field.
+ (DecimalFormatSymbols (Locale)): Set locale.
+ (serialVersionOnStream): Upgraded to number 2.
+ (readObject): Assign locale if it wasn't by the serializer.
+
+2003-11-23 Atsushi Nemoto <anemo at mba.ocn.ne.jp>
* libraries/javalib/kaffe/applet/AppletTag.java
(parseForApplets):Fixed the parsing of empty <applet> tag.
Index: kaffe/libraries/javalib/java/text/DecimalFormatSymbols.java
diff -u kaffe/libraries/javalib/java/text/DecimalFormatSymbols.java:1.12 kaffe/libraries/javalib/java/text/DecimalFormatSymbols.java:1.13
--- kaffe/libraries/javalib/java/text/DecimalFormatSymbols.java:1.12 Wed Aug 27 14:32:10 2003
+++ kaffe/libraries/javalib/java/text/DecimalFormatSymbols.java Sun Nov 23 20:41:05 2003
@@ -580,9 +580,10 @@
private char perMill;
/**
* @serial This value represents the type of object being de-serialized.
+ * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later.
* 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later,
* 2 indicates 1.4 or later
- */
+ */
private int serialVersionOnStream = 2;
/**
* @serial This is the character used to represent 0.
@@ -590,10 +591,10 @@
private char zeroDigit;
/**
- * @serial the locale of these currency symbols.
+ * @serial The locale of these currency symbols.
*/
private Locale locale;
-
+
private static final long serialVersionUID = 5772796243397350300L;
private void readObject(ObjectInputStream stream)
@@ -606,9 +607,8 @@
exponential = 'E';
}
if (serialVersionOnStream < 2)
- {
locale = Locale.getDefault();
- }
+
serialVersionOnStream = 2;
}
}
Index: kaffe/libraries/javalib/java/text/FormatCharacterIterator.java
diff -u kaffe/libraries/javalib/java/text/FormatCharacterIterator.java:1.2 kaffe/libraries/javalib/java/text/FormatCharacterIterator.java:1.3
--- kaffe/libraries/javalib/java/text/FormatCharacterIterator.java:1.2 Sat Oct 25 18:30:25 2003
+++ kaffe/libraries/javalib/java/text/FormatCharacterIterator.java Sun Nov 23 20:41:05 2003
@@ -58,7 +58,7 @@
attributes = new HashMap[0];
}
- FormatCharacterIterator(String s, int[] ranges, HashMap[] attributes)
+ FormatCharacterIterator (String s, int[] ranges, HashMap[] attributes)
{
formattedString = s;
this.ranges = ranges;
@@ -86,10 +86,10 @@
return new HashMap();
}
- public Object getAttribute(AttributedCharacterIterator.Attribute attrib)
+ public Object getAttribute (AttributedCharacterIterator.Attribute attrib)
{
if (attributes != null && attributes[attributeIndex] != null)
- return attributes[attributeIndex].get(attrib);
+ return attributes[attributeIndex].get (attrib);
else
return null;
}
@@ -111,17 +111,17 @@
break;
newKeys = attributes[currentAttrIndex].keySet();
}
- while (newKeys.containsAll(reqAttrs));
+ while (newKeys.containsAll (reqAttrs));
return ranges[currentAttrIndex-1];
}
- public int getRunLimit(AttributedCharacterIterator.Attribute attribute)
+ public int getRunLimit (AttributedCharacterIterator.Attribute attribute)
{
Set s = new HashSet();
- s.add(attribute);
- return getRunLimit(s);
+ s.add (attribute);
+ return getRunLimit (s);
}
public int getRunLimit()
@@ -139,7 +139,7 @@
return getRunLimit (attributes[attributeIndex].keySet());
}
- public int getRunStart(Set reqAttrs)
+ public int getRunStart (Set reqAttrs)
{
if (attributes == null)
return formattedString.length();
@@ -157,7 +157,7 @@
break;
newKeys = attributes[currentAttrIndex].keySet();
}
- while (newKeys.containsAll(reqAttrs));
+ while (newKeys.containsAll (reqAttrs));
return (currentAttrIndex > 0) ? ranges[currentAttrIndex-1] : 0;
}
@@ -175,20 +175,20 @@
return 0;
}
- return getRunStart(attributes[attributeIndex].keySet());
+ return getRunStart (attributes[attributeIndex].keySet());
}
- public int getRunStart(AttributedCharacterIterator.Attribute attribute)
+ public int getRunStart (AttributedCharacterIterator.Attribute attribute)
{
Set s = new HashSet();
- s.add(attribute);
- return getRunStart(s);
+ s.add (attribute);
+ return getRunStart (s);
}
public Object clone()
{
- return new FormatCharacterIterator(formattedString, ranges, attributes);
+ return new FormatCharacterIterator (formattedString, ranges, attributes);
}
/*
@@ -198,14 +198,14 @@
*/
public char current()
{
- return formattedString.charAt(charIndex);
+ return formattedString.charAt (charIndex);
}
public char first()
{
charIndex = 0;
attributeIndex = 0;
- return formattedString.charAt(0);
+ return formattedString.charAt (0);
}
public int getBeginIndex()
@@ -228,7 +228,7 @@
charIndex = formattedString.length()-1;
if (attributes != null)
attributeIndex = attributes.length-1;
- return formattedString.charAt(charIndex);
+ return formattedString.charAt (charIndex);
}
public char next()
@@ -244,7 +244,7 @@
if (charIndex >= ranges[attributeIndex])
attributeIndex++;
}
- return formattedString.charAt(charIndex);
+ return formattedString.charAt (charIndex);
}
public char previous()
@@ -261,13 +261,13 @@
if (charIndex < ranges[attributeIndex])
attributeIndex--;
}
- return formattedString.charAt(charIndex);
+ return formattedString.charAt (charIndex);
}
- public char setIndex(int position)
+ public char setIndex (int position)
{
if (position < 0 || position > formattedString.length())
- throw new IllegalArgumentException("position is out of range");
+ throw new IllegalArgumentException ("position is out of range");
charIndex = position;
if (attributes != null)
@@ -281,10 +281,10 @@
if (charIndex == formattedString.length())
return DONE;
else
- return formattedString.charAt(charIndex);
+ return formattedString.charAt (charIndex);
}
- protected void mergeAttributes(HashMap[] attributes, int[] ranges)
+ protected void mergeAttributes (HashMap[] attributes, int[] ranges)
{
Vector new_ranges = new Vector();
Vector new_attributes = new Vector();
@@ -294,28 +294,28 @@
{
if (this.attributes[i] != null)
{
- new_attributes.add(this.attributes[i]);
+ new_attributes.add (this.attributes[i]);
if (attributes[j] != null)
- this.attributes[i].putAll(attributes[j]);
+ this.attributes[i].putAll (attributes[j]);
}
else
{
- new_attributes.add(attributes[j]);
+ new_attributes.add (attributes[j]);
}
if (this.ranges[i] == ranges[j])
{
- new_ranges.add(new Integer(ranges[j]));
+ new_ranges.add (new Integer (ranges[j]));
i++;
j++;
}
else if (this.ranges[i] < ranges[j])
{
- new_ranges.add(new Integer(this.ranges[i]));
+ new_ranges.add (new Integer (this.ranges[i]));
i++;
}
else
{
- new_ranges.add(new Integer(ranges[j]));
+ new_ranges.add (new Integer (ranges[j]));
j++;
}
}
@@ -324,32 +324,32 @@
{
for (;i<this.ranges.length;i++)
{
- new_attributes.add(this.attributes[i]);
- new_ranges.add(new Integer(this.ranges[i]));
+ new_attributes.add (this.attributes[i]);
+ new_ranges.add (new Integer (this.ranges[i]));
}
}
if (j != ranges.length)
{
for (;j<ranges.length;j++)
{
- new_attributes.add(attributes[j]);
- new_ranges.add(new Integer(ranges[j]));
+ new_attributes.add (attributes[j]);
+ new_ranges.add (new Integer (ranges[j]));
}
}
this.attributes = new HashMap[new_attributes.size()];
this.ranges = new int[new_ranges.size()];
- System.arraycopy(new_attributes.toArray(), 0, this.attributes,
- 0, this.attributes.length);
+ System.arraycopy (new_attributes.toArray(), 0, this.attributes,
+ 0, this.attributes.length);
for (i=0;i<new_ranges.size();i++)
{
- this.ranges[i] = ((Integer)new_ranges.elementAt(i)).intValue();
+ this.ranges[i] = ((Integer)new_ranges.elementAt (i)).intValue();
}
}
- protected void append(AttributedCharacterIterator iterator)
+ protected void append (AttributedCharacterIterator iterator)
{
char c = iterator.first();
Vector more_ranges = new Vector();
@@ -360,7 +360,7 @@
formattedString = formattedString + String.valueOf(c);
// TODO: Reduce the size of the output array.
more_attributes.add (iterator.getAttributes());
- more_ranges.add(new Integer(formattedString.length()));
+ more_ranges.add (new Integer (formattedString.length()));
// END TOOD
c = iterator.next();
}
@@ -370,11 +370,11 @@
+ more_attributes.size()];
int[] new_ranges = new int[ranges.length + more_ranges.size()];
- System.arraycopy(attributes, 0, new_attributes, 0, attributes.length);
- System.arraycopy(more_attributes.toArray(), 0, new_attributes,
- attributes.length, more_attributes.size());
+ System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
+ System.arraycopy (more_attributes.toArray(), 0, new_attributes,
+ attributes.length, more_attributes.size());
- System.arraycopy(ranges, 0, new_ranges, 0, ranges.length);
+ System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
Object[] new_ranges_array = more_ranges.toArray();
for (int i=0;i<more_ranges.size();i++)
new_ranges[i+ranges.length] = ((Integer)new_ranges_array[i]).intValue();
@@ -383,14 +383,14 @@
ranges = new_ranges;
}
- protected void append(String text, HashMap local_attributes)
+ protected void append (String text, HashMap local_attributes)
{
int[] new_ranges = new int[ranges.length+1];
HashMap[] new_attributes = new HashMap[attributes.length+1];
formattedString += text;
- System.arraycopy(attributes, 0, new_attributes, 0, attributes.length);
- System.arraycopy(ranges, 0, new_ranges, 0, ranges.length);
+ System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
+ System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
new_ranges[ranges.length] = formattedString.length();
new_attributes[attributes.length] = local_attributes;
@@ -398,8 +398,8 @@
attributes = new_attributes;
}
- protected void append(String text)
+ protected void append (String text)
{
- append(text, null);
+ append (text, null);
}
}
More information about the kaffe
mailing list