[cp-patches] FYI: ComponentGraphics clip fix

2006-06-04 Thread Sven de Marothy
2006-06-05  Sven de Marothy  <[EMAIL PROTECTED]>

*  gnu/java/awt/peer/gtk/ComponentGraphics.java
(ComponentGraphics): Use 0,0 as clip origin.


Index: gnu/java/awt/peer/gtk/ComponentGraphics.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java,v
retrieving revision 1.8
diff -U3 -r1.8 ComponentGraphics.java
--- gnu/java/awt/peer/gtk/ComponentGraphics.java	3 Jun 2006 22:41:41 -	1.8
+++ gnu/java/awt/peer/gtk/ComponentGraphics.java	5 Jun 2006 03:36:45 -
@@ -71,8 +71,9 @@
 this.component = component;
 cairo_t = initState(component);
 setup( cairo_t );
+Rectangle bounds = component.awtComponent.getBounds();
+setClip( new Rectangle( 0, 0, bounds.width, bounds.height) );
 setBackground(component.awtComponent.getBackground());
-setClip(component.awtComponent.getBounds());
 setColor(component.awtComponent.getForeground());
   }
 
@@ -81,8 +82,9 @@
 component = cg.component;
 cairo_t = initState(component);
 copy( cg, cairo_t );
+Rectangle bounds = component.awtComponent.getBounds();
+setClip( new Rectangle( 0, 0, bounds.width, bounds.height) );
 setBackground(component.awtComponent.getBackground());
-setClip(component.awtComponent.getBounds());
 setColor(component.awtComponent.getForeground());
   }
 


[cp-patches] FYI: Add Formatter to HEAD

2006-06-04 Thread Andrew John Hughes
This patch adds Formatter (and a class and interface it depends on)
to HEAD.  There are a few hacks in there to make it work (namely
we lose a lot of the constructors, as we can't be as general
as to work on an Appendable; I've had to lock it down to the
default StringBuilder instead).  However, the main parsing and
formatting bits of the class are as on the generics branch,
and you'll only run in to problems if you want to create a
formatter for a stream directly (instead you have to create
the string and send that to the stream).

On the positive sides, there are two classes in here that
are as on the generics side, which is two less to merge.

Changelog:

2006-06-04  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/util/Formattable.java,
* java/util/FormattableFlags.java,
* java/util/Formatter.java:
Documented.

2006-03-20  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/util/Formatter.java:
Make the class final.

2005-09-26  Tom Tromey  <[EMAIL PROTECTED]>

* java/util/Formatter.java (format): Set fmtLocale.
(applyLocalization): New method.
(basicIntegralConversion): Likewise.
(hexOrOctalConversion): Use it.
(decimalConversion): New method.
(format): Use decimalConversion, dateTimeConversion.
(genericFormat): Upper-case earlier.  Justify correctly.
(singleDateTimeConversion): New method.
(dateTimeConversion): Likewise.

2005-09-25  Tom Tromey  <[EMAIL PROTECTED]>

* java/util/Formatter.java (lineSeparator): Use SystemProperties.

2005-09-24  Tom Tromey  <[EMAIL PROTECTED]>

* java/util/FormattableFlags.java (PLUS, SPACE, ZERO, COMMA,
PAREN): New constants.
* java/util/Formattable.java: New file.
* java/util/Formatter.java: New file.

2005-08-13  Tom Tromey  <[EMAIL PROTECTED]>

* java/util/FormattableFlags.java: New file.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/util/Formattable.java
===
RCS file: java/util/Formattable.java
diff -N java/util/Formattable.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ java/util/Formattable.java  4 Jun 2006 23:29:47 -
@@ -0,0 +1,92 @@
+/* Formattable.java -- Objects which can be passed to a Formatter
+   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 java.util;
+
+/** 
+ * 
+ * The Formattable interface is used to provide customised
+ * formatting to arbitrary objects via the [EMAIL PROTECTED] Formatter}.  The
+ * [EMAIL PROTECTED] #formatTo} method is called for Formattable
+ * objects used with the 's' conversion operator, allowing the object
+ * to provide its own formatting of its internal data.
+ * 
+ * 
+ * Thread safet

[cp-patches] FYI: [generics] Document remaining formatting classes

2006-06-04 Thread Andrew John Hughes
This patch adds documentation to the remaining formatting
classes.  The main class head Formattable documentation, 
however, is far from complete; I'll add more when I get round
to testing the class more throughly unless someone wants to
beat me to it.

2006-06-04  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/util/Formattable.java,
* java/util/FormattableFlags.java,
* java/util/Formatter.java:
Documented.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/util/Formattable.java
===
RCS file: /cvsroot/classpath/classpath/java/util/Attic/Formattable.java,v
retrieving revision 1.1.2.1
diff -u -3 -p -u -r1.1.2.1 Formattable.java
--- java/util/Formattable.java  25 Sep 2005 02:55:13 -  1.1.2.1
+++ java/util/Formattable.java  4 Jun 2006 22:19:22 -
@@ -38,9 +38,55 @@ exception statement from your version. *
 
 package java.util;
 
-/** @since 1.5 */
+/** 
+ * 
+ * The Formattable interface is used to provide customised
+ * formatting to arbitrary objects via the [EMAIL PROTECTED] Formatter}.  The
+ * [EMAIL PROTECTED] #formatTo} method is called for Formattable
+ * objects used with the 's' conversion operator, allowing the object
+ * to provide its own formatting of its internal data.
+ * 
+ * 
+ * Thread safety is left up to the implementing class.  Thus,
+ * [EMAIL PROTECTED] Formattable} objects are not guaranteed to be thread-safe,
+ * and users should make their own provisions for multiple thread access.
+ * 
+ *
+ * @author Tom Tromey ([EMAIL PROTECTED])
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5 
+ */
 public interface Formattable
 {
+
+  /**
+   * Formats the object using the supplied formatter to the specification
+   * provided by the given flags, width and precision.
+   *
+   * @param formatter the formatter to use for formatting the object.
+   *  The formatter gives access to the output stream
+   *  and locale via [EMAIL PROTECTED] Formatter#out()} and
+   *  [EMAIL PROTECTED] Formatter#locale()} respectively.
+   * @param flags a bit mask constructed from the flags in the
+   *  [EMAIL PROTECTED] FormattableFlags} class.  When no flags
+   *  are set, the implementing class should use its
+   *  defaults.
+   * @param width the minimum number of characters to include.
+   *  A value of -1 indicates no minimum.  The remaining
+   *  space is padded with ' ' either on the left
+   *  (the default) or right (if left justification is
+   *  specified by the flags).
+   * @param precision the maximum number of characters to include.
+   *  A value of -1 indicates no maximum.  This value
+   *  is applied prior to the minimum (the width).  Thus,
+   *  a value may meet the minimum width initially, but
+   *  not when the width value is applied, due to
+   *  characters being removed by the precision value.
+   * @throws IllegalFormatException if there is a problem with
+   *the syntax of the format
+   *specification or a mismatch
+   *between it and the arguments.
+   */
   public void formatTo(Formatter formatter, int flags, int width,
   int precision);
 }
Index: java/util/FormattableFlags.java
===
RCS file: /cvsroot/classpath/classpath/java/util/Attic/FormattableFlags.java,v
retrieving revision 1.1.2.2
diff -u -3 -p -u -r1.1.2.2 FormattableFlags.java
--- java/util/FormattableFlags.java 25 Sep 2005 02:55:13 -  1.1.2.2
+++ java/util/FormattableFlags.java 4 Jun 2006 22:19:22 -
@@ -38,19 +38,82 @@ exception statement from your version. *
 
 package java.util;
 
-/** @since 1.5 */
+/** 
+ * This class contains a set of flags used
+ * by the [EMAIL PROTECTED] Formattable#formatTo()} method.
+ * They are used to modify the output of the
+ * [EMAIL PROTECTED] Formattable}.  The interpretation and
+ * validation of the flags is left to the
+ * particular [EMAIL PROTECTED] Formattable}.
+ *
+ * @author Tom Tromey ([EMAIL PROTECTED])
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5 
+ */
 public class FormattableFlags
 {
+
+  /**
+   * Requires the o

[cp-patches] [generics] Patch: FYI: genericize javax.naming

2006-06-04 Thread Tom Tromey
I'm checking this in on the generics branch.

This genericizes some things in javax.naming.

Tom

2006-06-04  Tom Tromey  <[EMAIL PROTECTED]>

* javax/naming/Context.java (list): Genericized.
(listBindings): Likewise.
* javax/naming/Reference.java (addrs): Genericized.
* javax/naming/InitialContext.java (myProps): Fixed type.
(init): Genericized.

Index: javax/naming/Context.java
===
RCS file: /cvsroot/classpath/classpath/javax/naming/Context.java,v
retrieving revision 1.2.2.3
diff -u -r1.2.2.3 Context.java
--- javax/naming/Context.java   29 May 2006 16:19:46 -  1.2.2.3
+++ javax/naming/Context.java   4 Jun 2006 20:30:43 -
@@ -270,7 +270,7 @@
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
*/
-  NamingEnumeration list(Name name) throws NamingException;
+  NamingEnumeration list(Name name) throws NamingException;
 
   /**
* Creates and returns the enumeration over the name bindings that are 
present
@@ -284,7 +284,7 @@
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
*/
-  NamingEnumeration list(String name) throws NamingException;
+  NamingEnumeration list(String name) throws NamingException;
 
   /**
* Creates and returns the enumeration over the name - object bindings that
@@ -297,7 +297,7 @@
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
*/
-  NamingEnumeration listBindings(Name name) throws NamingException;
+  NamingEnumeration listBindings(Name name) throws NamingException;
 
   /**
* Creates and returns the enumeration over the name - object bindings that
@@ -310,7 +310,7 @@
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
*/
-  NamingEnumeration listBindings(String name) throws NamingException;
+  NamingEnumeration listBindings(String name) throws NamingException;
 
   /**
* Creates the new naming subcontext and binds it to the current (this)
Index: javax/naming/InitialContext.java
===
RCS file: /cvsroot/classpath/classpath/javax/naming/InitialContext.java,v
retrieving revision 1.7.2.4
diff -u -r1.7.2.4 InitialContext.java
--- javax/naming/InitialContext.java29 May 2006 16:19:46 -  1.7.2.4
+++ javax/naming/InitialContext.java4 Jun 2006 20:30:43 -
@@ -73,7 +73,7 @@
   /**
* The environment, associated with this initial context.
*/
-  protected Hashtable myProps;
+  protected Hashtable myProps;
   
   /**
* The list of the properties, to that the second alternative value must
@@ -166,13 +166,13 @@
*  not later reuse this structure for other purposes.
* @since 1.3
*/
-  protected void init(Hashtable environment) throws NamingException
+  protected void init(Hashtable environment) throws NamingException
   {
 // If is documented that the caller should not modify the environment.
 if (environment != null)
-  myProps = environment;
+  myProps = (Hashtable) environment;
 else
-  myProps = new Hashtable();
+  myProps = new Hashtable();
 
 Applet napplet = (Applet) myProps.get(Context.APPLET);
 
Index: javax/naming/Reference.java
===
RCS file: /cvsroot/classpath/classpath/javax/naming/Reference.java,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 Reference.java
--- javax/naming/Reference.java 29 May 2006 16:19:46 -  1.1.2.5
+++ javax/naming/Reference.java 4 Jun 2006 20:30:43 -
@@ -58,7 +58,7 @@
* The list of addresses, stored in this reference. The object may be 
* have by several different addresses.
*/
-  protected Vector addrs;
+  protected Vector addrs;
   
   /**
* The name of the class factory to create an instance of the object,



[cp-patches] FYI: createVolatileImage change

2006-06-04 Thread Sven de Marothy
2006-06-04  Sven de Marothy  <[EMAIL PROTECTED]>

* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(createVolatileImage): Pass peer to VolatileImage constructor.
* java/awt/Component.java
(createVolatileImage): Call peer method directly.


Index: gnu/java/awt/peer/gtk/GtkComponentPeer.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java,v
retrieving revision 1.114
diff -U3 -r1.114 GtkComponentPeer.java
--- gnu/java/awt/peer/gtk/GtkComponentPeer.java	29 May 2006 16:14:59 -	1.114
+++ gnu/java/awt/peer/gtk/GtkComponentPeer.java	4 Jun 2006 20:18:01 -
@@ -697,7 +697,7 @@
   // on which this component is displayed.
   public VolatileImage createVolatileImage (int width, int height)
   {
-return new GtkVolatileImage (width, height);
+return new GtkVolatileImage (this, width, height, null);
   }
 
   // Creates buffers used in a buffering strategy.
@@ -707,7 +707,7 @@
 // numBuffers == 2 implies double-buffering, meaning one back
 // buffer and one front buffer.
 if (numBuffers == 2)
-  backBuffer = new GtkVolatileImage(awtComponent.getWidth(),
+  backBuffer = new GtkVolatileImage(this, awtComponent.getWidth(),
 	awtComponent.getHeight(),
 	caps.getBackBufferCapabilities());
 else
Index: java/awt/Component.java
===
RCS file: /sources/classpath/classpath/java/awt/Component.java,v
retrieving revision 1.119
diff -U3 -r1.119 Component.java
--- java/awt/Component.java	30 May 2006 16:38:11 -	1.119
+++ java/awt/Component.java	4 Jun 2006 20:18:03 -
@@ -2067,11 +2067,9 @@
*/
   public VolatileImage createVolatileImage(int width, int height)
   {
-if (GraphicsEnvironment.isHeadless())
-  return null;
-GraphicsConfiguration config = getGraphicsConfiguration();
-return config == null ? null
-  : config.createCompatibleVolatileImage(width, height);
+if (peer != null)
+  return peer.createVolatileImage(width, height);
+return null;
   }
 
   /**
@@ -2090,11 +2088,9 @@
ImageCapabilities caps)
 throws AWTException
   {
-if (GraphicsEnvironment.isHeadless())
-  return null;
-GraphicsConfiguration config = getGraphicsConfiguration();
-return config == null ? null
-  : config.createCompatibleVolatileImage(width, height, caps);
+if (peer != null)
+  return peer.createVolatileImage(width, height);
+return null;
   }
 
   /**


[cp-patches] FYI: Merge Formatter exceptions

2006-06-04 Thread Andrew John Hughes
This patch merges the Formatter exceptions (now documented)
from the generics branch.

Changelog:

2006-06-04  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/util/DuplicateFormatFlagsException.java,
* java/util/FormatFlagsConversionMismatchException.java,
* java/util/FormatterClosedException.java,
* java/util/IllegalFormatCodePointException.java,
* java/util/IllegalFormatConversionException.java,
* java/util/IllegalFormatException.java,
* java/util/IllegalFormatFlagsException.java,
* java/util/IllegalFormatPrecisionException.java,
* java/util/IllegalFormatWidthException.java,
* java/util/MissingFormatArgumentException.java,
* java/util/MissingFormatWidthException.java,
* java/util/UnknownFormatConversionException.java,
* java/util/UnknownFormatFlagsException.java:
Documented.

2005-08-13  Tom Tromey  <[EMAIL PROTECTED]>

* java/util/UnknownFormatConversionException.java
(serialVersionUID): New field.
(s): Renamed from 'conv' for serialization.
* java/util/MissingFormatWidthException.java (serialVersionUID):
New field.
(s): Renamed from 'width' for serialization.
* java/util/MissingFormatArgumentException.java
(serialVersionUID): New field.
(s): Renamed from 'spec' for serialization.
* java/util/IllegalFormatWidthException.java (serialVersionUID):
New field.
(w): Renamed from 'width' for serialization.
* java/util/IllegalFormatPrecisionException.java
(serialVersionUID): New field.
(p): Renamed from 'precision' for serialization.
* java/util/IllegalFormatFlagsException.java (serialVersionUID):
New field.
* java/util/IllegalFormatConversionException.java
(serialVersionUID): New field.
(c): Renamed from 'conv' for serialization.
(arg): Renamed from 'argClass' for serialization.
* java/util/IllegalFormatCodePointException.java
(serialVersionUID): New field.
(c): Renamed from 'codepoint' for serialization.
* java/util/FormatFlagsConversionMismatchException.java
(serialVersionUID): New field.
(f): Renamed from 'flags' for serialization.
(c): Renamed from 'conversion' for serialization.
* java/util/DuplicateFormatFlagsException.java (serialVersionUID):
New field.
* java/util/IllegalFormatException.java (serialVersionUID): New
field.
* java/util/FormatterClosedException.java (serialVersionUID): New
field.

2005-04-20  Tom Tromey  <[EMAIL PROTECTED]>

* java/util/DuplicateFormatFlagsException.java: New file.
* java/util/FormatFlagsConversionMismatchException.java: New file.
* java/util/FormatterClosedException.java: New file.
* java/util/IllegalFormatCodePointException.java: New file.
* java/util/IllegalFormatConversionException.java: New file.
* java/util/UnknownFormatFlagsException.java: New file.
* java/util/UnknownFormatConversionException.java: New file.
* java/util/MissingFormatWidthException.java: New file.
* java/util/MissingFormatArgumentException.java: New file.
* java/util/IllegalFormatWidthException.java: New file.
* java/util/IllegalFormatPrecisionException.java: New file.
* java/util/IllegalFormatFlagsException.java: New file.
* java/util/IllegalFormatException.java: New file.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/util/DuplicateFormatFlagsException.java
===
RCS file: java/util/DuplicateFormatFlagsException.java
diff -N java/util/DuplicateFormatFlagsException.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ java/util/DuplicateFormatFlagsException.java4 Jun 2006 19:56:12 
-
@@ -0,0 +1,88 @@
+/* DuplicateFormatFlagsException.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 F

[cp-patches] FYI: VolatileImage fixes

2006-06-04 Thread Sven de Marothy
2006-06-04  Sven de Marothy  <[EMAIL PROTECTED]>

* gnu/java/awt/peer/gtk/CairoSurface.java
(getFlippedBuffer): New method.
(getGtkImage): Renamed method.
* gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java
* gnu/java/awt/peer/gtk/GtkVolatileImage.java
Renamed getSharedImage to getGtkImage.
* include/gnu_java_awt_peer_gtk_CairoSurface.h
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c
(getFlippedBuffer): New method
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
Avoid window casts.


Index: gnu/java/awt/peer/gtk/CairoSurface.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/CairoSurface.java,v
retrieving revision 1.5
diff -U3 -r1.5 CairoSurface.java
--- gnu/java/awt/peer/gtk/CairoSurface.java	1 Jun 2006 13:57:39 -	1.5
+++ gnu/java/awt/peer/gtk/CairoSurface.java	4 Jun 2006 19:39:50 -
@@ -123,6 +123,8 @@
*/
   native void setPixels(int[] pixels);
 
+  native long getFlippedBuffer(int size);
+
   /**
* Create a cairo_surface_t with specified width and height.
* The format will be ARGB32 with premultiplied alpha and native bit 
@@ -197,11 +199,11 @@
   }
 
   /**
-   * Return a GtkImage which shares its data with this Cairo surface.
+   * Return a GtkImage from this Cairo surface.
*/
-  public GtkImage getSharedGtkImage()
+  public GtkImage getGtkImage()
   {
-return new GtkImage( width, height, bufferPointer );
+return new GtkImage( width, height, getFlippedBuffer( width * height ));
   }
 
   /**
Index: gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,v
retrieving revision 1.1
diff -U3 -r1.1 ComponentGraphicsCopy.java
--- gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java	30 May 2006 04:21:53 -	1.1
+++ gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java	4 Jun 2006 19:39:50 -
@@ -83,7 +83,7 @@
 this.component = component;
 this.width = width;
 this.height = height;
-gtkimage = surface.getSharedGtkImage();
+gtkimage = surface.getGtkImage();
 getPixbuf( component, gtkimage );
   }
 
Index: gnu/java/awt/peer/gtk/GtkVolatileImage.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/GtkVolatileImage.java,v
retrieving revision 1.4
diff -U3 -r1.4 GtkVolatileImage.java
--- gnu/java/awt/peer/gtk/GtkVolatileImage.java	3 Jun 2006 22:41:41 -	1.4
+++ gnu/java/awt/peer/gtk/GtkVolatileImage.java	4 Jun 2006 19:39:50 -
@@ -127,7 +127,7 @@
   {
 if( needsUpdate )
   {
-	update( offScreen.getSharedGtkImage() );
+	update( offScreen.getGtkImage() );
 	needsUpdate = false;
 	return VolatileImage.IMAGE_RESTORED;
   }
Index: include/gnu_java_awt_peer_gtk_CairoSurface.h
===
RCS file: /sources/classpath/classpath/include/gnu_java_awt_peer_gtk_CairoSurface.h,v
retrieving revision 1.1
diff -U3 -r1.1 gnu_java_awt_peer_gtk_CairoSurface.h
--- include/gnu_java_awt_peer_gtk_CairoSurface.h	29 May 2006 16:14:59 -	1.1
+++ include/gnu_java_awt_peer_gtk_CairoSurface.h	4 Jun 2006 19:39:50 -
@@ -18,6 +18,7 @@
 JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_CairoSurface_getPixels (JNIEnv *env, jobject, jint);
 JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_CairoSurface_setPixels (JNIEnv *env, jobject, jintArray);
 JNIEXPORT jlong JNICALL Java_gnu_java_awt_peer_gtk_CairoSurface_newCairoContext (JNIEnv *env, jobject);
+JNIEXPORT jlong JNICALL Java_gnu_java_awt_peer_gtk_CairoSurface_getFlippedBuffer (JNIEnv *env, jobject, jint);
 JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_CairoSurface_copyAreaNative (JNIEnv *env, jobject, jint, jint, jint, jint, jint, jint, jint);
 
 #ifdef __cplusplus
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c
===
RCS file: /sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c,v
retrieving revision 1.14
diff -U3 -r1.14 gnu_java_awt_peer_gtk_CairoSurface.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c	3 Jun 2006 05:21:05 -	1.14
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c	4 Jun 2006 19:39:55 -
@@ -208,6 +208,29 @@
  (*env)->ReleaseDoubleArrayElements (env, java_matrix, native_matrix, 0);
 }
 
+JNIEXPORT jlong JNICALL 
+Java_gnu_java_awt_peer_gtk_CairoSurface_getFlippedBuffer 
+(JNIEnv *env, jobject obj, jint size)
+{
+  jint *dst;
+  jint *src = (jint *)getNativeObject(env, obj, BUFFER);
+  int i;
+  int t;
+
+  g_assert( src != NULL );
+  dst = g_malloc( size * sizeof( jint ) );
+
+  for(i = 0; i < size; i++ )
+{
+  t = (src[i] & 0xFF) << 16;
+  dst[i] = (src[i] & 0x

[cp-patches] FYI: Document the Formatter exceptions

2006-06-04 Thread Andrew John Hughes
The attached patch documents the heap of Formatter
exceptions on the generics branch.

Changelog:

2006-06-04  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/util/DuplicateFormatFlagsException.java,
* java/util/FormatFlagsConversionMismatchException.java,
* java/util/FormatterClosedException.java,
* java/util/IllegalFormatCodePointException.java,
* java/util/IllegalFormatConversionException.java,
* java/util/IllegalFormatException.java,
* java/util/IllegalFormatFlagsException.java,
* java/util/IllegalFormatPrecisionException.java,
* java/util/IllegalFormatWidthException.java,
* java/util/MissingFormatArgumentException.java,
* java/util/MissingFormatWidthException.java,
* java/util/UnknownFormatConversionException.java,
* java/util/UnknownFormatFlagsException.java:
Documented.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/util/DuplicateFormatFlagsException.java
===
RCS file: 
/cvsroot/classpath/classpath/java/util/Attic/DuplicateFormatFlagsException.java,v
retrieving revision 1.1.2.3
diff -u -3 -p -u -r1.1.2.3 DuplicateFormatFlagsException.java
--- java/util/DuplicateFormatFlagsException.java21 Sep 2005 21:32:40 
-  1.1.2.3
+++ java/util/DuplicateFormatFlagsException.java4 Jun 2006 19:33:06 
-
@@ -38,19 +38,49 @@ exception statement from your version. *
 
 package java.util;
 
-/** @since 1.5 */
-public class DuplicateFormatFlagsException extends IllegalFormatException
+/** 
+ * Thrown when the flags supplied to the [EMAIL PROTECTED] Formatter#format()}
+ * method of a [EMAIL PROTECTED] Formatter} contain duplicates.
+ *
+ * @author Tom Tromey ([EMAIL PROTECTED])
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5 
+ */
+public class DuplicateFormatFlagsException 
+  extends IllegalFormatException
 {
   private static final long serialVersionUID = 18890531L;
 
+  /**
+   * The flags which contain a duplicate.
+   *
+   * @serial the flags containing a duplicate.
+   */
   // Note: name fixed by serialization.
   private String flags;
 
+  /**
+   * Constructs a new DuplicateFormatFlagsException
+   * which specifies that the supplied set of flags contains a
+   * duplicate.
+   *
+   * @param flags the flags containing a duplicate.
+   * @throws NullPointerException if flags is null.
+   */
   public DuplicateFormatFlagsException(String flags)
   {
+super("Duplicate flag passed in " + flags);
+if (flags == null)
+  throw new
+   NullPointerException("Null flags value passed to constructor.");
 this.flags = flags;
   }
 
+  /**
+   * Returns the flags which contain a duplicate.
+   *
+   * @return the flags.
+   */
   public String getFlags()
   {
 return flags;
Index: java/util/FormatFlagsConversionMismatchException.java
===
RCS file: 
/cvsroot/classpath/classpath/java/util/Attic/FormatFlagsConversionMismatchException.java,v
retrieving revision 1.1.2.4
diff -u -3 -p -u -r1.1.2.4 FormatFlagsConversionMismatchException.java
--- java/util/FormatFlagsConversionMismatchException.java   25 Sep 2005 
02:55:13 -  1.1.2.4
+++ java/util/FormatFlagsConversionMismatchException.java   4 Jun 2006 
19:33:06 -
@@ -38,29 +38,72 @@ exception statement from your version. *
 
 package java.util;
 
-/** @since 1.5 */
+/** 
+ * Thrown when the flags supplied to the [EMAIL PROTECTED] Formatter#format()}
+ * method of a [EMAIL PROTECTED] Formatter} contains a flag that does not match
+ * the conversion character specified for it.
+ *
+ * @author Tom Tromey ([EMAIL PROTECTED])
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5 
+ */
 public class FormatFlagsConversionMismatchException
   extends IllegalFormatException
 {
   private static final long serialVersionUID = 19120414L;
 
+  /**
+   * The mismatching flag.
+   *
+   * @serial the mismatching flag.
+   */
   // Note: name fixed by serialization.
   private String f;
+
+  /**
+   * The conversion character which doesn't match the
+   * appropriate flag.
+   *
+   * @serial the conversion character which doesn't match its flag.
+   */
   // Note: name fixed by serialization.
   private char c;
 
+  /**
+   * Constructs a new FormatFlagsConversionMismatchException
+   * which specifies that the flag, f, does

[cp-patches] FYI: Merge nanoTime from generics branch

2006-06-04 Thread Andrew John Hughes
I'm committing the attached patch to add System.nanoTime()
from the generics branch.

Changelog:

2006-03-20  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/lang/System.java:
(nanoTime()): Documented.

2006-03-20  Tom Tromey  <[EMAIL PROTECTED]>

* java/lang/System.java:
(nanoTime()): Implemented.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/lang/System.java
===
RCS file: /cvsroot/classpath/classpath/java/lang/System.java,v
retrieving revision 1.57
diff -u -3 -p -u -r1.57 System.java
--- java/lang/System.java   12 May 2006 15:54:38 -  1.57
+++ java/lang/System.java   4 Jun 2006 18:12:25 -
@@ -222,6 +222,36 @@ public final class System
 return VMSystem.currentTimeMillis();
   }
 
+  /** 
+   * 
+   * Returns the current value of a nanosecond-precise system timer.
+   * The value of the timer is an offset relative to some arbitrary fixed
+   * time, which may be in the future (making the value negative).  This
+   * method is useful for timing events where nanosecond precision is
+   * required.  This is achieved by calling this method before and after the
+   * event, and taking the difference betweent the two times:
+   * 
+   * 
+   * long startTime = System.nanoTime();
+   * ... event code ...
+   * long endTime = System.nanoTime();
+   * long duration = endTime - startTime;
+   * 
+   * 
+   * Note that the value is only nanosecond-precise, and not accurate; there
+   * is no guarantee that the difference between two values is really a
+   * nanosecond.  Also, the value is prone to overflow if the offset
+   * exceeds 2^63.
+   * 
+   *
+   * @return the time of a system timer in nanoseconds.
+   * @since 1.5 
+   */
+  public static long nanoTime()
+  {
+return VMSystem.nanoTime();
+  }
+
   /**
* Copy one array onto another from src[srcStart] ...
* src[srcStart+len-1] to dest[destStart] ...


signature.asc
Description: Digital signature


[cp-patches] FYI: Merge java.math.BigDecimal

2006-06-04 Thread Andrew John Hughes
I'm committing the attached patch to merge the non-1.5-requiring
parts of java.math.BigDecimal.

Changelog:

2006-03-01  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(precision): Fixed overflow problem with large numbers.
(longValueExact): New method.
(intValueExact): Likewise.
(byteValueExact): Likewise.
(shortValueExact): Likewise.

2006-03-01  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(remainder(BigDecimal)): New method.
(divideAndRemainder(BigDecimal)): Likewise.
(divideToIntegralValue(BigDecimal)): Likewise.
(floor): New implementation method.

2006-02-28  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(divide(BigDecimal, int, RoundingMode)): New method.
(divide(BigDecimal, RoundingMode)): Likewise.
(divide(BigDecimal, int, int)): Removed incorrect throwing of exception
when the new scale is < 0.
(setScale(int, RoundingMode)): New method.
(ulp): Likewise.

2006-02-27  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java: Replaced occurences of BigInteger.valueOf
with BigInteger.ZERO, BigInteger.ONE, BigInteger.TEN where appropriate.
(add(BigDecimal, MathContext)): New method.
(subtract(BigDecimal, MathContext)): Likewise.
(precision): Fixed to correctly handle BigIntegers with more than 19
digits.
(pow(int, MathContext)): New method.

2006-02-27  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java: Added @throws clause to constructors.
(mathContext): Removed this unneeded field.
(BigDecimal(int, MathContext)): New constructor.
(BigDecimal(BigInteger, int, MathContext)): Likewise.
(multiply(BigDecimal, MathContext)): New method.
(negate(MathContext)): Likewise.
(plus(MathContext)): Likewise.
(numDigitsInLong): Fixed to properly handle negatives.

2006-02-24  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(BigDecimal(long, MathContext)): New constructor.
(BigDecimal(BigInteger, MathContext)): Likewise.
(BigDecimal(String, MathContext)): Likewise.
(BigDecimal(double, MathContext)): Likewise.
(round): Fixed a typo where the precision field was used instead of a
call to the precision method, and also store the new precision in the
returned BigDecimal.
(abs(MathContext)): New method.

2006-02-24  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java
(toBigInteger): Fixed problem where this method couldn't handle 
negative values for scale.
(toBigIntegerExact): New method.
(stripTrailingZeros): Likewise.

2006-02-23  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(toString): Fixed a problem where the negative sign was being displayed
twice in the exponent.
(toEngineeringString): New method.
(toPlainString): Likewise.
(pow): Likewise.

2006-02-23  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(toString): Rewrote this method to behave as specified.  Added API
comments to explain behaviour.
(scaleByPowerOfTen): New method.

2006-02-22  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(BigDecimal(char[], int, int, MathContext)): New constructor.
(BigDecimal(char[], MathContext)): Likewise.
(BigDecimal(char[])): Likewise.
(BigDecimal(char[], int, int)): Likewise.
(BigDecimal(String)): Fixed handling of exponent and scale.

2006-02-21  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/BigDecimal.java:
(mathContext): New field.
(precision): Likewise.
(BigDecimal(int)): New constructor.
(BigDecimal(long)): Likewise.
(BigDecimal(BigInteger)): Added API docs.
(BigDecimal(BigInteger, int)): Removed incorrect NumberFormatException
and added API docs.
(plus): New method.
(round): Likewise.
(precision): Likewise.
(valueOf): Likewise.
(numDigitsInLong): New implementation method.

2006-02-21  Anthony Balkissoon  <[EMAIL PROTECTED]>

* java/math/MathContext.java: New class.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj exte

[cp-patches] FYI: Fix Gtk peer warnings

2006-06-04 Thread Andrew John Hughes
I'm committing the attached patch to fix Gtk+ peer warnings
that are making the build fail with Werror.

Changelog:

2006-06-04  Andrew John Hughes  <[EMAIL PROTECTED]>

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c:
(drawVolatile): Add casts.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c:
(getOutline): Add casts.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c:
Comment out unused prototype.
(getPixels): Add appropriate cast and comment out unused variable.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
===
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,v
retrieving revision 1.10
diff -u -3 -p -u -r1.10 gnu_java_awt_peer_gtk_ComponentGraphics.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c   3 Jun 
2006 22:41:41 -   1.10
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c   4 Jun 
2006 17:47:07 -
@@ -228,12 +228,12 @@ Java_gnu_java_awt_peer_gtk_ComponentGrap
   g_assert (widget != NULL);
 
   while(widget->window != NULL)
-widget = widget->window;
+widget = GTK_WIDGET(widget->window);
   pixmap = cp_gtk_get_pixmap( env, img );
  
 
-  gc = gdk_gc_new( widget );
-  gdk_draw_drawable(widget,
+  gc = gdk_gc_new(GDK_DRAWABLE(widget));
+  gdk_draw_drawable(GDK_DRAWABLE(widget),
gc,
pixmap,
0, 0,
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
===
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,v
retrieving revision 1.14
diff -u -3 -p -u -r1.14 gnu_java_awt_peer_gtk_GdkTextLayout.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c   1 Jun 2006 
10:51:17 -   1.14
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c   4 Jun 2006 
17:47:07 -
@@ -444,10 +444,10 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout
   PangoLayoutLine *current_line;
   FT_Outline_Funcs ftCallbacks = 
 {
-  _moveTo,
-  _lineTo,
-  _quadTo,
-  _curveTo,
+  (FT_Outline_MoveToFunc) _moveTo,
+  (FT_Outline_LineToFunc) _lineTo,
+  (FT_Outline_ConicToFunc) _quadTo,
+  (FT_Outline_CubicToFunc) _curveTo,
   0,
   0
 };
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c
===
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 gnu_java_awt_peer_gtk_GtkVolatileImage.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c3 Jun 
2006 22:41:41 -   1.1
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c4 Jun 
2006 17:47:07 -
@@ -49,7 +49,7 @@ exception statement from your version. *
 
 /* prototypes */
 static void *getNativeObject( JNIEnv *env, jobject obj );
-static void setNativeObject( JNIEnv *env, jobject obj, void *ptr );
+/* static void setNativeObject( JNIEnv *env, jobject obj, void *ptr ); */
 
 GdkPixmap *cp_gtk_get_pixmap( JNIEnv *env, jobject obj);
 
@@ -57,7 +57,8 @@ GdkPixmap *cp_gtk_get_pixmap( JNIEnv *en
  * Creates a cairo surface, ARGB32, native ordering, premultiplied alpha.
  */
 JNIEXPORT jlong JNICALL 
-Java_gnu_java_awt_peer_gtk_GtkVolatileImage_init (JNIEnv *env, jobject obj, 
+Java_gnu_java_awt_peer_gtk_GtkVolatileImage_init (JNIEnv *env, 
+ jobject obj __attribute__ 
((__unused__)), 
  jobject peer,
  jint width, jint height)
 {
@@ -108,7 +109,8 @@ JNIEXPORT jintArray JNICALL 
 Java_gnu_java_awt_peer_gtk_GtkVolatileImage_getPixels
 (JNIEnv *env, jobject obj)
 {
-  jint *pixeldata, *jpixdata;
+  /* jint *pixeldata, *jpixdata; */
+  jint *jpixdata;
   GdkPixmap *pixmap;
   jintArray jpixels;
   int width, height, depth, size;
@@ -124,7 +126,7 @@ Java_gnu_java_awt_peer_gtk_GtkVolatileIm
   g_assert (field != 0);
   height = (*env)->GetIntField (env, obj, field);
 
-  pixmap = (jint *)getNativeObject(env, obj);
+  pixmap = GDK_PIXMAP(getN

Re: [cp-patches] FYI: [generics] Fix for System.getenv bug

2006-06-04 Thread Archie Cobbs

Andrew John Hughes wrote:

I'm committing the patch which fixes a bug in System.getenv()
when an environment variable has an empty value.


Not part of your patch (code was there before) but:


String[] parts = pair.split("=");


Shouldn't this be "pair.split("=", 1)" instead? E.g. what if I have
a variable like "FOO=2+2=4".

Actually, even that is not right. E.g., consider "FOO==BAR". The
value is "=BAR" not empty string.

Instead, I think using pair.indexOf('=') is required here...

-Archie

__
Archie Cobbs  *CTO, Awarix*  http://www.awarix.com



[cp-patches] FYI: [generics] Fix for System.getenv bug

2006-06-04 Thread Andrew John Hughes
I'm committing the patch which fixes a bug in System.getenv()
when an environment variable has an empty value.

Changelog:

2006-06-04  Andrew John Hughes  <[EMAIL PROTECTED]>

* java/lang/System.java:
(getenv()): Handle cases where split only
returns an array of size 1.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/lang/System.java
===
RCS file: /cvsroot/classpath/classpath/java/lang/System.java,v
retrieving revision 1.38.2.19
diff -u -3 -p -u -r1.38.2.19 System.java
--- java/lang/System.java   3 Jun 2006 16:02:08 -   1.38.2.19
+++ java/lang/System.java   4 Jun 2006 15:35:55 -
@@ -549,7 +549,10 @@ public final class System
for (String pair : environ)
  {
String[] parts = pair.split("=");
-   variables.put(parts[0], parts[1]);
+   if (parts.length == 2)
+ variables.put(parts[0], parts[1]);
+   else
+ variables.put(parts[0], "");
  }
environmentMap = Collections.unmodifiableMap(variables);
   }


signature.asc
Description: Digital signature


Re: [cp-patches] FYI: Clipping fixes

2006-06-04 Thread Roman Kennke
Hi Sven,

Am Sonntag, den 04.06.2006, 00:47 +0200 schrieb Sven de Marothy:
> This seems to make the clipping less buggy. I'm still not sure about it.
> Anyone care to write some tests to figure out how setClip() is different
> from clip()?

As far as I understand, setClip() does (re)set the clip, whereas clip()
intersects the current clip with another shape/rectangle.

/Roman

-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [cp-patches] FYI: Partial volatileimage impl.

2006-06-04 Thread Roman Kennke
Hi Sven,


would this help with
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24205 ??

/Roman

Am Sonntag, den 04.06.2006, 00:43 +0200 schrieb Sven de Marothy:
> 2006-06-02  Sven de Marothy  <[EMAIL PROTECTED]>
> 
>   * gnu/java/awt/peer/gtk/VolatileImageGraphics.java
>   * include/gnu_java_awt_peer_gtk_GtkVolatileImage.h
>   * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c
>   New files.
>   * gnu/java/awt/peer/gtk/ComponentGraphics.java
>   (drawImage): Overloads for VolatileImage drawing.
>   (drawVolatile): New method.
>   * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
>   * include/gnu_java_awt_peer_gtk_ComponentGraphics.h
>   (drawVolatile): New method.
>   * gnu/java/awt/peer/gtk/GtkVolatileImage.java
>   Unstub implementation.
>   * include/Makefile.am
>   * native/jni/gtk-peer/Makefile.am
>   Add new files.
>   * native/jni/gtk-peer/gtkpeer.h
>   New prototype.
>   
> 
-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[cp-patches] FYI: remove warnings (end)

2006-06-04 Thread Raif S. Naffah
hello all,

the attached patch --already committed-- cleans up some classes in
gnu.javax.crypto to remove warnings detected by Eclipse.

2006-06-04  Raif S. Naffah  <[EMAIL PROTECTED]>

* gnu/javax/crypto/sasl/SaslUtil.java: Remove unused import.
* gnu/javax/crypto/sasl/srp/SRPRegistry.java (PASSWORD_DB): Fix javadoc 
@link.
* gnu/javax/crypto/sasl/srp/PasswordFile.java: Removed unused import.
* gnu/javax/crypto/prng/CSPRNG.java (FILE_SOURCES): Fix javadoc @see.
(getSystemInstance): Fix javadoc @link.
(counter): Increased visibility.
* gnu/javax/crypto/pad/TLS1.java: Remove unused import.
* gnu/javax/crypto/pad/IPad.java: Fix javadoc @link.
* gnu/javax/crypto/pad/PKCS1_V1_5.java (PKCS1_V1_5): Likewise.
* gnu/javax/crypto/pad/PKCS7.java (PKCS7): Likewise.
* gnu/javax/crypto/pad/TBC.java (TBC): Likewise.
* gnu/javax/crypto/mode/CTR.java: Remove unused import.
* gnu/javax/crypto/mode/BaseMode.java (defaultBlockSize): Fix javadoc 
@see.
* gnu/javax/crypto/key/dh/GnuDHPrivateKey.java (getEncoded): Fix 
javadoc @see.
* gnu/javax/crypto/jce/spec/TMMHParameterSpec.java: Fix javadoc @link.
* gnu/javax/crypto/keyring/AuthenticatedEntry.java: Remove unused 
imports.
* gnu/javax/crypto/keyring/CertificateEntry.java: Likewise.
* gnu/javax/crypto/keyring/CertPathEntry.java: Likewise.
* gnu/javax/crypto/keyring/EncryptedEntry.java: Likewise.
* gnu/javax/crypto/keyring/PublicKeyEntry.java: Likewise.
* gnu/javax/crypto/mac/OMAC.java: Likewise.
* gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/KhazadSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/RijndaelSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/SerpentSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/SquareSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/key/TwofishSecretKeyFactoryImpl.java: Likewise.
* gnu/javax/crypto/jce/mac/OMacImpl.java: Likewise.
* gnu/javax/crypto/jce/prng/CSPRNGSpi.java: Likewise.
* gnu/javax/crypto/cipher/IBlockCipherSpi.java: Fix javadoc @link.
* gnu/javax/crypto/jce/cipher/CipherAdapter.java (CipherAdapter): 
Likewise.
* gnu/javax/crypto/cipher/BaseCipher.java: Remove unused import.
* gnu/javax/crypto/assembly/Cascade.java: Fix javadoc @link.
* gnu/javax/crypto/assembly/Direction.java: Likewise.
* gnu/javax/crypto/assembly/Transformer.java: Likewise.


cheers;
rsn
Index: Cascade.java
===
RCS file: /cvsroot/classpath/classpath/gnu/javax/crypto/assembly/Cascade.java,v
retrieving revision 1.2
diff -u -r1.2 Cascade.java
--- Cascade.java	13 Apr 2006 21:07:02 -	1.2
+++ Cascade.java	4 Jun 2006 06:18:30 -
@@ -60,7 +60,7 @@
  * of identical ciphers).
  *
  * The term "block ciphers" used above refers to implementations of
- * [EMAIL PROTECTED] gnu.crypto.mode.IMode}, including the [EMAIL PROTECTED] gnu.crypto.mode.ECB}
+ * [EMAIL PROTECTED] gnu.javax.crypto.mode.IMode}, including the [EMAIL PROTECTED] gnu.javax.crypto.mode.ECB}
  * mode which basically exposes a symmetric-key block cipher algorithm as a
  * Mode of Operations.
  *
Index: Direction.java
===
RCS file: /cvsroot/classpath/classpath/gnu/javax/crypto/assembly/Direction.java,v
retrieving revision 1.2
diff -u -r1.2 Direction.java
--- Direction.java	13 Apr 2006 21:07:02 -	1.2
+++ Direction.java	4 Jun 2006 06:18:58 -
@@ -45,9 +45,9 @@
  *
  * The possible values for this type are two:
  * 
- *FORWARD: equivalent to [EMAIL PROTECTED] gnu.crypto.mode.IMode#ENCRYPTION}, and
+ *FORWARD: equivalent to [EMAIL PROTECTED] gnu.javax.crypto.mode.IMode#ENCRYPTION}, and
  *its inverse value
- *REVERSED: equivalent to [EMAIL PROTECTED] gnu.crypto.mode.IMode#DECRYPTION}.
+ *REVERSED: equivalent to [EMAIL PROTECTED] gnu.javax.crypto.mode.IMode#DECRYPTION}.
  * 
  */
 public final class Direction
Index: Transformer.java
===
RCS file: /cvsroot/classpath/classpath/gnu/javax/crypto/assembly/Transformer.java,v
retrieving revision 1.2
diff -u -r1.2 Transformer.java
--- Transformer.java	13 Apr 2006 21:07:02 -	1.2
+++ Transformer.java	4 Jun 2006 06:20:50 -
@@ -47,7 +47,7 @@
  * A Transformer is an abstract representation of a two-way
  * transformation that can be chained together with other instances of
  * this type. Examples of such transformations in this library are:
- * [EMAIL PROTECTED] Cascade} cipher, [EMAIL PROTECTED] gnu.crypto.pad.IPad} alg