Re: GCJ ------ file type not supported by system

2014-09-05 Thread Mario Torre
On Thu, 2014-09-04 at 18:17 +0200, Guillermo Rodriguez wrote:
 Yes I can submit patches

Just start doing that, everything else will follow like the water in a
river in a rainy winter. We won't build dams.

Cheers,
Mario





Re: GCJ ------ file type not supported by system

2014-09-05 Thread Mario Torre
On Thu, 2014-09-04 at 18:17 +0200, Guillermo Rodriguez wrote:
 I think that updating the website

P.S. That counts as a patch as well ;)

Cheers,
Mario





Re: GCJ ------ file type not supported by system

2014-09-01 Thread Mario Torre
On Mon, 2014-09-01 at 11:32 +0200, Guillermo Rodriguez Garcia wrote:
 Hi Andrew,
 
 2014-09-01 11:03 GMT+02:00 Andrew Haley a...@redhat.com:
  On 29/08/14 11:00, Guillermo Rodriguez Garcia wrote:
  Yes I know that anyone can work on GNU Classpath. But as in any OSS
  project, a new project maintainer taking over ownership (in the OSS
  sense of the word) would need to have the approval and the support of
  the current maintainers.
 
  That would not be a problem.  But really, there's no need to own
  the project: all patches are welcome.
 
 Yes I am sure about this, but that is not my point. What I am saying
 is that it would be very good for the project to be maintained by a
 team who really wants to move things forward.
 

I understand what you mean, but the current maintainer has always
integrated patches and done releases, I think the problem is not the
lack of one maintainer willing to move forward, is lack of manpower to
do it.

As I said, anyone can step in, if patches start to flow (including bug
fixes) I'm sure they'll be integrated correctly and quickly.

If someone wants to take the project, the best thing to do is to start
contributing patches. After all, how can the maintainer know if someone
is seriously willing to take his role if there lack of a serious and
recent contribution flow?

Cheers,
Mario





Re: Fwd: Re: GCJ ------ file type not supported by system

2014-08-29 Thread Mario Torre
On Fri, 2014-08-29 at 09:07 +0100, Andrew Haley wrote:
 java.lang.IllegalArgumentException: file type not supported by system
at javax.sound.sampled.AudioSystem.write(Unknown Source)
at com.all.smws.speech. .genSliceFeat(Unknown Source)
at com.all.smws.speech.SpeechFilter.getAnnotations(Unknown Source)
at com.all.sndsep.segmentation.Segmentor.getNewAnnotations(Unknown
 Source)
at com.all.sndsep.segmentation.Segmentor.getNewAnnotations(Unknown
 Source)
at com.all.sndsep.segmentation.Segmentor.getNewAnnotations(Unknown
 Source)
at com.all.sndsep.segmentation.Segmentor.getAllAnnotations(Unknown
 Source)
at com.all.smws.speech.SpeechFilter.getSmwsAnnotations(Unknown
 Source)
at com.all.smws.speech.SMWS.getSpeech(Unknown Source)
at com.all.onins.oi.stream.OnlineInputStream.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Just throwing a possible hint to the problem.

The Java Sound API works with system providers. By the look of if, the
provider used under the hood is some SpeechFilter thing, which I don't
think is part of either classpath or gcj.

Try checking the default providers in 

META-INF/services/javax.sound.sampled.spi.AudioFileWriter

Just my two cents, but I won't have time to look it further if this
doesn't work...

Cheers,
Mario





Re: Re: GCJ ------ file type not supported by system

2014-08-29 Thread Mario Torre
On Fri, 2014-08-29 at 11:47 +0200, Guillermo Rodriguez Garcia wrote:
 That is a pity.
 
 I think GNU Classpath is a very good choice for embedded systems with
 limited flash/RAM (especially the latter).
 
 Perhaps it is time to look for adopters to take care of the project?
 It would be really bad to let it just die.
 
 Guillermo

Hi Guillermo,

It's free software, anyone can step in :)

Cheers,
Mario





Re: [GSoC 2013] projects information

2013-04-22 Thread Mario Torre
On Fri, 2013-04-12 at 12:21 +0300, Claudiu Olteanu wrote:
 My name is Claudiu Olteanu, I'm from Bucharest, Romania and I study at
 the University 'Politehnica' of Bucharest, the Faculty of Automatic
 Control and Computers Science. I'm a third year student and I would
 like to participate to GSoC this summer. After I took a look at the
 projects list I decided that it would be interesting and motivating to
 work on one of these projects :
 - Update the SQL interfaces
 - Update the JMX implementation
 - Add more ImageIO support
 - Add more sound support
 
 
 I will appreciate it if you give me more details about them and some
 advice that can put me on track.
 
Hello Claudiu,

Those areas are quite broad, so unless you have some more specific
questions is really difficult to give you any feedback.

What I can suggest is to get the latest Classpath from git and give it a
try and see what areas that can be improved are most of your interest.

I personally would like to see more sound and ImageIO support; for
sound, for example, we have a GStreamer pipeline, this could be improved
and also add MIDI support.

Anyway, all those areas are pretty interesting.

Cheers,
Mario





FOSDEM Free Java Dev Room 2013

2012-12-12 Thread Mario Torre
Hello all!

This is a reminder that the call for paper for Fosdem 2013 Free Java Dev
Room has been started:

http://wiki.debian.org/Java/DevJam/2013/Fosdem/CallForParticipation

Since this year marks the 10th year of Free Java, I hope to see a large
participation from the GNU Classpath Community.

Waiting forward to see your papers submitted!

Cheers,
Mario




Re: [cp-patches] GNU Classpath

2012-10-19 Thread Mario Torre
Il giorno 17/ott/2012, alle ore 04:59, Andrew Hughes gnu.and...@redhat.com ha 
scritto:
 - Original Message -
 Hi team,
 
 There could be another way if we can't drop old-style ChangeLog for
 some reason:
 do not alter ChangeLog (i.e. use commit log instead) until the patch
 is fully accepted (e.g., Andrew could get log notes (one or even
 several) from git log of processed patches (of master
 savannah/master) and update ChangeLog (as a separate commit).
 No magic, just deferred update.
 
 
 No.  Updating the ChangeLog is a requirement.


Hi Andrew.

Maybe it's a requirement, but to be honest, is also a very redundant piece of 
information that is already in the commit log, so I for one would like to see 
this going away.

In Thermostat we add the review thread of the mailing list to keep better track 
of the actual history of the patch (something that doesn't really show up in 
the Changelog anyway), which proves to be more useful that duplicating the 
Changelog info.

Cheers,
Mario
---
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

http://www.ladybug-studio.com

IcedRobot: www.icedrobot.org
Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/








Re: 0.99 Release

2012-02-01 Thread Mario Torre
Il giorno 01/feb/2012, alle ore 17:33, Andrew Hughes ha scritto:
 Hi all,
 
 I'd like to do a new GNU Classpath release just after FOSDEM (3rd-6th Feb.).
 I was hoping to get it in before, but the locale fixing has taken longer than 
 expected.
 There are a lot of unreleased fixes in there, including these latest locale
 improvements.
 
 Are there any objections to a release on the 8th of February?


Really!

Cool! For a moment I though I was reading old mails! Cheers!

Mario
---
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

http://www.ladybug-studio.com

IcedRobot: www.icedrobot.org
Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/








Re: Future blog

2010-12-08 Thread Mario Torre
Il giorno mer, 08/12/2010 alle 09.26 +, Gary Benson ha scritto:
 Dr Andrew John Hughes wrote:
  On 23:06 Tue 07 Dec, Mark Wielaard wrote:
   As soon as I am back I would like us to at least start moving to
   mercurial on savannah if people don't mind.
  
  Yes, I do mind.
  
  We already discussed this some time back:
  
  http://developer.classpath.org/pipermail/classpath/2008-June/002629.html
  
  and nothing happened.  I don't particularly see any huge benefit
  to moving the repository to a different version control system.
 
 Seriously?  There's no reason anybody needs to be using CVS these
 days.
 
 Cheers,
 Gary
 

Nah, no need for version control system at all, Real Hackers(TM) append
a timestamp to the file names :)

But seriously, let's go to hg soon I really like the idea.

Cheers,
Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Future blog

2010-12-08 Thread Mario Torre
Il giorno mer, 08/12/2010 alle 13.45 +0200, Pekka Enberg ha scritto:

 I completely agree. I have Ivan's patches locally and I'm planning to
 go through them and resend them to the list unless he beats me to it.
 
Pekka
 

If we were using mecurial we could use review board or webrew.

I really like those tools because they give you context around the
patch, and it's easier for the reviewer, with just a very small overhead
to the developer.

Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Future blog

2010-12-07 Thread Mario Torre
Il giorno mar, 07/12/2010 alle 23.06 +0100, Mark Wielaard ha scritto:
 Hi all,
 
 For those who didn't see Pekka's blog on planet.classpath.org you can
 find it here:
 http://penberg.posterous.com/whats-the-future-of-gnu-classpath
 
 He makes some very good points. I agree with all of them.
 Now the cool thing would be if I said lets do them all right now!.
 But instead I am going on vacation and be offline for about two weeks.
 Sorry about that. But I didn't want to not respond at all.
 
 As soon as I am back I would like us to at least start moving to
 mercurial on savannah if people don't mind. This is just because other
 projects around free java (hi openjdk) are also using mercurial and it
 seems convenient to use something similar, but other suggestions
 appreciated. Hopefully we can do something similar for Mauve (it isn't
 abandoned, more in the same state as GNU Classpath). And somehow
 integrate/extend it with Malva and the jtreg testsuite from OpenJDK.
 (They probably should stay separate projects, but at least the
 autobuilder should run them. The autobuilder is in a really bad shape,
 but there is a new host already that can pick up the load.)
 
 The discussion on the patches mailinglist does show a real problem
 though. We have very little active hackers, and so aren't doing very
 well helping new hackers like Pekka and Ivan to get their work
 integrated.
  
 Opinions? Suggestions? Flames?
 
 Thanks,
 
 Mark
 
 

Hi Mark,

the post is definitely nice and I also completely agree on all points.

Just quoting here what I wrote on the #classpath channel, I feel very
guilty because despite I read all the GNU Classpath mails I never
reply...

My last two years had very little free time and most of it went to
OpenJDK but I definitely agree with what Pekka wrote.

Hopefully this new project (IcedRobot for the interested parties) will
make us contribute more to GNU Classpath again as well.

I don't know if GNU Classpath should still be a cleanroom implementation
of the jdk class library though, as there are many areas that are just
difficult to make it right like the last decimal format code (and btw, I
spent I don't know how much time on this thing and it still doesn't work
100% right).

Those could just benefit from a good out of the box implementation like
the jdk; also, the OpenJDK code is free now and will always be like
that, there's no way back and the effort of maintaining OpenJDK code
ourselves if Oracle decides to screw up things are still less than
writing the missing part of GNU Classpath to make it to the same level
anyway.

It's a tricky situation...

Anyway, let's make the two things you proposed.

And I would give my +1 to migrate to mercurial ASAP.

This is sane!

And then we'll make GNU Classpath shine again :)

Cheers,
Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Free Java @ FOSDEM 2011 DevRoom Proposal

2010-10-27 Thread Mario Torre
Il giorno mer, 27/10/2010 alle 12.01 +0200, Mark Wielaard ha scritto:

 The event itself will be free (as in beer). See http://fosdem.org/

And the beer? ;)

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas GmbH, Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards: http://endsoftpatents.org/




Re: Simple Swing Tests with OpenJDK/Classpath/Classpath+Escher

2010-05-19 Thread Mario Torre
Il giorno mer, 19/05/2010 alle 01.46 -0300, Marcos Roriz ha scritto:
 Hello all,

 Conclusion:
 Escher did fine for the tests, only problems detected are not yet
 implemented features, anti aliased font and that error with the png. I
 think the overall speed was great (after the start). About the
 Unicode, I think, it's a problem with GNU Classpath, because the same
 error applied to jamvm and cacao.

Hi Marcos,

Mmm, those rendering errors are weird, they should not occur. I don't
have time to look at them now, if you can track them down that would be
a great addition to your project, but don't spend too much time on that.

Perhaps you can try the Swing demo (is somewhere in the example
directory), this was always rendered correctly. I don't think it's an
Escher problem, I think it's in the peer code, maybe it's something to
do with your installed fonts.

Good work so far, keep up with this. Next week I think we should start
looking at the generator code.

Cheers,
Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Errors at building classpath, info attached (Real One)

2010-05-11 Thread Mario Torre
Il giorno mar, 11/05/2010 alle 14.44 +0100, Andrew John Hughes ha
scritto:


  I'm not sure on that either. Andrew(s)? I think this is because of some
  incompatibilities introduced by recent Firefox, if I'm not wrong, the
  development of the plugin moved completely in the IcedTea project, if
  that's the case, you may skip it (it's not needed for Escher anyway). If
  you make it work, or you really have time for that and want to try it,
  go for it, hacking is always fun, but keep in mind that is more
  important to get the whole thing up and running first than having each
  subsystem working properly (you need to fix GNU Classpath/Escher
  integration now).
 
 
 i've mentioned before that we should probably just remove it, given
 development has shifted to IcedTea.  We should at least not have it
 enabled by default.

Yeah, has been difficult to track this stuff because all the interest
moved away, this is actually a good point for Marcos' project, he's
making us talking about GNU Classpath again.

Anyway, I also think we should remove it and put on the docs why we did.

Cheers,
Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Patch to compile Escher with Classpath.

2010-05-03 Thread Mario Torre
Il giorno dom, 02/05/2010 alle 02.57 -0300, Marcos Roriz ha scritto:
 I finished up a patch that compiles the current Escher (Hg) with the
 current GNU Classpath (CVS). The major problems in the compilation was
 the difference between method name and the number/types of parameters
 in classpath and escher. After some fixing everything is fine. Now
 I'll generate some simple application tests (Hello World GUI, as Mario
 Torre said =D).
 
 Regards,
 
 Marcos Roriz

Hi Marcos,

Thanks for the patch!

I see there are a number of white space changes that make difficult to
read the patch.

Those white space changes are also affecting the formatting, so it's not
OK, because they break the GNU coding guidelines.

Please, try to export the patch ignoring white spaces changes and
resubmit.

Other than that, it looks good though, so now post a screen shot of your
first Escher based HelloWorld somewhere!! :)

Cheers,
Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Errors at building classpath, info attached (Real One)

2010-04-30 Thread Mario Torre
Il giorno gio, 29/04/2010 alle 22.06 -0300, Marcos Roriz ha scritto:
 Sorry for the last post, I hit enter unintentionally.
 Guys, I tried building yersteday classpath cvs and after some problems
 I got it to work :)

Parabens Marcos, é muito bom!

This means you got the first HelloWorld running? :)

 First I'll tell what I had to do to get eclipse to get out of the red
 state in errors. I copied these two files (which the wiki refers)
 to .java:
   * classpath/gnu/classpath/Configuration.java.in
   * classpath/gnu/java/security/Configuration.java.in
 Because the build uses the .in to configure, don' t move them (yes I
 did that :'[). Also add the jaxme jar (usually on /usr/share/java) to
 the build path (I thought that I needed antlr, am I missing something
 here?) and we go down to two errors I think, which are basically
 incompatibility with my version of jaxme.

Oh, bad eclipse... I don't use it since ages, so I can't really help
much here, but I remember this specific error. It should go away once
you do a full build from command line, because those files are generated
during the configure process (just refresh the project).

 About the build problems:
 Here's the first problem, it complains about the following errors
 (Error 1) which can be fixed with Giuseppe Scrivano patch. I wonder
 why the thread isn't showing on classpath-patch mailing list.

Mmm, we should probably get this patch in so. I'm not sure why we didn't
yet (well, perhaps nobody noticed it... :)

Pun: If you succeed in making us commit this patch, you basically
already pass the first task (revive GNU Classpath :P

 The second error is about building the web plugin. It seems that on
 ubuntu the mozilla headers are separated on two folders stable and
 unstable. The build only get the stable directory. So here we can
 upgrade to a newer version (which only have one directory) or compile
 our own xulrunner. I did an upgrade to a newer version (got lucid
 version), the error went away.

I'm not sure on that either. Andrew(s)? I think this is because of some
incompatibilities introduced by recent Firefox, if I'm not wrong, the
development of the plugin moved completely in the IcedTea project, if
that's the case, you may skip it (it's not needed for Escher anyway). If
you make it work, or you really have time for that and want to try it,
go for it, hacking is always fun, but keep in mind that is more
important to get the whole thing up and running first than having each
subsystem working properly (you need to fix GNU Classpath/Escher
integration now).

 I wonder if I can add this info on the wiki. What you guys think?

Sure, this would be great, please do it. I don't think we need to wait
your paperwork for the wiki, Mark? (please, also keep a copy of your
contributed diff for anything you do, even website/wiki changes).

Cheers,
Mario


-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: Classpath IPP Logging

2010-04-26 Thread Mario Torre
Il giorno lun, 26/04/2010 alle 11.23 +0100, Andrew Haley ha scritto:
 On 04/23/2010 06:26 PM, Andrew Haley wrote:
  Does anyone here have any idea how to turn on IPP logging in GNU Classpath?
  It's used like:
  
logger.log(Component.IPP, Attribute: Name:  + 
  jobUri.getCategory()
  .getName() +  Value:  + jobUri.toString() + );
   
  It would be very useful to enable this, but I just can't figure it out.
 
 Is there really no-one understands how to use Classpath's system logger,
 or is it that no-one reads this list any more?
 
 Andrew.

Hi Andrew!

I think you need an handler to perform the correct logging, because by
default if I remember correctly only critical logging is performed.

I don't remember any more how we do it in GNU Classpath, I'm quite sure
the mechanism is the same though (and I'm sure it was working).

For the JDK, you need to configure a file called logging.properties,
this will take the settings for the logger, like the level of logging
and the handlers to use for the logging.

Here is a very basic introduction to logging in general:

http://www.crazysquirrel.com/computing/java/logging.jspx

If you need help in this specific case, ping me and we can try to give
it a look together.

Cheers,
Mario
-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/




Re: [Fwd: compiling errors with latest gcc 4.4 and AWT/Swing]

2009-04-15 Thread Mario Torre
Il giorno mar, 14/04/2009 alle 17.36 +0100, David Michel ha scritto:
 Hi All,
 
 I was recently trying to run a java project, developed for and run
 with Sun's java, with the gcc compiler instead. When I first installed
 the gcj available from the Ubuntu repository, I ran into compilation
 erros and then realised that the version shipped on the repos was
 relatively old  (4.2.4) so I decided to upgrade it to the latest one,
 hoping that these compilation issues will get resolved.
 
 With great help from this forum, I got the newest GCC running on my
 machine with the following commands:

Not sure because I don't have the code at hand right now, but it's
possible that this was fixed in classpath but not merged in yet?

I think that adding a null check there would be enough, but I have to
give a look at the code to be sure, perhaps some special behaviour is
required instead.

I'll try to give a look at it asap.

Cheers,
Mario





Re: Tools License Review

2009-03-06 Thread Mario Torre
Il giorno ven, 06/03/2009 alle 16.33 +, Andrew John Hughes ha
scritto:

 tools/com/sun/tools/javadoc/Main.java
 tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java
 tools/gnu/classpath/tools/taglets/TagletContext.java
 
 Shall we migrate all these to GPLv2 + Classpath exception?

I agree, especially if the purpose is to be able to integrate this stuff
with OpenJDK or to be consistent with Classpath, so, unless (of course)
there are other reasons to not move, I would change the license.

Cheers,
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://endsoftpatents.org/




Re: trouble w/ synchronized close method in PushbackInputStream

2008-11-01 Thread Mario Torre
Il giorno ven, 31/10/2008 alle 12.40 -0600, Robert Dodier ha scritto:
 Hi,

 At this point I guess I am inclined to plead for trying to reduce
 the use of synchronization in PushbackInputStream.
 Apparently it is possible to create an implementation of it which
 avoids deadlock; Sun's version seems to be evidence of that.

Hi!

I don't think this is a safe way of resolving bugs, maybe in this case
it is (but I have to look at the code), but avoid the deadlock just by
removing a synchronized block means that the two threads now have a
chance to get in the way of each other's data.

We should instead avoid the deadlock in the first place.

Maybe the problem is caused by some threads doing unrelated things, so
in this case having an object to use as semaphore, instead of this,
may be of help.

Can you provide an example causing the deadlock?

Cheers,
Mario




Re: [Fwd: Problem with AWT/Swing code]

2008-10-16 Thread Mario Torre
Il giorno gio, 16/10/2008 alle 10.15 +0100, Andrew Haley ha scritto:
 Forwarding to GNU Classpath; this isn't gcj-specific.
 
 Andrew.

I don't think the code is correct.

The two calls to SwingUtilities.invokeLater(r); are suspicious to me.
If you remove one of them (try the one in the runnable), it works again.

I see an egg and chicken problem here: we call recursively the Threads.

Maybe Sun code detects this, while we don't, and maybe we should do the
same here, I have to check.

Cheers,
Mario




Re: [Fwd: Problem with AWT/Swing code]

2008-10-16 Thread Mario Torre
Il giorno gio, 16/10/2008 alle 17.09 +0200, ffileppo ha scritto:

 Hi Mario,
 thanks for your interest.
 
 I tried commenting SwingUtilities.invokeLater(r) call in Runnable but now the 
 application is behaving in a different/wrong way (i.e. it is always showing 
 the same deltaTime for every lines -- the original code compiled with 
 openjdk shows different deltaTime for every line).
 
 Do you know any workaround for this problem?
 
 Thank you,
 
 Francesco

Ciao Francesco!

I would arrange the code in a completely different way, but you can try
to use an updater thread (for example you can use a Timer thread to
update the time).

But we clearly do the wrong thing there. The
SwingUtilities.invokeLater() should queue the runnable, what I see here
is that we keep executing them as soon as they arrive.

I'll give it a look and let you know.

Cheers,
Mario





Re: [Fwd: Problem with AWT/Swing code]

2008-10-16 Thread Mario Torre
Il giorno gio, 16/10/2008 alle 19.08 +0200, Mario Torre ha scritto:

 But we clearly do the wrong thing there. The
 SwingUtilities.invokeLater() should queue the runnable, what I see here
 is that we keep executing them as soon as they arrive.

I reply to myself :)

We don't do the wrong thing, as Roman said Sun simply rearrange the
events, we don't, and I don't see a reason for doing it on our code
(it's just an implementation detail).

I suggest you to use a Timer for doing the same thing.

Cheers,
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: Problem in displaying swing components on ARM, using GNU Classpath and Cacao

2008-10-07 Thread Mario Torre
Il giorno mar, 07/10/2008 alle 17.39 +0200, Christian Thalinger ha
scritto:
 On Mon, 2008-10-06 at 11:33 +0530, Pavan Kumar Maddali wrote:
 Thanks for the reply. In both cases swing widget on swing(JFrame)
  or swing on awt - swing widjets like (labels, textfields, buttons,..)
  are not visible, but window is visible.
  I build the gnuclasspath using default options, so the awt-peer is
  Gtk.
  The program is working fine under x86 Linux machine with the same
  version of GNU Classpath.
 
 With the same version of CACAO?
 
 - Christian

I am about to update both escher and the escher peer in Classpath, it
only needs an XServer to run, maybe you can try to use it wand see if it
works?

Cheers,
Mario




Re: Problem in displaying swing components on ARM, using GNU Classpath and Cacao

2008-10-05 Thread Mario Torre
Il giorno ven, 03/10/2008 alle 17.32 +0530, Pavan Kumar Maddali ha
scritto:

 To make the swing components visible, Does I have to keep any specific
 libraries on path or I have to set any environment variables or
 provide runtime parameters ? 
 
 Thanks in Adavance.

Hi!

Are you trying to display a swing widget on top of an awt one?
What swing peer are you running?
Does your program works correctly with the same version of GNU Classpath
on a x86 Linux machine?

Cheers,
Mario




Re: [cp-patches] FYI: System.getenv

2008-09-19 Thread Mario Torre
Il giorno gio, 18/09/2008 alle 01.00 +0100, Andrew John Hughes ha
scritto:

 Please be more careful when applying such fixes.  This patch
 alters code which is nothing to do with the bug:
 
  -   ListString environ = (ListString)VMSystem.environ();
  -   MapString,String variables = new EnvironmentMap();
  +MapString, String _map = new HashMap();
  +ListString environ = (ListString)VMSystem.environ();

Sorry, this one was a cut and paste typo, thanks for spotting it.

Cheers,
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: System.getenv

2008-09-16 Thread Mario Torre
Hi all!

I just submitted this patch that fixes a problem in our System.getenv()
method.

It's possible to have variable in the form of:

key=value=value=value

like (from my env list):

XDM_MANAGED=method=classic

cheers,
Mario

2008-09-16  Mario Torre  [EMAIL PROTECTED]

* java/lang/System.java (getenv): Fix env entries of the form
key=value=value=value not parsed correctly. 

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/lang/System.java
===
RCS file: /sources/classpath/classpath/java/lang/System.java,v
retrieving revision 1.62
diff -u -r1.62 System.java
--- java/lang/System.java	7 Jan 2008 21:11:24 -	1.62
+++ java/lang/System.java	16 Sep 2008 19:26:17 -
@@ -546,20 +546,28 @@
 SecurityManager sm = SecurityManager.current; // Be thread-safe.
 if (sm != null)
   sm.checkPermission(new RuntimePermission(getenv.*));
+
 if (environmentMap == null)
   {
-	ListString environ = (ListString)VMSystem.environ();
-	MapString,String variables = new EnvironmentMap();
-	for (String pair : environ)
-	  {
-	String[] parts = pair.split(=);
-	if (parts.length == 2)
-	  variables.put(parts[0], parts[1]);
-	else
-	  variables.put(parts[0], );
-	  }
-	environmentMap = Collections.unmodifiableMap(variables);
+MapString, String _map = new HashMap();
+ListString environ = (ListString)VMSystem.environ();
+for (String envEntry : environ)
+  {
+// avoid broken and null entries
+if (envEntry != null  !envEntry.endsWith(=))
+  {
+// it's perfectly legal that some entries may be in the form
+// key=value=value=value
+int equalSignIndex = envEntry.indexOf('=');
+String key = envEntry.substring(0, equalSignIndex);
+String value = envEntry.substring(equalSignIndex + 1);
+_map.put(key, value);
+  }
+  }
+
+environmentMap = Collections.unmodifiableMap(_map);
   }
+
 return environmentMap;
   }
 


[commit-cp] classpath/java/lang System.java

2008-09-16 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/09/16 19:41:44

Modified files:
java/lang  : System.java 

Log message:
2008-09-16  Mario Torre  [EMAIL PROTECTED]

* java/lang/System.java (getenv): Fix env entries of the form
key=value=value=value not parsed correctly. 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/lang/System.java?cvsroot=classpathr1=1.62r2=1.63




[commit-cp] classpath ChangeLog

2008-09-16 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/09/16 19:43:48

Modified files:
.  : ChangeLog 

Log message:
2008-09-16  Mario Torre  [EMAIL PROTECTED]

* java/lang/System.java (getenv): Fix env entries of the form
key=value=value=value not parsed correctly. 

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




Re: [cp-patches] FYI: fix for DecimalFormat

2008-09-05 Thread Mario Torre
Il giorno gio, 04/09/2008 alle 01.06 +0200, Robert Schuster ha scritto:
 -if (i  len  pattern.charAt(i + 1) == '\u00A4')
 +if ((i + 1)  len  pattern.charAt(i + 1) == '\u00A4')

I feel very stupid for this :)

Cheers,
Mario





[cp-patches] FYI: XImageProducer and Escher fixlet

2008-09-01 Thread Mario Torre
Hi!

This patch implements an ImageProducer for XImage.getSource.
It also fix XGraphicsDevice to use the latest Escher stuff.

Thanks,
Mario

2008-09-01  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XGraphicsDevice.java (getDisplay): fix to support
new Escher API.
* gnu/java/awt/peer/x/XImage.java (getSource): method implemented.
* gnu/java/awt/peer/x/XImage.java (XImageProducer): implement
ImageProducer
for getSource.

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/peer/x/XImage.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XImage.java,v
retrieving revision 1.4
diff -u -r1.4 XImage.java
--- gnu/java/awt/peer/x/XImage.java	30 Apr 2007 20:30:56 -	1.4
+++ gnu/java/awt/peer/x/XImage.java	1 Sep 2008 16:06:38 -
@@ -39,13 +39,19 @@
 package gnu.java.awt.peer.x;
 
 import gnu.x11.Pixmap;
+import gnu.x11.image.ZPixmap;
 
 import java.awt.Graphics;
 import java.awt.GraphicsEnvironment;
 import java.awt.Image;
+
+import java.awt.image.ColorModel;
+import java.awt.image.ImageConsumer;
 import java.awt.image.ImageObserver;
 import java.awt.image.ImageProducer;
+
 import java.util.Hashtable;
+import java.util.Vector;
 
 public class XImage
   extends Image
@@ -75,8 +81,7 @@
 
   public ImageProducer getSource()
   {
-// TODO: Implement this.
-throw new UnsupportedOperationException(Not yet implemented.);
+return new XImageProducer(); 
   }
 
   /**
@@ -108,4 +113,71 @@
   {
 pixmap.free();
   }
+  
+  protected class XImageProducer implements ImageProducer
+  {
+private VectorImageConsumer consumers = new VectorImageConsumer();
+
+@Override
+public void addConsumer(ImageConsumer ic)
+{
+  if (ic != null  !isConsumer(ic))
+this.consumers.add(ic);
+}
+
+@Override
+public boolean isConsumer(ImageConsumer ic)
+{
+  return this.consumers.contains(ic);
+}
+
+@Override
+public void removeConsumer(ImageConsumer ic)
+{
+  if (ic != null)
+this.consumers.remove(ic);
+}
+
+@Override
+public void requestTopDownLeftRightResend(ImageConsumer ic)
+{
+  /* just ignore the call */
+}
+
+@Override
+public void startProduction(ImageConsumer ic)
+{
+  this.addConsumer(ic);
+
+  for (ImageConsumer consumer : this.consumers)
+{
+  int width = XImage.this.getWidth(null);
+  int height = XImage.this.getHeight(null);
+  
+  XGraphics2D graphics = (XGraphics2D) getGraphics();
+  ColorModel model = graphics.getColorModel();
+  graphics.dispose();
+  
+  ZPixmap zpixmap = (ZPixmap)
+XImage.this.pixmap.image(0, 0, width, height,
+ 0x,
+ gnu.x11.image.Image.Format.ZPIXMAP);
+  
+  int size = zpixmap.get_data_length();
+  System.out.println(size:  + size + , w =  + width + , h =  + height);
+  
+  int [] pixel = new int[size];
+  for (int i = 0; i  size; i++)
+pixel[i] = zpixmap.get_data_element(i);
+
+  consumer.setHints(ImageConsumer.SINGLEPASS);
+  
+  consumer.setDimensions(width, height);
+  consumer.setPixels(0, 0, width, height, model, pixel, 0, width);
+  consumer.imageComplete(ImageConsumer.STATICIMAGEDONE);
+}
+  
+  System.out.println(done!);
+}
+  }
 }
Index: gnu/java/awt/peer/x/XGraphicsDevice.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XGraphicsDevice.java,v
retrieving revision 1.2
diff -u -r1.2 XGraphicsDevice.java
--- gnu/java/awt/peer/x/XGraphicsDevice.java	30 Apr 2007 20:30:56 -	1.2
+++ gnu/java/awt/peer/x/XGraphicsDevice.java	1 Sep 2008 16:06:38 -
@@ -39,6 +39,7 @@
 
 import gnu.classpath.SystemProperties;
 import gnu.x11.Display;
+import gnu.x11.EscherServerConnectionException;
 
 import java.awt.GraphicsConfiguration;
 import java.awt.GraphicsDevice;
@@ -127,9 +128,16 @@
 Socket socket = createLocalSocket();
 if (socket != null)
   {
-display = new Display(socket, localhost,
-  displayName.display_no

[cp-patches] FYI: Remove @Override from XImage

2008-09-01 Thread Mario Torre
Hi all!

@Override is a legal annotation when we implement methods from an
interface since java 1.6, but not before.

I removed the @Override annotation that I introduced in my last patch so
that we can compile classpath with javac  1.6

Cheers,
Mario

2008-09-01  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XImage.java (XImageProducer): remove @Override
annotation to allow compilation on javac  1.5

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/peer/x/XImage.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XImage.java,v
retrieving revision 1.5
diff -u -r1.5 XImage.java
--- gnu/java/awt/peer/x/XImage.java	1 Sep 2008 16:07:31 -	1.5
+++ gnu/java/awt/peer/x/XImage.java	1 Sep 2008 17:20:33 -
@@ -118,33 +118,28 @@
   {
 private VectorImageConsumer consumers = new VectorImageConsumer();
 
-@Override
 public void addConsumer(ImageConsumer ic)
 {
   if (ic != null  !isConsumer(ic))
 this.consumers.add(ic);
 }
 
-@Override
 public boolean isConsumer(ImageConsumer ic)
 {
   return this.consumers.contains(ic);
 }
 
-@Override
 public void removeConsumer(ImageConsumer ic)
 {
   if (ic != null)
 this.consumers.remove(ic);
 }
 
-@Override
 public void requestTopDownLeftRightResend(ImageConsumer ic)
 {
   /* just ignore the call */
 }
 
-@Override
 public void startProduction(ImageConsumer ic)
 {
   this.addConsumer(ic);


[commit-cp] classpath gnu/java/awt/peer/x/XGraphicsDevice.j...

2008-09-01 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/09/01 16:07:32

Modified files:
gnu/java/awt/peer/x: XGraphicsDevice.java XImage.java 
.  : ChangeLog 

Log message:
2008-09-01  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XGraphicsDevice.java (getDisplay): fix to 
support
new Escher API.
* gnu/java/awt/peer/x/XImage.java (getSource): method 
implemented.
* gnu/java/awt/peer/x/XImage.java (XImageProducer): implement 
ImageProducer
for getSource.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XGraphicsDevice.java?cvsroot=classpathr1=1.2r2=1.3
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XImage.java?cvsroot=classpathr1=1.4r2=1.5
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9710r2=1.9711




[commit-cp] classpath ChangeLog gnu/java/awt/peer/x/XImage....

2008-09-01 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/09/01 17:29:53

Modified files:
.  : ChangeLog 
gnu/java/awt/peer/x: XImage.java 

Log message:
2008-09-01  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XImage.java (XImageProducer): remove @Override
annotation to allow compilation on javac  1.5

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9712r2=1.9713
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XImage.java?cvsroot=classpathr1=1.5r2=1.6




[cp-patches] FYI: more corba fixlets

2008-08-25 Thread Mario Torre
Hello all!

This patch fix another NPE in our CORBA implementation.

Committed.

Thanks,
Mario


2008-08-25  Mario Torre  [EMAIL PROTECTED]

* gnu/javax/rmi/CORBA/RmiUtilities.java (readValue): check if sender is
null to avoid NPE.
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/javax/rmi/CORBA/RmiUtilities.java
===
RCS file: /sources/classpath/classpath/gnu/javax/rmi/CORBA/RmiUtilities.java,v
retrieving revision 1.3
diff -u -r1.3 RmiUtilities.java
--- gnu/javax/rmi/CORBA/RmiUtilities.java	5 May 2008 22:21:17 -	1.3
+++ gnu/javax/rmi/CORBA/RmiUtilities.java	25 Aug 2008 15:15:00 -
@@ -702,13 +702,14 @@
 if (in instanceof HeadlessInput)
   ((HeadlessInput) in).subsequentCalls = true;
 
-gnuRuntime g;
+gnuRuntime g = null;
 Serializable object = null;
 
 try
   {
 g = (gnuRuntime) sender;
-object = g.target;
+if (sender != null)
+  object = g.target;
   }
 catch (ClassCastException e)
   {


[commit-cp] classpath gnu/javax/rmi/CORBA/RmiUtilities.java...

2008-08-25 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/08/25 15:19:40

Modified files:
gnu/javax/rmi/CORBA: RmiUtilities.java 
.  : ChangeLog 

Log message:
2008-08-25  Mario Torre  [EMAIL PROTECTED]

* gnu/javax/rmi/CORBA/RmiUtilities.java (readValue): check if 
sender is
null to avoid NPE.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/javax/rmi/CORBA/RmiUtilities.java?cvsroot=classpathr1=1.3r2=1.4
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9702r2=1.9703




[commit-cp] classpath/gnu/CORBA OrbFunctional.java

2008-08-22 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/08/22 14:28:06

Modified files:
gnu/CORBA  : OrbFunctional.java 

Log message:
2008-08-22  Mario Torre  [EMAIL PROTECTED]
 
* gnu/CORBA/OrbFunctional.java (set_parameters): Fix
NullPointerException checking when param is null. 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/CORBA/OrbFunctional.java?cvsroot=classpathr1=1.7r2=1.8




[commit-cp] classpath ChangeLog

2008-08-22 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/08/22 14:28:36

Modified files:
.  : ChangeLog 

Log message:
2008-08-22  Mario Torre  [EMAIL PROTECTED]
 
* gnu/CORBA/OrbFunctional.java (set_parameters): Fix
NullPointerException checking when param is null. 

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




Re: [cp-patches] FYI: Fix typo in gst_native_pipeline.c

2008-08-18 Thread Mario Torre
Il giorno lun, 18/08/2008 alle 17.36 +0100, Andrew John Hughes ha
scritto:
 Compiling the GStreamer peer as part of GCJ spotted the following
 typo:
 
 ChangeLog:
 
 2008-08-18  Andrew John Hughes  [EMAIL PROTECTED]
 
   * native/jni/gstreamer-peer/gst_native_pipeline.c:
   (get_free_space(int)): Use #else not #elif when
   there is no condition.
 
 Okay for GCJ too?

Cool, so this thingy is used now!

I have many pending fixes there (and some new stuff), hopefully I will
work on this in the next days time permitting, but if you spot errors,
please ping me.

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: Server downtime

2008-08-10 Thread Mario Torre
Il giorno sab, 09/08/2008 alle 19.24 -0700, Jim Pick ha scritto:

 The server is back now.  If you see anything strange, send me an email.
 
 Cheers,
 
   - Jim

Hi Jim, thanks!

The only strange thing that I see is that we don't have a new release
yet! :)

Cheers,
Mario




Re: Jikes RVM 3.0.0 released

2008-08-08 Thread Mario Torre
Il giorno gio, 07/08/2008 alle 22.43 +0100, Ian Rogers ha scritto:
 We're very happy to announce the release of Jikes RVM version 3.0.0.
 
 The road towards 3.0 began just about two years ago and a large number of
 people, both on the core team and from our user community at large, have
 contributed to making it a success. Thank You!

Cool!

Congratulations!
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: [cp-patches] RFC: [cp-tools] remove unnecessary gjavah from cp-tools and correct classpath in gjavap wrapper script

2008-07-18 Thread Mario Torre
Il giorno sab, 12/07/2008 alle 22.06 +0100, Paul Jenner ha scritto:
 Hi list.
 
 A couple of simple patches for consideration for cp-tools.
 
 The first is to remove gjavah from cp-tools since a javah tool is now in
 Classpath so gjavah in cp-tools is no longer needed.

Hello!

Thanks for the patches!

 2008-07-12  Paul Jenner  [EMAIL PROTECTED]
 
 * bin/gjavah.in,
 * configure.ac,
 * Makefile.am,
 * src/gnu/classpath/tools/javah/GnuByteCodeJavah.java,
 * src/gnu/classpath/tools/javah/Javah.java,
 * src/gnu/classpath/tools/javah/JavahMain.java:
 Removed gjavah.

Not sure about this one, do we really have javah now? :)

I have to admit that I don't track cp-tools, but I think we still have
gjavah in classpath.

 The second is to correct the classpath in the gjavap wrapper script - it
 points to cptools.zip instead of cptools.jar which is what is built.
 
 2008-07-12  Paul Jenner  [EMAIL PROTECTED]
 
 * bin/gjavap.in: Corrected cptools.jar classpath.
 
 If acceptable, could someone with access commit these?
 
 Hope this helps,
 
 Paul

As I said I don't track cp-tools, but this one seems to be right to me,
Andrew?

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: Issues while using ImageWriter in ubuntu 64bit

2008-07-18 Thread Mario Torre
Il giorno mar, 15/07/2008 alle 21.08 -0700, ndesk1900 ha scritto:
 Hello all,
 

 Now the issue is i am not too sure how i should apply this patch? it seems
 someone has checked in a whole lot of files to fix this? Do i need to
 recompile the kernel or something? Can anyone help me with this fix, does
 anyone have a simpler fix?

Hey! I don't think classpath is so broken that requires a kernel upgrade
to run :)

I think this patch is already in. I know we have some issues with
ImageIO, but I'm currently tracking a completely different area so I
can't help you right now, maybe others can?

Anyway, it would help if you could post a stack trace and a test case,
or double check that the issue is exactly the same as the bug report.
I'll try to give it a look the next week, but I can't promise it right
now.

Ciao,
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: Other class libraries

2008-06-25 Thread Mario Torre
Il giorno mar, 24/06/2008 alle 22.18 +0100, Andrew John Hughes ha
scritto:

Hi Andrew!

 both the Classpath and OpenJDK codebases of late, as have Mark, Mario,
 Christian and probably others

I don't, when I change code in OpenJDK I do this blindly :)

On the other hand, you have my word (legally speaking, I guess it's the
only thing I can do that is valid, but ianal you know...), that I don't
copy code back and forth, or take inspiration for fixing nasty bugs, the
codebases are anyway completely different, except for some one liners,
which, as twisti said, are not a problem anyway.

 I think it's an issue we need to look into, and we need to do so
 before it's too late.  In reality, I don't think Sun is going to come
 chasing GNU Classpath contributors, if just because the majority are
 also now OpenJDK contributors (which is half the problem) and it would
 eradicate all the good work they've done with the Free Java community
 over the past couple of years.
 
 Unfortunately, such suppositions aren't worth much in legal terms (and
 let's get the obvious IANAL disclaimer in here before I say any more).
  As we discussed a little on IRC earlier today, it's actually quite a
 ridiculous situation that GNU Classpath and OpenJDK are just about
 under the same license, but because of that 'or later' clause, they
 are incompatible.

FWIW I would not deny my ok in changing the or later in /dev/null if
that can help.

 an ideal world, both would be under GPLv3 and we'd share code between
 the two as intended.  On the other side, I've not seen as much code as
 I'd expect (like the AWT peers) move into OpenJDK either, but I think
 this is less legal and more process related.

Some work is done in that respect, see our peer project. We are mixing
stuff, we screw, we fix, we can do that in our respective codebases, and
anytime we are ready we release the code as the GPL requires, so this is
only a legal problem with the Free Software Foundation hosted
repository, that we want to fix of course, but I don't feel like a
terrible blocker.

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: Fix bmp writer

2008-06-15 Thread Mario Torre
Last patch for today :) (maybe...)

This one fixes a problem in our bmp writer, where the stream is closed
twice, resulting in an exception.

Once again, the full changelog for all the patchset follows (I'm going
to commit all together... Hey, we really want mercurial soon!!!).

Thanks,
Mario

2008-06-15  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): delegate to
setPaint.
(setPaint): fix to set paint context and foreground color.
(imageCache): new field.
(drawImage): new codepath for scaling images.
(prepareImage): new method.
(getPaintContext): set paintContext appropriately.
* gnu/java/awt/java2d/RasterGraphics.java (renderScanline): new method,
override from superclass to detect correct value of y while rendering
the scanline.
* gnu/java/awt/java2d/ScanlineConverter.java (renderShape): revert
previous
patch. 
* gnu/java/awt/peer/x/XEventPump.java (findMouseEventTarget): new
method.
(handleButtonPress): use of findMouseEventTarget to detect the correct
target.
(handleButtonRelease):  likewise.
* gnu/java/awt/peer/x/XGraphics2D.java (rawDrawImage): clip the target
image
so that it is completely contained in the destination pixmaps, as per
X11
specification.
* gnu/java/awt/peer/x/XToolkit.java (createTextField): method
implemented. 
(createButton): likewise.
(prepareImage): likewise.
(createLabel): likewise.
(checkImage): likewise.
(createTextArea): likewise.
(createCheckbox): likewise.
(checkHeadLess): new method.
* gnu/javax/imageio/bmp/BMPImageWriter.java (write):
don't close the stream.
* gnu/javax/imageio/bmp/BMPImageWriterSpi.java (names): added new names
to
the list of known names for BMP.
* java/awt/image/WritableRaster.java (createWritableTranslatedChild): 
* javax/imageio/ImageIO.java (write): call dispose on ImageWriter after
writing of the image.
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/javax/imageio/bmp/BMPImageWriter.java
===
RCS file: /sources/classpath/classpath/gnu/javax/imageio/bmp/BMPImageWriter.java,v
retrieving revision 1.1
diff -u -r1.1 BMPImageWriter.java
--- gnu/javax/imageio/bmp/BMPImageWriter.java	20 Mar 2006 22:33:48 -	1.1
+++ gnu/javax/imageio/bmp/BMPImageWriter.java	15 Jun 2008 17:55:38 -
@@ -178,7 +178,6 @@
   encoder.encode(out, streamMetadata, image, param);
 else
   throw new BMPException(Encoder has not been initialized.);
-out.close();
   }
   
   /**
Index: gnu/javax/imageio/bmp/BMPImageWriterSpi.java
===
RCS file: /sources/classpath/classpath/gnu/javax/imageio/bmp/BMPImageWriterSpi.java,v
retrieving revision 1.1
diff -u -r1.1 BMPImageWriterSpi.java
--- gnu/javax/imageio/bmp/BMPImageWriterSpi.java	20 Mar 2006 22:33:48 -	1.1
+++ gnu/javax/imageio/bmp/BMPImageWriterSpi.java	15 Jun 2008 17:55:38 -
@@ -51,7 +51,7 @@
   static final String vendorName = GNU;
   static final String version = 0.1;
   static final String writerClassName = gnu.javax.imageio.bmp.BMPImageWriter;
-  static final String[] names = { Microsoft Windows BMP };
+  static final String[] names = { bmp, BMP, Microsoft Windows BMP };
   static final String[] suffixes = { .bmp, .bm };
   static final String[] MIMETypes = { image/bmp, image/x-windows-bmp };
   static final String[] readerSpiNames = { gnu.javax.imageio.bmp.BMPImageReaderSpi };
Index: javax/imageio/ImageIO.java
===
RCS file: /sources/classpath/classpath/javax/imageio/ImageIO.java,v
retrieving revision 1.12
diff -u -r1.12 ImageIO.java
--- javax/imageio/ImageIO.java	10 Dec 2006 20:25:46 -	1.12
+++ javax/imageio/ImageIO.java	15 Jun 2008 17:55:39 -
@@ -851,6 +851,7 @@
   }
 
 w.write(null, img, null);
+w.dispose();
 output.close();
 return true;
   }


[cp-patches] FYI: clip target image when painting on a Pixmaps in escher.

2008-06-15 Thread Mario Torre
Second patch out of 3 patches...

This one fixes a problem in the escher peer, when we paint over a
pixmaps.

The X11 specs says that the image has to be fully contained in the
pixmaps, or a nice BatMatch is all we get :) (see the xlib::getImage
function for details if you are interested).

Again, the full changelog for all the patchset follows.

Thanks,
Mario

2008-06-15  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): delegate to
setPaint.
(setPaint): fix to set paint context and foreground color.
(imageCache): new field.
(drawImage): new codepath for scaling images.
(prepareImage): new method.
(getPaintContext): set paintContext appropriately.
* gnu/java/awt/java2d/RasterGraphics.java (renderScanline): new method,
override from superclass to detect correct value of y while rendering
the scanline.
* gnu/java/awt/java2d/ScanlineConverter.java (renderShape): revert
previous
patch. 
* gnu/java/awt/peer/x/XEventPump.java (findMouseEventTarget): new
method.
(handleButtonPress): use of findMouseEventTarget to detect the correct
target.
(handleButtonRelease):  likewise.
* gnu/java/awt/peer/x/XGraphics2D.java (rawDrawImage): clip the target
image
so that it is completely contained in the destination pixmaps, as per
X11
specification.
* gnu/java/awt/peer/x/XToolkit.java (createTextField): method
implemented. 
(createButton): likewise.
(prepareImage): likewise.
(createLabel): likewise.
(checkImage): likewise.
(createTextArea): likewise.
(createCheckbox): likewise.
(checkHeadLess): new method.
* gnu/javax/imageio/bmp/BMPImageWriter.java (write):
don't close the stream.
* gnu/javax/imageio/bmp/BMPImageWriterSpi.java (names): added new names
to
the list of known names for BMP.
* java/awt/image/WritableRaster.java (createWritableTranslatedChild): 
* javax/imageio/ImageIO.java (write): call dispose on ImageWriter after
writing of the image.
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/peer/x/XGraphics2D.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XGraphics2D.java,v
retrieving revision 1.11
diff -u -r1.11 XGraphics2D.java
--- gnu/java/awt/peer/x/XGraphics2D.java	7 May 2008 14:21:57 -	1.11
+++ gnu/java/awt/peer/x/XGraphics2D.java	15 Jun 2008 17:54:47 -
@@ -394,9 +394,23 @@
 xdrawable.put_image(xgc, zpixmap, x, y);
 imageCache.put(image, zpixmap);
   } else {
-ZPixmap zpixmap = (ZPixmap) xdrawable.image(x, y, w, h,
-0x,
-   gnu.x11.image.Image.Format.ZPIXMAP);
+
+// TODO optimize reusing the rectangles
+Rectangle source =
+  new Rectangle(0, 0, xdrawable.width, xdrawable.height);
+Rectangle target = new Rectangle(x, y, w, h);
+
+Rectangle destination = source.intersection(target); 
+
+x = destination.x;
+y = destination.y;
+w = destination.width;
+h = destination.height;
+
+ZPixmap zpixmap =
+  (ZPixmap) xdrawable.image(x, y, w, h,
+0x,
+gnu.x11.image.Image.Format.ZPIXMAP);
 for (int yy = 0; yy  h; yy++)
   {
 for (int xx = 0; xx  w; xx++)


Re: [cp-patches] FYI: scanline fix and image scaling for escher.

2008-06-15 Thread Mario Torre
Il giorno dom, 15/06/2008 alle 20.56 +0100, Andrew John Hughes ha
scritto:

 
 This change breaks the build:
 
 Index: gnu/java/awt/java2d/RasterGraphics.java
 ===
 RCS file: 
 /sources/classpath/classpath/gnu/java/awt/java2d/RasterGraphics.java,v
 retrieving revision 1.4
 diff -u -r1.4 RasterGraphics.java
 --- gnu/java/awt/java2d/RasterGraphics.java   29 May 2008 16:41:39 -  
 1.4
 +++ gnu/java/awt/java2d/RasterGraphics.java   15 Jun 2008 17:54:00 -
 @@ -38,6 +38,9 @@
 
  package gnu.java.awt.java2d;
 
 +import gnu.x11.image.ZPixmap;
 +
 +import java.awt.Color;

Ops, sorry, patch already committed :)

Mario

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/java2d/RasterGraphics.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/RasterGraphics.java,v
retrieving revision 1.5
diff -u -r1.5 RasterGraphics.java
--- gnu/java/awt/java2d/RasterGraphics.java	15 Jun 2008 18:14:55 -	1.5
+++ gnu/java/awt/java2d/RasterGraphics.java	15 Jun 2008 20:57:12 -
@@ -38,9 +38,6 @@
 
 package gnu.java.awt.java2d;
 
-import gnu.x11.image.ZPixmap;
-
-import java.awt.Color;
 import java.awt.GraphicsConfiguration;
 import java.awt.Rectangle;
 import java.awt.image.ColorModel;
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.9642
diff -u -r1.9642 ChangeLog
--- ChangeLog	15 Jun 2008 18:14:56 -	1.9642
+++ ChangeLog	15 Jun 2008 20:57:12 -
@@ -1,4 +1,9 @@
 2008-06-15  Mario Torre  [EMAIL PROTECTED]
+
+	* gnu/java/awt/java2d/RasterGraphics.java: remove unused import that cause
+	compilation to fail when xpeers are not enabled.
+
+2008-06-15  Mario Torre  [EMAIL PROTECTED]
  
 * gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): delegate to
 setPaint.


Re: CACAO 0.99 released.

2008-06-15 Thread Mario Torre
Il giorno sab, 14/06/2008 alle 16.54 +0200, Christian Thalinger ha
scritto:
 CACAO 0.99 Just one step left... released.

Hey, auguri!! :)

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[commit-cp] classpath gnu/java/awt/java2d/RasterGraphics.ja...

2008-06-15 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/06/15 20:58:12

Modified files:
gnu/java/awt/java2d: RasterGraphics.java 
.  : ChangeLog 

Log message:
2008-06-15  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/java2d/RasterGraphics.java: remove unused import 
that cause
compilation to fail when xpeers are not enabled.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/java2d/RasterGraphics.java?cvsroot=classpathr1=1.5r2=1.6
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9642r2=1.9643




Re: Savannah has Mercurial!

2008-06-06 Thread Mario Torre
Il giorno ven, 06/06/2008 alle 11.23 +0200, Roman Kennke ha scritto:

 Cheers, Roman

I tend to second Roman, and I give a +1 to the switch as soon as
possible!

HG needs some time to get used to, so I expect we will have some
troubles, but I think it's worth in the long time.

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: Savannah has Mercurial!

2008-06-06 Thread Mario Torre
Il giorno ven, 06/06/2008 alle 15.05 +0100, Ian Rogers ha scritto:
 Andrew John Hughes wrote:
  I just noticed this announcement when submitting the news announcement
  for 0.97.2.
 
  What do people think to the idea of switching?  Maybe post 0.98?
 

 Hi,
 
 just to give a different perspective. For Jikes RVM there's been no
 choice to use Mercurial as SourceForge don't provide it,

Hi Ian!

We use hg with escher, and it's hosted on sf. You may give a look at
this:

http://www.selenic.com/mercurial/wiki/index.cgi/MercurialOnSourceforge

It's not publicized, but allowed by the sf team as far as I know.

 So in summary, having a central repository that's an
 SVN repository can be a good thing as it supports the maximum number of
 version control tools. We have a list of different tools for working
 with our repository (hg, git, svn, svk, darcs, svm, rsync) and how to
 set them up with Jikes RVM here:
 
 http://jikesrvm.org/Using+Distributed+And+Local+Version+Control+Tools
 
 I may be talking rubbish as I'm not a version control guru. Regards,

I'm not sure I understand, but I don't think it's a good idea for
development to mix up.

Just my 2 cents :)

Mario




Re: [cp-patches] RFC: @file support for gjavah gjar

2008-06-04 Thread Mario Torre
Il giorno mer, 04/06/2008 alle 09.08 -0600, Tom Tromey ha scritto:

 Some of the indentation seems wrong to me, though I always find it a
 bit hard to tell due to diffs making tabs look weird.

I don't know if I say a popular thing or not, but please, expand your
tabs into spaces, it makes the whole code readable when I look at it
using cat and less, sometime is quite hard to understand, especially
when we have no brace code like:

if (true)
  doWhatever();
else
  someThingSeriouslyScrewedIfImHere();

It becomes sometime, for example like:

  if (true)
doWhatever();
  else
someThingSeriouslyScrewedIfImHere();

due to werid mix of tabs and spaces

Thanks,
Mario




Re: [cp-patches] FYI: renderScanline fixlets.

2008-06-01 Thread Mario Torre
Il giorno dom, 01/06/2008 alle 14.00 +0200, Mark Wielaard ha scritto:
 Hi Mario,
  
  +import gnu.java.awt.peer.x.XDialogPeer;
   import gnu.java.util.LRUCache;
   
   import java.awt.AWTError;
 
 This unncessarily pulls in one of the x peers, which won't compile
 unless you enable escher support. I have removed it:

Thanks for catching this, it went into for some unknown reason :)

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: renderScanline fixlets.

2008-05-29 Thread Mario Torre
Hi all!

this patch fixes the renderScanline method.
It would be great if it was a little faster and less generic, I'm
searching for some algorithm that we may use, though it's like moving in
a minefield, this kind of code is always very subject to patents (well,
I'm in the old Europe, but, you know...)

I'm committing it in, have a nice day,
Mario

2008-05-29  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): now set
directly
the foreground color the application wants to use to draw. On null,
behave
like OpenJDK, drawing black.
(renderScanline): fixed NPE, paintContext never initialized. Correctely
retrieve destination raster
(getColor): Return the correct type.
(static initializer): HashMap now typed.
(background): now defaults to black and not null.
(getPaintContext): new method. Initialize lazily the PaintContext.
(foreground): new field.
(isForegroundColorNull): likewise.
(getDeviceBounds): made abstract.
* gnu/java/awt/java2d/RasterGraphics.java (getDeviceBounds): new
method.
* gnu/java/awt/java2d/ScanlineConverter.java (renderShape): pass
correct
value of Y to doScanline.
* gnu/java/awt/peer/x/GLGraphics.java (getDeviceBounds): new method.
(setBackground): synch with new Escher 2.0 API.
* gnu/java/awt/peer/x/XGraphicsConfiguration.java
(getDefaultTransform):
implemented.
(getBounds): new method.
* java/awt/AlphaComposite.java (derive(int) and derive(float)):
new methods.
* java/awt/image/WritableRaster.java (createWritableTranslatedChild):
now call createWritableChild.
(createWritableChild): reformatted.

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/peer/x/XGraphicsConfiguration.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java,v
retrieving revision 1.3
diff -u -r1.3 XGraphicsConfiguration.java
--- gnu/java/awt/peer/x/XGraphicsConfiguration.java	20 Sep 2007 14:01:08 -	1.3
+++ gnu/java/awt/peer/x/XGraphicsConfiguration.java	29 May 2008 16:34:26 -
@@ -146,8 +146,7 @@
 
   public AffineTransform getDefaultTransform()
   {
-// TODO: Implement this.
-throw new UnsupportedOperationException(Not yet implemented.);
+return new AffineTransform();
   }
 
   public AffineTransform getNormalizingTransform()
@@ -158,8 +157,10 @@
 
   public Rectangle getBounds()
   {
-// TODO: Implement this.
-throw new UnsupportedOperationException(Not yet implemented.);
+Display d = device.getDisplay();
+Screen screen = d.default_screen;
+
+return new Rectangle(0, 0, screen.width, screen.height); 
   }
 
   /**
Index: gnu/java/awt/peer/x/GLGraphics.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/GLGraphics.java,v
retrieving revision 1.1
diff -u -r1.1 GLGraphics.java
--- gnu/java/awt/peer/x/GLGraphics.java	29 Jun 2006 15:15:56 -	1.1
+++ gnu/java/awt/peer/x/GLGraphics.java	29 May 2008 16:34:26 -
@@ -39,7 +39,9 @@
 
 import java.awt.Color;
 import java.awt.GraphicsConfiguration;
+import java.awt.Rectangle;
 import java.awt.image.ColorModel;
+import java.util.Map;
 
 import gnu.java.awt.java2d.AbstractGraphics2D;
 import gnu.x11.extension.glx.GL;
@@ -70,7 +72,7 @@
   public void setBackground(Color b)
   {
 super.setBackground(b);
-gl.clear_color(b.getRed() / 255.F, b.getGreen() / 255.F,
+gl.clearColor(b.getRed() / 255.F, b.getGreen() / 255.F,
b.getBlue() / 255.F, b.getAlpha() / 255.F);
   }
 
@@ -120,4 +122,12 @@
 throw new UnsupportedOperationException(Not yet implemented);
   }
 
+  @Override
+  protected Rectangle getDeviceBounds()
+  {
+// FIXME: not sure it's correct
+return new Rectangle(0, 0,
+ gl.display.default_screen.width, 
+ gl.display.default_screen.height);
+  }
 }
Index: java/awt/AlphaComposite.java
===
RCS file: /sources/classpath/classpath/java/awt/AlphaComposite.java,v
retrieving revision 1.10
diff -u -r1.10 AlphaComposite.java
--- java/awt/AlphaComposite.java	21 Jun 2007 05:35:45 -	1.10
+++ java/awt

[commit-cp] classpath gnu/java/awt/peer/x/GLGraphics.java g...

2008-05-29 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/05/29 16:41:43

Modified files:
gnu/java/awt/peer/x: GLGraphics.java XGraphicsConfiguration.java 
gnu/java/awt/java2d: RasterGraphics.java AbstractGraphics2D.java 
 ScanlineConverter.java 
java/awt   : AlphaComposite.java 
.  : ChangeLog 
java/awt/image : WritableRaster.java 

Log message:
2008-05-29  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): now 
set directly
the foreground color the application wants to use to draw. On 
null, behave
like OpenJDK, drawing black.
(renderScanline): fixed NPE, paintContext never initialized. 
Correctely
retrieve destination raster
(getColor): Return the correct type.
(static initializer): HashMap now typed.
(background): now defaults to black and not null.
(getPaintContext): new method. Initialize lazily the 
PaintContext.
(foreground): new field.
(isForegroundColorNull): likewise.
(getDeviceBounds): made abstract.
* gnu/java/awt/java2d/RasterGraphics.java (getDeviceBounds): 
new method.
* gnu/java/awt/java2d/ScanlineConverter.java (renderShape): 
pass correct
value of Y to doScanline.
* gnu/java/awt/peer/x/GLGraphics.java (getDeviceBounds): new 
method.
(setBackground): synch with new Escher 2.0 API.
* gnu/java/awt/peer/x/XGraphicsConfiguration.java 
(getDefaultTransform):
implemented.
(getBounds): new method.
* java/awt/AlphaComposite.java (derive(int) and derive(float)):
new methods.
* java/awt/image/WritableRaster.java 
(createWritableTranslatedChild):
now call createWritableChild.
(createWritableChild): reformatted.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/GLGraphics.java?cvsroot=classpathr1=1.1r2=1.2
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java?cvsroot=classpathr1=1.3r2=1.4
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/java2d/RasterGraphics.java?cvsroot=classpathr1=1.3r2=1.4
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java?cvsroot=classpathr1=1.20r2=1.21
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/java2d/ScanlineConverter.java?cvsroot=classpathr1=1.6r2=1.7
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/AlphaComposite.java?cvsroot=classpathr1=1.10r2=1.11
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9621r2=1.9622
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/image/WritableRaster.java?cvsroot=classpathr1=1.10r2=1.11




[cp-patches] FYI: fixing resizing of windows in escher peer.

2008-05-19 Thread Mario Torre
Hello all!

This patch fixes a problem with resizing windows in the escher peers.

Please note that now Classpath needs a not yet released escher version
when build with escher support, you can find this in the new mercurial
repository:

http://escher.sourceforge.net/hg//escher-trunk

I'll update the news and try to push out an escher release as soon as
things are a little more stable. [1]

Mario

[1] Actually escher is in a funny state with a mix of new and old API,
which in turns means also a mix of CamelCase and classical_c_case
convetions...

2008-05-19  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XEventPump.java (handleExpose): new method. 
(handleDestroyNotify): likewise.
(handleClientMessage): likewise.
(handleButtonRelease): likewise.
(handleMotionNotify): likewise.
(handleKeyEvent): likewise.
(handleButtonPress): likewise.
(handleEvent): refactored to use new methods instead of a big switch
block. Fixed resizing of windows.
* gnu/java/awt/peer/x/XWindowPeer.java (standardSelect): update list
of flags for X11 events handling.
(callback): removed now unused flag. 

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/peer/x/XWindowPeer.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XWindowPeer.java,v
retrieving revision 1.7
diff -u -r1.7 XWindowPeer.java
--- gnu/java/awt/peer/x/XWindowPeer.java	7 May 2008 14:21:58 -	1.7
+++ gnu/java/awt/peer/x/XWindowPeer.java	19 May 2008 14:06:36 -
@@ -71,23 +71,16 @@
   private static int standardSelect = Event.BUTTON_PRESS_MASK
   | Event.BUTTON_RELEASE_MASK
   | Event.POINTER_MOTION_MASK
-  //| Event.RESIZE_REDIRECT_MASK
+ // | Event.RESIZE_REDIRECT_MASK //
   | Event.EXPOSURE_MASK
   | Event.PROPERTY_CHANGE_MASK
-  | Event.STRUCTURE_NOTIFY_MASK
-  | Event.SUBSTRUCTURE_NOTIFY_MASK
+  //| Event.STRUCTURE_NOTIFY_MASK
+  //| Event.SUBSTRUCTURE_NOTIFY_MASK
   | Event.KEY_PRESS_MASK
   | Event.KEY_RELEASE_MASK
-  //| Event.VISIBILITY_CHANGE_MASK
+  //| Event.VISIBILITY_CHANGE_MASK //
   ;
-
-  /**
-   * Indicates if we are in callback mode, that is when a property (like size)
-   * is changed in reponse to a request from the X server and doesn't need
-   * to be propagated back to the X server.
-   */
-  boolean callback = false;
-
+  
   /**
* The X window.
*/
@@ -273,14 +266,9 @@
*/
   public void reshape(int x, int y, int width, int height)
   {
-// Need to substract insets because AWT size is including insets,
-// and X size is excluding insets.
-if (! callback)
-  {
-Insets i = insets;
-xwindow.move_resize(x - i.left, y - i.right, width - i.left - i.right,
-height - i.top - i.bottom);
-  }
+Insets i = insets;
+xwindow.move_resize(x - i.left, y - i.right, width - i.left - i.right,
+height - i.top - i.bottom);
   }
 
   public Insets insets()
Index: gnu/java/awt/peer/x/XEventPump.java
===
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/x/XEventPump.java,v
retrieving revision 1.10
diff -u -r1.10 XEventPump.java
--- gnu/java/awt/peer/x/XEventPump.java	7 May 2008 14:40:39 -	1.10
+++ gnu/java/awt/peer/x/XEventPump.java	19 May 2008 14:06:36 -
@@ -38,6 +38,7 @@
 
 package gnu.java.awt.peer.x;
 
+import java.awt.AWTEvent;
 import java.awt.Graphics;
 import java.awt.Insets;
 import java.awt.Rectangle;
@@ -50,6 +51,8 @@
 import java.awt.event.WindowEvent;
 import java.util.HashMap;
 
+import gnu.java.awt.ComponentReshapeEvent;
+import gnu.x11.Atom;
 import gnu.x11.Display;
 import gnu.x11.event.ButtonPress;
 import gnu.x11.event.ButtonRelease;
@@ -62,6 +65,8 @@
 import gnu.x11.event.KeyPress;
 import gnu.x11

[commit-cp] classpath gnu/java/awt/peer/x/XWindowPeer.java ...

2008-05-19 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/05/19 14:16:23

Modified files:
gnu/java/awt/peer/x: XWindowPeer.java XEventPump.java 
.  : ChangeLog 

Log message:
2008-05-19  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XEventPump.java (handleExpose): new 
method. 
(handleDestroyNotify): likewise.
(handleClientMessage): likewise.
(handleButtonRelease): likewise.
(handleMotionNotify): likewise.
(handleKeyEvent): likewise.
(handleButtonPress): likewise.
(handleEvent): refactored to use new methods instead of a big 
switch
block. Fixed resizing of windows.
* gnu/java/awt/peer/x/XWindowPeer.java (standardSelect): update 
list
of flags for X11 events handling.
(callback): removed now unused flag. 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XWindowPeer.java?cvsroot=classpathr1=1.7r2=1.8
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XEventPump.java?cvsroot=classpathr1=1.10r2=1.11
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9616r2=1.9617




[cp-patches] FYI: gcc 4.3.0 warnings Java_math_VMBigInteger

2008-05-16 Thread Mario Torre
This fixes a warning that comes to an error on my system, preventing
compilation.

Cheers,
Mario

2008-05-16  Mario Torre  [EMAIL PROTECTED]

* native/jni/java-math/java_math_VMBigInteger.c
(Java_java_math_VMBigInteger_natModInverse): fix variable res not
initialized. 

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: native/jni/java-math/java_math_VMBigInteger.c
===
RCS file: /sources/classpath/classpath/native/jni/java-math/java_math_VMBigInteger.c,v
retrieving revision 1.1
diff -u -r1.1 java_math_VMBigInteger.c
--- native/jni/java-math/java_math_VMBigInteger.c	28 Feb 2008 22:44:23 -	1.1
+++ native/jni/java-math/java_math_VMBigInteger.c	16 May 2008 18:32:42 -
@@ -1112,7 +1112,7 @@
 #if defined(WITH_GNU_MP)
   mpz_srcptr _this;
   mpz_ptr _bi;
-  unsigned long res;
+  unsigned long res = 0;
 
   TRACE(begin);
   _this = (mpz_srcptr)JCL_GetRawData (env, (*env)-GetObjectField (env, this, native_ptr));


[commit-cp] classpath/native/jni/java-math java_math_VMBigI...

2008-05-16 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/05/16 18:49:33

Modified files:
native/jni/java-math: java_math_VMBigInteger.c 

Log message:
2008-05-16  Mario Torre  [EMAIL PROTECTED]

* native/jni/java-math/java_math_VMBigInteger.c
(Java_java_math_VMBigInteger_natModInverse): fix variable res 
not
initialized.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-math/java_math_VMBigInteger.c?cvsroot=classpathr1=1.1r2=1.2




Re: Classpath 0.98

2008-05-14 Thread Mario Torre
Il giorno dom, 11/05/2008 alle 15.55 +0100, Andrew John Hughes ha
scritto:
 On 11/05/2008, Ian Rogers [EMAIL PROTECTED] wrote:
  Andrew John Hughes wrote:
 
   Dear all,
  
   I think it's about time we started to consider another (major)
   release.  My personal wishlist of things to finish for this release

If we can delay a little, I would like to finish two things:

1. escher peer made usable

I'm almost there, but I'm fixing a couple of bugs that are important, I
guess I'll need a full week to make things solid.

2. Fix the bug in the GConf backend.

It's too much time now really, I want to fix this bug, but I can work on
this only on this weekend, maybe the next one... so it makes a full week
again.

Let me know if it's ok for you to wait a little, I don't want to delay
the release, so feel free to ignore me :)

Btw, we need the usual testing period anyway, but I think Classpath is
better than ever :)

Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/





[commit-cp] classpath java/awt/Component.java gnu/java/awt/...

2008-05-07 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/05/07 14:22:01

Modified files:
java/awt   : Component.java 
gnu/java/awt/peer/x: XFramePeer.java XGraphics2D.java 
 XWindowPeer.java XEventPump.java 
.  : ChangeLog 

Log message:
2008-05-07  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XEventPump.java (handleEvent): 
xEvent.code is now
masked to identify and react to syntetic events.
Added UnmapNotify, DestroyNotify and ClientMessage to the list 
of event
handled.
* gnu/java/awt/peer/x/XFramePeer.java (getState): initial 
implementation.
* gnu/java/awt/peer/x/XGraphics2D.java (setPaint): fix NPE, 
this is a
workaround, the code have to be fixed in a better way.
* gnu/java/awt/peer/x/XWindowPeer.java (getXwindow): new method 
to allow
access to the underling xwindow.
(standardSelect): add more events for notification.
(XWindowPeer): call set_wm_delete_window to ask the WM to 
notify us
when a delete event occur.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/Component.java?cvsroot=classpathr1=1.158r2=1.159
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XFramePeer.java?cvsroot=classpathr1=1.5r2=1.6
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XGraphics2D.java?cvsroot=classpathr1=1.10r2=1.11
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XWindowPeer.java?cvsroot=classpathr1=1.6r2=1.7
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XEventPump.java?cvsroot=classpathr1=1.8r2=1.9
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9604r2=1.9605




[commit-cp] classpath gnu/java/awt/peer/x/XEventPump.java C...

2008-05-07 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/05/07 14:40:41

Modified files:
gnu/java/awt/peer/x: XEventPump.java 
.  : ChangeLog 

Log message:
2008-05-07  Mario Torre  [EMAIL PROTECTED]

* gnu/java/awt/peer/x/XEventPump.java (handleEvent):
Fixed mouse dragging and movement in XEventPump. Patch from 
Roman Kennke.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XEventPump.java?cvsroot=classpathr1=1.9r2=1.10
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9605r2=1.9606




[cp-patches] RFC: File bug Fix and small VM interface change

2008-04-09 Thread Mario Torre
Hello all!

I would like to submit this fix.

The problem is that to detect if a file is writable we actually open it
for writing... Even worse, in the case of a directory, we write to it a
temp file!

There are a number of issues that I see wrong here, but what worries me
most is that these operations can kill filesystem that reside on compact
flash memories and other devices that have a limited number of write.

The current fix does two things.

1. introduce a new method, native, canWriteDirectory(String path)
This method is meant to be implemented by whoever implements the VM
interface, so that it can do nice things with their target environment.
The default implementation works on Linux and should work on any *nix
operating systems. I've left canWriteDirectory(File file) for backward
compatibility, but I guess no one uses this anyway (it defer to the
native method).

2. Change the implementation of Java_java_io_VMFile_canWrite and
Java_java_io_VMFile_canRead so that they use cpio_checkAccess now,
instead of doing the old The lazy man's way out (which is also more
code, btw...)

I'm going to submit this today if no one complains, any ideas?

Ah, before I forget, there are a number of unrelated fixes like
indentation and all the function signature now reflect the fact that
these methods are static (jclass instead of jobject). It would be handy
here to use mercurial (hg record) to separate patchsets.

Mario


2008-04-09  Mario Torre  [EMAIL PROTECTED]
 
* java/io/File.java (canWrite): use canWriteDirectory(String). 
* vm/reference/java/io/VMFile.java (canWriteDirectory): new native
method. 
* native/jni/java-io/java_io_VMFile.c: correct indentation, sync
function
names with header file definition.
(Java_java_io_VMFile_canRead): use cpio_checkAccess to get access
permission. Removed unused variable.
(Java_java_io_VMFile_canWrite): likewise.
(Java_java_io_VMFile_canWriteDirectory): new function.
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/io/File.java
===
RCS file: /sources/classpath/classpath/java/io/File.java,v
retrieving revision 1.72
diff -u -r1.72 File.java
--- java/io/File.java	6 Nov 2007 13:38:39 -	1.72
+++ java/io/File.java	9 Apr 2008 18:28:36 -
@@ -158,7 +158,7 @@
   return false;
 
 if (VMFile.isDirectory(path))
-  return VMFile.canWriteDirectory(this);
+  return VMFile.canWriteDirectory(path);
 else
   return VMFile.canWrite(path);
   }
Index: native/jni/java-io/java_io_VMFile.c
===
RCS file: /sources/classpath/classpath/native/jni/java-io/java_io_VMFile.c,v
retrieving revision 1.16
diff -u -r1.16 java_io_VMFile.c
--- native/jni/java-io/java_io_VMFile.c	6 Nov 2007 13:38:39 -	1.16
+++ native/jni/java-io/java_io_VMFile.c	9 Apr 2008 18:28:36 -
@@ -97,7 +97,7 @@
   if (result != CPNATIVE_OK)
 {
   if (result != EEXIST)
-	JCL_ThrowException (env,
+JCL_ThrowException (env,
 			java/io/IOException,
 			cpnative_getErrorString (result));
   JCL_free_cstring (env, name, filename);
@@ -124,12 +124,11 @@
 
 JNIEXPORT jboolean JNICALL
 Java_java_io_VMFile_canRead (JNIEnv * env,
-			 jobject obj __attribute__ ((__unused__)),
-			 jstring name)
+ jclass clazz __attribute__ ((__unused__)),
+ jstring name)
 {
 #ifndef WITHOUT_FILESYSTEM
   const char *filename;
-  int fd;
   int result;
 
   /* Don't use the JCL convert function because it throws an exception
@@ -137,20 +136,18 @@
   filename = (*env)-GetStringUTFChars (env, name, 0);
   if (filename == NULL)
 {
-  return 0;
+  return JNI_FALSE;
 }
 
-  /* The lazy man's way out.  We actually do open the file for reading
- briefly

Re: [cp-patches] RFC: File bug Fix and small VM interface change

2008-04-09 Thread Mario Torre

On Wed, 2008-04-09 at 19:59 +0100, Ian Rogers wrote:
 Hi Mario,
 
 this looks like a good patch so +1 from me. Just to note that we've been 
 discussing the VMFile interface in a Jikes RVM tracker [1] and that on 
 IRC MJW pointed out that GCJ's implementation appeared to vary from that 
 of Classpath [2] [3] [4].
 
 Regards,
 Ian

I think that the GCJ implementation makes sense, maybe we should adopt
it at some point, even though for now I'll stay with the Classpath
version. :)

Thanks for the reply!
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: File bug Fix and small VM interface change

2008-04-09 Thread Mario Torre
On Wed, 2008-04-09 at 19:59 +0100, Ian Rogers wrote:
 Hi Mario,
 
 this looks like a good patch so +1 from me. Just to note that we've been 
 discussing the VMFile interface in a Jikes RVM tracker [1] and that on 
 IRC MJW pointed out that GCJ's implementation appeared to vary from that 
 of Classpath [2] [3] [4].
 
 Regards,
 Ian

Committed, thanks,
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: Qname and SAXParser Fixlets

2008-04-09 Thread Mario Torre
I've fixed a couple of small bugs in SAXParser and QName.

SAXParser incorrectly throws SAXNotSupportedException, the spec says
that this exception should be thrown if the property is recognized, but
not supported.

QName should throw IllegalArgumentException if the passed String is
null.

I've also fixed an indentation problem I've left out from my previous
CopyOnWriteArrayList patch.

Mario

2008-03-27  Mario Torre  [EMAIL PROTECTED]

* gnu/xml/stream/SAXParser.java (getProperty): throw
SAXNotRecognizedException instead of SAXNotSupportedException
after fall through all known properties.
* javax/xml/namespace/QName.java (valueOf): throw
IllegalArgumentException if string is null.
* java/util/concurrent/CopyOnWriteArrayList.java (lastIndexOf):
fixed indentation.
(indexOf): likewise. 

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/xml/stream/SAXParser.java
===
RCS file: /sources/classpath/classpath/gnu/xml/stream/SAXParser.java,v
retrieving revision 1.25
diff -u -r1.25 SAXParser.java
--- gnu/xml/stream/SAXParser.java	18 Sep 2007 21:52:32 -	1.25
+++ gnu/xml/stream/SAXParser.java	27 Mar 2008 17:34:20 -
@@ -233,7 +233,7 @@
   return baseAware ? Boolean.TRUE : Boolean.FALSE;
 if ((GNU_PROPERTIES + document-xml-encoding).equals(name))
   return xmlEncoding;
-throw new SAXNotSupportedException(name);
+throw new SAXNotRecognizedException(name);
   }
 
   public boolean isXIncludeAware()
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.9
diff -u -r1.9 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 16:07:29 -	1.9
+++ java/util/concurrent/CopyOnWriteArrayList.java	27 Mar 2008 17:34:20 -
@@ -236,7 +236,7 @@
 
 for (int i = index; i  data.length; i++)
   if (equals(e, data[i]))
-	return i;
+return i;
 return -1;
   }
 
@@ -272,7 +272,7 @@
 
 for (int i = index; i = 0; i--)
   if (equals(e, data[i]))
-	return i;
+return i;
 return -1;
   }
 
Index: javax/xml/namespace/QName.java
===
RCS file: /sources/classpath/classpath/javax/xml/namespace/QName.java,v
retrieving revision 1.9
diff -u -r1.9 QName.java
--- javax/xml/namespace/QName.java	11 Jan 2006 22:05:45 -	1.9
+++ javax/xml/namespace/QName.java	27 Mar 2008 17:34:20 -
@@ -146,6 +146,9 @@
 
   public static QName valueOf(String qNameAsString)
   {
+if (qNameAsString == null)
+  throw new IllegalArgumentException(qNameAsString can't be null);
+
 String namespaceUri = , prefix = null;
 int start = qNameAsString.indexOf('{');
 int end = qNameAsString.indexOf('}');


[cp-patches] FYI: CopyOnWriteArrayList fixlets, part II

2008-04-09 Thread Mario Torre
This should fix the last stuff. Maybe the Iterator returned by this
subList needs some love too, but for now I'm happy. It passes all the
tck public domain tests :)

I've just pushed a mauve test also.

Ciao,
Mario

2008-03-26  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java (SubList.set): 
(SubList.clear): new method.
(SubList.checkMod): fix indentation.
(SubList.checkBoundsInclusive):  likewise. 
(SubList.checkBoundsExclusive): likewise.
(SubList): added synchronization. Now throw
IndexOutOfBoundsException instead of IllegalArgumentException
when index are out of range.
(SubList.size): added synchronization.
(SubList.get): likewise.
(SubList.listIterator): fixed indentation.
(SubList.set): added synchronization. Update the state of the
storage
after modification.
(SubList.add): likewise.
(SubList.remove): likewise.
(SubList.addAll): likewise.

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.8
diff -u -r1.8 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 11:23:40 -	1.8
+++ java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 16:03:15 -
@@ -53,7 +53,6 @@
 import java.util.ListIterator;
 import java.util.NoSuchElementException;
 import java.util.RandomAccess;
-import java.util.concurrent.ConcurrentSkipListMap.Iter;
 
 /**
  * A thread-safe implementation of an ArrayList. A CopyOnWriteArrayList is
@@ -911,16 +910,16 @@
* @return a List backed by a subsection of this list
* @throws IndexOutOfBoundsException if fromIndex lt; 0
* || toIndex gt; size()
-   * @throws IllegalArgumentException if fromIndex gt; toIndex
+   * @throws IndexOutOfBoundsException if fromIndex gt; toIndex
* @see ConcurrentModificationException
* @see RandomAccess
*/
-  public ListE subList(int fromIndex, int toIndex)
+  public synchronized ListE subList(int fromIndex, int toIndex)
   {
 // This follows the specification of AbstractList, but is inconsistent
 // with the one in List. Don't you love Sun's inconsistencies?
 if (fromIndex  toIndex)
-  throw new IllegalArgumentException(fromIndex ++ toIndex);
+  throw new IndexOutOfBoundsException(fromIndex ++ toIndex);
 if (fromIndex  0 || toIndex  size())
   throw new IndexOutOfBoundsException();
 
@@ -976,7 +975,7 @@
 void checkMod()
 {
   if (data != backingList.data)
-	throw new ConcurrentModificationException();
+throw new ConcurrentModificationException();
 }
 
 /**
@@ -990,8 +989,8 @@
 private void checkBoundsInclusive(int index)
 {
   if (index  0 || index  size)
-	throw new IndexOutOfBoundsException(Index:  + index + , Size:
-	+ size);
+throw new IndexOutOfBoundsException(Index:  + index +
+, Size: + size);
 }
 
 /**
@@ -1005,8 +1004,8 @@
 private void checkBoundsExclusive(int index)
 {
   if (index  0 || index = size)
-	throw new IndexOutOfBoundsException(Index:  + index + , Size:
-	+ size);
+throw new IndexOutOfBoundsException(Index:  + index +
+, Size: + size);
 }
 
 /**
@@ -1018,8 +1017,30 @@
  */
 public int size()
 {
-  checkMod();
-  return size;
+  synchronized (backingList)
+{
+  checkMod();
+  return size;
+}
+}
+
+public void clear()
+{
+  synchronized (backingList)
+{
+  E[] snapshot = backingList.data;
+  E[] newData = (E[]) new Object[snapshot.length - size];
+
+  int toIndex = size + offset;
+  
+  System.arraycopy(snapshot, 0, newData, 0, offset);
+  System.arraycopy(snapshot, toIndex, newData, offset,
+   snapshot.length - toIndex);
+  
+  backingList.data = newData;
+  this.data = backingList.data;
+  this.size = 0;
+}
 }
 
 /**
@@ -1040,9 +1061,16 @@
  */
 public E set(int index, E o)
 {
-  checkMod();
-  checkBoundsExclusive(index);
-  return

[cp-patches] RFC: File bug Fix and small VM interface change

2008-04-09 Thread Mario Torre
Hello all!

I would like to submit this fix.

The problem is that to detect if a file is writable we actually open it
for writing... Even worse, in the case of a directory, we write to it a
temp file!

There are a number of issues that I see wrong here, but what worries me
most is that these operations can kill filesystem that reside on compact
flash memories and other devices that have a limited number of write.

The current fix does two things.

1. introduce a new method, native, canWriteDirectory(String path)
This method is meant to be implemented by whoever implements the VM
interface, so that it can do nice things with their target environment.
The default implementation works on Linux and should work on any *nix
operating systems. I've left canWriteDirectory(File file) for backward
compatibility, but I guess no one uses this anyway (it defer to the
native method).

2. Change the implementation of Java_java_io_VMFile_canWrite and
Java_java_io_VMFile_canRead so that they use cpio_checkAccess now,
instead of doing the old The lazy man's way out (which is also more
code, btw...)

I'm going to submit this today if no one complains, any ideas?

Ah, before I forget, there are a number of unrelated fixes like
indentation and all the function signature now reflect the fact that
these methods are static (jclass instead of jobject). It would be handy
here to use mercurial (hg record) to separate patchsets.

Mario


2008-04-09  Mario Torre  [EMAIL PROTECTED]
 
* java/io/File.java (canWrite): use canWriteDirectory(String). 
* vm/reference/java/io/VMFile.java (canWriteDirectory): new native
method. 
* native/jni/java-io/java_io_VMFile.c: correct indentation, sync
function
names with header file definition.
(Java_java_io_VMFile_canRead): use cpio_checkAccess to get access
permission. Removed unused variable.
(Java_java_io_VMFile_canWrite): likewise.
(Java_java_io_VMFile_canWriteDirectory): new function.
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/io/File.java
===
RCS file: /sources/classpath/classpath/java/io/File.java,v
retrieving revision 1.72
diff -u -r1.72 File.java
--- java/io/File.java	6 Nov 2007 13:38:39 -	1.72
+++ java/io/File.java	9 Apr 2008 18:28:36 -
@@ -158,7 +158,7 @@
   return false;
 
 if (VMFile.isDirectory(path))
-  return VMFile.canWriteDirectory(this);
+  return VMFile.canWriteDirectory(path);
 else
   return VMFile.canWrite(path);
   }
Index: native/jni/java-io/java_io_VMFile.c
===
RCS file: /sources/classpath/classpath/native/jni/java-io/java_io_VMFile.c,v
retrieving revision 1.16
diff -u -r1.16 java_io_VMFile.c
--- native/jni/java-io/java_io_VMFile.c	6 Nov 2007 13:38:39 -	1.16
+++ native/jni/java-io/java_io_VMFile.c	9 Apr 2008 18:28:36 -
@@ -97,7 +97,7 @@
   if (result != CPNATIVE_OK)
 {
   if (result != EEXIST)
-	JCL_ThrowException (env,
+JCL_ThrowException (env,
 			java/io/IOException,
 			cpnative_getErrorString (result));
   JCL_free_cstring (env, name, filename);
@@ -124,12 +124,11 @@
 
 JNIEXPORT jboolean JNICALL
 Java_java_io_VMFile_canRead (JNIEnv * env,
-			 jobject obj __attribute__ ((__unused__)),
-			 jstring name)
+ jclass clazz __attribute__ ((__unused__)),
+ jstring name)
 {
 #ifndef WITHOUT_FILESYSTEM
   const char *filename;
-  int fd;
   int result;
 
   /* Don't use the JCL convert function because it throws an exception
@@ -137,20 +136,18 @@
   filename = (*env)-GetStringUTFChars (env, name, 0);
   if (filename == NULL)
 {
-  return 0;
+  return JNI_FALSE;
 }
 
-  /* The lazy man's way out.  We actually do open the file for reading
- briefly to verify it can be done */
-  result = cpio_openFile (filename, fd, CPFILE_FLAG_READ, 0);
+  result = cpio_checkAccess (filename, CPFILE_FLAG_READ);
+  
   (*env)-ReleaseStringUTFChars (env, name, filename);
   if (result != CPNATIVE_OK)
-return 0;
-  cpio_closeFile (fd);
+return JNI_FALSE;
 
-  return 1;
+  return JNI_TRUE;
 #else /* not WITHOUT_FILESYSTEM */
-  return 0;
+  return JNI_FALSE;
 #endif /* not WITHOUT_FILESYSTEM */
 }
 
@@ -166,12 +163,11 @@
 
 JNIEXPORT jboolean JNICALL
 Java_java_io_VMFile_canWrite (JNIEnv * env

[commit-cp] classpath native/jni/java-io/java_io_VMFile.c C...

2008-04-09 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/04/09 20:23:16

Modified files:
native/jni/java-io: java_io_VMFile.c 
.  : ChangeLog 
vm/reference/java/io: VMFile.java 
java/io: File.java 

Log message:
2008-04-09  Mario Torre  [EMAIL PROTECTED]
 
* java/io/File.java (canWrite): use canWriteDirectory(String). 
* vm/reference/java/io/VMFile.java (canWriteDirectory): new 
native method. 
* native/jni/java-io/java_io_VMFile.c: correct indentation, 
sync function
names with header file definition.
(Java_java_io_VMFile_canRead): use cpio_checkAccess to get 
access
permission. Removed unused variable.
(Java_java_io_VMFile_canWrite): likewise.
(Java_java_io_VMFile_canWriteDirectory): new function.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-io/java_io_VMFile.c?cvsroot=classpathr1=1.16r2=1.17
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9571r2=1.9572
http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/java/io/VMFile.java?cvsroot=classpathr1=1.12r2=1.13
http://cvs.savannah.gnu.org/viewcvs/classpath/java/io/File.java?cvsroot=classpathr1=1.72r2=1.73




[cp-patches] FYI: Qname and SAXParser Fixlets

2008-03-27 Thread Mario Torre
I've fixed a couple of small bugs in SAXParser and QName.

SAXParser incorrectly throws SAXNotSupportedException, the spec says
that this exception should be thrown if the property is recognized, but
not supported.

QName should throw IllegalArgumentException if the passed String is
null.

I've also fixed an indentation problem I've left out from my previous
CopyOnWriteArrayList patch.

Mario

2008-03-27  Mario Torre  [EMAIL PROTECTED]

* gnu/xml/stream/SAXParser.java (getProperty): throw
SAXNotRecognizedException instead of SAXNotSupportedException
after fall through all known properties.
* javax/xml/namespace/QName.java (valueOf): throw
IllegalArgumentException if string is null.
* java/util/concurrent/CopyOnWriteArrayList.java (lastIndexOf):
fixed indentation.
(indexOf): likewise. 

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/xml/stream/SAXParser.java
===
RCS file: /sources/classpath/classpath/gnu/xml/stream/SAXParser.java,v
retrieving revision 1.25
diff -u -r1.25 SAXParser.java
--- gnu/xml/stream/SAXParser.java	18 Sep 2007 21:52:32 -	1.25
+++ gnu/xml/stream/SAXParser.java	27 Mar 2008 17:34:20 -
@@ -233,7 +233,7 @@
   return baseAware ? Boolean.TRUE : Boolean.FALSE;
 if ((GNU_PROPERTIES + document-xml-encoding).equals(name))
   return xmlEncoding;
-throw new SAXNotSupportedException(name);
+throw new SAXNotRecognizedException(name);
   }
 
   public boolean isXIncludeAware()
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.9
diff -u -r1.9 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 16:07:29 -	1.9
+++ java/util/concurrent/CopyOnWriteArrayList.java	27 Mar 2008 17:34:20 -
@@ -236,7 +236,7 @@
 
 for (int i = index; i  data.length; i++)
   if (equals(e, data[i]))
-	return i;
+return i;
 return -1;
   }
 
@@ -272,7 +272,7 @@
 
 for (int i = index; i = 0; i--)
   if (equals(e, data[i]))
-	return i;
+return i;
 return -1;
   }
 
Index: javax/xml/namespace/QName.java
===
RCS file: /sources/classpath/classpath/javax/xml/namespace/QName.java,v
retrieving revision 1.9
diff -u -r1.9 QName.java
--- javax/xml/namespace/QName.java	11 Jan 2006 22:05:45 -	1.9
+++ javax/xml/namespace/QName.java	27 Mar 2008 17:34:20 -
@@ -146,6 +146,9 @@
 
   public static QName valueOf(String qNameAsString)
   {
+if (qNameAsString == null)
+  throw new IllegalArgumentException(qNameAsString can't be null);
+
 String namespaceUri = , prefix = null;
 int start = qNameAsString.indexOf('{');
 int end = qNameAsString.indexOf('}');


[commit-cp] classpath java/util/concurrent/CopyOnWriteArray...

2008-03-27 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/03/27 17:39:28

Modified files:
java/util/concurrent: CopyOnWriteArrayList.java 
gnu/xml/stream : SAXParser.java 
.  : ChangeLog 
javax/xml/namespace: QName.java 

Log message:
2008-03-27  Mario Torre  [EMAIL PROTECTED]

* gnu/xml/stream/SAXParser.java (getProperty): throw
SAXNotRecognizedException instead of SAXNotSupportedException
after fall through all known properties.
* javax/xml/namespace/QName.java (valueOf): throw
IllegalArgumentException if string is null.
* java/util/concurrent/CopyOnWriteArrayList.java (lastIndexOf):
fixed indentation.
(indexOf): likewise. 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/concurrent/CopyOnWriteArrayList.java?cvsroot=classpathr1=1.9r2=1.10
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/stream/SAXParser.java?cvsroot=classpathr1=1.25r2=1.26
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9568r2=1.9569
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/xml/namespace/QName.java?cvsroot=classpathr1=1.9r2=1.10




[cp-patches] FYI: CopyOnWriteArrayList fixlets, part II

2008-03-26 Thread Mario Torre
This fixes the hashCode method to comply with the OpenJDK
documentation. Now we pass all the public domain tck tests for this
class, except the SubList one.

Thanks,
Mario

2008-03-26  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java (equals):
removed useless local variable.
(hashCode): new method.
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.7
diff -u -r1.7 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	25 Mar 2008 19:56:29 -	1.7
+++ java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 11:18:33 -
@@ -705,8 +705,6 @@
 if (this == o)
   return true;
 
-boolean _equals = false;
-
 // let's see if 'o' is a list, if so, we need to compare the elements
 // as returned by the iterator
 if (o instanceof List)
@@ -723,10 +721,21 @@
   return false;
   }
 
-_equals = true;
+return true;
+  }
+
+return false;
+  }
+  
+  public int hashCode()
+  {
+// see http://java.sun.com/6/docs/api/java/util/List.html#hashcode()
+int hashcode = 1;
+for (E element : this)
+  {
+hashcode = 31 * hashcode + (element == null ? 0 : element.hashCode());
   }
- 
-return _equals;
+return hashcode;
   }
   
   /**
Index: ChangeLog
===
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.9566
diff -u -r1.9566 ChangeLog
--- ChangeLog	25 Mar 2008 19:56:30 -	1.9566
+++ ChangeLog	26 Mar 2008 11:18:33 -
@@ -1,3 +1,9 @@
+2008-03-26  Mario Torre  [EMAIL PROTECTED]
+
+	* java/util/concurrent/CopyOnWriteArrayList.java (equals): removed useless
+	local variable. 
+	(hashCode): new method.
+
 2008-03-25  Mario Torre  [EMAIL PROTECTED]
 
 	* java/util/concurrent/CopyOnWriteArrayList.java (clone): clone method


Re: [cp-patches] FYI: CopyOnWriteArrayList fixlets, part II

2008-03-26 Thread Mario Torre

On Wed, 2008-03-26 at 12:32 +, Andrew John Hughes wrote:

 Not sure what the failure is, but looking at the code I guess that the
 sublist should be acquiring the same lock that the main set, etc.
 methods do (i.e. on the list itself) for each operation so that the
 array is not modified behind its back.

Yeah, exactly, I'm just adding the code for that. I'll post a patch in
few minutes, so stay tuned :)

Cheers,
Mario
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: CopyOnWriteArrayList fixlets, part II

2008-03-26 Thread Mario Torre
This should fix the last stuff. Maybe the Iterator returned by this
subList needs some love too, but for now I'm happy. It passes all the
tck public domain tests :)

I've just pushed a mauve test also.

Ciao,
Mario

2008-03-26  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java (SubList.set): 
(SubList.clear): new method.
(SubList.checkMod): fix indentation.
(SubList.checkBoundsInclusive):  likewise. 
(SubList.checkBoundsExclusive): likewise.
(SubList): added synchronization. Now throw
IndexOutOfBoundsException instead of IllegalArgumentException
when index are out of range.
(SubList.size): added synchronization.
(SubList.get): likewise.
(SubList.listIterator): fixed indentation.
(SubList.set): added synchronization. Update the state of the
storage
after modification.
(SubList.add): likewise.
(SubList.remove): likewise.
(SubList.addAll): likewise.

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.8
diff -u -r1.8 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 11:23:40 -	1.8
+++ java/util/concurrent/CopyOnWriteArrayList.java	26 Mar 2008 16:03:15 -
@@ -53,7 +53,6 @@
 import java.util.ListIterator;
 import java.util.NoSuchElementException;
 import java.util.RandomAccess;
-import java.util.concurrent.ConcurrentSkipListMap.Iter;
 
 /**
  * A thread-safe implementation of an ArrayList. A CopyOnWriteArrayList is
@@ -911,16 +910,16 @@
* @return a List backed by a subsection of this list
* @throws IndexOutOfBoundsException if fromIndex lt; 0
* || toIndex gt; size()
-   * @throws IllegalArgumentException if fromIndex gt; toIndex
+   * @throws IndexOutOfBoundsException if fromIndex gt; toIndex
* @see ConcurrentModificationException
* @see RandomAccess
*/
-  public ListE subList(int fromIndex, int toIndex)
+  public synchronized ListE subList(int fromIndex, int toIndex)
   {
 // This follows the specification of AbstractList, but is inconsistent
 // with the one in List. Don't you love Sun's inconsistencies?
 if (fromIndex  toIndex)
-  throw new IllegalArgumentException(fromIndex ++ toIndex);
+  throw new IndexOutOfBoundsException(fromIndex ++ toIndex);
 if (fromIndex  0 || toIndex  size())
   throw new IndexOutOfBoundsException();
 
@@ -976,7 +975,7 @@
 void checkMod()
 {
   if (data != backingList.data)
-	throw new ConcurrentModificationException();
+throw new ConcurrentModificationException();
 }
 
 /**
@@ -990,8 +989,8 @@
 private void checkBoundsInclusive(int index)
 {
   if (index  0 || index  size)
-	throw new IndexOutOfBoundsException(Index:  + index + , Size:
-	+ size);
+throw new IndexOutOfBoundsException(Index:  + index +
+, Size: + size);
 }
 
 /**
@@ -1005,8 +1004,8 @@
 private void checkBoundsExclusive(int index)
 {
   if (index  0 || index = size)
-	throw new IndexOutOfBoundsException(Index:  + index + , Size:
-	+ size);
+throw new IndexOutOfBoundsException(Index:  + index +
+, Size: + size);
 }
 
 /**
@@ -1018,8 +1017,30 @@
  */
 public int size()
 {
-  checkMod();
-  return size;
+  synchronized (backingList)
+{
+  checkMod();
+  return size;
+}
+}
+
+public void clear()
+{
+  synchronized (backingList)
+{
+  E[] snapshot = backingList.data;
+  E[] newData = (E[]) new Object

[commit-cp] classpath java/util/concurrent/CopyOnWriteArray...

2008-03-26 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/03/26 16:07:30

Modified files:
java/util/concurrent: CopyOnWriteArrayList.java 
.  : ChangeLog 

Log message:
2008-03-26  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java (SubList.set): 
(SubList.clear): new method.
(SubList.checkMod): fix indentation.
(SubList.checkBoundsInclusive):  likewise. 
(SubList.checkBoundsExclusive): likewise.
(SubList): added synchronization. Now throw
IndexOutOfBoundsException instead of IllegalArgumentException
when index are out of range.
(SubList.size): added synchronization.
(SubList.get): likewise.
(SubList.listIterator): fixed indentation.
(SubList.set): added synchronization. Update the state of the 
storage
after modification.
(SubList.add): likewise.
(SubList.remove): likewise.
(SubList.addAll): likewise.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/concurrent/CopyOnWriteArrayList.java?cvsroot=classpathr1=1.8r2=1.9
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9567r2=1.9568




[cp-patches] FYI: CopyOnWriteArrayList fixlets

2008-03-25 Thread Mario Torre
This patch is the first of a series that I'm preparing about
CopyOnWriteArrayList, my goal is to pass the public domain JCK on this
class.

2008-03-25  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java (clone): clone
method in CopyOnWriteArrayList should just do a shallow copy.
Fixed.
(equals): new method, override from base class.
(toString): likewise.

-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-53
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[commit-cp] classpath java/util/concurrent/CopyOnWriteArray...

2008-03-25 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/03/25 19:56:32

Modified files:
java/util/concurrent: CopyOnWriteArrayList.java 
.  : ChangeLog 

Log message:
2008-03-25  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java (clone): clone 
method
in CopyOnWriteArrayList should just do a shallow copy. Fixed.
(equals): new method, override from base class.
(toString): likewise.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/concurrent/CopyOnWriteArrayList.java?cvsroot=classpathr1=1.6r2=1.7
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9565r2=1.9566




Re: Regressions from 0.96.1

2008-02-20 Thread Mario Torre
Il giorno mer, 20/02/2008 alle 13.02 +0100, Mark Wielaard ha scritto:
 Hi Andrew,

  +FAIL: java.util.prefs.PreferenceTest
 
 Only these 3 do relly worry me a bit.

Uff.. I can't reproduce this on my machine.

What version of GConf are you using?
It maybe a synchronization issue, but I doubt about that.

Andrew, if I send you a patch, you can test it on builder if we have the
same issue before I commit it?

Thanks,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


Re: brandweg hacking session on friday

2008-02-19 Thread Mario Torre

Il giorno mar, 19/02/2008 alle 13.59 +0100, Mark Wielaard ha scritto:
 BXL

Remember that I owe Mark a beer :)

I'll be available for the hacking session, you girls and guys have just
to tell me where and when :)

Also, if it's a place with a wifi it's better, otherwise, I'll steal
from Roman ;)

Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




[cp-patches] FYI: GConf updates

2008-02-09 Thread Mario Torre
I've update the GConf backend to use the GConfClient api instead of
directly invoking GConfEngine.

This change was needed as since the last update of the GConf daemon in
Fedora I was flooded of g_warning messages telling me that I should
never use GConfEngine directly...

I introduced GConfEngine because of some synchronization issues, but I
also moved the code that was giving me troubles outside of the native
peer (read as: java methods are now synchronized).

If you experience threading issues, please tell me. I've tested with few
apps and everything seems ok, but I would like to know if there are
issues on Maemo and OpenMoko (Robert Schuster: ping!).

This update is compatible with OpenJDK.

I'm working on adding few more gadgets to this backend, like automatic
notification if the preferences are changed by another GConfClient (I'm
talking about changes outside the java scope; currently the changes are
visible by the application, but notification is not sent across
registered listener).

As a final note, yesterday I forgot to remove one header file from
include, this patch fixes that.

Thanks,
Mario

2008-02-09  Mario Torre  [EMAIL PROTECTED]

* include/java_util_VMTimeZone.h: Removed.
* native/jni/gconf-peer/GConfNativePeer.c: all native methods, replaced
GConfEngine with GConfClient and use GConfClient API instead.

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: include/java_util_VMTimeZone.h
===
RCS file: include/java_util_VMTimeZone.h
diff -N include/java_util_VMTimeZone.h
--- include/java_util_VMTimeZone.h	31 Aug 2004 21:06:48 -	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -
@@ -1,19 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-
-#ifndef __java_util_VMTimeZone__
-#define __java_util_VMTimeZone__
-
-#include jni.h
-
-#ifdef __cplusplus
-extern C
-{
-#endif
-
-JNIEXPORT jstring JNICALL Java_java_util_VMTimeZone_getSystemTimeZoneId (JNIEnv *env, jclass);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __java_util_VMTimeZone__ */
Index: native/jni/gconf-peer/GConfNativePeer.c
===
RCS file: /sources/classpath/classpath/native/jni/gconf-peer/GConfNativePeer.c,v
retrieving revision 1.10
diff -u -r1.10 GConfNativePeer.c
--- native/jni/gconf-peer/GConfNativePeer.c	23 Nov 2007 22:02:15 -	1.10
+++ native/jni/gconf-peer/GConfNativePeer.c	9 Feb 2008 18:49:40 -
@@ -55,8 +55,8 @@
 /** Reference count */
 static int reference_count = 0;
 
-/** GConfEngine backend */
-static GConfEngine *engine = NULL;
+/** GConfClient backend */
+static GConfClient *client = NULL;
 
 /** java.util.ArrayList class */
 static jclass jlist_class = NULL;
@@ -70,7 +70,7 @@
 /* * PRIVATE FUNCTIONS DELCARATION * */
 
 /**
- * Gets the reference of the default GConfEngine..
+ * Gets the reference of the default GConfClient..
  * The client reference should be released with g_object_unref after use.
  */
 static void init_gconf (void);
@@ -133,12 +133,12 @@
 
   init_gconf ();
 
-  /* if engine is null, there is probably an out of memory */
-  if (engine == NULL)
+  /* if client is null, there is probably an out of memory */
+  if (client == NULL)
 {
   /* release the string and throw a runtime exception */
   throw_exception (env,
-  		Unable to initialize GConfEngine in native code\n);
+  		Unable to initialize GConfClient in native code\n);
   return;
 }
 
@@ -179,7 +179,7 @@
   return NULL;
 }
 
-  entries = gconf_engine_all_entries (engine, dir, err);
+  entries = gconf_client_all_entries (client, dir, err);
   if (err != NULL)
 {
   throw_exception_by_name (env, java/util/prefs/BackingStoreException,
@@ -253,7 +253,7 @@
   return NULL;
 }
 
-  entries = gconf_engine_all_dirs (engine, dir, err);
+  entries = gconf_client_all_dirs (client, dir, err);
   if (err != NULL)
 {
   throw_exception_by_name (env, java/util/prefs/BackingStoreException,
@@ -312,7 +312,7 @@
 {
   GError *err = NULL;
 
-  gconf_engine_suggest_sync (engine, err);
+  gconf_client_suggest_sync (client, err);
   if (err != NULL)
 {
   throw_exception_by_name (env, java/util/prefs/BackingStoreException,
@@ -341,7 +341,7 @@
   return JNI_FALSE;
 }
 
-  result = gconf_engine_unset (engine, _key, err);
+  result = gconf_client_unset (client, _key, err);
   if (err != NULL)
 {
   result = JNI_FALSE;
@@ -374,7 +374,7 @@
   return NULL;
 }
 
-  _value = gconf_engine_get_string (engine

[commit-cp] classpath native/jni/gconf-peer/GConfNativePeer...

2008-02-09 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/02/09 18:57:23

Modified files:
native/jni/gconf-peer: GConfNativePeer.c 
.  : ChangeLog 
Added files:
.  : .cproject 
Removed files:
include: java_util_VMTimeZone.h 

Log message:
2008-02-09  Mario Torre  [EMAIL PROTECTED]

* include/java_util_VMTimeZone.h: Removed.
* native/jni/gconf-peer/GConfNativePeer.c: all native methods, 
replaced
GConfEngine with GConfClient and use GConfClient API instead.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/include/java_util_VMTimeZone.h?cvsroot=classpathr1=1.1r2=0
http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gconf-peer/GConfNativePeer.c?cvsroot=classpathr1=1.10r2=1.11
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9491r2=1.9492
http://cvs.savannah.gnu.org/viewcvs/classpath/.cproject?cvsroot=classpathrev=1.1




[cp-patches] RFC: remove generated headers from include

2008-02-08 Thread Mario Torre
I'm going to commit this patch if ok.

Thanks,
Mario

2008-02-08  Mario Torre  [EMAIL PROTECTED]

* configure.ac: --enable-regen-header option now enabled by default.
* include/gnu_java_awt_dnd_peer_gtk_GtkDragSourceContextPeer.h:
Removed.
* include/gnu_java_awt_peer_gtk_CairoGraphics2D.h: Removed.
* include/gnu_java_awt_peer_gtk_CairoSurface.h: Removed.
* include/gnu_java_awt_peer_gtk_ComponentGraphics.h: Removed.
* include/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.h: Removed.
* include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h: Removed.
* include/gnu_java_awt_peer_gtk_GdkFontPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h: Removed.
* include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h: Removed.
* include/gnu_java_awt_peer_gtk_GdkRobotPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkButtonPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkCanvasPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkCheckboxPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkChoicePeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkClipboard.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkComponentPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkFileDialogPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkFramePeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkGenericPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkImage.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkLabelPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkListPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkMenuBarPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkMenuItemPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkMenuPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkPanelPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkScrollbarPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkScrollPanePeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkSelection.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkToolkit.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkVolatileImage.h: Removed.
* include/gnu_java_awt_peer_gtk_GtkWindowPeer.h: Removed.
* include/gnu_java_awt_peer_qt_MainQtThread.h: Removed.
* include/gnu_java_awt_peer_qt_QMatrix.h: Removed.
* include/gnu_java_awt_peer_qt_QPainterPath.h: Removed.
* include/gnu_java_awt_peer_qt_QPen.h: Removed.
* include/gnu_java_awt_peer_qt_QtAudioClip.h: Removed.
* include/gnu_java_awt_peer_qt_QtButtonPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtCanvasPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtCheckboxPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtChoicePeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtComponentPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtDialogPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtEmbeddedWindowPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtFileDialogPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtFontMetrics.h: Removed.
* include/gnu_java_awt_peer_qt_QtFontPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtFramePeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtGraphics.h: Removed.
* include/gnu_java_awt_peer_qt_QtImage.h: Removed.
* include/gnu_java_awt_peer_qt_QtLabelPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtListPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtMenuBarPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtMenuComponentPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtMenuItemPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtMenuPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtPanelPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtPopupMenuPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtScreenDevice.h: Removed.
* include/gnu_java_awt_peer_qt_QtScrollbarPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtScrollPanePeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtTextAreaPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtTextFieldPeer.h: Removed.
* include/gnu_java_awt_peer_qt_QtToolkit.h: Removed.
* include/gnu_java_awt_peer_qt_QtVolatileImage.h: Removed.
* include

Re: [cp-patches] RFC: remove generated headers from include

2008-02-08 Thread Mario Torre
Il giorno ven, 08/02/2008 alle 21.48 +0100, Dalibor Topic ha scritto:
 Mario Torre schrieb:
  I'm going to commit this patch if ok.

 Sounds good as a first step, I'll check in a patch to 
 include/Makefile.am etc. later to make sure the headers are generated in 
 the build dir, and that distcheck passes.

Committend, thanks,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


Re: Get ready for Fosdem - Free Java Meeting

2008-02-08 Thread Mario Torre
Il giorno ven, 08/02/2008 alle 21.20 +0100, Mark Wielaard ha scritto:

 You only have to pay the beer yourself *)

But hey, this is also share alike what do you want more? :P

Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


Re: Remove the generated headers from include dir?

2008-02-08 Thread Mario Torre
Il giorno ven, 08/02/2008 alle 18.33 +0100, Dalibor Topic ha scritto:

 Does that sound like a useful build system change?
 
 cheers,
 dalibor topic

Is something I also wanted to do, if no one object, I would go.

Cheers,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


[commit-cp] classpath ChangeLog configure.ac include/gnu_ja...

2008-02-08 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   08/02/08 22:26:48

Modified files:
.  : ChangeLog configure.ac 
Removed files:
include: gnu_java_awt_peer_qt_QtPanelPeer.h 
 gnu_xml_libxmlj_dom_GnomeDocumentBuilder.h 
 gnu_java_awt_peer_qt_QtVolatileImage.h 
 gnu_java_awt_peer_qt_MainQtThread.h 
 gnu_java_awt_peer_gtk_CairoSurface.h 
 gnu_java_awt_peer_qt_QtComponentPeer.h 
 gnu_java_awt_peer_qt_QtAudioClip.h 
 gnu_javax_sound_midi_alsa_AlsaPortDevice.h 
 gnu_java_awt_peer_gtk_GtkToolkit.h 
 gnu_xml_libxmlj_sax_GnomeLocator.h 
 java_nio_VMDirectByteBuffer.h 
 gnu_java_nio_FileChannelImpl.h 
 java_lang_VMFloat.h 
 gnu_java_awt_peer_gtk_CairoGraphics2D.h 
 gnu_javax_sound_midi_alsa_AlsaMidiDeviceProvider.h 
 gnu_java_awt_peer_gtk_GtkGenericPeer.h 
 java_lang_VMSystem.h 
 gnu_java_awt_peer_qt_QtTextFieldPeer.h 
 gnu_java_util_prefs_gconf_GConfNativePeer.h 
 gnu_java_awt_peer_gtk_GdkPixbufDecoder.h 
 gnu_java_awt_peer_qt_QtFontMetrics.h 
 gnu_java_awt_peer_gtk_GtkCheckboxPeer.h 
 gnu_java_awt_dnd_peer_gtk_GtkDragSourceContextPeer.h 
 gnu_java_nio_VMChannel.h 
 gnu_java_awt_peer_gtk_GtkTextFieldPeer.h 
 java_io_VMObjectStreamClass.h 
 gnu_java_awt_peer_qt_QtEmbeddedWindowPeer.h 
 gnu_java_nio_EpollSelectorImpl.h 
 gnu_java_awt_peer_qt_QtGraphics.h 
 gnu_xml_libxmlj_dom_GnomeXPathExpression.h 
 
gnu_javax_sound_sampled_gstreamer_lines_GstNativeDataLine.h 
 gnu_java_awt_peer_gtk_GtkMenuPeer.h 
 gnu_java_awt_peer_gtk_GtkMenuBarPeer.h 
 gnu_java_awt_peer_qt_QtImage.h 
 gnu_java_awt_peer_qt_QtPopupMenuPeer.h 
 java_lang_reflect_VMArray.h java_io_VMFile.h 
 gnu_java_nio_VMPipe.h 
 gnu_xml_libxmlj_dom_GnomeXPathNodeList.h 
 gnu_java_awt_peer_qt_QtMenuBarPeer.h 
 java_net_VMURLConnection.h 
 gnu_xml_libxmlj_dom_GnomeDocument.h 
 gnu_xml_libxmlj_dom_GnomeAttr.h 
 gnu_xml_libxmlj_dom_GnomeXPathResult.h 
 gnu_xml_libxmlj_dom_GnomeEntity.h 
 gnu_xml_libxmlj_dom_GnomeNotation.h 
 java_net_VMNetworkInterface.h 
 gnu_java_nio_charset_iconv_IconvDecoder.h 
 gnu_java_awt_peer_qt_QtDialogPeer.h 
 gnu_java_awt_peer_qt_QtToolkit.h 
 gnu_java_awt_peer_qt_QtLabelPeer.h 
 java_lang_VMProcess.h 
 gnu_javax_sound_sampled_gstreamer_io_GstInputStream.h 
 gnu_java_awt_peer_gtk_ComponentGraphicsCopy.h 
 gnu_java_awt_peer_gtk_GtkFileDialogPeer.h 
 gnu_java_awt_peer_gtk_GtkFramePeer.h 
 gnu_java_awt_peer_qt_QtScrollbarPeer.h 
 gnu_java_awt_peer_qt_QPainterPath.h 
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h 
 gnu_java_awt_peer_qt_QMatrix.h 
 gnu_java_awt_peer_gtk_GtkPanelPeer.h 
 java_net_VMInetAddress.h 
 gnu_java_awt_peer_qt_QtTextAreaPeer.h 
 gnu_java_awt_peer_gtk_GtkImage.h 
 gnu_java_awt_peer_gtk_GtkLabelPeer.h 
 gnu_java_awt_peer_gtk_GtkCanvasPeer.h 
 gnu_java_net_VMPlainSocketImpl.h 
 gnu_java_awt_peer_gtk_GtkSelection.h 
 gnu_java_awt_peer_gtk_GdkRobotPeer.h 
 gnu_java_awt_peer_gtk_GtkTextAreaPeer.h 
 gnu_java_awt_peer_qt_QtFileDialogPeer.h 
 gnu_java_awt_peer_gtk_GtkScrollPanePeer.h 
 gnu_java_awt_peer_gtk_GtkComponentPeer.h 
 gnu_java_awt_peer_gtk_GtkListPeer.h 
 gnu_xml_libxmlj_dom_GnomeNode.h 
 gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.h

Re: [cp-patches] RFC: adding -reverse to gnative2ascii

2008-01-25 Thread Mario Torre

Il giorno ven, 25/01/2008 alle 15.06 -0700, Tom Tromey ha scritto:
  Mario == Mario Torre [EMAIL PROTECTED] writes:
 
 Mario This patch adds the -reverse option to gnative2ascii as described here:
 Mario http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=103
 
 Mario Mark told me that Tom Tromey is already working on it too, so feel free
 Mario to ignore this one.
 
 Sorry about this overlap btw -- I didn't realize you were doing it,
 and I'd emailed before reading the list.
 
 Tom

Oh, no!!

My fault. I was reading the bugzilla lists, and fixed this as I thought
it was a one minute job, then I asked to Mark on IRC if he was working
on this one, and he said that you probably were doing it already... I
decide to post on list just in case. :)

Cheers,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


[cp-patches] RFC: adding -reverse to gnative2ascii

2008-01-24 Thread Mario Torre
This patch adds the -reverse option to gnative2ascii as described here:

http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=103

The user can pass either option, if both are present one is simply
ignored, I first added an exception, but I guess it's better to just
ignore the redundant option rather that stop the application.

Mark told me that Tom Tromey is already working on it too, so feel free
to ignore this one.

Thanks,
Mario

2008-01-24  Mario Torre  [EMAIL PROTECTED]

* tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
(createParser): 
added new option for compatibility with OpenJDK.
* resource/gnu/classpath/tools/native2ascii/messages.properties: Help
string for new option.

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
===
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java,v
retrieving revision 1.5
diff -u -r1.5 Native2ASCII.java
--- tools/gnu/classpath/tools/native2ascii/Native2ASCII.java	8 Jan 2007 17:00:49 -	1.5
+++ tools/gnu/classpath/tools/native2ascii/Native2ASCII.java	24 Jan 2008 17:14:49 -
@@ -68,7 +68,7 @@
   String encoding;
   // True for reverse operation.
   boolean reversed;
-
+  
   private class HandleFile extends FileArgumentCallback
   {
 public HandleFile()
@@ -101,10 +101,18 @@
 encoding = argument;
   }
 });
+
 result.add(new Option(reversed, Messages.getString(Native2ASCII.ReversedHelp)) //$NON-NLS-1$ //$NON-NLS-2$
 {
   public void parsed(String argument) throws OptionException
-  {
+  {   
+reversed = true;
+  }
+});
+result.add(new Option(reverse, Messages.getString(Native2ASCII.ReverseHelp)) //$NON-NLS-1$ //$NON-NLS-2$
+{
+  public void parsed(String argument) throws OptionException
+  { 
 reversed = true;
   }
 });
Index: resource/gnu/classpath/tools/native2ascii/messages.properties
===
RCS file: /sources/classpath/classpath/resource/gnu/classpath/tools/native2ascii/messages.properties,v
retrieving revision 1.1
diff -u -r1.1 messages.properties
--- resource/gnu/classpath/tools/native2ascii/messages.properties	20 May 2006 22:10:31 -	1.1
+++ resource/gnu/classpath/tools/native2ascii/messages.properties	24 Jan 2008 17:14:49 -
@@ -41,3 +41,4 @@
 Native2ASCII.EncodingArgName=NAME
 Native2ASCII.EncodingSpecified=encoding already specified
 Native2ASCII.ReversedHelp=convert from encoding to native
+Native2ASCII.ReverseHelp=convert from encoding to native, this option has the same effect of \reversed\


Re: [cp-patches] RFC: adding -reverse to gnative2ascii

2008-01-24 Thread Mario Torre
Il giorno gio, 24/01/2008 alle 19.30 +0100, Dalibor Topic ha scritto:

 I'd suggest removing the redundant option. The official docs at 
 http://java.sun.com/javase/6/docs/technotes/tools/solaris/native2ascii.html 
 don't have a -reversed, just a -reverse, so I assume it was a typo anyway.
 
 cheers,
 dalibor topic

Agree, but not needed anymore :)

Anyway, I was thinking that someone could use that option in scripts,
that's why I left it in place.

Cheers,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


Re: Quality control and FOSS rant

2008-01-10 Thread Mario Torre
Il giorno gio, 10/01/2008 alle 20.03 +0100, Mark Wielaard ha scritto:

 No worries. We know trolls and how to deal with them.
 We do have a flow chart that people have to follow when contributing to
 GNU Classpath. It is all very formal really:
 http://gnu.wildebeest.org/~mark/patch.png

Oh, dear... Why no one ever told me about that :P

Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: Happy New Year

2008-01-01 Thread Mario Torre
Il giorno mar, 01/01/2008 alle 22.23 +, Andrew John Hughes ha
scritto:

 Happy New Year from me as well! 

And from me too!

 I agree; hopefully 2008 will see OpenJDK become a true FOSS project
 and not just a Sun development process with an audience.

But I think they are doing well, after all, and things will surely
improve :)

Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


Re: [cp-patches] FYI: more CopyOnWriteArrayList fixlets

2007-11-27 Thread Mario Torre

Il giorno lun, 26/11/2007 alle 09.29 +, Ian Rogers ha scritto:

 Looking at the current status, TimeUnitTest looks to be failing as the 
 version of JSR166 in the external directory is old enough not to be 
 declaring TimeUnit.MILLISECONDS:
 
 http://www.cs.man.ac.uk/~irogers/jsr166/production/jsr166-tck/TimeUnitTest.default-output.txt
 
 I wonder if some of the other failures could be down to an old JSR 166. 
 What's the protocol to update the code in the external directory?

I think so. CopyOnWriteArrayList was also written by Doug Lea, I have no
reason to believe he has not released it under public domain like the
rest of the code (I admit I have not checked, though), so I think that
we simply ship an old version. Being it in the external I would just
download the new one (if any) and go with it.

Also, if that means to remove CopyOnWriteArrayList also, well, go for
it :)

Mark? hints?

Thanks,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


Re: installation problem of classpath0.96.1

2007-11-26 Thread Mario Torre

Il giorno dom, 25/11/2007 alle 13.09 -0800, Li, Guangqiang ha scritto:
 Hi,

Hi!

 It seems configure cannot find the java files in the vm/reference
 directory. Can I add some parameter to the configure to make it able 
 to locate the files? I have tried to add vm/reference to the PATH, it
 does not work. Can you figure out what the problem is? Thank you.

What are the options passed to configure?

You should first install classpath, then compile jamvm passing it the
location where classpath is installed.

For example, this is what I pass to jamvm configure, assuming
$PATH_TO_CLASSPATH_INSTALL points to the root installation directory:

./configure --prefix=$PATH_TO_CLASSPATH_INSTALL
--with-classpath-install-dir=$PATH_TO_CLASSPATH_INSTALL --disable-zip

Hope that helps,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


[cp-patches] FYI: more CopyOnWriteArrayList fixlets

2007-11-24 Thread Mario Torre
I'm committing this one, that fixes a couple of woops! I did in the
last patch, as well as some other methods that were already broken
(read: not my fault :)

Now it should pass all the public domain tck166 tests, except for
subList.

Thanks,
Mario

2007-11-24  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java: 
(addAll): fix implementation, now add elements in the correct position.
(addAllAbsent): fixed typos (woops!).
(remove(int)): fixed range in arraycopy that was causing for incorrect
values to be inserted in the list. Refactored to give variables better
names.
(remove(Object)): refactored to give better names to variable.
(listIterator): fix to set the starting index.
(listIterator.previous): fix to decrement element position before
returning the previous element in the iterator.  

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.4
diff -u -r1.4 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	23 Nov 2007 21:51:27 -	1.4
+++ java/util/concurrent/CopyOnWriteArrayList.java	24 Nov 2007 22:16:53 -
@@ -41,7 +41,9 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+
 import java.lang.reflect.Array;
+
 import java.util.AbstractList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -395,15 +397,23 @@
*/
   public synchronized E remove(int index)
   {
-E[] data = this.data;
-E[] newData = (E[]) new Object[data.length - 1];
+if (index  0 || index = this.size())
+  throw new IndexOutOfBoundsException(index =  +  index);
+
+E[] snapshot = this.data;
+E[] newData = (E[]) new Object[snapshot.length - 1];
+
+E result = snapshot[index];
+
 if (index  0)
-  System.arraycopy(data, 0, newData, 0, index - 1);
-System.arraycopy(data, index + 1, newData, index,
- data.length - index - 1);
-E r = data[index];
+  System.arraycopy(snapshot, 0, newData, 0, index);
+
+System.arraycopy(snapshot, index + 1, newData, index,
+ snapshot.length - index - 1);
+
 this.data = newData;
-return r;
+
+return result;
   }
 
   /**
@@ -417,32 +427,32 @@
*/
   public synchronized boolean remove(Object element)
   {
-E[] data = this.data;
-E[] newData = (E[]) new Object[data.length - 1];
+E[] snapshot = this.data;
+E[] newData = (E[]) new Object[snapshot.length - 1];
 
 // search the element to remove while filling the backup array
 // this way we can run this method in O(n)
 int elementIndex = -1;
-for (int i = 0; i  this.data.length; i++)
+for (int i = 0; i  snapshot.length; i++)
   {
-if (equals(element, this.data[i]))
+if (equals(element, snapshot[i]))
   {
 elementIndex = i;
 break;
   }
 
 if (i  newData.length)
-  newData[i] = this.data[i];
+  newData[i] = snapshot[i];
   }
 
 if (elementIndex  0)
   return false;
-
-System.arraycopy(this.data, elementIndex + 1, newData, elementIndex,
- this.data.length - elementIndex - 1);
+ 
+System.arraycopy(snapshot, elementIndex + 1, newData, elementIndex,
+ snapshot.length - elementIndex - 1);
 this.data = newData;
 
-return false;
+return true;
   }
   
   /**
@@ -575,18 +585,33 @@
*/
   public synchronized boolean addAll(int index, Collection ? extends E c)
   {
-E[] data = this.data;
-Iterator? extends E itr = c.iterator();
+if (index  0 || index  this.size())
+  throw new IndexOutOfBoundsException(index =  +  index);
+
 int csize = c.size();
 if (csize == 0)
   return false;
-
+
+E[] data = this.data;
+Iterator? extends E itr = c.iterator();
+
 E[] newData = (E[]) new Object[data.length + csize];
-System.arraycopy(data, 0, newData, 0, data.length);
-int end = data.length;
+
+// avoid this call at all if we were asked to put the elements at the
+// beginning of our storage
+if (index != 0)
+  System.arraycopy(data, 0, newData, 0, index);
+
+int itemsLeft = index;
+
 for (E value : c)
-  newData[end++] = value

[commit-cp] classpath java/util/concurrent/CopyOnWriteArray...

2007-11-24 Thread Mario Torre
CVSROOT:/sources/classpath
Module name:classpath
Changes by: Mario Torre neugens   07/11/24 22:31:08

Modified files:
java/util/concurrent: CopyOnWriteArrayList.java 
.  : ChangeLog 

Log message:
2007-11-24  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java: 
(addAll): fix implementation, now add elements in the correct 
position.
(addAllAbsent): fixed typos (whoops!).
(remove(int)): fixed range in arraycopy that was causing for 
incorrect
values to be inserted in the list. Refactored to give variables 
better
names.
(remove(Object)): refactored to give better names to variable.
(listIterator): fix to set the starting index.
(listIterator.previous): fix to decrement element position before
returning the previous element in the iterator.  

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/concurrent/CopyOnWriteArrayList.java?cvsroot=classpathr1=1.4r2=1.5
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9439r2=1.9440




Re: [cp-patches] Patch to gnu.java.nio.charset

2007-11-23 Thread Mario Torre

Il giorno ven, 23/11/2007 alle 15.09 +, Ian Rogers ha scritto:
 Committed.
 
 Ian Rogers wrote:
  Hi,
 
  the attached patch adds efficient support for array encoding/decoding 
  character sets to all ByteCharsets, US_ASCII and ISO_8859_1. It does 
  this by using 2 package private helper classes. The patch also makes 
  fields and classes that can be final, final. The patch also adds the 
  use of generic types where appropriate.
 
  Thanks,
  Ian

Hi Ian!

For some reason ByteDecodeLoopHelper and ByteEncodeLoopHelper went not
in with the rest of the patch.

Thanks,
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/




Re: [cp-patches] FYI: java.lang.Long remove unnecessary synchronized

2007-11-23 Thread Mario Torre

Il giorno ven, 23/11/2007 alle 14.47 +, Ian Rogers ha scritto:
 Hi,
 
 Committed.
 
 Regards,
 Ian

Hi Ian!

Thanks for committing these patches and again welcome!

But, ehm... can I ask you to please also add a ChangeLog (and for the
future to post them to this list with the patches)?

Thanks again!
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente


[cp-patches] FYI: CopyOnWriteArrayList fixlets

2007-11-23 Thread Mario Torre
I'm committing this one. It fixes few methods on CopyOnWriteArrayList
and also improves performances in a couple of points (not much, to be
honest).

Mauve tests will follow shortly.

Thanks,
Mario

2007-11-23  Mario Torre  [EMAIL PROTECTED]

* java/util/concurrent/CopyOnWriteArrayList.java: 
Added javadoc.
(serialVersionUID): new field. 
(iterator): new method, override from base class.
(remove): likewise.
(listIterator): likewise.
(removeAll): likewise.
(retainAll): likewise.
(contains): fixed typo in javadoc.
(addIfAbsent): added javadoc.
(addAllAbsent): Rewrite to improve performance. Also add javadoc.

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/util/concurrent/CopyOnWriteArrayList.java
===
RCS file: /sources/classpath/classpath/java/util/concurrent/CopyOnWriteArrayList.java,v
retrieving revision 1.3
diff -u -r1.3 CopyOnWriteArrayList.java
--- java/util/concurrent/CopyOnWriteArrayList.java	31 Mar 2007 10:01:39 -	1.3
+++ java/util/concurrent/CopyOnWriteArrayList.java	23 Nov 2007 21:26:22 -
@@ -46,13 +46,61 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.RandomAccess;
 
-/** @since 1.5 */
+/**
+ * A thread-safe implementation of an ArrayList. A CopyOnWriteArrayList is
+ * as special ArrayList which performs copies of the underlying storage
+ * each time a write (coderemove/code, codeadd/code etc..) operation
+ * is performed.br /
+ * br /
+ * The update operation in this class run usually in codeO(n)/code or worse,
+ * but traversal operations are fast and efficient, especially when running in
+ * a multi-thread environment without the need to design complex synchronize
+ * mechanisms.br /
+ * br /
+ * codeIterator/codes in this class work on a snapshot of the backing store
+ * at the moment the iterator itself was created, hence the iterator will not
+ * reflect changes in the underlying storage. Thus, update operation on the
+ * codeIterator/codes are not supported, but as interferences from other
+ * threads are impossible, no codeConcurrentModificationException/code
+ * will be ever thrown from within the codeIterator/code.
+ * br /br /
+ * This class is especially useful when used with event handling, like the
+ * following code demonstrates:br /
+ * codepre
+ * 
+ * CopyOnWriteArrayListEventListener listeners =
+ *   new CopyOnWriteArrayListEventListener();
+ * 
+ * [...]
+ * 
+ * for (final EventListener listener : listeners)
+ *   {
+ * Runnable dispatcher = new Runnable() {
+ *   public void run()
+ *   {
+ * listener.preferenceChange(event);
+ *   }
+ * };
+ * 
+ * Executor executor = Executors.newSingleThreadExecutor();
+ * executor.execute(dispatcher);
+ *   }
+ * /pre/code
+ * 
+ * @since 1.5
+ */
 public class CopyOnWriteArrayListE extends AbstractListE implements
 ListE, RandomAccess, Cloneable, Serializable
 {
   /**
+   * 
+   */
+  private static final long serialVersionUID = 8673264195747942595L;
+  
+  /**
* Where the data is stored.
*/
   private transient E[] data;
@@ -118,7 +166,7 @@
   }
 
   /**
-   * Returns true iff element is in this ArrayList.
+   * Returns true if element is in this ArrayList.
* 
* @param e
*  the element whose inclusion in the List is being tested
@@ -359,6 +407,134 @@
   }
 
   /**
+   * Remove the first occurrence, if any, of the given object from this list,
+   * returning codetrue/code if the object was removed, codefalse/code
+   * otherwise.
+   * 
+   * @param element the object to be removed.
+   * @return true if element was removed, false otherwise. false means also that
+   * the underlying storage was unchanged after this operation concluded.
+   */
+  public synchronized boolean remove(Object element)
+  {
+E[] data = this.data;
+E[] newData = (E[]) new Object[data.length - 1];
+
+// search the element to remove while filling the backup array
+// this way we can run this method in O(n)
+int elementIndex = -1;
+for (int i = 0; i  this.data.length; i++)
+  {
+if (equals(element, this.data[i]))
+  {
+elementIndex = i;
+break;
+  }
+
+if (i  newData.length)
+  newData[i] = this.data[i];
+  }
+
+if (elementIndex  0)
+  return false;
+
+System.arraycopy(this.data, elementIndex + 1

[cp-patches] FYI: GConf updates

2007-11-23 Thread Mario Torre
I'm committing these changes to the GConf preference backed, as
discussed in my previous mail.

Thanks,
Mario

2007-11-23  Mario Torre  [EMAIL PROTECTED]

* gnu/java/util/prefs/EventDispatcher.java: class removed.
* gnu/classpath/toolkit/DefaultDaemonThreadFactory.java: new file.
* java/util/prefs/AbstractPreferences.java:
(fire(PreferenceChangeEvent)):
Use DefaultDaemonThreadFactory and Executors.newSingleThreadExecutor
instead of EventDispatcher. Import statement refactored accordingly.
Also refactored to use 1.5 enhanced for loop and generics.
(fire(NodeChangeEvent, boolean)): likewise.
* gnu/java/util/prefs/GConfBasedPreferences.java (childSpi):
removed startWatchingNode call.
* gnu/java/util/prefs/gconf/GConfNativePeer.java:
(GConfNativePeer): removed use of semaphore. 
(gconf_all_nodes): method name shortened, renamed from
gconf_client_all_nodes (removed client_ from method signature) and
declared synchronized. 
(gconf_suggest_sync): likewise.
(gconf_get_string): likewise.
(gconf_unescape_key): likewise.
(gconf_set_string): likewise.
(gconf_escape_key):  likewise.
(gconf_all_keys): likewise.
(gconf_dir_exists): likewise.
(getKeys): refactored to use new native method name.
(getKey): likewise.
(setString): likewise.
(getChildrenNodes): likewise.
(unset): likewise.
(suggestSync): likewise.
(finalize): likewise.
(nodeExist): likewise.
(gconf_client_add_dir): removed, not needed anymore.
(gconf_client_remove_dir): likewise.
(startWatchingNode): likewise.
(stopWatchingNode): likewise.
* native/jni/conf-peer/GConfNativePeer.c:
All native methods renamed to match changes in GConfNativePeer.java
Now use GConfEngine instead of GConfClient.
Removed gdk_thread_enter/leave locking from all methods.

(Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1add_1dir):
removed.

(Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1dir_1exists):
likewise.
* include/gnu_java_util_prefs_gconf_GConfNativePeer.h: regenerated.

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/util/prefs/gconf/GConfNativePeer.java
===
RCS file: /sources/classpath/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java,v
retrieving revision 1.4
diff -u -r1.4 GConfNativePeer.java
--- gnu/java/util/prefs/gconf/GConfNativePeer.java	18 Dec 2006 16:47:10 -	1.4
+++ gnu/java/util/prefs/gconf/GConfNativePeer.java	21 Nov 2007 00:49:09 -
@@ -49,19 +49,11 @@
 public final class GConfNativePeer
 {
   /**
-   * Object to achieve locks for methods that need to be synchronized.
-   */
-  private static final Object[] semaphore = new Object[0];
-
-  /**
* Creates a new instance of GConfNativePeer
*/
   public GConfNativePeer()
   {
-synchronized (semaphore)
-  {
-init_class();
-  }
+init_class();
   }
 
   /**
@@ -72,31 +64,7 @@
*/
   public boolean nodeExist(String node)
   {
-return gconf_client_dir_exists(node);
-  }
-
-  /**
-   * Add the node codenode/code to the list of nodes the GConf will watch.
-   * An event is raised everytime this node is changed. You can add a node
-   * multiple times.
-   * 
-   * @param node the node to track.
-   */
-  public void startWatchingNode(String node)
-  {
-gconf_client_add_dir(node);
-  }
-
-  /**
-   * Remove the node codenode/code to the list of nodes the GConf is
-   * watching. Note that if a node has been added multiple times, you must
-   * remove it the same number of times before the remove takes effect.
-   * 
-   * @param node the node you don't want to track anymore.
-   */
-  public void stopWatchingNode(String node)
-  {
-gconf_client_remove_dir(node);
+return gconf_dir_exists(node);
   }
 
   /**
@@ -111,7 +79,7 @@
*/
   public boolean setString(String key, String value)
   {
-return gconf_client_set_string(key, value);
+return gconf_set_string(key, value);
   }
 
   /**
@@ -124,7 +92,7 @@
*/
   public boolean unset(String key)
   {
-return gconf_client_unset(key);
+return gconf_unset(key);
   }
 
   /**
@@ -135,7 +103,7 @@
*/
   public String getKey(String key)
   {
-return gconf_client_get_string(key);
+return gconf_get_string(key);
   }
 
   /**
@@ -149,7 +117,7 @@
*/
   public ListString getKeys(String node) throws BackingStoreException
   {
-return gconf_client_all_keys(node);
+return gconf_all_keys(node

  1   2   3   >