> > Andrew John Hughes schrieb: > > > This adds support in gjar for the @file argument > > as used by the OpenJDK build. > > > > ChangeLog: > > > > 2008-06-02 Andrew John Hughes <[EMAIL PROTECTED]> > > > > * tools/gnu/classpath/tools/getopt/OptionException.java: > > (OptionException(String,Throwable)): New constructor. > > * tools/gnu/classpath/tools/jar/Main.java: > > (fileLists): New queue for streams containing lists of files. > > (HandleFile.NotifyFile(String)): Check for '@' arguments > > and add to stream queue. > > (parsed(String)): Add stdin to queue instead of setting flag. > > (readNames()): Work with the queue rather than just stdin. > > (run(String[])): Always execute readNames(). > > > > > > > On 02/06/2008, Robert Schuster <[EMAIL PROTECTED]> wrote: > Hi Andrew, > I am not so happy with that patch. :) > > 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. The patch looks good, though I wonder how we can still integrate the stdin support gjar has. > 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? > What my implementation does not handle is whitespace inside filenames > and quoting. However I am not sure whether this is supported in filelist > anyway. > > It may be possible that some tools need @file support and some not (Does > anyone know more about this?). And such a case I would change the getopt > API to explicitly request @file support in parse(). > > Please have a look at the attached patch. :) > > Regards > Robert Thanks, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8