[cp-patches] FYI: gjar @file fix

Robert Schuster theBohemian at gmx.net
Mon Jun 2 23:31:59 UTC 2008


Hi Andrew,

>>  I was trying to get Classpath to build PhoneME today and that requires
>>  our javah to support @-style arguments as well. From my work for MIDPath
>>  I know that we also lack that functionality in gjar that is why I tried
>>  an implementation that can be used in all getopt using classpath tools.
>>
> 
> Ok I wasn't aware you were working on this, sorry.
Sorry, I did not announce this anywhere. :)

>>  What I am also unhappy is that a simple BufferedReader.readLine() is
>>  used to get the filelist entries. The filelist the phoneme build
>>  generates looks like this: "Bla Foo Baz". So a simple parser is needed
>>  that splits at whitespace bounds. My suggested implementation does
>>  exactly that.
>>
> 
> So I see.  Is there a reason you didn't use String.split or
> StringTokenizer for this?

I considered String.split() to be to costly (regular expressions).
StringTokenizer would be a good idea ...

>  The patch looks
> good, though I wonder how we can still integrate the stdin support
> gjar has.
I just saw that StreamTokenizer might provide a good parser that can
also deal with quoting.

If we use that in the parser and add an optional InputStream argument to
Parser.parse() we could have the best of your and my approach and
additionally get quoting right.

Unfortunately I need some sleep now and will continue with this patch in
~10 hours.

Regards
Robert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20080603/eb370d25/attachment.pgp 


More information about the Classpath-patches mailing list