[kaffe] CVS kaffe (kaz): *

Kaffe CVS cvs-commits at kaffe.org
Tue Nov 29 05:47:44 PST 2005


PatchSet 6977 
Date: 2005/11/29 13:41:10
Author: kaz
Branch: HEAD
Tag: (none) 
Log:
2005-11-28  Ito Kazumitsu  <kaz at maczuka.gcd.org>

	*
	libraries/javalib/vmspecific/gnu/java/nio/charset/UTF_16Decoder.java,
	libraries/javalib/vmspecific/gnu/java/nio/charset/UnicodeLittle.java,
	libraries/javalib/vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java:
	Removed.

	* libraries/javalib/Makefile.am,libraries/javalib/Makefile.in:
	Deleted lines listing removed files.

Members: 
	ChangeLog:1.4499->1.4500 
	libraries/javalib/Makefile.am:1.402->1.403 
	libraries/javalib/Makefile.in:1.498->1.499 
	libraries/javalib/vmspecific/gnu/java/nio/charset/UTF_16Decoder.java:1.1->1.2(DEAD) 
	libraries/javalib/vmspecific/gnu/java/nio/charset/UnicodeLittle.java:1.1->1.2(DEAD) 
	libraries/javalib/vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java:1.1->1.2(DEAD) 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4499 kaffe/ChangeLog:1.4500
--- kaffe/ChangeLog:1.4499	Sun Nov 27 18:18:41 2005
+++ kaffe/ChangeLog	Tue Nov 29 13:41:10 2005
@@ -1,3 +1,14 @@
+2005-11-28  Ito Kazumitsu  <kaz at maczuka.gcd.org>
+
+	*
+	libraries/javalib/vmspecific/gnu/java/nio/charset/UTF_16Decoder.java,
+	libraries/javalib/vmspecific/gnu/java/nio/charset/UnicodeLittle.java,
+	libraries/javalib/vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java:
+	Removed.
+
+	* libraries/javalib/Makefile.am,libraries/javalib/Makefile.in:
+	Deleted lines listing removed files.
+
 2005-11-27  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* kaffe/kaffevm/kaffe-gc/gc-refs.c
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.402 kaffe/libraries/javalib/Makefile.am:1.403
--- kaffe/libraries/javalib/Makefile.am:1.402	Fri Nov  4 20:32:27 2005
+++ kaffe/libraries/javalib/Makefile.am	Tue Nov 29 13:41:11 2005
@@ -653,9 +653,6 @@
 	vmspecific/gnu/java/net/SysInetAddressImpl.java \
 	vmspecific/gnu/java/nio/VMPipe.java \
 	vmspecific/gnu/java/nio/VMSelector.java \
-	vmspecific/gnu/java/nio/charset/UTF_16Decoder.java \
-	vmspecific/gnu/java/nio/charset/UnicodeLittle.java \
-	vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java \
 	vmspecific/java/io/VMFile.java \
 	vmspecific/java/io/VMObjectInputStream.java \
 	vmspecific/java/io/VMObjectStreamClass.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.498 kaffe/libraries/javalib/Makefile.in:1.499
--- kaffe/libraries/javalib/Makefile.in:1.498	Fri Nov  4 20:32:28 2005
+++ kaffe/libraries/javalib/Makefile.in	Tue Nov 29 13:41:12 2005
@@ -972,9 +972,6 @@
 	vmspecific/gnu/java/net/SysInetAddressImpl.java \
 	vmspecific/gnu/java/nio/VMPipe.java \
 	vmspecific/gnu/java/nio/VMSelector.java \
-	vmspecific/gnu/java/nio/charset/UTF_16Decoder.java \
-	vmspecific/gnu/java/nio/charset/UnicodeLittle.java \
-	vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java \
 	vmspecific/java/io/VMFile.java \
 	vmspecific/java/io/VMObjectInputStream.java \
 	vmspecific/java/io/VMObjectStreamClass.java \
===================================================================
Checking out kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/UTF_16Decoder.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/Attic/UTF_16Decoder.java,v
VERS: 1.1
***************
--- kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/UTF_16Decoder.java	Tue Nov 29 13:47:44 2005
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,167 +0,0 @@
-/* UTF_16Decoder.java -- 
-   Copyright (C) 2002, 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.java.nio.charset;
-
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CoderResult;
-
-/**
- * Decoder for UTF-16, UTF-15LE, and UTF-16BE.
- *
- * @author Jesse Rosenstock
- */
-final class UTF_16Decoder extends CharsetDecoder
-{
-  // byte orders
-  static final int BIG_ENDIAN = 0;
-  static final int LITTLE_ENDIAN = 1;
-  static final int UNKNOWN_ENDIAN = 2;
-  static final int MAYBE_BIG_ENDIAN = 3;
-  static final int MAYBE_LITTLE_ENDIAN = 4;
-
-  private static final char BYTE_ORDER_MARK = 0xFEFF;
-  private static final char REVERSED_BYTE_ORDER_MARK = 0xFFFE;
-
-  private final int originalByteOrder;
-  private int byteOrder;
-
-  UTF_16Decoder (Charset cs, int byteOrder)
-  {
-    super (cs, 0.5f, 1.0f);
-    this.originalByteOrder = byteOrder;
-    this.byteOrder = byteOrder;
-  }
-
-  protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out)
-  {
-    // TODO: Optimize this in the case in.hasArray() / out.hasArray()
-
-    int inPos = in.position ();
-    try
-      {
-        while (in.remaining () >= 2)
-          {
-            byte b1 = in.get ();
-            byte b2 = in.get ();
-
-            // handle byte order mark
-            if (byteOrder == UNKNOWN_ENDIAN ||
-                byteOrder == MAYBE_BIG_ENDIAN ||
-                byteOrder == MAYBE_LITTLE_ENDIAN)
-              {
-                char c = (char) (((b1 & 0xFF) << 8) | (b2 & 0xFF));
-                if (c == BYTE_ORDER_MARK)
-                  {
-                    if (byteOrder == MAYBE_LITTLE_ENDIAN)
-                      {
-                        return CoderResult.malformedForLength (2);
-                      }
-                    byteOrder = BIG_ENDIAN;
-                    inPos += 2;
-                    continue;
-                  }
-                else if (c == REVERSED_BYTE_ORDER_MARK)
-                  {
-                    if (byteOrder == MAYBE_BIG_ENDIAN)
-                      {
-                        return CoderResult.malformedForLength (2);
-                      }
-                    byteOrder = LITTLE_ENDIAN;
-                    inPos += 2;
-                    continue;
-                  }
-                else
-                  {
-                    // assume big or little endian, do not consume bytes,
-                    // continue with normal processing
-                    byteOrder = (byteOrder == MAYBE_LITTLE_ENDIAN ?
-                                 LITTLE_ENDIAN : BIG_ENDIAN);
-                  }
-              }
-
-	    // FIXME: Change so you only do a single comparison here.
-            char c = (byteOrder == BIG_ENDIAN
-		      ? (char) (((b1 & 0xFF) << 8) | (b2 & 0xFF))
-		      : (char) (((b2 & 0xFF) << 8) | (b1 & 0xFF)));
-
-            if (0xD800 <= c && c <= 0xDFFF)
-              {
-                // c is a surrogate
-                
-                // make sure c is a high surrogate
-                if (c > 0xDBFF)
-                  return CoderResult.malformedForLength (2);
-                if (in.remaining () < 2)
-                  return CoderResult.UNDERFLOW;
-                byte b3 = in.get ();
-                byte b4 = in.get ();
-                char d = (byteOrder == BIG_ENDIAN
-			  ? (char) (((b3 & 0xFF) << 8) | (b4 & 0xFF))
-			  : (char) (((b4 & 0xFF) << 8) | (b3 & 0xFF)));
-                // make sure d is a low surrogate
-                if (d < 0xDC00 || d > 0xDFFF)
-                  return CoderResult.malformedForLength (2);
-                out.put (c);
-                out.put (d);
-                inPos += 4;
-              }
-            else
-              {
-                if (!out.hasRemaining ())
-                  return CoderResult.UNDERFLOW;
-                out.put (c);
-                inPos += 2;
-              }
-          }
-
-        return CoderResult.UNDERFLOW;
-      }
-    finally
-      {
-        in.position (inPos);
-      }
-  }
-
-  protected void implReset ()
-  {
-    byteOrder = originalByteOrder;
-  }
-}
===================================================================
Checking out kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/UnicodeLittle.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/Attic/UnicodeLittle.java,v
VERS: 1.1
***************
--- kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/UnicodeLittle.java	Tue Nov 29 13:47:44 2005
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,74 +0,0 @@
-/* UnicodeLittle.java -- 
-   Copyright (C) 2005  Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package gnu.java.nio.charset;
-
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CharsetEncoder;
-
-/**
- * UTF-16 little endian with a byte-order mark
- * Included for java.io completeness.
- * ("UTF-16" is equal to UnicodeBig, and 
- * UTF-16BE/LE do not have a BOM
- */
-final class UnicodeLittle extends Charset
-{
-  UnicodeLittle ()
-  {
-    super ("UnicodeLittle", new String[] {});
-  }
-
-  public boolean contains (Charset cs)
-  {
-    return cs instanceof US_ASCII || cs instanceof ISO_8859_1
-      || cs instanceof UTF_8 || cs instanceof UTF_16BE
-      || cs instanceof UTF_16LE || cs instanceof UTF_16;
-  }
-
-  public CharsetDecoder newDecoder ()
-  {
-    return new UTF_16Decoder (this, UTF_16Decoder.MAYBE_LITTLE_ENDIAN);
-  }
-
-  public CharsetEncoder newEncoder ()
-  {
-    return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, true);
-  }
-}
===================================================================
Checking out kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/iconv/Attic/IconvProvider.java,v
VERS: 1.1
***************
--- kaffe/libraries/javalib/vmspecific/gnu/java/nio/charset/iconv/IconvProvider.java	Tue Nov 29 13:47:44 2005
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,115 +0,0 @@
-/* IconvProvider.java --
-   Copyright (C) 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package gnu.java.nio.charset.iconv;
-
-import java.nio.charset.Charset;
-import java.nio.charset.spi.CharsetProvider;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Vector;
-
-/**
- * Charset provider wrapping iconv.
- *
- * @author Sven de Marothy
- */
-public final class IconvProvider extends CharsetProvider
-{
-  private static IconvProvider singleton;
-
-  static
-    {
-      synchronized (IconvProvider.class)
-        {
-	  singleton = null;
-        }
-    }
-
-  // Declaring the construtor public may violate the use of singleton.
-  // But it must be public so that an instance of this class can be
-  // created by Class.newInstance(), which is the case when this provider is
-  // defined in META-INF/services/java.nio.charset.spi.CharsetProvider.
-  public IconvProvider()
-  {
-    IconvMetaData.setup();
-  }
-
-  public Iterator charsets()
-  {
-    Vector names = IconvMetaData.charsets();
-    Vector charsets = new Vector();
-    for (int i = 0; i < names.size(); i++)
-      {
-	try
-	  {
-	    charsets.add(new IconvCharset((IconvMetaData) names.elementAt(i)));
-	  }
-	catch (IllegalArgumentException e)
-	  {
-	  }
-      }
-    return charsets.iterator();
-  }
-
-  public Charset charsetForName(String charsetName)
-  {
-    try
-      {
-	IconvMetaData info = IconvMetaData.get(charsetName);
-
-	// Try anyway if the set isn't found.
-	if (info == null)
-	  info = new IconvMetaData(charsetName, 2.0f, 2.0f, 2.0f, 2.0f,
-	                           new String[] {  }, charsetName);
-	return new IconvCharset(info);
-      }
-    catch (IllegalArgumentException e)
-      {
-	return null;
-      }
-  }
-
-  public static synchronized IconvProvider provider()
-  {
-    if (singleton == null)
-      singleton = new IconvProvider();
-    return singleton;
-  }
-}




More information about the kaffe mailing list