[cp-patches] FYI: committed sun/reflect/annotation/AnnotationInvocationHandler.java

2006-06-09 Thread Jeroen Frijters
Hi,

I committed the file as in the previous RFC.

Regards,
Jeroen

2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]

* sun/reflect/annotation/AnnotationInvocationHandler.java:
New file.



[cp-patches] FYI: Small patch for gnu/java/awt/font/opentype/truetype/VirtualMachine.java

2006-06-09 Thread Jeroen Frijters
Hi,

While trying to get True Type font rendering to work I ran into a
missing instruction. Fortunately it was a trivial one, so I implemented
it.

Regards,
Jeroen

2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]

* gnu/java/awt/font/opentype/truetype/VirtualMachine.java
(executeInstruction): Added NOT support.
Index: gnu/java/awt/font/opentype/truetype/VirtualMachine.java
===
RCS file: 
/cvsroot/classpath/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java,v
retrieving revision 1.1
diff -u -r1.1 VirtualMachine.java
--- gnu/java/awt/font/opentype/truetype/VirtualMachine.java 30 Apr 2006 
09:45:11 -  1.1
+++ gnu/java/awt/font/opentype/truetype/VirtualMachine.java 9 Jun 2006 
09:26:59 -
@@ -1066,6 +1066,10 @@
   stack[sp] = ((e1 != 0) || (stack[sp] != 0)) ? 1 : 0;
   break;
 
+case 0x5C: // NOT
+  stack[sp] = (stack[sp] != 0) ? 0 : 1;
+  break;
+
 case 0x5e: // SDB, Set Delta Base in the graphics state
   deltaBase = stack[sp--];
   break;
@@ -1764,7 +1768,7 @@
 /* 50 */ LT, LTEQ, GT, GTEQ,
 /* 54 */ EQ, NEQ, INST_56, INST_57,
 /* 58 */ IF, EIF, AND, OR,
-/* 5c */ INST_5C, INST_5D, SDB, SDS,
+/* 5c */ NOT, INST_5D, SDB, SDS,
 /* 60 */ ADD, SUB, DIV, MUL,
 /* 64 */ ABS, NEG, FLOOR, CEILING,
 /* 68 */ ROUND[0], ROUND[1], ROUND[2], ROUND[3],


[cp-patches] FYI: BasicScrollPaneUI.getActionMap()

2006-06-09 Thread David Gilbert
This patch (committed) fixes a cut-and-paste error that sneaked into my 
earlier patch:


2006-06-09  David Gilbert  [EMAIL PROTECTED]

   * javax/swing/plaf/basic/BasicScrollPaneUI.java
   (getActionMap): Use correct key to store action map.

Regards,

Dave
Index: javax/swing/plaf/basic/BasicScrollPaneUI.java
===
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java,v
retrieving revision 1.26
diff -u -r1.26 BasicScrollPaneUI.java
--- javax/swing/plaf/basic/BasicScrollPaneUI.java   8 Jun 2006 10:52:51 
-   1.26
+++ javax/swing/plaf/basic/BasicScrollPaneUI.java   9 Jun 2006 09:56:05 
-
@@ -516,7 +516,7 @@
   {
 map = createActionMap();
 if (map != null)
-  UIManager.put(Slider.actionMap, map);
+  UIManager.put(ScrollPane.actionMap, map);
   }
 return map;
   }


Re: [cp-patches] Re: RFC: add a cacerts file under resource/java/security

2006-06-09 Thread Raif S. Naffah
hello Tom,

On Friday 09 June 2006 09:16, Tom Tromey wrote:
  Mark == Mark Wielaard [EMAIL PROTECTED] writes:

 Mark I CCed the devjam list on which a couple of different
 distribution Mark packagers are subscribed. Devjam people, Raif
 added support for Mark importing trusted ca-certs to GNU Classpath
 so our tls/ssl Mark implementation for example can just reuse the
 ca-certs that are already Mark packaged for an distribution (for
 example those used by Mozilla).

 I know zilch about this area, so forgive me if my questions are
 naive.

 Why read these files and transform them into something we can
 distribute?

to offer similar capabilities as the RI's version of the keytool.


 Why not read them dynamically, as needed?  That way if a 
 new cert is installed, a newly run VM will pick it up automatically.

there are cases where this is not possible or desired:

* there is no such location on the machine with a Classpath + VM.
* these certificates are in more than one directory, with no direct 
parent.
* the directory/directories containing these certificates exist but may 
not be available or accessible to the keytool user.
* the same version of Classpath + VM, installed on different machines 
may end up with different cacerts file.


cheers;
rsn


pgp6UImcgkh9S.pgp
Description: PGP signature


Re: [cp-patches] Patch for support of the GOST block cipher.

2006-06-09 Thread Raif S. Naffah
hello Morgon,

On Thursday 08 June 2006 16:15, Morgon Kanter wrote:
 The attached patch adds support for the GOST 28147-89 block cipher.
 It works and is compatable with the canonical English implementation
 from [1], which I generated the test vectors that appear in the
 attached GOSTTest.java from.

 I'm pretty sure that there's no worry of regression here because I
 haven't actually changed any old code, just added new stuff. I've
 also written a Mauve test case, but for some reason it keeps timing
 out when testing all of the block ciphers, so I also wrote the
 attached GOSTTest.java which verifies that the thing actually works
 as specified by [1]. Test vectors therein were mostly generated by
 taking random bytes and hashing them for the keys and plaintexts
 (ciphertexts generated by [1]). Make sure to replace the S-Boxes in
 [1] with the ones used in this implementation if you're going to do
 your own verification, otherwise it's obviously not going to work.

 My copyright assignment isn't done yet (still waiting for the papers
 in the mail), so this probably shouldn't be committed yet.

 Changes:
   * gnu/javax/crypto/cipher/GOST.java
   * gnu/javax/crypto/jce/cipher/GOSTSpi.java
   * gnu/javax/crypto/jce/key/GOSTKeyGeneratorImpl.java
   * gnu/javax/crypto/jce/key/GOSTSecretKeyFactoryImpl.java
   * gnu/javax/crypto/jce/mac/OMacGOSTImpl.java
   Added for the addition of the GOST block cipher.
   * gnu/java/security/Registry.java
   * gnu/javax/crypto/cipher/CipherFactory.java
   * gnu/javax/crypto/jce/GnuCrypto.java
   * gnu/javax/crypto/jce/cipher/PBES2.java
   Updated with constants, methods, and classes to allow the
   use of the GOST block cipher.
   * gnu/java/security/util/Util.java
   (copyIntToBytes): added.
   (toIntFromBytes): added.

 [1] http://www.vipul.net/gost/software/gost.c

thanks for your contribution!

there's no hurry to check this in; i'll wait for your assignment papers 
to be signed before committing this patch on your behalf.


cheers;
rsn


pgp0INj0LTzYj.pgp
Description: PGP signature


[cp-patches] FYI: JScrollBar keyboard bindings

2006-06-09 Thread David Gilbert

This patch (committed) adds keyboard bindings for the JScrollBar component:

2006-06-09  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicLookAndFeel.java
(initComponentDefaults): Corrected 'ScrollBar.focusInputMap' entry,
* javax/swing/plaf/basic/BasicScrollBarUI.java
(installKeyboardActions): Implemented,
(uninstallKeyboardActions): Implemented,
(getInputMap): New method,
(getActionMap): New method,
(createActionMap): New method,
(installUI): Call installKeyboardActions(),
(uninstallUI): Call uninstallKeyboardActions().

Note that these only get used when a scrollbar has the focus, which is not 
common.

Regards,

Dave
Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.91
diff -u -r1.91 BasicLookAndFeel.java
--- javax/swing/plaf/basic/BasicLookAndFeel.java6 Jun 2006 15:12:10 
-   1.91
+++ javax/swing/plaf/basic/BasicLookAndFeel.java9 Jun 2006 11:09:41 
-
@@ -1069,14 +1069,14 @@
 PAGE_DOWN, positiveBlockIncrement,
 END,  maxScroll,
 HOME,  minScroll,
-LEFT,  positiveUnitIncrement,
+LEFT,  negativeUnitIncrement,
 KP_UP, negativeUnitIncrement,
 KP_DOWN, positiveUnitIncrement,
 UP,  negativeUnitIncrement,
-RIGHT, negativeUnitIncrement,
-KP_LEFT, positiveUnitIncrement,
+RIGHT, positiveUnitIncrement,
+KP_LEFT, negativeUnitIncrement,
 DOWN,  positiveUnitIncrement,
-KP_RIGHT, negativeUnitIncrement
+KP_RIGHT, positiveUnitIncrement
   }),
   ScrollBar.foreground, new ColorUIResource(light),
   ScrollBar.maximumThumbSize, new DimensionUIResource(4096, 4096),
Index: javax/swing/plaf/basic/BasicScrollBarUI.java
===
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java,v
retrieving revision 1.33
diff -u -r1.33 BasicScrollBarUI.java
--- javax/swing/plaf/basic/BasicScrollBarUI.java17 Apr 2006 07:41:05 
-  1.33
+++ javax/swing/plaf/basic/BasicScrollBarUI.java9 Jun 2006 11:09:42 
-
@@ -1,5 +1,5 @@
 /* BasicScrollBarUI.java --
-   Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006,  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -38,8 +38,6 @@
 
 package javax.swing.plaf.basic;
 
-import gnu.classpath.NotImplementedException;
-
 import java.awt.Color;
 import java.awt.Component;
 import java.awt.Container;
@@ -56,10 +54,14 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 
+import javax.swing.AbstractAction;
+import javax.swing.ActionMap;
 import javax.swing.BoundedRangeModel;
+import javax.swing.InputMap;
 import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JScrollBar;
+import javax.swing.JSlider;
 import javax.swing.LookAndFeel;
 import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
@@ -67,6 +69,7 @@
 import javax.swing.UIManager;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
+import javax.swing.plaf.ActionMapUIResource;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.ScrollBarUI;
 
@@ -762,15 +765,151 @@
   }
 
   /**
-   * This method installs the keyboard actions for the scrollbar.
+   * Installs the input map from the look and feel defaults, and a 
+   * corresponding action map.  Note the the keyboard bindings will only
+   * work when the [EMAIL PROTECTED] JScrollBar} component has the focus, 
which is rare.
*/
   protected void installKeyboardActions()
-throws NotImplementedException
   {
-// FIXME: implement.
+InputMap keyMap = getInputMap(
+JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+SwingUtilities.replaceUIInputMap(scrollbar, 
+JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
+ActionMap map = getActionMap();
+SwingUtilities.replaceUIActionMap(scrollbar, map);
   }
 
   /**
+   * Uninstalls the input map and action map installed by
+   * [EMAIL PROTECTED] #installKeyboardActions()}.
+   */
+  protected void uninstallKeyboardActions()
+  {
+SwingUtilities.replaceUIActionMap(scrollbar, null);
+SwingUtilities.replaceUIInputMap(scrollbar, 
+JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
+  }
+
+  InputMap getInputMap(int condition) 
+  {
+if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
+  return (InputMap) UIManager.get(ScrollBar.focusInputMap);
+return null;
+  }
+  
+  /**
+   * Returns the action map for the [EMAIL PROTECTED] JScrollBar}.  All scroll 
bars 
+   * share a single action map which is created the first time this method is 
+   * called, then stored in 

[cp-patches] FYI: re-factored BasePad

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

the attached patch --already committed (in two commits)-- re-factors
the self-test code in BasePad to allow more flexible correctness tests
by sub-classes.

2006-06-09  Raif S. Naffah  [EMAIL PROTECTED]

* gnu/javax/crypto/pad/BasePad.java (selfTest): Re-factored to allow 
more
flexible self-test by sub-classes.
(test1BlockSize): New method.


cheers;
rsn
Index: BasePad.java
===
RCS file: /cvsroot/classpath/classpath/gnu/javax/crypto/pad/BasePad.java,v
retrieving revision 1.1
diff -u -r1.1 BasePad.java
--- BasePad.java	26 Jan 2006 02:25:09 -	1.1
+++ BasePad.java	9 Jun 2006 11:25:17 -
@@ -98,42 +98,66 @@
 blockSize = -1;
   }
 
+  /**
+   * A default implementation of a correctness test that exercises the padder
+   * implementation, using block sizes varying from 2 to 256 bytes.
+   * 
+   * @return codetrue/code if the concrete implementation correctly unpads
+   * what it pads for all tested block sizes. Returns codefalse/code
+   * if the test fails for any block size.
+   */
   public boolean selfTest()
   {
+final byte[] in = new byte[1024];
+for (int bs = 2; bs  256; bs++)
+  if (! test1BlockSize(bs, in))
+return false;
+return true;
+  }
+
+  /**
+   * The basic symmetric test for a padder given a specific block size.
+   * p
+   * The code ensures that the implementation is capable of unpadding what it
+   * pads.
+   * 
+   * @param size the block size to test.
+   * @param buffer a work buffer. It is exposed as an argument for this method
+   *  to reduce un-necessary object allocations.
+   * @return codetrue/code if the test passes; codefalse/code
+   * otherwise.
+   */
+  protected boolean test1BlockSize(int size, byte[] buffer)
+  {
 byte[] padBytes;
 final int offset = 5;
-final int limit = 1024;
-final byte[] in = new byte[limit];
-for (int bs = 2; bs  256; bs++)
+final int limit = buffer.length;
+
+this.init(size);
+for (int i = 0; i  limit - offset - blockSize; i++)
   {
-this.init(bs);
-for (int i = 0; i  limit - offset - blockSize; i++)
+padBytes = pad(buffer, offset, i);
+if (((i + padBytes.length) % blockSize) != 0)
   {
-padBytes = pad(in, offset, i);
-if (((i + padBytes.length) % blockSize) != 0)
+new RuntimeException(name()).printStackTrace(System.err);
+return false;
+  }
+System.arraycopy(padBytes, 0, buffer, offset + i, padBytes.length);
+try
+  {
+if (padBytes.length != unpad(buffer, offset, i + padBytes.length))
   {
 new RuntimeException(name()).printStackTrace(System.err);
 return false;
   }
-
-System.arraycopy(padBytes, 0, in, offset + i, padBytes.length);
-try
-  {
-if (padBytes.length != unpad(in, offset, i + padBytes.length))
-  {
-new RuntimeException(name()).printStackTrace(System.err);
-return false;
-  }
-  }
-catch (WrongPaddingException x)
-  {
-x.printStackTrace(System.err);
-return false;
-  }
   }
-this.reset();
+catch (WrongPaddingException x)
+  {
+x.printStackTrace(System.err);
+return false;
+  }
   }
-
+this.reset();
 return true;
   }
 


[cp-patches] FYI: ISO-10126-2 by Matthew Wringe

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

the attached patch --already committed on behalf of Matthew Wringe-- 
adds an implementation of the ISO-10126-2 padding scheme.

a new Mauve test to exercise block sizes from 2 to 256 was also added as 
gnu.testlet.gnu.javax.crypto.pad.TestOfISO10126.

2006-06-09  Raif S. Naffah  [EMAIL PROTECTED]

On behalf of Matthew Wringe [EMAIL PROTECTED]
* gnu/java/security/Registry.java (ISO10126_PAD): New constant.
* gnu/javax/crypto/pad/ISO10126.java: New class.
* gnu/javax/crypto/pad/PadFactory.java (names): New field.
(getInstance): Added support for ISO-10126 scheme.
(getNames): Likewise.
Cache result for speed.


cheers;
rsn
Index: Registry.java
===
RCS file: /cvsroot/classpath/classpath/gnu/java/security/Registry.java,v
retrieving revision 1.5
diff -u -r1.5 Registry.java
--- Registry.java	22 Mar 2006 22:49:24 -	1.5
+++ Registry.java	9 Jun 2006 11:39:02 -
@@ -177,6 +177,9 @@
   /** TLSv1 padding scheme. */
   String TLS1_PAD = tls1;
 
+  /** ISO 10126-2 padding scheme. */
+  String ISO10126_PAD = iso10126;
+
   // Pseudo-random number generators..
 
   /** (Apparently) RC4 keystream PRNG. */
Index: PadFactory.java
===
RCS file: /cvsroot/classpath/classpath/gnu/javax/crypto/pad/PadFactory.java,v
retrieving revision 1.2
diff -u -r1.2 PadFactory.java
--- PadFactory.java	22 Mar 2006 22:49:24 -	1.2
+++ PadFactory.java	9 Jun 2006 11:40:19 -
@@ -49,12 +49,8 @@
  */
 public class PadFactory implements Registry
 {
-
-  // Constants and variables
-  // -
-
-  // Constructor(s)
-  // -
+  /** Collection of padding algorithm names --cached for speed. */
+  private static Set names;
 
   /** Trivial constructor to enforce Singleton pattern. */
   private PadFactory()
@@ -104,6 +100,10 @@
   {
 result = new TLS1();
   }
+else if (pad.equals(ISO10126_PAD))
+  {
+result = new ISO10126();
+  }
 
 if (result != null  !result.selfTest())
   {
@@ -114,24 +114,25 @@
   }
 
   /**
-   * pReturns a [EMAIL PROTECTED] java.util.Set} of names of padding algorithms
-   * supported by this iFactory/i./p
+   * Returns a [EMAIL PROTECTED] java.util.Set} of names of padding algorithms
+   * supported by this iFactory/i.
*
* @return a [EMAIL PROTECTED] Set} of padding algorithm names (Strings).
*/
   public static final Set getNames()
   {
-HashSet hs = new HashSet();
-hs.add(PKCS5_PAD);
-hs.add(PKCS7_PAD);
-hs.add(TBC_PAD);
-hs.add(EME_PKCS1_V1_5_PAD);
-hs.add(SSL3_PAD);
-hs.add(TLS1_PAD);
-
-return Collections.unmodifiableSet(hs);
+if (names == null)
+  {
+HashSet hs = new HashSet();
+hs.add(PKCS5_PAD);
+hs.add(PKCS7_PAD);
+hs.add(TBC_PAD);
+hs.add(EME_PKCS1_V1_5_PAD);
+hs.add(SSL3_PAD);
+hs.add(TLS1_PAD);
+hs.add(ISO10126_PAD);
+names = Collections.unmodifiableSet(hs);
+  }
+return names;
   }
-
-  // Instance methods
-  // -
 }
Index: ISO10126.java
===
RCS file: ISO10126.java
diff -N ISO10126.java
--- /dev/null	1 Jan 1970 00:00:00 -
+++ ISO10126.java	1 Jan 1970 00:00:00 -
@@ -0,0 +1,109 @@
+/* ISO10126.java -- An implementation of the ISO 10126-2 padding scheme
+   Copyright (C) 2006  Free Software Foundation, Inc.
+
+This file is a 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 of the License, 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; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, 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 

[cp-patches] RFC:Proposed fix for the javax.swing.text blocker bug 27973

2006-06-09 Thread Audrius Meskauskas
This patch removes the strangely looking construct that currently fully 
suppress the HTMLDocument functionality, blocking the further work on 
the javax.swing.text.html. HTML is currently developed with this patch 
being applied locally.


The patch introduces no Mauve regressions in javax/swing/text/** (70 
failures, both before and after applying). The removed code may be a 
compensation of some old bug that is now fixed. I am, however, not so 
sure and put this under RFC. The patch revives the HTMLDocument and can 
be at least temporary used to continue work on the java.swing.text.html 
package.


2006-06-09  Audrius Meskauskas  [EMAIL PROTECTED]

   * javax/swing/text/DefaultStyledDocument.java 
(ElementBuffer.insertContentTag):

   Do not recreate leaves and do not remove elements here.

Index: DefaultStyledDocument.java
===
RCS file: /sources/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v
retrieving revision 1.65
diff -u -r1.65 DefaultStyledDocument.java
--- DefaultStyledDocument.java	3 Mar 2006 10:47:11 -	1.65
+++ DefaultStyledDocument.java	9 Jun 2006 11:47:20 -
@@ -1053,14 +1053,6 @@
 
   Edit edit = getEditForParagraphAndIndex(paragraph, index);
   edit.addAddedElement(leaf);
-
-  if (end != toRec.getEndOffset())
-{
-  recreateLeaves(end, toRec, onlyContent);
-  
-  if (onlyContent)
-edit.addRemovedElement(target);
-}
 }
   else
 paragraph.replace(0, 0, new Element[] { leaf });


[cp-patches] FYI: Integrating ImageView

2006-06-09 Thread Audrius Meskauskas
With this patch, the HTMLDocument handles the IMG tag and can display 
the images. It only works with the bug 27973 fixed with one of the 
proposed patches. I also add the simple demo to demonstrate the work of 
the HTML parsing and rendering.


2006-06-09  Audrius Meskauskas  [EMAIL PROTECTED]

   * gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java
   (constructor): Do not lowercase the values.
   * javax/swing/text/html/HTMLDocument.java
   (HTMLReader.addSpecialElement): Implemented.
   * examples/gnu/classpath/examples/swing/HtmlDemo.java: New file.
Index: HTMLDocument.java
===
RCS file: /sources/classpath/classpath/javax/swing/text/html/HTMLDocument.java,v
retrieving revision 1.31
diff -u -r1.31 HTMLDocument.java
--- HTMLDocument.java	6 Jun 2006 19:39:53 -	1.31
+++ HTMLDocument.java	9 Jun 2006 12:43:43 -
@@ -39,13 +39,15 @@
 package javax.swing.text.html;
 
 import gnu.classpath.NotImplementedException;
-
 import gnu.javax.swing.text.html.CharacterAttributeTranslator;
+
 import java.io.IOException;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Stack;
 import java.util.Vector;
+
+import javax.swing.JEditorPane;
 import javax.swing.text.AbstractDocument;
 import javax.swing.text.AttributeSet;
 import javax.swing.text.BadLocationException;
@@ -59,9 +61,15 @@
 import javax.swing.text.html.HTML.Tag;
 
 /**
- * TODO: Add more comments here 
+ * Represents the HTML document that is constructed by defining the text and
+ * other components (images, buttons, etc) in HTML language. This class can
+ * becomes the default document for [EMAIL PROTECTED] JEditorPane} after setting its
+ * content type to text/html. HTML document also serves as an intermediate
+ * data structure when it is needed to parse HTML and then obtain the content of
+ * the certain types of tags. This class also has methods for modifying the HTML
+ * content.
  * 
- * @author Audrius Meskauskas, Lithuania ([EMAIL PROTECTED])
+ * @author Audrius Meskauskas ([EMAIL PROTECTED])
  * @author Anthony Balkissoon ([EMAIL PROTECTED])
  * @author Lillian Angel ([EMAIL PROTECTED])
  */
@@ -727,11 +735,17 @@
   } 
 }
 
+/**
+ * Inserts the elements that are represented by ths single tag with 
+ * attributes (only). The closing tag, even if present, mut follow
+ * immediately after the starting tag without providing any additional
+ * information. Hence the [EMAIL PROTECTED] TagAction#end} method need not be
+ * overridden and still does nothing.
+ */
 public class SpecialAction extends TagAction
 {
   /**
-   * This method is called when a start tag is seen for one of the types
-   * of tags associated with this Action.
+   * The functionality is delegated to [EMAIL PROTECTED] HTMLReader#addSpecialElement}
*/
   public void start(HTML.Tag t, MutableAttributeSet a)
   {
@@ -1407,10 +1421,19 @@
  * @param a the attribute set specifying the special content
  */
 protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a)
-  throws NotImplementedException
 {
-  // FIXME: Implement
-  print (HTMLReader.addSpecialElement not implemented yet);
+  a.addAttribute(StyleConstants.NameAttribute, t);
+  
+  // Migrate from the rather htmlAttributeSet to the faster, lighter and 
+  // unchangeable alternative implementation.
+  AttributeSet copy = a.copyAttributes();
+  
+  // TODO: Figure out why we must always insert this single character
+  // (otherwise the element does not appear). Either fix or add explaining
+  // comment or at least report a normal bug.
+  ElementSpec spec = new ElementSpec(copy, ElementSpec.ContentType, 
+ new char[] {' '}, 0, 1 );
+  parseBuffer.add(spec);
 }
 
 void printBuffer()
Index: SmallHtmlAttributeSet.java
===
RCS file: /sources/classpath/classpath/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java,v
retrieving revision 1.1
diff -u -r1.1 SmallHtmlAttributeSet.java
--- SmallHtmlAttributeSet.java	6 Jun 2006 12:57:27 -	1.1
+++ SmallHtmlAttributeSet.java	9 Jun 2006 12:43:57 -
@@ -100,8 +100,6 @@
 key = en.nextElement();
 keys[i] = key;
 value = copyFrom.getAttribute(key);
-if (value instanceof String)
-  value = ((String) value).toLowerCase();
 values[i] = value;
   }
   }
/* HtmlDemo.java -- HTML viewer demo
   Copyright (C) 2006 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 

[cp-patches] FYI: More stub methods in java.awt.*

2006-06-09 Thread David Gilbert

This patch (committed) marks some stubs in java.awt.*:

2006-06-09  David Gilbert  [EMAIL PROTECTED]

* java/awt/datatransfer/DataFlavor.java
(readExternal): Mark as stub,
(writeExternal): Likewise,
* java/awt/dnd/DropTargetContext.java
(dropComplete): Mark as stub,
(acceptDrag): Likewise,
(rejectDrag): Likewise,
(acceptDrop): Likewise,
(rejectDrop): Likewise,
(getCurrentDataFlavors): Likewise,
(getTransferable): Likewise,
* java/awt/dnd/DropTargetDropEvent.java
(dropComplete): Mark as stub.

Regards,

Dave
Index: java/awt/datatransfer/DataFlavor.java
===
RCS file: /sources/classpath/classpath/java/awt/datatransfer/DataFlavor.java,v
retrieving revision 1.29
diff -u -r1.29 DataFlavor.java
--- java/awt/datatransfer/DataFlavor.java   18 Feb 2006 10:25:39 -  
1.29
+++ java/awt/datatransfer/DataFlavor.java   9 Jun 2006 13:03:32 -
@@ -38,6 +38,8 @@
 
 package java.awt.datatransfer;
 
+import gnu.classpath.NotImplementedException;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -785,7 +787,8 @@
*
* @exception IOException If an error occurs.
*/
-  public void writeExternal(ObjectOutput stream) throws IOException
+  public void writeExternal(ObjectOutput stream) 
+throws IOException, NotImplementedException
   {
 // FIXME: Implement me
   }
@@ -801,7 +804,7 @@
* cannot be found.
*/
   public void readExternal(ObjectInput stream) 
-throws IOException, ClassNotFoundException
+throws IOException, ClassNotFoundException, NotImplementedException
   {
 // FIXME: Implement me
   }
Index: java/awt/dnd/DropTargetContext.java
===
RCS file: /sources/classpath/classpath/java/awt/dnd/DropTargetContext.java,v
retrieving revision 1.10
diff -u -r1.10 DropTargetContext.java
--- java/awt/dnd/DropTargetContext.java 16 Mar 2006 00:50:23 -  1.10
+++ java/awt/dnd/DropTargetContext.java 9 Jun 2006 13:03:33 -
@@ -1,5 +1,5 @@
 /* DropTargetContext.java --
-   Copyright (C) 2002, 2003, 2004  Free Software Foundation
+   Copyright (C) 2002, 2003, 2004, 2006,  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -37,6 +37,8 @@
 
 package java.awt.dnd;
 
+import gnu.classpath.NotImplementedException;
+
 import java.awt.Component;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
@@ -59,23 +61,23 @@
 protected boolean isLocal;
 protected Transferable transferable;
 
-TransferableProxy (Transferable t, boolean local)
+TransferableProxy(Transferable t, boolean local)
 {
   this.transferable = t;
   this.isLocal = local;
 }
 
-public DataFlavor[] getTransferDataFlavors ()
+public DataFlavor[] getTransferDataFlavors()
 {
-  return transferable.getTransferDataFlavors ();
+  return transferable.getTransferDataFlavors();
 }
 
-public boolean isDataFlavorSupported (DataFlavor flavor)
+public boolean isDataFlavorSupported(DataFlavor flavor)
 {
-  return transferable.isDataFlavorSupported (flavor);
+  return transferable.isDataFlavorSupported(flavor);
 }
 
-public Object getTransferData (DataFlavor flavor)
+public Object getTransferData(DataFlavor flavor)
   throws UnsupportedFlavorException, IOException
 {
   return transferable.getTransferData (flavor);
@@ -87,32 +89,32 @@
   private java.awt.dnd.peer.DropTargetContextPeer dtcp;
 
   // package private
-  DropTargetContext (DropTarget dropTarget)
+  DropTargetContext(DropTarget dropTarget)
   {
 this.dropTarget = dropTarget;
   }
 
-  public DropTarget getDropTarget ()
+  public DropTarget getDropTarget()
   {
 return dropTarget;
   }
 
-  public Component getComponent ()
+  public Component getComponent()
   {
-return dropTarget.getComponent ();
+return dropTarget.getComponent();
   }
 
-  public void addNotify (java.awt.dnd.peer.DropTargetContextPeer dtcp)
+  public void addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp)
   {
 this.dtcp = dtcp;
   }
 
-  public void removeNotify ()
+  public void removeNotify()
   {
 this.dtcp = null;
   }
 
-  protected void setTargetActions (int actions)
+  protected void setTargetActions(int actions)
   {
 targetActions = actions;
   }
@@ -127,45 +129,51 @@
*
* @exception InvalidDnDOperationException If a drop is not outstanding.
*/
-  public void dropComplete (boolean success)
+  public void dropComplete(boolean success)
+throws NotImplementedException
   {
 // FIXME: implement this
   }
 
-  protected void acceptDrag (int dragOperation)
+  protected void acceptDrag(int dragOperation)
+throws NotImplementedException
   {
 // FIXME: implement this
   }
 
-  protected void rejectDrag ()
+  protected 

Re: [cp-patches] Small ComboBox fix

2006-06-09 Thread Lillian Angel
Committed.

On Thu, 2006-06-08 at 15:03 -0400, Francis Kung wrote:
 Hi,
 
 Came across a problem when painting a JComboBox with null or empty items
 in it; patch is attached.
 
 It's a bit of a workaround, but I think it's good enough (it's a rare
 case, so it's not worth hacking into the higher Component-level methods
 that the ComboBox inherits).
 
 Corresponding Mauve testcase is also being submitted on that list.
 
 Francis
 




[cp-patches] eliminate some memory leaks in gcjwebplugin.cc

2006-06-09 Thread Thomas Fitzsimmons

Hi,

I committed this patch which replaces some g_strconcat calls with macros.

Tom

2006-06-09  Thomas Fitzsimmons  [EMAIL PROTECTED]

* native/plugin/gcjwebplugin.cc (PLUGIN_ERROR_THREE): New macro.
(NP_Initialize): Use PLUGIN_ERROR_THREE in place of g_strconcat.
Index: native/plugin/gcjwebplugin.cc
===
RCS file: /sources/classpath/classpath/native/plugin/gcjwebplugin.cc,v
retrieving revision 1.10
diff -u -r1.10 gcjwebplugin.cc
--- native/plugin/gcjwebplugin.cc	8 Jun 2006 21:49:11 -	1.10
+++ native/plugin/gcjwebplugin.cc	9 Jun 2006 14:52:17 -
@@ -79,6 +79,10 @@
   g_printerr (%s:%d: thread %p: Error: %s: %s\n, __FILE__, __LINE__,  \
   g_thread_self (), first, second)
 
+#define PLUGIN_ERROR_THREE(first, second, third)\
+  g_printerr (%s:%d: thread %p: Error: %s: %s: %s\n, __FILE__,\
+  __LINE__, g_thread_self (), first, second, third)
+
 // Plugin information passed to about:plugins.
 #define PLUGIN_NAME GCJ Web Browser Plugin
 #define PLUGIN_DESC The  PLUGIN_NAME  executes Java applets.
@@ -1621,9 +1625,9 @@
   file_error = g_mkdir (data_directory, 0700);
   if (file_error != 0)
 {
-  PLUGIN_ERROR_TWO (g_strconcat(Failed to create data directory , 
-data_directory, NULL),
-strerror (errno));
+  PLUGIN_ERROR_THREE (Failed to create data directory,
+  data_directory,
+  strerror (errno));
   return NPERR_GENERIC_ERROR;
 }
 }
@@ -1635,16 +1639,16 @@
 {
   if (channel_error)
 {
-  PLUGIN_ERROR_TWO (g_strconcat(Failed to open whitelist file ,
-whitelist_filename, NULL),
-channel_error-message);
+  PLUGIN_ERROR_THREE (Failed to open whitelist file,
+  whitelist_filename,
+  channel_error-message);
   g_error_free (channel_error);
   channel_error = NULL;
 }
   else
-PLUGIN_ERROR (g_strconcat(Failed to open whitelist file ,
-  whitelist_filename, NULL));
-  
+PLUGIN_ERROR_TWO (Failed to open whitelist file,
+  whitelist_filename);
+
   return NPERR_GENERIC_ERROR;
 }
 


Re: [cp-patches] Patch: gcjwebplugin data directory fix

2006-06-09 Thread Tom Tromey
 Lillian == Lillian Angel [EMAIL PROTECTED] writes:

Lillian To avoid any problems with saving the whitelist file
Lillian (permission denied, etc), we have decided to store all the
Lillian plugin data in ~/.gcjwebplugin.

It looks like the saving happens in the C code.  Is this necessary?
I was wondering if instead it would make sense to use java.util.prefs
to store this stuff.

Tom



[cp-patches] FYI: BufferedImage - small fix

2006-06-09 Thread David Gilbert
This patch (committed) fixes a minor bug in the getProperty() method and 
removes a FIXME:


2006-06-09  David Gilbert  [EMAIL PROTECTED]

   * java/awt/image/BufferedImage.java
   (BufferedImage(int, int, int)): Added API docs,
   (getProperty(String)): Return correct value for undefined properties,
   (getPropertyNames()): Added comments and removed FIXME.

Regards,

Dave
Index: java/awt/image/BufferedImage.java
===
RCS file: /sources/classpath/classpath/java/awt/image/BufferedImage.java,v
retrieving revision 1.14
diff -u -r1.14 BufferedImage.java
--- java/awt/image/BufferedImage.java   6 Jun 2006 07:53:41 -   1.14
+++ java/awt/image/BufferedImage.java   9 Jun 2006 14:50:21 -
@@ -1,5 +1,5 @@
 /* BufferedImage.java --
-   Copyright (C) 2000, 2002, 2003, 2004, 2005  Free Software Foundation
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006,  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -99,6 +99,13 @@
 
   Vector observers;
   
+  /**
+   * Creates a new buffered image.
+   * 
+   * @param w  the width.
+   * @param h  the height.
+   * @param type  the image type (see the constants defined by this class).
+   */
   public BufferedImage(int w, int h, int type)
   {
 ColorModel cm = null;
@@ -363,11 +370,28 @@
return 1;
   }
 
+  /**
+   * Returns the value of the specified property, or 
+   * [EMAIL PROTECTED] Image#UndefinedProperty} if the property is not defined.
+   * 
+   * @param string  the property key (codenull/code not permitted).
+   * 
+   * @return The property value.
+   * 
+   * @throws NullPointerException if codestring/code is codenull/code.
+   */
   public Object getProperty(String string)
   {
-if (properties == null)
-  return null;
-return properties.get(string);
+if (string == null)
+  throw new NullPointerException(The property name cannot be null.);
+Object result = Image.UndefinedProperty;
+if (properties != null)
+  {
+Object v = properties.get(string);
+if (v != null)
+  result = v;
+  }
+return result;
   }
 
   public Object getProperty(String string, ImageObserver imageobserver)
@@ -375,10 +399,15 @@
 return getProperty(string);
   }
 
-  
+  /**
+   * Returns codenull/code always.
+   * 
+   * @return codenull/code always.
+   */
   public String[] getPropertyNames()
   {
-// FIXME: implement
+// This method should always return null, see:
+// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4640609
 return null;
   }
 


[cp-patches] FYI: CairoGraphics2D, support general GlyphVector impls

2006-06-09 Thread Roman Kennke
I added a fallback for CairoGraphics2D.drawGlyphVector() that can draw
GlyphVector instances other than FreetypeGlyphVector too. For this case
it simply calls fill(Shape) with the coordinate system translated
accordingly.

This allows me to play with GnuGlyphVector and CairoGraphics2D.

2006-06-08  Roman Kennke  [EMAIL PROTECTED]

* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(drawGlyphVector): Added fallback for non-FreetypeGlyphVector
implementations.

/Roman

-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java
===
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v
retrieving revision 1.15
diff -u -1 -0 -r1.15 CairoGraphics2D.java
--- gnu/java/awt/peer/gtk/CairoGraphics2D.java	7 Jun 2006 19:12:03 -	1.15
+++ gnu/java/awt/peer/gtk/CairoGraphics2D.java	9 Jun 2006 16:02:34 -
@@ -1280,26 +1280,36 @@
 drawString (str, (float) x, (float) y);
   }
 
   public void drawString(AttributedCharacterIterator ci, int x, int y)
   {
 drawString (ci, (float) x, (float) y);
   }
 
   public void drawGlyphVector(GlyphVector gv, float x, float y)
   {
-int n = gv.getNumGlyphs ();
-int[] codes = gv.getGlyphCodes (0, n, null);
-float[] positions = gv.getGlyphPositions (0, n, null);
-
-setFont (gv.getFont ());
-cairoDrawGlyphVector( (GdkFontPeer)getFont().getPeer(), x, y, n, codes, positions);
+if (gv instanceof FreetypeGlyphVector)
+  {
+int n = gv.getNumGlyphs ();
+int[] codes = gv.getGlyphCodes (0, n, null);
+float[] positions = gv.getGlyphPositions (0, n, null);
+
+setFont (gv.getFont ());
+cairoDrawGlyphVector( (GdkFontPeer)getFont().getPeer(), x, y, n, codes,
+  positions);
+  }
+else
+  {
+translate(x, y);
+fill(gv.getOutline());
+translate(-x, -y);
+  }
   }
 
   public void drawString(AttributedCharacterIterator ci, float x, float y)
   {
 GlyphVector gv = getFont().createGlyphVector(getFontRenderContext(), ci);
 drawGlyphVector(gv, x, y);
   }
 
   /**
* Should perhaps be contexct dependent, but this is left for now as an 


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[cp-patches] Patch: FYI: fix classpath/23863

2006-06-09 Thread Tom Tromey
I'm checking this in to Classpath and also to GCC svn trunk.

This fixes PR 23863, a bug in mprec.  The bug is that when parsing
certain doubles, we can overwrite the stack.  This showed up when
using a gcj-compiled ecj to compile GNU Classpath.

The fix is to import a new version of mprec.c from newlib, and then to
apply a small patch to let it dynamically grow its freelist.  This way
any size bigint can be allocated and the stack will never be trashed.

This patch also adds an assert in the place where we were previously
returning a bad result, to help insure against regressions.

Tested on x86 FC4 by re-running ecj1 on the failing compilation.

Tom

Index: ChangeLog
from  Tom Tromey  [EMAIL PROTECTED]

PR classpath/23863:
* native/fdlibm/dtoa.c (_dtoa): Free contents of _Jv_reent when
finished.
* native/fdlibm/mprec.c: New version from newlib.  Commented out
some includes.  Added assert.h.
(_reent, _Bigint): New defines.
(_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S): Likewise.
(__ULong, __Long): New types.
(_calloc_r): New function.
(Balloc): Dynamically add new _freelist entries as needed.
* native/fdlibm/mprec.h (struct _Jv_Bigint): Don't use
MAX_BIGNUMS to size _x[].
(struct _Jv_reent): _freelist now a _Jv_Bigint**.  Removed
_allocation_map, num.  Added _max_k.

Index: native/fdlibm/dtoa.c
===
RCS file: /cvsroot/classpath/classpath/native/fdlibm/dtoa.c,v
retrieving revision 1.4
diff -u -r1.4 dtoa.c
--- native/fdlibm/dtoa.c 5 Mar 2005 14:46:53 - 1.4
+++ native/fdlibm/dtoa.c 9 Jun 2006 16:10:26 -
@@ -2,7 +2,7 @@
  *
  * The author of this software is David M. Gay.
  *
- * Copyright (c) 1991 by ATT.
+ * Copyright (c) 1991, 2006 by ATT.
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose without fee is hereby granted, provided that this entire notice
@@ -897,10 +897,23 @@
 {
   struct _Jv_reent reent;
   char *p;
+  int i;
+
   memset (reent, 0, sizeof reent);
 
   p = _dtoa_r (reent, _d, mode, ndigits, decpt, sign, rve, float_type);
   strcpy (buf, p);
 
-  return;
+  for (i = 0; i  reent._result_k; ++i)
+{
+  struct _Jv_Bigint *l = reent._freelist[i];
+  while (l)
+   {
+ struct _Jv_Bigint *next = l-_next;
+ free (l);
+ l = next;
+   }
+}
+  if (reent._freelist)
+free (reent._freelist);
 }
Index: native/fdlibm/mprec.c
===
RCS file: /cvsroot/classpath/classpath/native/fdlibm/mprec.c,v
retrieving revision 1.7
diff -u -r1.7 mprec.c
--- native/fdlibm/mprec.c 12 Jan 2006 09:26:49 - 1.7
+++ native/fdlibm/mprec.c 9 Jun 2006 16:10:26 -
@@ -80,72 +80,112 @@
  * down depends on the machine and the number being converted.
  */
 
+/*#include _ansi.h*/
 #include assert.h
 #include stdlib.h
 #include string.h
+/* #include reent.h */
 #include mprec.h
 
 /* reent.c knows this value */
-#define _Kmax 15
-#include stdio.h
+/* #define _Kmax 15 */
 
-_Jv_Bigint *
-_DEFUN (Balloc, (ptr, k), struct _Jv_reent *ptr _AND int k)
-{
-  _Jv_Bigint *rv = NULL;
+#define _reent _Jv_reent
+#define _Bigint _Jv_Bigint
 
-  int i = 0;
-  int j = 1;
+#define _REENT_CHECK_MP(x)
+#define _REENT_MP_FREELIST(x) ((x)-_freelist)
+#define _REENT_MP_P5S(x) ((x)-_p5s)
 
-  /* FIXME - assert disabled because of PR classpath/23863
-   * assert ((1  k)  MAX_BIGNUM_WDS);
-   */
+typedef unsigned long __ULong;
+typedef long __Long;
 
-  while ((ptr-_allocation_map  j)  i  MAX_BIGNUMS)
-i++, j = 1;
+static void *
+_calloc_r (void *ignore, size_t x1, size_t x2)
+{
+  char *result = (char *) malloc (x1 * x2);
+  memset (result, 0, x1 * x2);
+  return result;
+}
 
-  assert (i  MAX_BIGNUMS);
+_Bigint *
+_DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k)
+{
+  int x;
+  _Bigint *rv ;
+  int new_k = k + 1;
 
-  if (i = MAX_BIGNUMS) 
-return NULL;
+  _REENT_CHECK_MP(ptr);
+  if (_REENT_MP_FREELIST(ptr) == NULL)
+{
+  /* Allocate a list of pointers to the mprec objects */
+  _REENT_MP_FREELIST(ptr) = (struct _Bigint **) _calloc_r (ptr, 
+ sizeof (struct _Bigint *),
+  new_k);
+  if (_REENT_MP_FREELIST(ptr) == NULL)
+   {
+ return NULL;
+   }
+  ptr-_max_k = new_k;
+}
+  else if (new_k  ptr-_max_k)
+{
+  struct _Bigint **new_list
+   = (struct _Bigint **) realloc (ptr-_freelist,
+  new_k * sizeof (struct _Bigint *));
+  memset (new_list[ptr-_max_k], 0,
+ (new_k - ptr-_max_k) * sizeof (struct _Bigint *));
+  ptr-_freelist = new_list;
+  ptr-_max_k = new_k;
+
+}
 
-  ptr-_allocation_map |= j;
-  rv = ptr-_freelist[i];
-  
-  rv-_k = k;
-  rv-_maxwds = 32;
+  assert (k 

[cp-patches] Patch: FYI: update tools .cvsignore

2006-06-09 Thread Tom Tromey
I'm checking this in.

Eclipse pointed out that the tools .deps is missing from .cvsignore.

Tom

2006-06-09  Tom Tromey  [EMAIL PROTECTED]

* tools/.cvsignore: Added .deps.

Index: tools/.cvsignore
===
RCS file: /cvsroot/classpath/classpath/tools/.cvsignore,v
retrieving revision 1.7
diff -u -r1.7 .cvsignore
--- tools/.cvsignore9 May 2006 19:38:42 -   1.7
+++ tools/.cvsignore9 Jun 2006 16:43:25 -
@@ -4,3 +4,4 @@
 Makefile
 tools.zip
 appletviewer
+.deps



[cp-patches] Patch: FYI: PR 27888

2006-06-09 Thread Tom Tromey
I'm checking this in.

This is Anthony's patch for PR 27888, plus an additional bit for
Collections and GapContent.  (The latter is probably not needed but
is included just to be complete.)

I also looked at the other possible failures -- BitSet, opentype,
Character -- but none of these needed changes.

Tom

2006-06-09  Anthony Green  [EMAIL PROTECTED]

PR classpath/27888:
* javax/swing/text/GapContent.java (binarySearch): Use unsigned shift.
* java/util/Collections.java (binarySearch): Use unsigned shift.
* java/util/Arrays.java (binarySearch): Use unsigned shift.

Index: java/util/Arrays.java
===
RCS file: /cvsroot/classpath/classpath/java/util/Arrays.java,v
retrieving revision 1.28
diff -u -r1.28 Arrays.java
--- java/util/Arrays.java   7 Apr 2006 19:45:46 -   1.28
+++ java/util/Arrays.java   9 Jun 2006 16:58:34 -
@@ -97,7 +97,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final byte d = a[mid];
 if (d == key)
   return mid;
@@ -131,7 +131,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final char d = a[mid];
 if (d == key)
   return mid;
@@ -165,7 +165,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final short d = a[mid];
 if (d == key)
   return mid;
@@ -199,7 +199,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final int d = a[mid];
 if (d == key)
   return mid;
@@ -233,7 +233,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final long d = a[mid];
 if (d == key)
   return mid;
@@ -268,7 +268,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final int r = Float.compare(a[mid], key);
 if (r == 0)
   return mid;
@@ -303,7 +303,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final int r = Double.compare(a[mid], key);
 if (r == 0)
   return mid;
@@ -369,7 +369,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final int d = Collections.compare(key, a[mid], c);
 if (d == 0)
   return mid;
Index: java/util/Collections.java
===
RCS file: /cvsroot/classpath/classpath/java/util/Collections.java,v
retrieving revision 1.41
diff -u -r1.41 Collections.java
--- java/util/Collections.java  11 May 2006 07:56:42 -  1.41
+++ java/util/Collections.java  9 Jun 2006 16:58:35 -
@@ -655,7 +655,7 @@
boolean forward = true;
 while (low = hi)
   {
-pos = (low + hi)  1;
+pos = (low + hi)  1;
 if (i  pos)
  {
if (!forward)
@@ -684,7 +684,7 @@
   {
while (low = hi)
  {
-   pos = (low + hi)  1;
+   pos = (low + hi)  1;
final int d = compare(l.get(pos), key, c);
if (d == 0)
   return pos;
Index: javax/swing/text/GapContent.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/text/GapContent.java,v
retrieving revision 1.49
diff -u -r1.49 GapContent.java
--- javax/swing/text/GapContent.java5 Jun 2006 11:44:50 -   1.49
+++ javax/swing/text/GapContent.java9 Jun 2006 16:58:35 -
@@ -918,7 +918,7 @@
 int mid = 0;
 while (low = hi)
   {
-mid = (low + hi)  1;
+mid = (low + hi)  1;
 final int d = a[mid];
 if (d == key)
   return mid;



[cp-patches] RFC: JDWP ExceptionOnlyFilter

2006-06-09 Thread Kyle Galloway

Here is a patch to complete the functionality of this filter.

ChangeLog

2006-06-09   Kyle Galloway   [EMAIL PROTECTED]

   * gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java:
   Fixed matches method to match instead of throwing exception
Index: gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java
===
RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java,v
retrieving revision 1.2
diff -u -r1.2 ExceptionOnlyFilter.java
--- gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java	9 Mar 2006 23:18:29 -	1.2
+++ gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java	9 Jun 2006 17:36:28 -
@@ -1,40 +1,40 @@
-/* ExceptionOnlyFilter.java -- 
-   Copyright (C) 2005 Free Software Foundation
+/* ExceptionOnlyFilter.java -- filter for exception events
+ Copyright (C) 2005 Free Software Foundation
 
-This file is part of GNU Classpath.
+ 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
-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. */
+ 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
+ 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.classpath.jdwp.event.filters;
@@ -42,36 +42,37 @@
 import gnu.classpath.jdwp.event.Event;
 import gnu.classpath.jdwp.exception.InvalidClassException;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.event.filters.ClassOnlyFilter;
 
 /**
- * Restricts reported exceptions by their class and whether they are caught
- * or uncaught.
+ * Restricts reported exceptions by their class and whether they are caught or
+ * uncaught. This modifier can be used with exception event kinds only.
  

[cp-patches] RFC: Added --enable-standalone-crypto

2006-06-09 Thread Vivek Lakshmanan

This completes adressing PR27649 in combination with

http://developer.classpath.org/pipermail/classpath-patches/2006-June/002635.html

This adds a --enable-standalone-crypto configuration option which 
creates an additional jar with the crypto providers for use by 
non-classpath based VMs.


changelog:

2006-06-09  Vivek Lakshmanan  [EMAIL PROTECTED]

* configure.ac:
Add --enable-standalone-crypto option (PR27649).
* lib/Makefile.am:
Create gnu-crypto.jar when CREATE_STANDALONE_CRYPTO is true.
Allow gnu-crypto.jar to be cleaned up.


Thanks,
Vivek

Index: configure.ac
===
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.160
diff -u -r1.160 configure.ac
--- configure.ac	7 Jun 2006 15:09:39 -	1.160
+++ configure.ac	9 Jun 2006 17:14:32 -
@@ -55,6 +55,22 @@
   [COMPILE_COLLECTIONS=no])
 AM_CONDITIONAL(CREATE_COLLECTIONS, test x${COMPILE_COLLECTIONS} = xyes)
 
+dnl 
+dnl Enables the creation of a standalone crypto jar with all 
+dnl crypto providers for use by VMs that may not use 
+dnl GNU-classpath (disabled by default).
+dnl 
+AC_ARG_ENABLE([standalone-crypto],
+  [AS_HELP_STRING(--enable-standalone-crypto,create additional crypto jar [default=no])],
+  [case x${enableval} in
+xyes) ENABLE_STANDALONE_CRYPTO=yes ;;
+xno) ENABLE_STANDALONE_CRYPTO=no ;;
+		x) ENABLE_STANDALONE_CRYPTO=yes ;;
+*) ENABLE_STANDALONE_CRYPTO=yes ;;
+  esac],
+  [ENABLE_STANDALONE_CRYPTO=no])
+AM_CONDITIONAL(CREATE_STANDALONE_CRYPTO, test x${ENABLE_STANDALONE_CRYPTO} = xyes)
+
 dnl ---
 dnl Enable JNI libraries (enabled by default)
 dnl ---
@@ -283,6 +299,10 @@
   AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
 fi
 
+if test x${ENABLE_STANDALONE_CRYPTO} = xyes; then
+  AC_SUBST(STANDALONE_CRYPTO_PREFIX, javax/crypto gnu/javax/crypto gnu/java/security gnu/classpath/ByteArray* gnu/classpath/debug gnu/java/io/Base64InputStream*)
+fi
+
 if test x${COMPILE_JNI} = xyes; then
   AC_HEADER_STDC
 
Index: lib/Makefile.am
===
RCS file: /sources/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.117
diff -u -r1.117 Makefile.am
--- lib/Makefile.am	5 Apr 2006 22:12:01 -	1.117
+++ lib/Makefile.am	9 Jun 2006 17:14:36 -
@@ -55,9 +55,21 @@
 	fi
 endif # CREATE_COLLECTIONS
 
+
+if CREATE_STANDALONE_CRYPTO
+STANDALONE_CRYPTO = gnu-crypto.jar
+
+gnu-crypto.jar: compile-classes
+	if test $(FASTJAR) != ; then \
+	  $(FASTJAR) cf $@ @STANDALONE_CRYPTO_PREFIX@; \
+	else \
+	  echo fastjar not found  gnu-crypto.jar; \
+	fi
+endif # CREATE_STANDALONE_CRYPTO
+
 if INSTALL_GLIBJ_ZIP
 
-glibj_DATA = glibj.zip $(COLLECTIONS)
+glibj_DATA = glibj.zip $(COLLECTIONS) $(STANDALONE_CRYPTO)
 
 endif # INSTALL_GLIBJ_ZIP
 
@@ -167,7 +179,7 @@
 CLEANFILES = compile-classes resources classes \
 	glibj.zip classes.1 classes.2 \
 	$(top_builddir)/gnu/java/locale/LocaleData.java \
-	$(JAVA_DEPEND)
+	$(JAVA_DEPEND) gnu-crypto.jar
 
 clean-local:
 	-rm -rf gnu


[cp-patches] RFC: 3 more JDWP events

2006-06-09 Thread Kyle Galloway
Here are three more JDWP events.  Can someone please review and commit 
these along with the other classpath changes submitted earlier today.


Thanks,
Kyle

ChangeLog:

2006-06-09  Kyle Galloway [EMAIL PROTECTED]

   * gnu/classpath/jdwp/event/MethodEntryEvent.java: New File
   * gnu/classpath/jdwp/event/MethodExitEvent.java: New File
   * gnu/classpath/jdwp/event/SingleStepEvent.java: New File
Index: gnu/classpath/jdwp/event/MethodEntryEvent.java
===
RCS file: gnu/classpath/jdwp/event/MethodEntryEvent.java
diff -N gnu/classpath/jdwp/event/MethodEntryEvent.java
--- /dev/null	1 Jan 1970 00:00:00 -
+++ gnu/classpath/jdwp/event/MethodEntryEvent.java	1 Jan 1970 00:00:00 -
@@ -0,0 +1,113 @@
+/* MethodEntryEvent.java -- n event specifying that a method has been invoked
+ Copyright (C) 2006 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.classpath.jdwp.event;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.id.ThreadId;
+import gnu.classpath.jdwp.util.Location;
+
+/**
+ * Notification from the VM that that a method has been invoked
+ * 
+ * @author Kyle Galloway ([EMAIL PROTECTED])
+ */
+public class MethodEntryEvent
+extends Event
+{
+  // The thread where the event occurred
+  Thread _thread;
+
+  // the location where the event occurred
+  Location _location;
+
+  //object instance
+  Object _instance;
+
+  /**
+   * Constructs a new codeMethodEntryEvent/code
+   * 
+   * @param thread the thread where the exception occurred
+   * @param location the location single stepped to
+   */
+  public MethodEntryEvent(Thread thread, Location location, Object instance)
+  {
+super(JdwpConstants.EventKind.METHOD_ENTRY);
+_thread = thread;
+_location = location;
+_instance = instance;
+  }
+
+  /**
+   * Returns a specific filtering parameter for this event. Valid types are
+   * thread and location
+   * 
+   * @param type the type of parameter desired
+   * @returns the desired parameter or null
+   */
+  public Object getParameter(int type)
+  {
+if (type == EVENT_THREAD)
+  return _thread;
+else if (type == EVENT_LOCATION)
+  return _location;
+else if (type == EVENT_INSTANCE)
+  return _instance;
+
+return null;
+  }
+
+  /**
+   * Writes the event to the given stream
+   * 
+   * @param outStream the output stream to write the event to
+   */
+  protected void _writeData(DataOutputStream outStream) throws IOException
+  {
+VMIdManager idm = VMIdManager.getDefault();
+ThreadId tid = (ThreadId) idm.getObjectId(_thread);
+
+tid.write(outStream);
+_location.write(outStream);
+  }
+
+}
Index: gnu/classpath/jdwp/event/MethodExitEvent.java
===
RCS file: gnu/classpath/jdwp/event/MethodExitEvent.java
diff -N gnu/classpath/jdwp/event/MethodExitEvent.java
--- /dev/null	1 Jan 1970 00:00:00 -
+++ gnu/classpath/jdwp/event/MethodExitEvent.java	1 Jan 1970 00:00:00 -
@@ -0,0 +1,110 @@
+/* MethodExitEvent.java -- n event specifying that a method has returned
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This 

Re: [cp-patches] RFC: New events for JDWP and small changes to Event internals

2006-06-09 Thread Keith Seitz

Kyle Galloway wrote:

ChangeLog:
2006-06-09   Kyle Galloway   [EMAIL PROTECTED]

   * gnu/classpath/jdwp/event/BreakpointEvent.java: Added Object
   _instance for filter compatibility
   * gnu/classpath/jdwp/event/BreakpointEvent.java(getParameter):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/ClassPrepareEventEvent.java(getParameter):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/Event.java: Added constants for
   type and changed the abstract method getParameters to match
   * gnu/classpath/jdwp/event/ThreadEndEvent.java(getParameter):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/ThreadStartEvent.java(getParameter):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/VmDeathEvent.java(getParameter):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/VmInitEvent.java(getParameter):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/ClassMatchFilter.java(matches):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/ClassOnlyFilter.java(matches):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/InstanceOnlyFilter.java(matches):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/ThreadOnlyFilter.java(matches):
   changed from Class type to constants
   * gnu/classpath/jdwp/event/ExceptionEvent.java: New file


Need a space between filename and methods in changelog entries. 
nitpickAlso a blank line between the last entry, since it is not 
related to those above it./nitpick


All the Event changes to getParameter are approved. [Boy, don't we wish 
we could finally use an enum!]



Index: gnu/classpath/jdwp/event/ExceptionEvent.java
===
RCS file: gnu/classpath/jdwp/event/ExceptionEvent.java
diff -N gnu/classpath/jdwp/event/ExceptionEvent.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnu/classpath/jdwp/event/ExceptionEvent.java1 Jan 1970 00:00:00 
-


[snip]


+package gnu.classpath.jdwp.event;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.id.ThreadId;
+import gnu.classpath.jdwp.util.Location;
+import gnu.classpath.jdwp.id.ObjectId;


Okay, this is kinda nit-pickity, but it *is* in the classpath hacker's 
guide: ObjectId is out of alphabetical order.



+  /**
+   * Writes the event to the given stream
+   * 
+   * @param outStream the output stream to write the event to

+   */


Missing @throws in javadoc. I'm probably very guilty of forgetting this 
a lot, too.



+  protected void _writeData(DataOutputStream outStream) throws IOException


throws should be on next line.

Otherwise it looks good. Got a savannah account yet?


Keith



Re: [cp-patches] RFC: JDWP ExceptionOnlyFilter

2006-06-09 Thread Keith Seitz

Kyle Galloway wrote:

Here is a patch to complete the functionality of this filter.


So that everyone knows, I've emailed Kyle privately about this patch, 
and I think he's going to submit a new patch for this (mainly without 
all the whitespace diffs).


Kyle feel free to correct me if I am mistaken. :-)

Keith



Re: [cp-patches] RFC: 3 more JDWP events

2006-06-09 Thread Keith Seitz

Kyle Galloway wrote:

A few nits, mainly typos and other frivolity.


Index: gnu/classpath/jdwp/event/MethodEntryEvent.java
===
RCS file: gnu/classpath/jdwp/event/MethodEntryEvent.java
diff -N gnu/classpath/jdwp/event/MethodEntryEvent.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnu/classpath/jdwp/event/MethodEntryEvent.java  1 Jan 1970 00:00:00 
-
@@ -0,0 +1,113 @@
+/* MethodEntryEvent.java -- n event specifying that a method has been invoked


typo


+/**
+ * Notification from the VM that that a method has been invoked
+ * 
+ * @author Kyle Galloway ([EMAIL PROTECTED])

+ */
+public class MethodEntryEvent
+extends Event
+{
+  // The thread where the event occurred
+  Thread _thread;
+
+  // the location where the event occurred
+  Location _location;
+
+  //object instance
+  Object _instance;


Should these be private?


+  /**
+   * Writes the event to the given stream
+   * 
+   * @param outStream the output stream to write the event to

+   */
+  protected void _writeData(DataOutputStream outStream) throws IOException


The throws thing again.


Index: gnu/classpath/jdwp/event/MethodExitEvent.java
===
RCS file: gnu/classpath/jdwp/event/MethodExitEvent.java
diff -N gnu/classpath/jdwp/event/MethodExitEvent.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnu/classpath/jdwp/event/MethodExitEvent.java   1 Jan 1970 00:00:00 
-
@@ -0,0 +1,110 @@
+/* MethodExitEvent.java -- n event specifying that a method has returned


Same typo :-)


+/**
+ * Notification from the VM that that a method has returned
+ * 
+ * @author Kyle Galloway ([EMAIL PROTECTED])

+ */
+public class MethodExitEvent
+extends Event
+{
+  // The thread where the event occurred
+  Thread _thread;
+
+  // the location where the event occurred
+  Location _location;
+
+  // object instance
+  Object _instance;


Same visibility question: private?



+  /**
+   * Writes the event to the given stream
+   * 
+   * @param outStream the output stream to write the event to

+   */
+  protected void _writeData(DataOutputStream outStream) throws IOException


:-)


Index: gnu/classpath/jdwp/event/SingleStepEvent.java
===
RCS file: gnu/classpath/jdwp/event/SingleStepEvent.java
diff -N gnu/classpath/jdwp/event/SingleStepEvent.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnu/classpath/jdwp/event/SingleStepEvent.java   1 Jan 1970 00:00:00 
-
@@ -0,0 +1,113 @@
+/**
+ * Notification from the VM that a single step has compleated including the
+ * thread and location stepped to
+ * 
+ * @author Kyle Galloway ([EMAIL PROTECTED])

+ */
+public class SingleStepEvent
+extends Event
+{
+  // the thread where the event occurred
+  Thread _thread;
+
+  // the location where the event occurred
+  Location _location;
+
+  //object instance
+  Object _instance;


Visibility again...


+  /**
+   * Returns a specific filtering parameter for this event. Valid types are
+   * thread and location
+   * 
+   * @param type the type of parameter desired

+   * @returns the desired parameter or null
+   */
+  public Object getParameter(int type)
+  {
+if (type == EVENT_THREAD)
+  return _thread;
+else if (type == EVENT_LOCATION)
+  return _location;
+
+return null;
+  }


Missing EVENT_INSTANCE? [Not that any debugger on the planet would ever 
use modifiers with a single step other than depth...]



+  /**
+   * Writes the event to the given stream
+   * 
+   * @param outStream the output stream to write the event to

+   */
+  protected void _writeData(DataOutputStream outStream) throws IOException


:-)

Otherwise, all looks good.

Keith



[cp-patches] FYI: TextLayout patch Bidi fix

2006-06-09 Thread Sven de Marothy
Hey all, this is my initial implementation of TextLayout, deprecating
the whole old TextLayoutPeer stuff.

Work's still needed (no hit testing yet), but it's mostly there.
/Sven

2006-06-08  Sven de Marothy  [EMAIL PROTECTED]

* java/text/Bidi.java: Treat WS as neutral for rules N1  N2.
* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
New constructor for bidirectionality.
(getGlyphMetrics): Return whitespace glyphs.
(getLogicalBounds): Offset rectangles to correct positions.
* gnu/java/awt/peer/gtk/GdkFontPeer.java
(getBaselineFor): Default to ROMAN_BASELINE.
(GdkFontLineMetrics): Guess some values for underline and 
strikethrough.
(layoutGlyphVector): Use bidirectionality.
* java/awt/font/TextLayout.java: Implement, mostly.


Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7743
diff -U3 -r1.7743 ChangeLog
--- ChangeLog	9 Jun 2006 17:02:31 -	1.7743
+++ ChangeLog	9 Jun 2006 20:20:03 -
@@ -1,3 +1,17 @@
+2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
+
+	* java/text/Bidi.java: Treat WS as neutral for rules N1  N2.
+	* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
+	New constructor for bidirectionality.
+	(getGlyphMetrics): Return whitespace glyphs.
+	(getLogicalBounds): Offset rectangles to correct positions.
+	* gnu/java/awt/peer/gtk/GdkFontPeer.java
+	(getBaselineFor): Default to ROMAN_BASELINE.
+	(GdkFontLineMetrics): Guess some values for underline and 
+	strikethrough.
+	(layoutGlyphVector): Use bidirectionality.
+	* java/awt/font/TextLayout.java: Implement, mostly.
+	
 2006-06-09  Anthony Green  [EMAIL PROTECTED]
 
 	PR classpath/27888:
Index: gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,v
retrieving revision 1.3
diff -U3 -r1.3 FreetypeGlyphVector.java
--- gnu/java/awt/peer/gtk/FreetypeGlyphVector.java	7 Jun 2006 23:48:05 -	1.3
+++ gnu/java/awt/peer/gtk/FreetypeGlyphVector.java	9 Jun 2006 20:20:08 -
@@ -82,10 +82,25 @@
   private AffineTransform[] glyphTransforms;
 
   /**
+   * Keep track of which glyphs are whitespace, since we don't have
+   * reporting from the peers yet. TextLayout needs this for justification.
+   */
+  private boolean[] whiteSpace;
+
+  /**
* Create a glyphvector from a given (Freetype) font and a String.
*/
   public FreetypeGlyphVector(Font f, String s, FontRenderContext frc)
   {
+this(f, s, frc, Font.LAYOUT_LEFT_TO_RIGHT);
+  }
+
+  /**
+   * Create a glyphvector from a given (Freetype) font and a String.
+   */
+  public FreetypeGlyphVector(Font f, String s, FontRenderContext frc,
+			 int flags)
+  {
 this.s = s;
 this.font = f;
 this.frc = frc;
@@ -94,6 +109,14 @@
 peer = (GdkFontPeer)font.getPeer();
 
 getGlyphs();
+if( flags == Font.LAYOUT_RIGHT_TO_LEFT )
+  {
+	// reverse the glyph ordering.
+	int[] temp = new int[ nGlyphs ];
+	for(int i = 0; i  nGlyphs; i++)
+	  temp[ i ] = glyphCodes[ nGlyphs - i - 1];
+	glyphCodes = temp;
+  }
 performDefaultLayout();
   }
 
@@ -180,10 +203,12 @@
*/
   public void performDefaultLayout()
   {
+whiteSpace = new boolean[ nGlyphs ]; 
 glyphTransforms = new AffineTransform[ nGlyphs ]; 
 double x = 0;
 for(int i = 0; i  nGlyphs; i++)
   {
+	whiteSpace[i] = Character.isWhitespace( glyphCodes[ i ] );
 	GlyphMetrics gm = getGlyphMetrics( i );
 	Rectangle2D r = gm.getBounds2D();
 	glyphTransforms[ i ] = AffineTransform.getTranslateInstance(x, 0);
@@ -237,17 +262,20 @@
 
   /**
* Returns the metrics of a single glyph.
+   * FIXME: Not all glyph types are supported.
*/
   public GlyphMetrics getGlyphMetrics(int glyphIndex)
   {
 double[] val = getMetricsNative( glyphCodes[ glyphIndex ] );
 if( val == null )
   return null;
+byte type = whiteSpace[ glyphIndex ] ? 
+  GlyphMetrics.WHITESPACE : GlyphMetrics.STANDARD;
 
 return new GlyphMetrics( true, (float)val[1], (float)val[2], 
 			 new Rectangle2D.Double( val[3], val[4], 
 		 val[5], val[6] ),
-			 GlyphMetrics.STANDARD );
+			 type );
   }
 
   /**
@@ -319,7 +347,12 @@
 
 Rectangle2D rect = (Rectangle2D)getGlyphLogicalBounds( 0 );
 for( int i = 1; i  nGlyphs; i++ )
-  rect = rect.createUnion( (Rectangle2D)getGlyphLogicalBounds( i ) );
+  {
+	Rectangle2D r2 = (Rectangle2D)getGlyphLogicalBounds( i );
+	Point2D p = getGlyphPosition( i );
+	r2.setRect( p.getX(), p.getY(), r2.getWidth(), r2.getHeight() );
+	rect = rect.createUnion( r2 );
+  }
 
 return rect;
   }
Index: gnu/java/awt/peer/gtk/GdkFontPeer.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java,v
retrieving revision 1.15

[cp-patches] FYI: CairoGraphics2D.drawString implemented on TextLayout

2006-06-09 Thread Sven de Marothy
2006-06-08  Sven de Marothy  [EMAIL PROTECTED]

* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(drawString): Use TextLayout instead of GlyphVector.


Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v
retrieving revision 1.16
diff -U3 -r1.16 CairoGraphics2D.java
--- gnu/java/awt/peer/gtk/CairoGraphics2D.java	9 Jun 2006 16:04:20 -	1.16
+++ gnu/java/awt/peer/gtk/CairoGraphics2D.java	9 Jun 2006 20:36:47 -
@@ -63,6 +63,7 @@
 import java.awt.Toolkit;
 import java.awt.font.FontRenderContext;
 import java.awt.font.GlyphVector;
+import java.awt.font.TextLayout;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Arc2D;
 import java.awt.geom.Area;
@@ -1271,8 +1272,8 @@
   {
 if (str == null || str.length() == 0)
   return;
-
-drawGlyphVector(getFont().createGlyphVector(null, str), x, y);
+(new TextLayout( str, getFont(), getFontRenderContext() )).
+  draw(this, x, y);
   }
 
   public void drawString(String str, int x, int y)


[cp-patches] FYI: AbstractGraphics2D fixes

2006-06-09 Thread Roman Kennke
Hi,

the attached patch fixes rendering with AbstractGraphics2D, most
importantly it limits the scanline area to the device bounds, so it
doesn't try to render outside the device.


2006-06-09  Roman Kennke  [EMAIL PROTECTED]

* gnu/java/awt/java2d/AbstractGraphics2D.java
(drawImage): Fixed scaling.
(fillShape): Removed offset handling.
(fillShapeImpl): Limit scanlining to device bounds.
(getSegments): Removed offset handling.
* gnu/java/awt/java2d/PolyEdge.java
(toString): Include isClip flag in output.

/Roman

-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: gnu/java/awt/java2d/AbstractGraphics2D.java
===
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java,v
retrieving revision 1.8
diff -u -1 -0 -r1.8 AbstractGraphics2D.java
--- gnu/java/awt/java2d/AbstractGraphics2D.java	19 May 2006 22:23:01 -	1.8
+++ gnu/java/awt/java2d/AbstractGraphics2D.java	9 Jun 2006 20:45:14 -
@@ -1324,22 +1324,22 @@
* @param y the y location to render to
* @param width the target width of the image
* @param height the target height of the image
* @param observer the image observer to receive notification
*/
   public boolean drawImage(Image image, int x, int y, int width, int height,
ImageObserver observer)
   {
 AffineTransform t = new AffineTransform();
 t.translate(x, y);
-double scaleX = (double) image.getWidth(observer) / (double) width;
-double scaleY = (double) image.getHeight(observer) / (double) height;
+double scaleX = (double) width / (double) image.getWidth(observer);
+double scaleY =  (double) height / (double) image.getHeight(observer);
 t.scale(scaleX, scaleY);
 return drawImage(image, t, observer);
   }
 
   /**
* Draws the specified image at the specified location. This forwards
* to [EMAIL PROTECTED] #drawImage(Image, AffineTransform, ImageObserver)}.
*
* @param image the image to render
* @param x the x location to render to
@@ -1466,29 +1466,25 @@
 // good hinting implemented.
 antialias = (v == RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
  //|| v == RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
   }
 else
   {
 Object v = renderingHints.get(RenderingHints.KEY_ANTIALIASING);
 antialias = (v == RenderingHints.VALUE_ANTIALIAS_ON);
   }
 
-double offs = 0.5;
-if (antialias)
-  offs = offs / AA_SAMPLING;
-
 Rectangle2D userBounds = s.getBounds2D();
 Rectangle2D deviceBounds = new Rectangle2D.Double();
-ArrayList segs = getSegments(s, transform, deviceBounds, false, offs);
+ArrayList segs = getSegments(s, transform, deviceBounds, false);
 Rectangle2D clipBounds = new Rectangle2D.Double();
-ArrayList clipSegs = getSegments(clip, transform, clipBounds, true, offs);
+ArrayList clipSegs = getSegments(clip, transform, clipBounds, true);
 segs.addAll(clipSegs);
 Rectangle2D inclClipBounds = new Rectangle2D.Double();
 Rectangle2D.union(clipBounds, deviceBounds, inclClipBounds);
 if (segs.size()  0)
   {
 if (antialias)
   fillShapeAntialias(segs, deviceBounds, userBounds, inclClipBounds);
 else
   fillShapeImpl(segs, deviceBounds, userBounds, inclClipBounds);
   }
@@ -1669,21 +1665,24 @@
 //  Collections.sort(edgeTable[y]);
 //  }
 
 // The activeEdges list contains all the edges of the current scanline
 // ordered by their intersection points with this scanline.
 ArrayList activeEdges = new ArrayList();
 PolyEdgeComparator comparator = new PolyEdgeComparator();
 
 // Scan all relevant lines.
 int minYInt = (int) Math.ceil(icMinY);
-for (int y = minYInt; y = maxY; y++)
+
+Rectangle devClip = getDeviceBounds();
+int scanlineMax = (int) Math.min(maxY, devClip.getMaxY());
+for (int y = minYInt; y  scanlineMax; y++)
   {
 ArrayList bucket = edgeTable[y - minYInt];
 // Update all the x intersections in the current activeEdges table
 // and remove entries that are no longer in the scanline.
 for (Iterator i = activeEdges.iterator(); i.hasNext();)
   {
 PolyEdge edge = (PolyEdge) i.next();
 if (y  edge.y1)
   i.remove();
 else
@@ -2162,22 +2161,21 @@
* @param s the shape to convert
* @param t the transformation to apply before converting
* @param deviceBounds an output parameter; holds the bounding rectangle of
*s in device space after return
* @param isClip true when the shape is a clip, false for normal shapes;
*this influences the settings in the created PolyEdge instances.
*
* @return a list of PolyEdge that form the shape in device space
*/

[cp-patches] Patch: FYI: update build for sun class

2006-06-09 Thread Tom Tromey
I'm checking this in.

This updates our build code to search for classes in the sun package.
This is only needed if you're building using make; the eclipse-based
build is already ok.

Tom

Index: ChangeLog
from  Tom Tromey  [EMAIL PROTECTED]
* lib/Makefile.am (install-data-local): Copy 'sun' files.
(uninstall-local): Delete 'sun' directory.
(glibj.zip): Include 'sun' classes.
(clean-local): Delete 'sun' directory.
* lib/gen-classlist.sh.in: Search 'sun' subdirectories.

Index: lib/Makefile.am
===
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.117
diff -u -r1.117 Makefile.am
--- lib/Makefile.am 5 Apr 2006 22:12:01 - 1.117
+++ lib/Makefile.am 9 Jun 2006 21:23:51 -
@@ -73,6 +73,7 @@
cp -R java $(DESTDIR)$(pkgdatadir)
cp -R javax $(DESTDIR)$(pkgdatadir)
cp -R org $(DESTDIR)$(pkgdatadir)
+   cp -R sun $(DESTDIR)$(pkgdatadir)
cp -R META-INF $(DESTDIR)$(pkgdatadir)
 
 # FIXME - should mimic doc/api/Makefile.am instead...
@@ -81,6 +82,7 @@
rm -rf $(DESTDIR)$(pkgdatadir)/java
rm -rf $(DESTDIR)$(pkgdatadir)/javax
rm -rf $(DESTDIR)$(pkgdatadir)/org
+   rm -rf $(DESTDIR)$(pkgdatadir)/sun
rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
 
 endif # INSTALL_CLASS_FILES
@@ -95,8 +97,8 @@
 else
 
 glibj.zip: classes compile-classes resources
-   if test $(ZIP) != ; then $(ZIP) -r -D glibj.zip gnu java javax org 
META-INF  /dev/null; fi
-   if test $(FASTJAR) != ; then $(FASTJAR) cf glibj.zip gnu java javax 
org META-INF; fi
+   if test $(ZIP) != ; then $(ZIP) -r -D glibj.zip gnu java javax org 
sun META-INF  /dev/null; fi
+   if test $(FASTJAR) != ; then $(FASTJAR) cf glibj.zip gnu java javax 
org sun META-INF; fi
 
 endif # USE_PREBUILT_GLIBJ_ZIP
 
@@ -175,6 +177,7 @@
-rm -rf javax
-rm -rf org
-rm -rf com
+   -rm -rf sun
-rm -rf META-INF
-rm -rf lists
-rm -f Makefile.deps
Index: lib/gen-classlist.sh.in
===
RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v
retrieving revision 1.36
diff -u -r1.36 gen-classlist.sh.in
--- lib/gen-classlist.sh.in 4 Apr 2006 17:16:50 - 1.36
+++ lib/gen-classlist.sh.in 9 Jun 2006 21:23:51 -
@@ -18,7 +18,7 @@
 # We do this because it makes splitting for the gcj build much
 # cheaper.
 (cd @top_srcdir@
- @FIND@ java javax gnu org -follow -name '*.java' -print |
+ @FIND@ java javax gnu org sun -follow -name '*.java' -print |
  sort -r | sed -e 's,/\([^/]*\)$, \1,' |
  while read pkg file; do
 echo $pkg @top_srcdir@ $pkg/$file
@@ -43,7 +43,7 @@
 echo Adding java source files from VM directory $vm_dirlist
 for dir in $vm_dirlist; do
(cd $dir
-   for subdir in java javax gnu org com; do
+   for subdir in java javax gnu org com sun; do
   if test -d $subdir; then
 @FIND@ $subdir -name '*.java' -print
   fi



[cp-patches] FYI: Fix locking in componentgraphics.

2006-06-09 Thread Sven de Marothy
2006-06-09  Sven de Marothy  [EMAIL PROTECTED]

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
(Java_gnu_java_awt_peer_gtk_ComponentGraphics_disposeSurface):
Use GTK locks while disposing (Xlib) surface.


Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
===
RCS file: /sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,v
retrieving revision 1.14
diff -U3 -r1.14 gnu_java_awt_peer_gtk_ComponentGraphics.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c	7 Jun 2006 09:40:54 -	1.14
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c	9 Jun 2006 22:03:53 -
@@ -186,7 +186,11 @@
 
   surface = cairo_get_target (gr-cr);
   if (surface != NULL)
-cairo_surface_destroy (surface);
+{
+  gdk_threads_enter();
+  cairo_surface_destroy (surface);
+  gdk_threads_leave();
+}
 }
 
 JNIEXPORT jlong JNICALL 


[cp-patches] FYI: Swing painting robustness

2006-06-09 Thread Roman Kennke
This improves the robustness in the Swing painting code against client
code doing nasty things with the passed-in Graphics object, like calling
create() or modifying the state in some irreversible way.

2006-06-09  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JComponent.java
(paintChildrenOptimized): Paint component with a new Graphics
object to protect the other painting code from modifications
done in that object, and avoid cleanup ops on possibly
dispose()ed
Graphics object.


/Roman

-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/JComponent.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.123
diff -u -1 -0 -r1.123 JComponent.java
--- javax/swing/JComponent.java	6 Jun 2006 09:19:58 -	1.123
+++ javax/swing/JComponent.java	9 Jun 2006 23:24:50 -
@@ -2032,33 +2032,24 @@
 
 Rectangle bounds = children[i].getBounds(rectCache);
 Rectangle oldClip = g.getClipBounds();
 if (oldClip == null)
   oldClip = bounds;
 
 if (!g.hitClip(bounds.x, bounds.y, bounds.width, bounds.height))
   continue;
 
 boolean translated = false;
-try
-  {
-g.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
-g.translate(bounds.x, bounds.y);
-translated = true;
-children[i].paint(g);
-  }
-finally
-  {
-if (translated)
-  g.translate(-bounds.x, -bounds.y);
-g.setClip(oldClip);
-  }
+Graphics g2 = g.create(bounds.x, bounds.y, bounds.width,
+   bounds.height);
+children[i].paint(g2);
+g2.dispose();
   }
 g.setClip(originalClip);
   }
 
   /**
* Paint the component's body. This usually means calling [EMAIL PROTECTED]
* ComponentUI#update} on the [EMAIL PROTECTED] #ui} property of the component, if
* it is non-codenull/code. You may override this if you wish to
* customize the component's body-painting behavior. The component's body
* is painted first, before the border and children.
@@ -2177,21 +2168,21 @@
   /**
* Performs double buffered repainting.
*/
   private void paintDoubleBuffered(Rectangle r)
   {
 RepaintManager rm = RepaintManager.currentManager(this);
 
 // Paint on the offscreen buffer.
 Component root = getRoot(this);
 Image buffer = rm.getOffscreenBuffer(this, root.getWidth(),
- root.getHeight());
+ root.getHeight());
 //Rectangle targetClip = SwingUtilities.convertRectangle(this, r, root);
 Point translation = SwingUtilities.convertPoint(this, 0, 0, root);
 Graphics g2 = buffer.getGraphics();
 g2.translate(translation.x, translation.y);
 g2.setClip(r.x, r.y, r.width, r.height);
 g2 = getComponentGraphics(g2);
 isPaintingDoubleBuffered = true;
 try
   {
 paint(g2);


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[cp-patches] FYI: JTabbedPane fix

2006-06-09 Thread Roman Kennke
Some apps (including Sun's Java2D demo, see below) seem to do strange
things with JTabbedPane: they only install one component in the first
tab, leav#e all other tabs at null and change this one component on some
event. This requires that the JTabbedPane impl doesn't try to change the
component when a null component is seen.

This gets the Java2D demo (included in Sun's JDK under demo/jfc/Java2D -
BSD+nuke license) running:

http://kennke.org/~roman/Bildschirmfoto.png

2006-06-09  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JTabbedPane.java
(setSelectedIndex): Don't change the visibility of the
components,
this is done by the UI class.
* javax/swing/plaf/basic/BasicTabbedPaneUI.java
(TabbedPaneLayout.layoutContainer): Change visibility of
component
here, depending on the selected index. Only do this if the new
selected component is not null. Some programs seem to expect
this.
(visibleComponent): New field.
(getVisibleComponent): Changed to return visibleComponent field.
(setVisibleComponent): Changed to set the visibility of
the old and new visible component.

/Roman
-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/JTabbedPane.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v
retrieving revision 1.40
diff -u -1 -0 -r1.40 JTabbedPane.java
--- javax/swing/JTabbedPane.java	31 May 2006 13:17:41 -	1.40
+++ javax/swing/JTabbedPane.java	9 Jun 2006 23:33:36 -
@@ -983,24 +983,20 @@
* This method sets the selected index. This method will hide the old
* component and show the new component.
*
* @param index The index to set it at.
*/
   public void setSelectedIndex(int index)
   {
 checkIndex(index, -1, tabs.size());
 if (index != getSelectedIndex())
   {
-	if (getSelectedIndex() != -1  getSelectedComponent() != null)
-	  getSelectedComponent().hide();
-	if (index != -1  getComponentAt(index) != null)
-	  getComponentAt(index).show();
 	model.setSelectedIndex(index);
   }
   }
 
   /**
* This method returns the component at the selected index.
*
* @return The component at the selected index.
*/
   public Component getSelectedComponent()
Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v
retrieving revision 1.45
diff -u -1 -0 -r1.45 BasicTabbedPaneUI.java
--- javax/swing/plaf/basic/BasicTabbedPaneUI.java	7 Jun 2006 18:50:57 -	1.45
+++ javax/swing/plaf/basic/BasicTabbedPaneUI.java	9 Jun 2006 23:33:39 -
@@ -523,20 +523,31 @@
  * of all its components.
  *
  * @param parent The Container to lay out.
  */
 public void layoutContainer(Container parent)
 {
   calculateLayoutInfo();
 
   int tabPlacement = tabPane.getTabPlacement();
   Insets insets = tabPane.getInsets();
+
+  int selectedIndex = tabPane.getSelectedIndex();
+  Component selectedComponent = tabPane.getComponentAt(selectedIndex);
+  // The RI doesn't seem to change the component if the new selected
+  // component == null. This is probably so that applications can add
+  // one single component for every tab. 
+  if (selectedComponent != null)
+{
+  setVisibleComponent(selectedComponent);
+}
+
   int childCount = tabPane.getComponentCount();
   if (childCount  0)
 {
   int compX;
   int compY;
   int tabAreaWidth = 0;
   int tabAreaHeight = 0;
   switch (tabPlacement)
   {
 case LEFT:
@@ -1404,20 +1415,25 @@
*/
   private int rolloverTab;
 
   /**
* Determines if tabs are painted opaque or not. This can be adjusted using
* the UIManager property 'TabbedPane.tabsOpaque'.
*/
   private boolean tabsOpaque;
 
   /**
+   * The currently visible component.
+   */
+  private Component visibleComponent;
+
+  /**
* Creates a new BasicTabbedPaneUI object.
*/
   public BasicTabbedPaneUI()
   {
 super();
 rects = new Rectangle[0];
 tabRuns = new int[10];
   }
 
   /**
@@ -2472,32 +2488,43 @@
 return dest;
   }
 
   /**
* This method returns the component that is shown in  the content area.
*
* @return The component that is shown in the content area.
*/
   protected Component getVisibleComponent()
   {
-return tabPane.getComponentAt(tabPane.getSelectedIndex());
+return visibleComponent;
   }
 
   /**
* This method sets the visible component.
*
* @param component The component to be set visible.
*/
   protected void setVisibleComponent(Component component)
   {
-component.setVisible(true);
-tabPane.setSelectedComponent(component);

[cp-testresults] Japi diffs for classpath

2006-06-09 Thread Stuart Ballard
Japi diff jdk12 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-classpath.html

Changes since last run:

-Comparison run at Thu Jun  8 09:56:54 2006 GMT
-jdk12 API scanned at 2006/06/08 05:28:44 EDT
-classpath API scanned at 2006/06/08 05:47:52 EDT
+Comparison run at Fri Jun  9 09:56:40 2006 GMT
+jdk12 API scanned at 2006/06/09 05:28:32 EDT
+classpath API scanned at 2006/06/09 05:47:40 EDT
-javax.swing.plaf.basic: 99.19% good, 0.65% missing
+javax.swing.plaf.basic: 99.35% good, 0.49% missing
-Total: 99.48% good, 0.2% missing
+Total: 99.49% good, 0.19% missing
-Methods: 120 missing.
-Constructors: 3 missing.
+Methods: 110 missing.
+Constructors: 1 missing.
-constructor javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction(int, 
java.lang.String): not implemented in classpath
-constructor javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction(int, 
java.lang.String): not implemented in classpath
-method 
javax.swing.plaf.basic.BasicScrollPaneUI.installKeyboardActions(javax.swing.JScrollPane):
 not implemented in classpath
-method 
javax.swing.plaf.basic.BasicScrollPaneUI.uninstallKeyboardActions(javax.swing.JScrollPane):
 not implemented in classpath
-method 
javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.isEnabled(): not 
implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction.isEnabled(): not 
implemented in classpath
-method 
javax.swing.plaf.basic.BasicTreeUI.TreePageAction.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreePageAction.isEnabled(): not 
implemented in classpath
-method 
javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.isEnabled(): not 
implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction.isEnabled(): not 
implemented in classpath


Japi diff jdk13 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk13-classpath.html

Changes since last run:

-Comparison run at Thu Jun  8 09:58:39 2006 GMT
-jdk13 API scanned at 2006/06/08 05:23:28 EDT
-classpath API scanned at 2006/06/08 05:47:52 EDT
+Comparison run at Fri Jun  9 09:58:32 2006 GMT
+jdk13 API scanned at 2006/06/09 05:23:07 EDT
+classpath API scanned at 2006/06/09 05:47:40 EDT
-javax.swing.plaf.basic: 99.36% good, 0.62% missing
+javax.swing.plaf.basic: 99.51% good, 0.47% missing
-Total: 98.44% good, 0.46% missing
+Total: 98.45% good, 0.45% missing
-Methods: 138 missing.
-Constructors: 3 missing.
+Methods: 128 missing.
+Constructors: 1 missing.
-constructor javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction(int, 
java.lang.String): not implemented in classpath
-constructor javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction(int, 
java.lang.String): not implemented in classpath
-method 
javax.swing.plaf.basic.BasicScrollPaneUI.installKeyboardActions(javax.swing.JScrollPane):
 not implemented in classpath
-method 
javax.swing.plaf.basic.BasicScrollPaneUI.uninstallKeyboardActions(javax.swing.JScrollPane):
 not implemented in classpath
-method 
javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction.isEnabled(): not 
implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction.isEnabled(): not 
implemented in classpath
-method 
javax.swing.plaf.basic.BasicTreeUI.TreePageAction.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreePageAction.isEnabled(): not 
implemented in classpath
-method 
javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction.isEnabled(): not 
implemented in classpath
-method javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction.isEnabled(): not 
implemented in classpath


Japi diff jdk14 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-classpath.html

Changes since last run:

-Comparison run at Thu Jun  8 10:00:46 2006 GMT
-jdk14 API scanned at 2006/06/08 05:15:56 EDT
-classpath API scanned at 2006/06/08 05:47:52 EDT
+Comparison run at Fri Jun  9 10:00:41 2006 GMT
+jdk14 API scanned at 2006/06/09 05:15:41 EDT
+classpath API scanned at 2006/06/09 05:47:40 EDT
-javax.swing.plaf.basic: 99.4% good, 0.59% missing
+javax.swing.plaf.basic: 99.53% good, 0.46% missing
-Total: 99.18% good, 0% minor, 0.72% missing
+Total: 99.19% good, 0% minor, 0.71% missing
-Methods: 175 missing.
-Constructors: 5 missing.
+Methods: 165 missing.
+Constructors: 3 missing.
-constructor 

[cp-testresults] FAIL: regressions for libgcj on Fri Jun 9 14:51:54 UTC 2006

2006-06-09 Thread cpdev
Baseline from: Thu Jun  8 22:35:44 UTC 2006

Regressions:
FAIL: Thread_Sleep -O3 -findirect-dispatch output - bytecode-native test
FAIL: Thread_Sleep -O3 output - source compiled test
FAIL: Thread_Sleep -findirect-dispatch output - bytecode-native test
FAIL: Thread_Sleep output - gij test
FAIL: Thread_Sleep output - source compiled test

Totals:
PASS: 4795
XPASS: 0
FAIL: 5
XFAIL: 12


___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


[cp-testresults] FAIL: classpath build with gcj (4.0) on Fri Jun 9 18:48:23 UTC 2006

2006-06-09 Thread cpdev
config.status: executing gen-classlist commands
config.status: executing copy-vmresources commands
Making all in lib
make[1]: Entering directory `/home/cpdev/Nightly/classpath/build/lib'
mkdir -p ../gnu/java/locale
../../classpath/scripts/generate-locale-list.sh  
../gnu/java/locale/LocaleData.java
true
top_builddir=.. top_srcdir=../../classpath /bin/sh ./gen-classlist.sh standard
Adding java source files from srcdir '../../classpath'.
Adding java source files from VM directory ../../classpath/vm/reference
Adding generated files in builddir '..'.
make -f ../../classpath/lib/Makefile.gcj \
  GCJ='/usr/local/bin/gcj' \
  
compile_classpath='..:../../classpath/vm/reference:../../classpath:../../classpath/external/w3c_dom:../../classpath/external/sax:../../classpath/external/relaxngDatatype:.:'
 \
  top_srcdir=../../classpath
make[2]: Entering directory `/home/cpdev/Nightly/classpath/build/lib'
/bin/sh ../../classpath/lib/split-for-gcj.sh
Splitting for gcj
make[2]: Leaving directory `/home/cpdev/Nightly/classpath/build/lib'
make[2]: Entering directory `/home/cpdev/Nightly/classpath/build/lib'
/usr/local/bin/gcj -Wno-deprecated --encoding=UTF-8 --bootclasspath '' 
--classpath 
..:../../classpath/vm/reference:../../classpath:../../classpath/external/w3c_dom:../../classpath/external/sax:../../classpath/external/relaxngDatatype:.:
 -C -d . -MD -MF lists/gnu-CORBA-CDR.deps -MT lists/gnu-CORBA-CDR.stamp -MP 
@lists/gnu-CORBA-CDR.list
../../classpath/javax/swing/text/html/HTMLDocument.java:1434: error: Type 
'ElementSpec' not found in the declaration of the local variable 'spec'.
 ElementSpec spec = new ElementSpec(copy, ElementSpec.ContentType, 
 ^
1 error
make[2]: *** [lists/gnu-CORBA-CDR.stamp] Error 1
make[2]: Leaving directory `/home/cpdev/Nightly/classpath/build/lib'
make[1]: *** [compile-classes] Error 2
make[1]: Leaving directory `/home/cpdev/Nightly/classpath/build/lib'
make: *** [all-recursive] Error 1


___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


[cp-testresults] FAIL: regressions for mauve-jamvm on Fri Jun 9 21:01:32 UTC 2006

2006-06-09 Thread cpdev
Baseline from: Fri Jun  9 15:49:29 UTC 2006

Regressions:
FAIL: gnu.testlet.java.lang.Thread.sleep: Interrupted sleep (number 2)

New fails:
FAIL: gnu.testlet.gnu.java.security.key.dss.TestOfDSSCodec abnormal termination 
142 CRASH or TIMEOUT
FAIL: gnu.testlet.gnu.javax.crypto.jce.TestOfDHKeyFactory abnormal termination 
142 CRASH or TIMEOUT
FAIL: gnu.testlet.gnu.javax.crypto.pad.TestOfISO10126 abnormal termination 142 
CRASH or TIMEOUT
FAIL: gnu.testlet.gnu.javax.crypto.sasl.srp.TestOfSRPAuthInfoProvider abnormal 
termination 142 CRASH or TIMEOUT
FAIL: 
gnu.testlet.gnu.javax.swing.text.html.parser.support.Parser.HTML_randomTable: 
Exception: java.lang.Exception: 'htmlhead/headbodytabletbody   
trtd   C_0_0tdC_0_1tdC_0_2 /tdtdC_0_3 tr   tdC_1_0 tr   td 
C_2_0tdC_2_1/td /trtr  td C_3_0/tr   
trtdC_4_0/tbody/table/body/html' - 
'htmlhead/headbodytabletbodytrtd'C_0_0'/tdtd'C_0_1'/tdtd'C_0_2'/tdtd'C_0_3'/td/trtrtd'C_1_0'/td/trtrtd'C_2_0'/tdtd'C_2_1'/td/trtrtd'C_3_0'/td/trtrtd'C_4_0'/tbody/td/tr/tbody/table/body/html'
 expected 
'htmlhead/headbodytabletbodytrtd'C_0_0'/tdtd'C_0_1'/tdtd'C_0_2'/tdtd'C_0_3'/td/trtrtd'C_1_0'/td/trtrtd'C_2_0'/tdtd'C_2_1'/td/trtrtd'C_3_0'/td/trtrtd'C_4_0'/td/tr/tbody/table/body/html'
 (number 1)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 10)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 14)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 17)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 21)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 24)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 3)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int) (number 7)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int, int[], 
ColorSpace, boolean, boolean, int, int) (number 11)
FAIL: gnu.testlet.java.awt.image.ColorModel.constructors: (int, int[], 
ColorSpace, boolean, boolean, int, int) (number 8)
FAIL: gnu.testlet.javax.security.auth.login.TestOfGnuConfiguration: 
parseFromSecurityProperty (number 1)
FAIL: gnu.testlet.javax.security.auth.login.TestOfGnuConfiguration: 
parseFromSystemProperty (number 1)
FAIL: gnu.testlet.javax.security.auth.login.TestOfGnuConfiguration: 
parseFromUserHome (number 1)
FAIL: gnu.testlet.javax.security.auth.login.TestOfPR25202: pr25202 (number 1)

Totals:
PASS: 31998
XPASS: 0
FAIL: 340
XFAIL: 0


___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


[cp-testresults] FAIL: classpath build with gcj (4.0) on Sat Jun 10 05:10:48 UTC 2006

2006-06-09 Thread cpdev
config.status: executing gen-classlist commands
config.status: executing copy-vmresources commands
Making all in lib
make[1]: Entering directory `/home/cpdev/Nightly/classpath/build/lib'
mkdir -p ../gnu/java/locale
../../classpath/scripts/generate-locale-list.sh  
../gnu/java/locale/LocaleData.java
true
top_builddir=.. top_srcdir=../../classpath /bin/sh ./gen-classlist.sh standard
Adding java source files from srcdir '../../classpath'.
Adding java source files from VM directory ../../classpath/vm/reference
Adding generated files in builddir '..'.
make -f ../../classpath/lib/Makefile.gcj \
  GCJ='/usr/local/bin/gcj' \
  
compile_classpath='..:../../classpath/vm/reference:../../classpath:../../classpath/external/w3c_dom:../../classpath/external/sax:../../classpath/external/relaxngDatatype:.:'
 \
  top_srcdir=../../classpath
make[2]: Entering directory `/home/cpdev/Nightly/classpath/build/lib'
/bin/sh ../../classpath/lib/split-for-gcj.sh
Splitting for gcj
make[2]: Leaving directory `/home/cpdev/Nightly/classpath/build/lib'
make[2]: Entering directory `/home/cpdev/Nightly/classpath/build/lib'
/usr/local/bin/gcj -Wno-deprecated --encoding=UTF-8 --bootclasspath '' 
--classpath 
..:../../classpath/vm/reference:../../classpath:../../classpath/external/w3c_dom:../../classpath/external/sax:../../classpath/external/relaxngDatatype:.:
 -C -d . -MD -MF lists/gnu-CORBA-CDR.deps -MT lists/gnu-CORBA-CDR.stamp -MP 
@lists/gnu-CORBA-CDR.list
../../classpath/javax/swing/text/html/HTMLDocument.java:1434: error: Type 
'ElementSpec' not found in the declaration of the local variable 'spec'.
 ElementSpec spec = new ElementSpec(copy, ElementSpec.ContentType, 
 ^
1 error
make[2]: *** [lists/gnu-CORBA-CDR.stamp] Error 1
make[2]: Leaving directory `/home/cpdev/Nightly/classpath/build/lib'
make[1]: *** [compile-classes] Error 2
make[1]: Leaving directory `/home/cpdev/Nightly/classpath/build/lib'
make: *** [all-recursive] Error 1


___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


Re: Mauve reports

2006-06-09 Thread Raif S. Naffah
hello Roman,

On Friday 09 June 2006 00:13, Roman Kennke wrote:
 FYI: I have set up my old Mauve report script on
 builder.classpath.org to generate nice HTML for the Mauve results:

 http://builder.classpath.org/mauve/mauvereport.cgi

very useful.  thanks for doing this.


 This really is only a frontend to:
 http://builder.classpath.org/mauve/mauve-jamvm

 These results normally get updated continuously, so the frontend
 should always report the latest results that have been built
 sucessfully.

 In the future we will (hopefully) add more compiler/VM(/classlib)
 combinations so that we can compare the results to others.

 I welcome suggestions for improvements of this frontend.

* it wasn't clear to me if the Last update date, is local or UTC.
* what timeout value is used in the scripts?  i see that most of the 
failed tests are due to timeout.  since this is an automated build/test 
process, may be we can increase that limit.


cheers;
rsn


pgpnWc66a6X6C.pgp
Description: PGP signature


[Bug swing/27973] DefaultStyledDocument does not interoperate with the HTML support implementation

2006-06-09 Thread roman at kennke dot org


--- Comment #4 from roman at kennke dot org  2006-06-09 10:17 ---
Can you check if the mauve tests for the ElementBuffer are affected by your
patch? BTW, Lillian and Tony also did quite some work on the ElementBuffer
class. This class is very fundamental and unfortunately not at all documented.
If you find testcases that don't work, it would be very helpful to have mauve
tests for it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27973



___
Bug-classpath mailing list
Bug-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-classpath


cvs commit messages

2006-06-09 Thread Tom Tromey
Our cvs commit messages starting including the full patch.
This seems somewhat unfriendly to me, in two ways.

First, we've all already seen the patch on classpath-patches.  And,
this is where discussion should take place anyway.

Second, this means that the full text of patches ends up in the
associated bugzilla bugs.

Can we disable this?

Tom



Re: Mauve reports

2006-06-09 Thread Archie Cobbs

Roman Kennke wrote:

I'd like to get JCHEVM (the Harmony edition of JCVM) included..
is that possible? Let me know what I can do to help if so.


This should be possible. Whenever me or Mark or somebody else finds time
to fiddle with the build scripts we will include this. OTOH, it might be
possible that Mark gives you access to the machine so you can set this
up yourself?


That'd be fine with me... just let me know what I need to do.

Thanks,
-Archie

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



Re: Patch: FYI: add real name property

2006-06-09 Thread Tom Tromey
 Robert == Robert Schuster [EMAIL PROTECTED] writes:

Robert We can then go to the eclipse guys and ask them politely about
Robert supporting this extension. :)

FWIW, the Eclipse ChangeLog plugin is written by Red Hat.  I already
checked in the patch to support this property :-).  If Classpath
decides to support it, I'll fix it to follow.

Tom



Re: J2ME-CDC-like library and classes dependency problems

2006-06-09 Thread Tom Tromey
 Kenny == Kenny Su [EMAIL PROTECTED] writes:

Kenny I am trying to modularize the classpath library and making it
Kenny closely to CDC-based library.

Cool.

Kenny Is there anyone who can tell me any useful tools to analyze the
Kenny classpath library.

You could write a custom tool using the ASM library.  From all
accounts ASM is quite easy to use.

Kenny PS. I don't know if there anyone who is doing it now, if yes,
Kenny please let me know. I think it is useful if classpath library
Kenny has some configure options to build library more flexible,
Kenny especially in embedded environment.

There have been various discussions about this in the past, but little
motion.  You could look through the list archives a bit to see.

Tom



Re: J2ME-CDC-like library and classes dependency problems

2006-06-09 Thread David Daney

Tom Tromey wrote:

Kenny == Kenny Su [EMAIL PROTECTED] writes:



Kenny I am trying to modularize the classpath library and making it
Kenny closely to CDC-based library.

Cool.

Kenny Is there anyone who can tell me any useful tools to analyze the
Kenny classpath library.

You could write a custom tool using the ASM library.  From all
accounts ASM is quite easy to use.

Kenny PS. I don't know if there anyone who is doing it now, if yes,
Kenny please let me know. I think it is useful if classpath library
Kenny has some configure options to build library more flexible,
Kenny especially in embedded environment.

There have been various discussions about this in the past, but little
motion.  You could look through the list archives a bit to see.



look also on [EMAIL PROTECTED] and [EMAIL PROTECTED] :


This is a good thread to look at:

http://gcc.gnu.org/ml/java/2006-01/msg00096.html

The I think the techniques propesed by Per Bothner in that thread are 
especially interesting.


David Daney.



[commit-cp] classpath/sun

2006-06-09 Thread Jeroen Frijters
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Jeroen Frijters jfrijters 06/06/09 06:54:11

New directory:
sun

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/sun/?cvsroot=classpath




[commit-cp] classpath/sun/reflect

2006-06-09 Thread Jeroen Frijters
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Jeroen Frijters jfrijters 06/06/09 06:57:05

New directory:
sun/reflect

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/sun/reflect/?cvsroot=classpath




[commit-cp] classpath/sun/reflect/annotation

2006-06-09 Thread Jeroen Frijters
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Jeroen Frijters jfrijters 06/06/09 06:57:21

New directory:
sun/reflect/annotation

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/sun/reflect/annotation/?cvsroot=classpath




[commit-cp] classpath ChangeLog sun/reflect/annotation/Anno...

2006-06-09 Thread Jeroen Frijters
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Jeroen Frijters jfrijters 06/06/09 06:59:21

Modified files:
.  : ChangeLog 
Added files:
sun/reflect/annotation: AnnotationInvocationHandler.java 

Log message:
2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]

* sun/reflect/annotation/AnnotationInvocationHandler.java:
New file.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7726r2=1.7727
http://cvs.savannah.gnu.org/viewcvs/classpath/sun/reflect/annotation/AnnotationInvocationHandler.java?cvsroot=classpathrev=1.1

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7726
retrieving revision 1.7727
diff -u -b -r1.7726 -r1.7727
--- ChangeLog   8 Jun 2006 23:32:13 -   1.7726
+++ ChangeLog   9 Jun 2006 06:59:20 -   1.7727
@@ -1,3 +1,8 @@
+2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]
+
+   * sun/reflect/annotation/AnnotationInvocationHandler.java:
+   New file.
+
 2006-06-08  Tom Tromey  [EMAIL PROTECTED]
 
* java/text/Bidi.java (resolveNeutralTypes): Set j'th slot

Index: sun/reflect/annotation/AnnotationInvocationHandler.java
===
RCS file: sun/reflect/annotation/AnnotationInvocationHandler.java
diff -N sun/reflect/annotation/AnnotationInvocationHandler.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ sun/reflect/annotation/AnnotationInvocationHandler.java 9 Jun 2006 
06:59:21 -   1.1
@@ -0,0 +1,340 @@
+/* sun.reflect.annotation.AnnotationInvocationHandler
+   Copyright (C) 2006
+   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 sun.reflect.annotation;
+
+import java.io.Serializable;
+import java.lang.annotation.AnnotationTypeMismatchException;
+import java.lang.annotation.IncompleteAnnotationException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This class exists for serialization compatibility with the JDK.
+ * VMs can choose to implement annotations by constructing proxies
+ * with this invocation handler, but that is not required.
+ * If a different strategy for proxy objects is chosen, they can
+ * have a writeReplace method to substitute a Proxy based on this
+ * invocation handler is used for serialization.
+ */
+public final class AnnotationInvocationHandler
+  implements InvocationHandler, Serializable
+{
+private static final long serialVersionUID = 6182022883658399397L;
+private final Class type;
+private final Map memberValues;
+
+/**
+ * Construct a new invocation handler for an annotation proxy.
+ * Note that the VM is responsible for filling the memberValues map
+ * with the default values of all the annotation members.
+ */
+public AnnotationInvocationHandler(Class type, Map memberValues)
+{
+this.type = type;
+this.memberValues = memberValues;
+}
+
+/**
+ * Compare an instance of AnnotationInvocationHandler with another object.
+   

[commit-cp] classpath ChangeLog gnu/java/awt/font/opentype/...

2006-06-09 Thread Jeroen Frijters
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Jeroen Frijters jfrijters 06/06/09 09:35:50

Modified files:
.  : ChangeLog 
gnu/java/awt/font/opentype/truetype: VirtualMachine.java 

Log message:
2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]

* gnu/java/awt/font/opentype/truetype/VirtualMachine.java
(executeInstruction): Added NOT support.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7727r2=1.7728
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java?cvsroot=classpathr1=1.1r2=1.2

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7727
retrieving revision 1.7728
diff -u -b -r1.7727 -r1.7728
--- ChangeLog   9 Jun 2006 06:59:20 -   1.7727
+++ ChangeLog   9 Jun 2006 09:35:49 -   1.7728
@@ -1,5 +1,10 @@
 2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]
 
+   * gnu/java/awt/font/opentype/truetype/VirtualMachine.java
+   (executeInstruction): Added NOT support.
+
+2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]
+
* sun/reflect/annotation/AnnotationInvocationHandler.java:
New file.
 

Index: gnu/java/awt/font/opentype/truetype/VirtualMachine.java
===
RCS file: 
/cvsroot/classpath/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnu/java/awt/font/opentype/truetype/VirtualMachine.java 30 Apr 2006 
09:45:11 -  1.1
+++ gnu/java/awt/font/opentype/truetype/VirtualMachine.java 9 Jun 2006 
09:35:50 -   1.2
@@ -1066,6 +1066,10 @@
   stack[sp] = ((e1 != 0) || (stack[sp] != 0)) ? 1 : 0;
   break;
 
+case 0x5C: // NOT
+  stack[sp] = (stack[sp] != 0) ? 0 : 1;
+  break;
+
 case 0x5e: // SDB, Set Delta Base in the graphics state
   deltaBase = stack[sp--];
   break;
@@ -1764,7 +1768,7 @@
 /* 50 */ LT, LTEQ, GT, GTEQ,
 /* 54 */ EQ, NEQ, INST_56, INST_57,
 /* 58 */ IF, EIF, AND, OR,
-/* 5c */ INST_5C, INST_5D, SDB, SDS,
+/* 5c */ NOT, INST_5D, SDB, SDS,
 /* 60 */ ADD, SUB, DIV, MUL,
 /* 64 */ ABS, NEG, FLOOR, CEILING,
 /* 68 */ ROUND[0], ROUND[1], ROUND[2], ROUND[3],




[commit-cp] classpath ChangeLog javax/swing/plaf/basic/Basi...

2006-06-09 Thread David Gilbert
CVSROOT:/sources/classpath
Module name:classpath
Changes by: David Gilbert trebligd06/06/09 09:58:36

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicScrollPaneUI.java 

Log message:
2006-06-09  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicScrollPaneUI.java
(getActionMap): Use correct key to store action map.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7728r2=1.7729
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java?cvsroot=classpathr1=1.26r2=1.27

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7728
retrieving revision 1.7729
diff -u -b -r1.7728 -r1.7729
--- ChangeLog   9 Jun 2006 09:35:49 -   1.7728
+++ ChangeLog   9 Jun 2006 09:58:35 -   1.7729
@@ -1,3 +1,8 @@
+2006-06-09  David Gilbert  [EMAIL PROTECTED]
+
+   * javax/swing/plaf/basic/BasicScrollPaneUI.java
+   (getActionMap): Use correct key to store action map.
+
 2006-06-09  Jeroen Frijters  [EMAIL PROTECTED]
 
* gnu/java/awt/font/opentype/truetype/VirtualMachine.java

Index: javax/swing/plaf/basic/BasicScrollPaneUI.java
===
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- javax/swing/plaf/basic/BasicScrollPaneUI.java   8 Jun 2006 10:52:51 
-   1.26
+++ javax/swing/plaf/basic/BasicScrollPaneUI.java   9 Jun 2006 09:58:36 
-   1.27
@@ -516,7 +516,7 @@
   {
 map = createActionMap();
 if (map != null)
-  UIManager.put(Slider.actionMap, map);
+  UIManager.put(ScrollPane.actionMap, map);
   }
 return map;
   }




[commit-cp] classpath ChangeLog javax/swing/plaf/basic/Basi...

2006-06-09 Thread David Gilbert
CVSROOT:/sources/classpath
Module name:classpath
Changes by: David Gilbert trebligd06/06/09 11:17:09

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicLookAndFeel.java 
BasicScrollBarUI.java 

Log message:
2006-06-09  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicLookAndFeel.java
(initComponentDefaults): Corrected 'ScrollBar.focusInputMap' 
entry,
* javax/swing/plaf/basic/BasicScrollBarUI.java
(installKeyboardActions): Implemented,
(uninstallKeyboardActions): Implemented,
(getInputMap): New method,
(getActionMap): New method,
(createActionMap): New method,
(installUI): Call installKeyboardActions(),
(uninstallUI): Call uninstallKeyboardActions().

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7729r2=1.7730
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java?cvsroot=classpathr1=1.91r2=1.92
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java?cvsroot=classpathr1=1.33r2=1.34

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7729
retrieving revision 1.7730
diff -u -b -r1.7729 -r1.7730
--- ChangeLog   9 Jun 2006 09:58:35 -   1.7729
+++ ChangeLog   9 Jun 2006 11:17:08 -   1.7730
@@ -1,5 +1,18 @@
 2006-06-09  David Gilbert  [EMAIL PROTECTED]
 
+   * javax/swing/plaf/basic/BasicLookAndFeel.java
+   (initComponentDefaults): Corrected 'ScrollBar.focusInputMap' entry,
+   * javax/swing/plaf/basic/BasicScrollBarUI.java
+   (installKeyboardActions): Implemented,
+   (uninstallKeyboardActions): Implemented,
+   (getInputMap): New method,
+   (getActionMap): New method,
+   (createActionMap): New method,
+   (installUI): Call installKeyboardActions(),
+   (uninstallUI): Call uninstallKeyboardActions().
+   
+2006-06-09  David Gilbert  [EMAIL PROTECTED]
+
* javax/swing/plaf/basic/BasicScrollPaneUI.java
(getActionMap): Use correct key to store action map.
 

Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- javax/swing/plaf/basic/BasicLookAndFeel.java6 Jun 2006 15:12:10 
-   1.91
+++ javax/swing/plaf/basic/BasicLookAndFeel.java9 Jun 2006 11:17:09 
-   1.92
@@ -1069,14 +1069,14 @@
 PAGE_DOWN, positiveBlockIncrement,
 END,  maxScroll,
 HOME,  minScroll,
-LEFT,  positiveUnitIncrement,
+LEFT,  negativeUnitIncrement,
 KP_UP, negativeUnitIncrement,
 KP_DOWN, positiveUnitIncrement,
 UP,  negativeUnitIncrement,
-RIGHT, negativeUnitIncrement,
-KP_LEFT, positiveUnitIncrement,
+RIGHT, positiveUnitIncrement,
+KP_LEFT, negativeUnitIncrement,
 DOWN,  positiveUnitIncrement,
-KP_RIGHT, negativeUnitIncrement
+KP_RIGHT, positiveUnitIncrement
   }),
   ScrollBar.foreground, new ColorUIResource(light),
   ScrollBar.maximumThumbSize, new DimensionUIResource(4096, 4096),

Index: javax/swing/plaf/basic/BasicScrollBarUI.java
===
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- javax/swing/plaf/basic/BasicScrollBarUI.java17 Apr 2006 07:41:05 
-  1.33
+++ javax/swing/plaf/basic/BasicScrollBarUI.java9 Jun 2006 11:17:09 
-   1.34
@@ -1,5 +1,5 @@
 /* BasicScrollBarUI.java --
-   Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006,  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -38,8 +38,6 @@
 
 package javax.swing.plaf.basic;
 
-import gnu.classpath.NotImplementedException;
-
 import java.awt.Color;
 import java.awt.Component;
 import java.awt.Container;
@@ -56,10 +54,14 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 
+import javax.swing.AbstractAction;
+import javax.swing.ActionMap;
 import javax.swing.BoundedRangeModel;
+import javax.swing.InputMap;
 import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JScrollBar;
+import javax.swing.JSlider;
 import javax.swing.LookAndFeel;
 import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
@@ -67,6 +69,7 @@
 import javax.swing.UIManager;
 import 

[commit-cp] classpath/gnu/javax/crypto/pad BasePad.java Cha...

2006-06-09 Thread Raif S. Naffah
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Raif S. Naffah raif   06/06/09 11:28:47

Modified files:
gnu/javax/crypto/pad: BasePad.java 
.  : ChangeLog 

Log message:
2006-06-09  Raif S. Naffah  [EMAIL PROTECTED]

* gnu/javax/crypto/pad/BasePad.java (selfTest): Re-factored to 
allow more
flexible self-test by sub-classes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/javax/crypto/pad/BasePad.java?cvsroot=classpathr1=1.1r2=1.2
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7730r2=1.7731

Patches:

Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7730
retrieving revision 1.7731
diff -u -b -r1.7730 -r1.7731
--- ChangeLog   9 Jun 2006 11:17:08 -   1.7730
+++ ChangeLog   9 Jun 2006 11:28:47 -   1.7731
@@ -1,3 +1,8 @@
+2006-06-09  Raif S. Naffah  [EMAIL PROTECTED]
+
+   * gnu/javax/crypto/pad/BasePad.java (selfTest): Re-factored to allow 
more
+   flexible self-test by sub-classes.
+
 2006-06-09  David Gilbert  [EMAIL PROTECTED]
 
* javax/swing/plaf/basic/BasicLookAndFeel.java




[commit-cp] classpath ChangeLog

2006-06-09 Thread Raif S. Naffah
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Raif S. Naffah raif   06/06/09 11:30:42

Modified files:
.  : ChangeLog 

Log message:
2006-06-09  Raif S. Naffah  [EMAIL PROTECTED]

* gnu/javax/crypto/pad/BasePad.java (selfTest): Re-factored to 
allow more
flexible self-test by sub-classes.
(test1BlockSize): New method.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7731r2=1.7732

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7731
retrieving revision 1.7732
diff -u -b -r1.7731 -r1.7732
--- ChangeLog   9 Jun 2006 11:28:47 -   1.7731
+++ ChangeLog   9 Jun 2006 11:30:41 -   1.7732
@@ -2,6 +2,7 @@
 
* gnu/javax/crypto/pad/BasePad.java (selfTest): Re-factored to allow 
more
flexible self-test by sub-classes.
+   (test1BlockSize): New method.
 
 2006-06-09  David Gilbert  [EMAIL PROTECTED]
 




[commit-cp] classpath ChangeLog javax/swing/plaf/basic/Basi...

2006-06-09 Thread Lillian Angel
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Lillian Angel langel  06/06/09 14:08:39

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicComboBoxRenderer.java 

Log message:
2006-06-09  Francis Kung  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicComboBoxRenderer.java:
(getPreferredSize): Return correct height for null or empty
items.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7735r2=1.7736
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java?cvsroot=classpathr1=1.9r2=1.10

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7735
retrieving revision 1.7736
diff -u -b -r1.7735 -r1.7736
--- ChangeLog   9 Jun 2006 13:09:14 -   1.7735
+++ ChangeLog   9 Jun 2006 14:08:38 -   1.7736
@@ -1,3 +1,9 @@
+2006-06-09  Francis Kung  [EMAIL PROTECTED]
+
+   * javax/swing/plaf/basic/BasicComboBoxRenderer.java:
+   (getPreferredSize): Return correct height for null or empty 
+   items.
+
 2006-06-09  David Gilbert  [EMAIL PROTECTED]
 
* java/awt/datatransfer/DataFlavor.java

Index: javax/swing/plaf/basic/BasicComboBoxRenderer.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- javax/swing/plaf/basic/BasicComboBoxRenderer.java   17 Mar 2006 15:18:24 
-  1.9
+++ javax/swing/plaf/basic/BasicComboBoxRenderer.java   9 Jun 2006 14:08:39 
-   1.10
@@ -80,7 +80,19 @@
*/
   public Dimension getPreferredSize()
   {
+if (this.getText() != null  ! this.getText().equals())
 return super.getPreferredSize();
+else
+  {
+// If the combo box option's text is empty or null, it won't size
+// properly (ie, it'll be way too short)... so we throw in a dummy
+// space to trick the superclass's sizing methods.
+String oldText = this.getText();
+this.setText( );
+Dimension d = super.getPreferredSize();
+this.setText(oldText);
+return d;
+  }
   }
 
   /**




[commit-cp] classpath ChangeLog native/plugin/gcjwebplugin.cc

2006-06-09 Thread Thomas Fitzsimmons
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Thomas Fitzsimmons fitzsim06/06/09 14:53:34

Modified files:
.  : ChangeLog 
native/plugin  : gcjwebplugin.cc 

Log message:
2006-06-09  Thomas Fitzsimmons  [EMAIL PROTECTED]

* native/plugin/gcjwebplugin.cc (PLUGIN_ERROR_THREE): New macro.
(NP_Initialize): Use PLUGIN_ERROR_THREE in place of g_strconcat.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7736r2=1.7737
http://cvs.savannah.gnu.org/viewcvs/classpath/native/plugin/gcjwebplugin.cc?cvsroot=classpathr1=1.10r2=1.11

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7736
retrieving revision 1.7737
diff -u -b -r1.7736 -r1.7737
--- ChangeLog   9 Jun 2006 14:08:38 -   1.7736
+++ ChangeLog   9 Jun 2006 14:53:33 -   1.7737
@@ -1,3 +1,8 @@
+2006-06-09  Thomas Fitzsimmons  [EMAIL PROTECTED]
+
+   * native/plugin/gcjwebplugin.cc (PLUGIN_ERROR_THREE): New macro.
+   (NP_Initialize): Use PLUGIN_ERROR_THREE in place of g_strconcat.
+
 2006-06-09  Francis Kung  [EMAIL PROTECTED]
 
* javax/swing/plaf/basic/BasicComboBoxRenderer.java:

Index: native/plugin/gcjwebplugin.cc
===
RCS file: /sources/classpath/classpath/native/plugin/gcjwebplugin.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- native/plugin/gcjwebplugin.cc   8 Jun 2006 21:49:11 -   1.10
+++ native/plugin/gcjwebplugin.cc   9 Jun 2006 14:53:34 -   1.11
@@ -79,6 +79,10 @@
   g_printerr (%s:%d: thread %p: Error: %s: %s\n, __FILE__, __LINE__,  \
   g_thread_self (), first, second)
 
+#define PLUGIN_ERROR_THREE(first, second, third)\
+  g_printerr (%s:%d: thread %p: Error: %s: %s: %s\n, __FILE__,\
+  __LINE__, g_thread_self (), first, second, third)
+
 // Plugin information passed to about:plugins.
 #define PLUGIN_NAME GCJ Web Browser Plugin
 #define PLUGIN_DESC The  PLUGIN_NAME  executes Java applets.
@@ -1621,8 +1625,8 @@
   file_error = g_mkdir (data_directory, 0700);
   if (file_error != 0)
 {
-  PLUGIN_ERROR_TWO (g_strconcat(Failed to create data directory , 
-data_directory, NULL),
+  PLUGIN_ERROR_THREE (Failed to create data directory,
+  data_directory,
 strerror (errno));
   return NPERR_GENERIC_ERROR;
 }
@@ -1635,15 +1639,15 @@
 {
   if (channel_error)
 {
-  PLUGIN_ERROR_TWO (g_strconcat(Failed to open whitelist file ,
-whitelist_filename, NULL),
+  PLUGIN_ERROR_THREE (Failed to open whitelist file,
+  whitelist_filename,
 channel_error-message);
   g_error_free (channel_error);
   channel_error = NULL;
 }
   else
-PLUGIN_ERROR (g_strconcat(Failed to open whitelist file ,
-  whitelist_filename, NULL));
+PLUGIN_ERROR_TWO (Failed to open whitelist file,
+  whitelist_filename);
   
   return NPERR_GENERIC_ERROR;
 }




[commit-cp] classpath ChangeLog java/awt/image/BufferedImag...

2006-06-09 Thread David Gilbert
CVSROOT:/sources/classpath
Module name:classpath
Changes by: David Gilbert trebligd06/06/09 15:00:57

Modified files:
.  : ChangeLog 
java/awt/image : BufferedImage.java 

Log message:
2006-06-09  David Gilbert  [EMAIL PROTECTED]

* java/awt/image/BufferedImage.java
(BufferedImage(int, int, int)): Added API docs,
(getProperty(String)): Return correct value for undefined 
properties,
(getPropertyNames()): Added comments and removed FIXME.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7737r2=1.7738
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/image/BufferedImage.java?cvsroot=classpathr1=1.14r2=1.15

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7737
retrieving revision 1.7738
diff -u -b -r1.7737 -r1.7738
--- ChangeLog   9 Jun 2006 14:53:33 -   1.7737
+++ ChangeLog   9 Jun 2006 15:00:56 -   1.7738
@@ -1,3 +1,10 @@
+2006-06-09  David Gilbert  [EMAIL PROTECTED]
+
+   * java/awt/image/BufferedImage.java
+   (BufferedImage(int, int, int)): Added API docs,
+   (getProperty(String)): Return correct value for undefined properties,
+   (getPropertyNames()): Added comments and removed FIXME.
+
 2006-06-09  Thomas Fitzsimmons  [EMAIL PROTECTED]
 
* native/plugin/gcjwebplugin.cc (PLUGIN_ERROR_THREE): New macro.

Index: java/awt/image/BufferedImage.java
===
RCS file: /sources/classpath/classpath/java/awt/image/BufferedImage.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- java/awt/image/BufferedImage.java   6 Jun 2006 07:53:41 -   1.14
+++ java/awt/image/BufferedImage.java   9 Jun 2006 15:00:57 -   1.15
@@ -1,5 +1,5 @@
 /* BufferedImage.java --
-   Copyright (C) 2000, 2002, 2003, 2004, 2005  Free Software Foundation
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006,  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -99,6 +99,13 @@
 
   Vector observers;
   
+  /**
+   * Creates a new buffered image.
+   * 
+   * @param w  the width.
+   * @param h  the height.
+   * @param type  the image type (see the constants defined by this class).
+   */
   public BufferedImage(int w, int h, int type)
   {
 ColorModel cm = null;
@@ -363,11 +370,28 @@
return 1;
   }
 
+  /**
+   * Returns the value of the specified property, or 
+   * [EMAIL PROTECTED] Image#UndefinedProperty} if the property is not defined.
+   * 
+   * @param string  the property key (codenull/code not permitted).
+   * 
+   * @return The property value.
+   * 
+   * @throws NullPointerException if codestring/code is codenull/code.
+   */
   public Object getProperty(String string)
   {
-if (properties == null)
-  return null;
-return properties.get(string);
+if (string == null)
+  throw new NullPointerException(The property name cannot be null.);
+Object result = Image.UndefinedProperty;
+if (properties != null)
+  {
+Object v = properties.get(string);
+if (v != null)
+  result = v;
+  }
+return result;
   }
 
   public Object getProperty(String string, ImageObserver imageobserver)
@@ -375,10 +399,15 @@
 return getProperty(string);
   }
 
-  
+  /**
+   * Returns codenull/code always.
+   * 
+   * @return codenull/code always.
+   */
   public String[] getPropertyNames()
   {
-// FIXME: implement
+// This method should always return null, see:
+// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4640609
 return null;
   }
 




[commit-cp] classpath/gnu/java/awt/peer/gtk CairoGraphics2D...

2006-06-09 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Roman Kennke rabbit78 06/06/09 16:04:21

Modified files:
gnu/java/awt/peer/gtk: CairoGraphics2D.java 
.  : ChangeLog 

Log message:
2006-06-08  Roman Kennke  [EMAIL PROTECTED]

* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(drawGlyphVector): Added fallback for non-FreetypeGlyphVector
implementations.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpathr1=1.15r2=1.16
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7738r2=1.7739

Patches:

Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7738
retrieving revision 1.7739
diff -u -b -r1.7738 -r1.7739
--- ChangeLog   9 Jun 2006 15:00:56 -   1.7738
+++ ChangeLog   9 Jun 2006 16:04:21 -   1.7739
@@ -1,3 +1,9 @@
+2006-06-08  Roman Kennke  [EMAIL PROTECTED]
+
+   * gnu/java/awt/peer/gtk/CairoGraphics2D.java
+   (drawGlyphVector): Added fallback for non-FreetypeGlyphVector
+   implementations.
+
 2006-06-09  David Gilbert  [EMAIL PROTECTED]
 
* java/awt/image/BufferedImage.java




[commit-cp] classpath ChangeLog native/fdlibm/dtoa.c native...

2006-06-09 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey tromey 06/06/09 16:16:35

Modified files:
.  : ChangeLog 
native/fdlibm  : dtoa.c mprec.c mprec.h 

Log message:
PR classpath/23863:
* native/fdlibm/dtoa.c (_dtoa): Free contents of _Jv_reent when
finished.
* native/fdlibm/mprec.c: New version from newlib.  Commented out
some includes.  Added assert.h.
(_reent, _Bigint): New defines.
(_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S): Likewise.
(__ULong, __Long): New types.
(_calloc_r): New function.
(Balloc): Dynamically add new _freelist entries as needed.
* native/fdlibm/mprec.h (struct _Jv_Bigint): Don't use
MAX_BIGNUMS to size _x[].
(struct _Jv_reent): _freelist now a _Jv_Bigint**.  Removed
_allocation_map, num.  Added _max_k.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7739r2=1.7740
http://cvs.savannah.gnu.org/viewcvs/classpath/native/fdlibm/dtoa.c?cvsroot=classpathr1=1.4r2=1.5
http://cvs.savannah.gnu.org/viewcvs/classpath/native/fdlibm/mprec.c?cvsroot=classpathr1=1.7r2=1.8
http://cvs.savannah.gnu.org/viewcvs/classpath/native/fdlibm/mprec.h?cvsroot=classpathr1=1.8r2=1.9

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7739
retrieving revision 1.7740
diff -u -b -r1.7739 -r1.7740
--- ChangeLog   9 Jun 2006 16:04:21 -   1.7739
+++ ChangeLog   9 Jun 2006 16:16:34 -   1.7740
@@ -1,3 +1,20 @@
+2006-06-09  Tom Tromey  [EMAIL PROTECTED]
+
+   PR classpath/23863:
+   * native/fdlibm/dtoa.c (_dtoa): Free contents of _Jv_reent when
+   finished.
+   * native/fdlibm/mprec.c: New version from newlib.  Commented out
+   some includes.  Added assert.h.
+   (_reent, _Bigint): New defines.
+   (_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S): Likewise.
+   (__ULong, __Long): New types.
+   (_calloc_r): New function.
+   (Balloc): Dynamically add new _freelist entries as needed.
+   * native/fdlibm/mprec.h (struct _Jv_Bigint): Don't use
+   MAX_BIGNUMS to size _x[].
+   (struct _Jv_reent): _freelist now a _Jv_Bigint**.  Removed
+   _allocation_map, num.  Added _max_k.
+
 2006-06-08  Roman Kennke  [EMAIL PROTECTED]
 
* gnu/java/awt/peer/gtk/CairoGraphics2D.java

Index: native/fdlibm/dtoa.c
===
RCS file: /cvsroot/classpath/classpath/native/fdlibm/dtoa.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- native/fdlibm/dtoa.c5 Mar 2005 14:46:53 -   1.4
+++ native/fdlibm/dtoa.c9 Jun 2006 16:16:35 -   1.5
@@ -2,7 +2,7 @@
  *
  * The author of this software is David M. Gay.
  *
- * Copyright (c) 1991 by ATT.
+ * Copyright (c) 1991, 2006 by ATT.
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose without fee is hereby granted, provided that this entire notice
@@ -897,10 +897,23 @@
 {
   struct _Jv_reent reent;
   char *p;
+  int i;
+
   memset (reent, 0, sizeof reent);
 
   p = _dtoa_r (reent, _d, mode, ndigits, decpt, sign, rve, float_type);
   strcpy (buf, p);
 
-  return;
+  for (i = 0; i  reent._result_k; ++i)
+{
+  struct _Jv_Bigint *l = reent._freelist[i];
+  while (l)
+   {
+ struct _Jv_Bigint *next = l-_next;
+ free (l);
+ l = next;
+   }
+}
+  if (reent._freelist)
+free (reent._freelist);
 }

Index: native/fdlibm/mprec.c
===
RCS file: /cvsroot/classpath/classpath/native/fdlibm/mprec.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- native/fdlibm/mprec.c   12 Jan 2006 09:26:49 -  1.7
+++ native/fdlibm/mprec.c   9 Jun 2006 16:16:35 -   1.8
@@ -80,72 +80,112 @@
  * down depends on the machine and the number being converted.
  */
 
+/*#include _ansi.h*/
 #include assert.h
 #include stdlib.h
 #include string.h
+/* #include reent.h */
 #include mprec.h
 
 /* reent.c knows this value */
-#define _Kmax 15
-#include stdio.h
+/* #define _Kmax 15 */
 
-_Jv_Bigint *
-_DEFUN (Balloc, (ptr, k), struct _Jv_reent *ptr _AND int k)
-{
-  _Jv_Bigint *rv = NULL;
+#define _reent _Jv_reent
+#define _Bigint _Jv_Bigint
 
-  int i = 0;
-  int j = 1;
+#define _REENT_CHECK_MP(x)
+#define _REENT_MP_FREELIST(x) ((x)-_freelist)
+#define _REENT_MP_P5S(x) ((x)-_p5s)
 
-  /* FIXME - assert disabled because of PR classpath/23863
-   * assert ((1  k)  MAX_BIGNUM_WDS);
-   */
+typedef unsigned long __ULong;
+typedef long __Long;
 
-  while ((ptr-_allocation_map  j)  i  MAX_BIGNUMS)
-

[commit-cp] classpath ChangeLog gnu/javax/security/auth/log...

2006-06-09 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey tromey 06/06/09 16:41:14

Modified files:
.  : ChangeLog 
gnu/javax/security/auth/login: ConfigFileParser.java 

Log message:
PR classpath/27966:
* gnu/javax/security/auth/login/ConfigFileParser.java
(validateClassName): Quote '.' in regexp.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7740r2=1.7741
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/javax/security/auth/login/ConfigFileParser.java?cvsroot=classpathr1=1.1r2=1.2

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7740
retrieving revision 1.7741
diff -u -b -r1.7740 -r1.7741
--- ChangeLog   9 Jun 2006 16:16:34 -   1.7740
+++ ChangeLog   9 Jun 2006 16:41:14 -   1.7741
@@ -1,3 +1,9 @@
+2006-06-09  Kazuya Ujihara  [EMAIL PROTECTED]
+
+   PR classpath/27966:
+   * gnu/javax/security/auth/login/ConfigFileParser.java
+   (validateClassName): Quote '.' in regexp.
+
 2006-06-09  Tom Tromey  [EMAIL PROTECTED]
 
PR classpath/23863:

Index: gnu/javax/security/auth/login/ConfigFileParser.java
===
RCS file: 
/cvsroot/classpath/classpath/gnu/javax/security/auth/login/ConfigFileParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnu/javax/security/auth/login/ConfigFileParser.java 15 Jan 2006 19:42:53 
-  1.1
+++ gnu/javax/security/auth/login/ConfigFileParser.java 9 Jun 2006 16:41:14 
-   1.2
@@ -264,7 +264,7 @@
 if (cn.startsWith(.) || cn.endsWith(.))
   abort(MODULE_CLASS MUST NOT start or end with a '.');
 
-String[] tokens = cn.split(.);
+String[] tokens = cn.split(\\.);
 for (int i = 0; i  tokens.length; i++)
   {
 String t = tokens[i];




[commit-cp] classpath ChangeLog tools/.cvsignore

2006-06-09 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey tromey 06/06/09 16:44:55

Modified files:
.  : ChangeLog 
tools  : .cvsignore 

Log message:
* tools/.cvsignore: Added .deps.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7741r2=1.7742
http://cvs.savannah.gnu.org/viewcvs/classpath/tools/.cvsignore?cvsroot=classpathr1=1.7r2=1.8

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7741
retrieving revision 1.7742
diff -u -b -r1.7741 -r1.7742
--- ChangeLog   9 Jun 2006 16:41:14 -   1.7741
+++ ChangeLog   9 Jun 2006 16:44:55 -   1.7742
@@ -1,3 +1,7 @@
+2006-06-09  Tom Tromey  [EMAIL PROTECTED]
+
+   * tools/.cvsignore: Added .deps.
+
 2006-06-09  Kazuya Ujihara  [EMAIL PROTECTED]
 
PR classpath/27966:

Index: tools/.cvsignore
===
RCS file: /cvsroot/classpath/classpath/tools/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- tools/.cvsignore9 May 2006 19:38:42 -   1.7
+++ tools/.cvsignore9 Jun 2006 16:44:55 -   1.8
@@ -4,3 +4,4 @@
 Makefile
 tools.zip
 appletviewer
+.deps




[commit-cp] classpath ChangeLog gnu/java/awt/peer/gtk/Freet...

2006-06-09 Thread Sven de Marothy
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Sven de Marothy smarothy  06/06/09 20:23:55

Modified files:
.  : ChangeLog 
gnu/java/awt/peer/gtk: FreetypeGlyphVector.java GdkFontPeer.java 
java/awt/font  : TextLayout.java 
java/text  : Bidi.java 

Log message:
2006-06-08  Sven de Marothy  [EMAIL PROTECTED]

* java/text/Bidi.java: Treat WS as neutral for rules N1  N2.
* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
New constructor for bidirectionality.
(getGlyphMetrics): Return whitespace glyphs.
(getLogicalBounds): Offset rectangles to correct positions.
* gnu/java/awt/peer/gtk/GdkFontPeer.java
(getBaselineFor): Default to ROMAN_BASELINE.
(GdkFontLineMetrics): Guess some values for underline and 
strikethrough.
(layoutGlyphVector): Use bidirectionality.
* java/awt/font/TextLayout.java: Implement, mostly.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7743r2=1.7744
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java?cvsroot=classpathr1=1.3r2=1.4
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java?cvsroot=classpathr1=1.15r2=1.16
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/font/TextLayout.java?cvsroot=classpathr1=1.7r2=1.8
http://cvs.savannah.gnu.org/viewcvs/classpath/java/text/Bidi.java?cvsroot=classpathr1=1.5r2=1.6

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7743
retrieving revision 1.7744
diff -u -b -r1.7743 -r1.7744
--- ChangeLog   9 Jun 2006 17:02:31 -   1.7743
+++ ChangeLog   9 Jun 2006 20:23:54 -   1.7744
@@ -1,3 +1,17 @@
+2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
+
+   * java/text/Bidi.java: Treat WS as neutral for rules N1  N2.
+   * gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
+   New constructor for bidirectionality.
+   (getGlyphMetrics): Return whitespace glyphs.
+   (getLogicalBounds): Offset rectangles to correct positions.
+   * gnu/java/awt/peer/gtk/GdkFontPeer.java
+   (getBaselineFor): Default to ROMAN_BASELINE.
+   (GdkFontLineMetrics): Guess some values for underline and 
+   strikethrough.
+   (layoutGlyphVector): Use bidirectionality.
+   * java/awt/font/TextLayout.java: Implement, mostly.
+   
 2006-06-09  Anthony Green  [EMAIL PROTECTED]
 
PR classpath/27888:

Index: gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
===
RCS file: 
/sources/classpath/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- gnu/java/awt/peer/gtk/FreetypeGlyphVector.java  7 Jun 2006 23:48:05 
-   1.3
+++ gnu/java/awt/peer/gtk/FreetypeGlyphVector.java  9 Jun 2006 20:23:55 
-   1.4
@@ -82,10 +82,25 @@
   private AffineTransform[] glyphTransforms;
 
   /**
+   * Keep track of which glyphs are whitespace, since we don't have
+   * reporting from the peers yet. TextLayout needs this for justification.
+   */
+  private boolean[] whiteSpace;
+
+  /**
* Create a glyphvector from a given (Freetype) font and a String.
*/
   public FreetypeGlyphVector(Font f, String s, FontRenderContext frc)
   {
+this(f, s, frc, Font.LAYOUT_LEFT_TO_RIGHT);
+  }
+
+  /**
+   * Create a glyphvector from a given (Freetype) font and a String.
+   */
+  public FreetypeGlyphVector(Font f, String s, FontRenderContext frc,
+int flags)
+  {
 this.s = s;
 this.font = f;
 this.frc = frc;
@@ -94,6 +109,14 @@
 peer = (GdkFontPeer)font.getPeer();
 
 getGlyphs();
+if( flags == Font.LAYOUT_RIGHT_TO_LEFT )
+  {
+   // reverse the glyph ordering.
+   int[] temp = new int[ nGlyphs ];
+   for(int i = 0; i  nGlyphs; i++)
+ temp[ i ] = glyphCodes[ nGlyphs - i - 1];
+   glyphCodes = temp;
+  }
 performDefaultLayout();
   }
 
@@ -180,10 +203,12 @@
*/
   public void performDefaultLayout()
   {
+whiteSpace = new boolean[ nGlyphs ]; 
 glyphTransforms = new AffineTransform[ nGlyphs ]; 
 double x = 0;
 for(int i = 0; i  nGlyphs; i++)
   {
+   whiteSpace[i] = Character.isWhitespace( glyphCodes[ i ] );
GlyphMetrics gm = getGlyphMetrics( i );
Rectangle2D r = gm.getBounds2D();
glyphTransforms[ i ] = AffineTransform.getTranslateInstance(x, 0);
@@ -237,17 +262,20 @@
 
   /**
* Returns the metrics of a single glyph.
+   * FIXME: Not all glyph types are supported.
*/
   public GlyphMetrics getGlyphMetrics(int glyphIndex)
   {
 double[] val = 

[commit-cp] classpath ChangeLog gnu/java/awt/peer/gtk/Cairo...

2006-06-09 Thread Sven de Marothy
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Sven de Marothy smarothy  06/06/09 20:40:59

Modified files:
.  : ChangeLog 
gnu/java/awt/peer/gtk: CairoGraphics2D.java 

Log message:
2006-06-08  Sven de Marothy  [EMAIL PROTECTED]

* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(drawString): Use TextLayout instead of GlyphVector.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7744r2=1.7745
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpathr1=1.16r2=1.17

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7744
retrieving revision 1.7745
diff -u -b -r1.7744 -r1.7745
--- ChangeLog   9 Jun 2006 20:23:54 -   1.7744
+++ ChangeLog   9 Jun 2006 20:40:58 -   1.7745
@@ -1,5 +1,10 @@
 2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
 
+   * gnu/java/awt/peer/gtk/CairoGraphics2D.java
+   (drawString): Use TextLayout instead of GlyphVector.
+
+2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
+
* java/text/Bidi.java: Treat WS as neutral for rules N1  N2.
* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
New constructor for bidirectionality.

Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java
===
RCS file: 
/sources/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- gnu/java/awt/peer/gtk/CairoGraphics2D.java  9 Jun 2006 16:04:20 -   
1.16
+++ gnu/java/awt/peer/gtk/CairoGraphics2D.java  9 Jun 2006 20:40:59 -   
1.17
@@ -63,6 +63,7 @@
 import java.awt.Toolkit;
 import java.awt.font.FontRenderContext;
 import java.awt.font.GlyphVector;
+import java.awt.font.TextLayout;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Arc2D;
 import java.awt.geom.Area;
@@ -1271,8 +1272,8 @@
   {
 if (str == null || str.length() == 0)
   return;
-
-drawGlyphVector(getFont().createGlyphVector(null, str), x, y);
+(new TextLayout( str, getFont(), getFontRenderContext() )).
+  draw(this, x, y);
   }
 
   public void drawString(String str, int x, int y)




[commit-cp] classpath ChangeLog java/awt/font/TextLayout.java

2006-06-09 Thread Sven de Marothy
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Sven de Marothy smarothy  06/06/09 20:48:02

Modified files:
.  : ChangeLog 
java/awt/font  : TextLayout.java 

Log message:
2006-06-08  Sven de Marothy  [EMAIL PROTECTED]

* java/awt/font/TextLayout.java
(getOutline): Allow null transform.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7745r2=1.7746
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/font/TextLayout.java?cvsroot=classpathr1=1.8r2=1.9

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7745
retrieving revision 1.7746
diff -u -b -r1.7745 -r1.7746
--- ChangeLog   9 Jun 2006 20:40:58 -   1.7745
+++ ChangeLog   9 Jun 2006 20:48:01 -   1.7746
@@ -1,5 +1,10 @@
 2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
 
+   * java/awt/font/TextLayout.java
+   (getOutline): Allow null transform.
+
+2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
+
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(drawString): Use TextLayout instead of GlyphVector.
 

Index: java/awt/font/TextLayout.java
===
RCS file: /sources/classpath/classpath/java/awt/font/TextLayout.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- java/awt/font/TextLayout.java   9 Jun 2006 20:23:55 -   1.8
+++ java/awt/font/TextLayout.java   9 Jun 2006 20:48:02 -   1.9
@@ -477,6 +477,7 @@
Rectangle2D r = runs[i].getLogicalBounds();
x += r.getWidth();
   }
+if( tx != null )
 gp.transform( tx );
 return gp;
   }




[commit-cp] classpath ChangeLog gnu/java/awt/java2d/Abstrac...

2006-06-09 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Roman Kennke rabbit78 06/06/09 20:49:51

Modified files:
.  : ChangeLog 
gnu/java/awt/java2d: AbstractGraphics2D.java PolyEdge.java 

Log message:
2006-06-09  Roman Kennke  [EMAIL PROTECTED]

* gnu/java/awt/java2d/AbstractGraphics2D.java
(drawImage): Fixed scaling.
(fillShape): Removed offset handling.
(fillShapeImpl): Limit scanlining to device bounds.
(getSegments): Removed offset handling.
* gnu/java/awt/java2d/PolyEdge.java
(toString): Include isClip flag in output.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7746r2=1.7747
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java?cvsroot=classpathr1=1.8r2=1.9
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/java2d/PolyEdge.java?cvsroot=classpathr1=1.2r2=1.3

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7746
retrieving revision 1.7747
diff -u -b -r1.7746 -r1.7747
--- ChangeLog   9 Jun 2006 20:48:01 -   1.7746
+++ ChangeLog   9 Jun 2006 20:49:50 -   1.7747
@@ -1,4 +1,14 @@
-2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
+2006-06-09  Roman Kennke  [EMAIL PROTECTED]
+
+   * gnu/java/awt/java2d/AbstractGraphics2D.java
+   (drawImage): Fixed scaling.
+   (fillShape): Removed offset handling.
+   (fillShapeImpl): Limit scanlining to device bounds.
+   (getSegments): Removed offset handling.
+   * gnu/java/awt/java2d/PolyEdge.java
+   (toString): Include isClip flag in output.
+
+2006-06-09  Sven de Marothy  [EMAIL PROTECTED]
 
* java/awt/font/TextLayout.java
(getOutline): Allow null transform.
@@ -56,7 +66,7 @@
(struct _Jv_reent): _freelist now a _Jv_Bigint**.  Removed
_allocation_map, num.  Added _max_k.
 
-2006-06-08  Roman Kennke  [EMAIL PROTECTED]
+2006-06-09  Roman Kennke  [EMAIL PROTECTED]
 
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(drawGlyphVector): Added fallback for non-FreetypeGlyphVector

Index: gnu/java/awt/java2d/AbstractGraphics2D.java
===
RCS file: 
/cvsroot/classpath/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gnu/java/awt/java2d/AbstractGraphics2D.java 19 May 2006 22:23:01 -  
1.8
+++ gnu/java/awt/java2d/AbstractGraphics2D.java 9 Jun 2006 20:49:51 -   
1.9
@@ -1331,8 +1331,8 @@
   {
 AffineTransform t = new AffineTransform();
 t.translate(x, y);
-double scaleX = (double) image.getWidth(observer) / (double) width;
-double scaleY = (double) image.getHeight(observer) / (double) height;
+double scaleX = (double) width / (double) image.getWidth(observer);
+double scaleY =  (double) height / (double) image.getHeight(observer);
 t.scale(scaleX, scaleY);
 return drawImage(image, t, observer);
   }
@@ -1473,15 +1473,11 @@
 antialias = (v == RenderingHints.VALUE_ANTIALIAS_ON);
   }
 
-double offs = 0.5;
-if (antialias)
-  offs = offs / AA_SAMPLING;
-
 Rectangle2D userBounds = s.getBounds2D();
 Rectangle2D deviceBounds = new Rectangle2D.Double();
-ArrayList segs = getSegments(s, transform, deviceBounds, false, offs);
+ArrayList segs = getSegments(s, transform, deviceBounds, false);
 Rectangle2D clipBounds = new Rectangle2D.Double();
-ArrayList clipSegs = getSegments(clip, transform, clipBounds, true, offs);
+ArrayList clipSegs = getSegments(clip, transform, clipBounds, true);
 segs.addAll(clipSegs);
 Rectangle2D inclClipBounds = new Rectangle2D.Double();
 Rectangle2D.union(clipBounds, deviceBounds, inclClipBounds);
@@ -1676,7 +1672,10 @@
 
 // Scan all relevant lines.
 int minYInt = (int) Math.ceil(icMinY);
-for (int y = minYInt; y = maxY; y++)
+
+Rectangle devClip = getDeviceBounds();
+int scanlineMax = (int) Math.min(maxY, devClip.getMaxY());
+for (int y = minYInt; y  scanlineMax; y++)
   {
 ArrayList bucket = edgeTable[y - minYInt];
 // Update all the x intersections in the current activeEdges table
@@ -2169,8 +2168,7 @@
* @return a list of PolyEdge that form the shape in device space
*/
   private ArrayList getSegments(Shape s, AffineTransform t,
-Rectangle2D deviceBounds, boolean isClip,
-double offs)
+Rectangle2D deviceBounds, boolean isClip)
   {
 // Flatten the path. TODO: Determine the best flattening factor
 // wrt to speed and quality.
@@ -2213,14 +2211,14 @@
 else if (segType == 

[commit-cp] classpath ChangeLog lib/Makefile.am lib/gen-cla...

2006-06-09 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey tromey 06/06/09 21:30:44

Modified files:
.  : ChangeLog 
lib: Makefile.am gen-classlist.sh.in 

Log message:
* lib/Makefile.am (install-data-local): Copy 'sun' files.
(uninstall-local): Delete 'sun' directory.
(glibj.zip): Include 'sun' classes.
(clean-local): Delete 'sun' directory.
* lib/gen-classlist.sh.in: Search 'sun' subdirectories.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7747r2=1.7748
http://cvs.savannah.gnu.org/viewcvs/classpath/lib/Makefile.am?cvsroot=classpathr1=1.117r2=1.118
http://cvs.savannah.gnu.org/viewcvs/classpath/lib/gen-classlist.sh.in?cvsroot=classpathr1=1.36r2=1.37

Patches:
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7747
retrieving revision 1.7748
diff -u -b -r1.7747 -r1.7748
--- ChangeLog   9 Jun 2006 20:49:50 -   1.7747
+++ ChangeLog   9 Jun 2006 21:30:43 -   1.7748
@@ -1,3 +1,11 @@
+2006-06-09  Tom Tromey  [EMAIL PROTECTED]
+
+   * lib/Makefile.am (install-data-local): Copy 'sun' files.
+   (uninstall-local): Delete 'sun' directory.
+   (glibj.zip): Include 'sun' classes.
+   (clean-local): Delete 'sun' directory.
+   * lib/gen-classlist.sh.in: Search 'sun' subdirectories.
+
 2006-06-09  Roman Kennke  [EMAIL PROTECTED]
 
* gnu/java/awt/java2d/AbstractGraphics2D.java

Index: lib/Makefile.am
===
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- lib/Makefile.am 5 Apr 2006 22:12:01 -   1.117
+++ lib/Makefile.am 9 Jun 2006 21:30:44 -   1.118
@@ -73,6 +73,7 @@
cp -R java $(DESTDIR)$(pkgdatadir)
cp -R javax $(DESTDIR)$(pkgdatadir)
cp -R org $(DESTDIR)$(pkgdatadir)
+   cp -R sun $(DESTDIR)$(pkgdatadir)
cp -R META-INF $(DESTDIR)$(pkgdatadir)
 
 # FIXME - should mimic doc/api/Makefile.am instead...
@@ -81,6 +82,7 @@
rm -rf $(DESTDIR)$(pkgdatadir)/java
rm -rf $(DESTDIR)$(pkgdatadir)/javax
rm -rf $(DESTDIR)$(pkgdatadir)/org
+   rm -rf $(DESTDIR)$(pkgdatadir)/sun
rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
 
 endif # INSTALL_CLASS_FILES
@@ -95,8 +97,8 @@
 else
 
 glibj.zip: classes compile-classes resources
-   if test $(ZIP) != ; then $(ZIP) -r -D glibj.zip gnu java javax org 
META-INF  /dev/null; fi
-   if test $(FASTJAR) != ; then $(FASTJAR) cf glibj.zip gnu java javax 
org META-INF; fi
+   if test $(ZIP) != ; then $(ZIP) -r -D glibj.zip gnu java javax org 
sun META-INF  /dev/null; fi
+   if test $(FASTJAR) != ; then $(FASTJAR) cf glibj.zip gnu java javax 
org sun META-INF; fi
 
 endif # USE_PREBUILT_GLIBJ_ZIP
 
@@ -175,6 +177,7 @@
-rm -rf javax
-rm -rf org
-rm -rf com
+   -rm -rf sun
-rm -rf META-INF
-rm -rf lists
-rm -f Makefile.deps

Index: lib/gen-classlist.sh.in
===
RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- lib/gen-classlist.sh.in 4 Apr 2006 17:16:50 -   1.36
+++ lib/gen-classlist.sh.in 9 Jun 2006 21:30:44 -   1.37
@@ -18,7 +18,7 @@
 # We do this because it makes splitting for the gcj build much
 # cheaper.
 (cd @top_srcdir@
- @FIND@ java javax gnu org -follow -name '*.java' -print |
+ @FIND@ java javax gnu org sun -follow -name '*.java' -print |
  sort -r | sed -e 's,/\([^/]*\)$, \1,' |
  while read pkg file; do
 echo $pkg @top_srcdir@ $pkg/$file
@@ -43,7 +43,7 @@
 echo Adding java source files from VM directory $vm_dirlist
 for dir in $vm_dirlist; do
(cd $dir
-   for subdir in java javax gnu org com; do
+   for subdir in java javax gnu org com sun; do
   if test -d $subdir; then
 @FIND@ $subdir -name '*.java' -print
   fi




[commit-cp] classpath ChangeLog native/jni/gtk-peer/gnu_jav...

2006-06-09 Thread Sven de Marothy
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Sven de Marothy smarothy  06/06/09 22:08:08

Modified files:
.  : ChangeLog 
native/jni/gtk-peer: gnu_java_awt_peer_gtk_ComponentGraphics.c 

Log message:
2006-06-09  Sven de Marothy  [EMAIL PROTECTED]

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
(Java_gnu_java_awt_peer_gtk_ComponentGraphics_disposeSurface):
Use GTK locks while disposing (Xlib) surface.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7748r2=1.7749
http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c?cvsroot=classpathr1=1.14r2=1.15

Patches:
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7748
retrieving revision 1.7749
diff -u -b -r1.7748 -r1.7749
--- ChangeLog   9 Jun 2006 21:30:43 -   1.7748
+++ ChangeLog   9 Jun 2006 22:08:07 -   1.7749
@@ -1,3 +1,9 @@
+2006-06-09  Sven de Marothy  [EMAIL PROTECTED]
+
+   * native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
+   (Java_gnu_java_awt_peer_gtk_ComponentGraphics_disposeSurface):
+   Use GTK locks while disposing (Xlib) surface.
+
 2006-06-09  Tom Tromey  [EMAIL PROTECTED]
 
* lib/Makefile.am (install-data-local): Copy 'sun' files.
@@ -16,7 +22,7 @@
* gnu/java/awt/java2d/PolyEdge.java
(toString): Include isClip flag in output.
 
-2006-06-09  Sven de Marothy  [EMAIL PROTECTED]
+2006-06-08  Sven de Marothy  [EMAIL PROTECTED]
 
* java/awt/font/TextLayout.java
(getOutline): Allow null transform.

Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
===
RCS file: 
/sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c   7 Jun 
2006 09:40:54 -   1.14
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c   9 Jun 
2006 22:08:08 -   1.15
@@ -186,7 +186,11 @@
 
   surface = cairo_get_target (gr-cr);
   if (surface != NULL)
+{
+  gdk_threads_enter();
 cairo_surface_destroy (surface);
+  gdk_threads_leave();
+}
 }
 
 JNIEXPORT jlong JNICALL 




[commit-cp] classpath/javax/swing JComponent.java ChangeLog

2006-06-09 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Roman Kennke rabbit78 06/06/09 23:28:01

Modified files:
javax/swing: JComponent.java 
.  : ChangeLog 

Log message:
2006-06-09  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JComponent.java
(paintChildrenOptimized): Paint component with a new Graphics
object to protect the other painting code from modifications
done in that object, and avoid cleanup ops on possibly 
dispose()ed
Graphics object.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JComponent.java?cvsroot=classpathr1=1.123r2=1.124
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7749r2=1.7750

Patches:

Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7749
retrieving revision 1.7750
diff -u -b -r1.7749 -r1.7750
--- ChangeLog   9 Jun 2006 22:08:07 -   1.7749
+++ ChangeLog   9 Jun 2006 23:27:59 -   1.7750
@@ -1,3 +1,11 @@
+2006-06-09  Roman Kennke  [EMAIL PROTECTED]
+
+   * javax/swing/JComponent.java
+   (paintChildrenOptimized): Paint component with a new Graphics
+   object to protect the other painting code from modifications
+   done in that object, and avoid cleanup ops on possibly dispose()ed
+   Graphics object.
+
 2006-06-09  Sven de Marothy  [EMAIL PROTECTED]
 
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c




[commit-cp] classpath/javax/swing JTabbedPane.java plaf/bas...

2006-06-09 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Roman Kennke rabbit78 06/06/09 23:34:34

Modified files:
javax/swing: JTabbedPane.java 
javax/swing/plaf/basic: BasicTabbedPaneUI.java 
.  : ChangeLog 

Log message:
2006-06-09  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JTabbedPane.java
(setSelectedIndex): Don't change the visibility of the 
components,
this is done by the UI class.
* javax/swing/plaf/basic/BasicTabbedPaneUI.java
(TabbedPaneLayout.layoutContainer): Change visibility of 
component
here, depending on the selected index. Only do this if the new
selected component is not null. Some programs seem to expect
this.
(visibleComponent): New field.
(getVisibleComponent): Changed to return visibleComponent field.
(setVisibleComponent): Changed to set the visibility of
the old and new visible component.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JTabbedPane.java?cvsroot=classpathr1=1.40r2=1.41
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java?cvsroot=classpathr1=1.45r2=1.46
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7750r2=1.7751

Patches:


Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7750
retrieving revision 1.7751
diff -u -b -r1.7750 -r1.7751
--- ChangeLog   9 Jun 2006 23:27:59 -   1.7750
+++ ChangeLog   9 Jun 2006 23:34:34 -   1.7751
@@ -1,5 +1,20 @@
 2006-06-09  Roman Kennke  [EMAIL PROTECTED]
 
+   * javax/swing/JTabbedPane.java
+   (setSelectedIndex): Don't change the visibility of the components,
+   this is done by the UI class.
+   * javax/swing/plaf/basic/BasicTabbedPaneUI.java
+   (TabbedPaneLayout.layoutContainer): Change visibility of component
+   here, depending on the selected index. Only do this if the new
+   selected component is not null. Some programs seem to expect
+   this.
+   (visibleComponent): New field.
+   (getVisibleComponent): Changed to return visibleComponent field.
+   (setVisibleComponent): Changed to set the visibility of
+   the old and new visible component.
+
+2006-06-09  Roman Kennke  [EMAIL PROTECTED]
+
* javax/swing/JComponent.java
(paintChildrenOptimized): Paint component with a new Graphics
object to protect the other painting code from modifications