Re: Patch: image loading fixes

2003-11-12 Thread Ricky Clarkson
Surely the exception to throw here would be IllegalArgumentException
anyway, as null would be an illegal input to the method.

Ricky.

> > >[patch to java/awt/Component.java]
> > 
> > public boolean prepareImage(Image image, ImageObserver observer)
> > {
> > +if (image == null)
> > +  throw new NullPointerException ();
> > +
> >  return prepareImage(image, image.getWidth(observer),
> >  image.getHeight(observer), observer);
> > }
> > 
> > Actually, the test for image == null is not needed.
> > 
> 
> Yes, I know an NPE will be thrown either way.  I just thought it better
> to be explicit.  But the other methods in Component don't follow this
> policy so I'll remove the check.

-- 
Phasers locked on target, Captain.


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: org.omg link on Classpath homepage

2003-10-22 Thread Ricky Clarkson
Hi,

If software that is non-free is software that is not part of the GNU
project, then Linux is non-free, and someone has somewhere defined free
as being GNU.

If you disallow links to software that itself provides links to
non-free software, you are effectively trying to create your own
separate internet where http://www.microsoft.com is illegal (as well it
should be, you may say :).

Ricky.

> And there was a somewhat-public dispute between the GNU Ghostscript team 
> and the GNU Project leadership (specifically RMS) over the fact that GNU 
> Ghostscript pointed people to Aladdin Ghostscript which is non-free - 
> last I heard, GNU Ghostscript was no longer part of the GNU project 
> (although the split was amicable) because they were unwilling to remove 
> all references to the non-free project. So I'm fairly sure that the rule 
> against pointing people to non-free code is enforced strictly on 
> software that is part of the GNU project.

-- 
Sin has many tools, but a lie is the handle which fits them all.


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: Workshop Oct. 14, again

2003-10-09 Thread Ricky Clarkson
Hi,

Is there any plan to record any of this, either by publishing digital
copies of paper stuff, presentations etc., or by publishing videos or
sound files?

I can't come, but it'd be interesting to sit at home and pretend :)

Ricky.

On Thu, Oct 09, 2003 at 04:18:10PM +0200, Sascha Brawer wrote:
> Hi all,
> 
> this is the final reminder for:
> 
>   GNU Classpath developer workshop at Linux-Kongress 2003
>   Tuesday, Oct. 14, 2003, 14:00 - 18:00
>   Saarland University, Dept. of Mathematics (Building 27.2)
>   Saarbr?cken, Germany
> 
> If you would like to discuss any specific topics, please inform the list
> so that people can prepare themselves.
> 
> So far, the following topics have been mentioned, either on the list or
> in private e-mail:
> 
> - graphics
> - VM interface
> - how to attract more developers
> - fate of ideas discussed in Karsruhe
> - status of individual packages
> - task list, roadmap for GNU Classpath 1.0
> - NotYetImplementedException, or the right color of bike sheds
> 
> In Karlsruhe (LinuxTag, July), I found it quite nice to have dinner
> together. We could reserve a table somewhere once we know how many people
> will attend.
> 
> Best regards,
> 
> -- Sascha
> 
> Sascha Brawer, [EMAIL PROTECTED], http://www.dandelis.ch/people/brawer/
> 
> 
> 
> 
> ___
> Classpath mailing list
> [EMAIL PROTECTED]
> http://mail.gnu.org/mailman/listinfo/classpath


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: porting to another jvm/jit

2003-10-08 Thread Ricky Clarkson
That sounds like a nice project.

I suggest you get hold of the source of a JVM that already uses
Classpath and take a look at it.  I think kissme is probably a good
example, but others on the list probably have different opinions.  I
haven't actually looked at any kissme code though.

If you find errors etc., feel free to submit patches, but there are
restrictions (covered on Classpath's web pages at
http://www.gnu.org/software/classpath/ ) if you submit large/many
patches.

Happy hacking,

Ricky.

On Tue, Oct 07, 2003 at 08:46:44PM +0200, Joseph Wenninger wrote:
> Hi
> 
> I'm porting a jvm/jit for a university project to the gnu classpath,
> since it is nearly impossible to support the sun jre, if you can't sign
> the sun community license, and  therefor don't have the sun-namespaces
> sources.
> 
> I have done a quick hack for testing purposes, but how would I cleanly
> integrate the classpath? My question is, how other jvm developers cope
> with the the VM*.c files ? Do they have to be in the classpath
> hierarchy, or can I somehow create a static classpath lib and than link
> that one against my own, which contains the VM specific implementations
> ?
> 
> 
> 
> Off-topic:
> By the way, we would like to support jdk 1.2 class files (major 45,
> minor 3). I tried to compile the classpath with jikes -source 1.2
> -target 1.2, but it looks like jikes 1.18 doesn't really work with that.
> Did anybody try that ? Is there another usable compiler for jre 1.2
> compatible class files ?  With jikes I get wrong
> [Field|Method|InterfaceMethod]Ref infos structures for many classes,
> they point into the constant pool to array constants instead of object
> constants. According to my knowledge that's wrong.
> Could it be a problem of how the classpath is compiled ?
> 
> 
> 
> 
> I'm using the 0.06 tarball
> 
> Thanks in advance for any information/help
> 
> Kind regards
> Joseph Wenninger
> 
> 
> 
> ___
> Classpath mailing list
> [EMAIL PROTECTED]
> http://mail.gnu.org/mailman/listinfo/classpath


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: NYIException

2003-09-29 Thread Ricky Clarkson
Hi,

I believe the functionality of @unimplemented would be adequately
replaced by @since and throw new UnsupportedOperationException.

To find out what methods of, e.g., JDK1.2 are unsupported, you can
simply search for methods that have @since 1.2 and throw
UnsupportedOperationException from their body.

I don't see how @unimplemented or NotYetImplementedException would give
extra information.

The reason for not implementing the method could be explained in normal
Javadoc comments, and this avoids generated documentation missing out
this information, as would happen if one ran Sun Javadoc over a method
with an @unimplemented tag, as far as I know.

Regards,

Ricky.

On Fri, Sep 26, 2003 at 02:38:30PM +0200, Sascha Brawer wrote:
> What would you say about defining a special Javadoc tag, such as the
> following?
> 
> /**
>  * @unimplemented 1.4 Here comes some explanation.
>  */
> [class|method|field]
> 
> It would not be too difficult to write a special doclet for the purpose
> of generating a document that summarizes the implementation status. Plus,
> it would be possible to document what exactly is not implemented, the
> reason, etc. The explanation text would also go into the generated
> documentation files.
> 
> -- Sascha
> 
> Sascha Brawer, [EMAIL PROTECTED], http://www.dandelis.ch/people/brawer/ 
> 
> 
> 
> 
> ___
> Classpath mailing list
> [EMAIL PROTECTED]
> http://mail.gnu.org/mailman/listinfo/classpath


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Classpath - javax.sound implementation - which library?

2003-09-24 Thread Ricky Clarkson
Hi,

I've been looking at tritonus, and its mixer capabilities are
ALSA-specific (hence Linux-specific).  Is there some other library that
would be viable for Classpath, such as SDL, that would be more portable?

I'm not sure of licensing issues around SDL or even tritonus, but
tritonus is LGPL, and the authors are apparently flexible on licensing.

Tritonus is at http://www.tritonus.org/

Regards,

Ricky.


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Classpath java.nio.charset.CharsetDecoder documentation.

2003-09-22 Thread Ricky Clarkson
Hi,

Please find attached a patch which is the result of diff -u  .

Also please find attached a similar patch for Changelog.

Feedback on this would be welcome, and would mean less time would be
wasted when I get around to CharsetEncoder and others.

Regards,

Ricky.
--- classpath-backup/java/nio/charset/CharsetDecoder.java   2003-09-20 
11:40:54.0 +0100
+++ classpath/java/nio/charset/CharsetDecoder.java  2003-09-21 23:24:47.0 
+0100
@@ -41,30 +41,198 @@
 import java.nio.CharBuffer;
 
 /**
+ * CharsetDecoder provides facilities to decode a sequence of 
+ * bytes (one or more [EMAIL PROTECTED] ByteBuffer}s) that are in a particular
+ * charset into a sequence of standard Java 16-bit Unicode characters (one or 
+ * more [EMAIL PROTECTED] CharBuffer}s).
+ * 
+ * The input data are provided in a [EMAIL PROTECTED] ByteBuffer} or, by invoking 
+ * [EMAIL PROTECTED] #decode(ByteBuffer in, CharBuffer out, boolean endOfInput)}
+ * repeatedly and passing a different [EMAIL PROTECTED] ByteBuffer} as a parameter 
each
+ * time, the data can be provided in a sequence of [EMAIL PROTECTED] ByteBuffer}s.
+ * 
+ * The output data are written to a [EMAIL PROTECTED] CharBuffer} or, by invoking
+ * [EMAIL PROTECTED] #decode(ByteBuffer in, CharBuffer out, boolean endOfInput)}
+ * repeatedly and altering the [EMAIL PROTECTED] CharBuffer} passed as a parameter 
each
+ * time, the data can be written to a sequence of [EMAIL PROTECTED] CharBuffer}s.
+ * 
+ * Methods are normally invoked on a CharsetDecoder in a certain 
order:
+ *
+ * 1.  [EMAIL PROTECTED] #reset()} - invoke if the CharsetDecoder has
+ * been used before.
+ *
+ * 2.  [EMAIL PROTECTED] #decode(ByteBuffer in, CharBuffer out, boolean 
endOfInput)}
+ * - invoke repeatedly as long as there are [EMAIL PROTECTED] ByteBuffer}s to be 
decoded.
+ *
+ * endOfInput should be false until the
+ * current invocation of
+ * [EMAIL PROTECTED] #decode(ByteBuffer in, CharBuffer out, boolean endOfInput)} is 
the
+ * last, i.e., pass true only when there are no more
+ * data to decode after the current invocation.
+ *
+ * Each invocation of
+ * [EMAIL PROTECTED] #decode(ByteBuffer in, CharBuffer out, boolean endOfInput)} 
decodes
+ * as many bytes as possible, and returns a [EMAIL PROTECTED] CoderResult} object to
+ * describe the reason for returning.  The invoker can examine this object to
+ * determine the reason and act accordingly, e.g., by filling the input
+ * [EMAIL PROTECTED] ByteBuffer}.
+ * 
+ * 3.  [EMAIL PROTECTED] #flush(CharBuffer out)} to ensure that the
+ * CharsetDecoder writes all data to the output
+ * [EMAIL PROTECTED] CharBuffer}.
+ *
+ * If the input [EMAIL PROTECTED] ByteBuffer} does not contain a valid sequence of
+ * bytes for the specified [EMAIL PROTECTED] Charset} the input is malformed
+ * ([EMAIL PROTECTED] CoderResult#isMalformed()}).
+ *
+ * If the input [EMAIL PROTECTED] ByteBuffer} is valid, but there is no equivalent
+ * Unicode character to map part of it to, the input has an unmappable
+ * character ([EMAIL PROTECTED] CoderResult#isUnmappable()}).
+ * 
+ * The methods [EMAIL PROTECTED] #onMalformedInput(CodingErrorAction newAction)} 
and
+ * [EMAIL PROTECTED] #onUnmappableCharacter(CodingErrorAction newAction)} allow an
+ * action ([EMAIL PROTECTED] CodingErrorAction}) to be specified for the respective
+ * decoding errors.
+ *
+ * The actions can be one of:
+ * 
+ * [EMAIL PROTECTED] CodingErrorAction#IGNORE} - specifies that the invalid input
+ * is to be ignored and that decoding should continue.
+ * 
+ * [EMAIL PROTECTED] CodingErrorAction#REPLACE} - specifies that the invalid
+ * input is to be ignored and that the decoder's replacement value is to be
+ * inserted (This is "\uFFFD"
+ * unless [EMAIL PROTECTED] #replaceWith(String newReplacement)} has been invoked) and
+ * that decoding should continue.
+ *
+ * [EMAIL PROTECTED] CodingErrorAction#REPORT} - specifies that the error should
+ * be reported to the invoker of
+ * [EMAIL PROTECTED] #decode(ByteBuffer in, CharBuffer out, boolean endOfInput)} via a
+ * [EMAIL PROTECTED] CoderResult} object, or by throwing a
+ * [EMAIL PROTECTED] CharacterCodingException}
+ * 
+ *
+ * To implement a decoder for a specific charset, create a subclass of
+ * this class and implement the protected abstract method
+ * [EMAIL PROTECTED] #decodeLoop(ByteBuffer in, CharBuffer out)}.
+ * 
+ * To ensure that any internal state in a subclass is cleared correctly, 
+ * also override [EMAIL PROTECTED] #flush(CharBuffer out)} and [EMAIL PROTECTED] 
#reset()}, but make
+ * sure that you invoke super.flush(out) and
+ * super.reset() in their respective methods.
+ * 
+ * Instances of this class are NOT threadsafe.
+ * 
  * @author Jesse Rosenstock
+ * @author Ricky Clarkson <[EMAIL PROTECTED]>
  * @since 1.4
  */
 public abstract class CharsetDecoder
 {
+  /**
+   * Flag meaning that the CharsetDecoder has been reset.
+   * 
+   * See [EMAIL PROTECTED] #state}.
+   */
  

Classpath java.awt.AWTEventMulticaster minor documentation patch.

2003-09-17 Thread Ricky Clarkson
Hi,

As you've probably guessed by now from previous emails, I'm bored,
there's nothing on TV, so I'm browsing some Classpath source.  Once I
can get it to configure and make properly I'll probably concentrate more
on contributing source and fixing bugs than docs, but at least I know
(hope) the docs will compile ok :)

Please find attached the following files:
diff: output of diff  

diff_minus_u: output of diff -u  

Regards,

Ricky.
82c82
<  * assume are firing AdjustmentEvent's.  However, this
---
>  * assume you are firing AdjustmentEvents.  However, this
98c98
<  * When it come time to process an event, simply call al,
---
>  * When it comes time to process an event, simply call al,
163c163
< // If a and/or b are Multicaster's, search them recursively.
---
> // If a and/or b are Multicasters, search them recursively.
650c650
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
662c662
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
674c674
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
686c686
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
698c698
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
710c710
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
723c723
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
735c735
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
749c749
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
763c763
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
775c775
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
787c787
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
800c800
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
812c812
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
826c826
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
839c839
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
853c853
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
1087c1087
<* @return latest entry in the chain
---
>* @return the latest entry in the chain
--- classpath/java/awt/AWTEventMulticaster.java 2002-03-31 03:05:37.0 +0100
+++ AWTEventMulticaster.java2003-09-16 19:53:33.0 +0100
@@ -79,7 +79,7 @@
  * This class is used to implement a chain of event handlers.  Dispatching
  * using this class is thread safe.  Here is a quick example of how to
  * add and delete listeners using this class.  For this example, we will
- * assume are firing AdjustmentEvent's.  However, this
+ * assume you are firing AdjustmentEvents.  However, this
  * same approach is useful for all events in the java.awt.event
  * package, and more if this class is subclassed.
  *
@@ -95,7 +95,7 @@
  * }
  * 
  *
- * When it come time to process an event, simply call al,
+ * When it comes time to process an event, simply call al,
  * assuming it is not null, and all listeners in the chain will
  * be fired.
  *
@@ -160,7 +160,7 @@
   return b;
 if (b == oldl)
   return a;
-// If a and/or b are Multicaster's, search them recursively.
+// If a and/or b are Multicasters, search them recursively.
 if (a instanceof AWTEventMulticaster)
   {
 EventListener newa = ((AWTEventMulticaster) a).remove(oldl);
@@ -647,7 +647,7 @@
*
* @param a the "a" listener, may be null
* @param b the "b" listener, may be null
-   * @return latest entry in the chain
+   * @return the latest entry in the chain
*/
   public static ComponentListener add(ComponentListener a, ComponentListener b)
   {
@@ -659,7 +659,7 @@
*
* @param a the "a" listener, may be null
* @param b the "b" listener, may be null
-   * @return latest entry in the chain
+   * @return the latest entry in the chain
*/
   public static ContainerListener add(ContainerListener a, ContainerListener b)
   {
@@ -671,7 +671,7 @@
*
* @param a the "a" listener, may be null
* @param b the "b" listener, may be null
-   * @return latest entry in the chain
+   * @return the latest entry in the chain
*/
   public static FocusListener add(FocusListener a, FocusListener b)
   {
@@ -683,7 +683,7 @@
*
* @param a the "a" listener, may be null
* @param b the "b" listener, may be null
-   * @return latest entry in the chain
+   * @return the latest entry in the chain
*/
   public static KeyListener add(KeyListener a, KeyListener b)
   {
@@ -695,7 +695,7 @@
*
* @par

Classpath java/awt/AWTEvent.java minor documentation patch.

2003-09-17 Thread Ricky Clarkson
Hi,

I was browsing AWTEvent.java, and came across a couple of tiny
grammatical errors.

Please see the attached files 'diff', which is the output of diff
 , and 'diff_minus_u', which
is the output of diff -u  .

Regards,

Ricky.
75c75
<* Indicates if the event has been consumed. False mean it is passed to
---
>* Indicates whether the event has been consumed. False means it is passed to
266c266
<* Tests whether not not this event has been consumed. A consumed event
---
>* Tests whether or not this event has been consumed. A consumed event
--- classpath/java/awt/AWTEvent.java2002-05-06 03:43:17.0 +0100
+++ AWTEvent.java   2003-09-16 19:41:56.0 +0100
@@ -72,7 +72,7 @@
   protected int id;
 
   /**
-   * Indicates if the event has been consumed. False mean it is passed to
+   * Indicates whether the event has been consumed. False means it is passed to
* the peer, true means it has already been processed. Semantic events
* generated by low-level events always have the value true.
*
@@ -263,7 +263,7 @@
   }
 
   /**
-   * Tests whether not not this event has been consumed. A consumed event
+   * Tests whether or not this event has been consumed. A consumed event
* is not processed in the default manner.
*
* @return true if this event has been consumed
___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Classpath java/applet/AppletContext.java minor documentation patch.

2003-09-17 Thread Ricky Clarkson
Hi,

I was browsing AppletContext.java, and found an incredibly minor
grammatical error, and was feeling pretty bored at the time, so here's a
patch.

See the attached file 'diff' for the output of diff   and 'diff_minus_u' for the
output of diff -u  

Regards,

Ricky.
147,148c147,148
<* Iterate over all keys that have associated streams. Stream associated
<* are local to the applet context, for security purposes.
---
>* Iterate over all keys that have associated streams. The associated
>* streams are local to the applet context, for security purposes.
--- classpath/java/applet/AppletContext.java2002-11-13 03:48:51.0 +
+++ AppletContext.java  2003-09-16 19:29:10.0 +0100
@@ -144,8 +144,8 @@
   InputStream getStream(String key);
 
   /**
-   * Iterate over all keys that have associated streams. Stream associated
-   * are local to the applet context, for security purposes.
+   * Iterate over all keys that have associated streams. The associated
+   * streams are local to the applet context, for security purposes.
*
* @return an iterator over the association keys
* @since 1.4
___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath