OSDN Git Service

* resource/gnu/classpath/tools/jar/messages.properties
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 2007 17:06:33 +0000 (17:06 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 2007 17:06:33 +0000 (17:06 +0000)
(Main.Stdin): New message.
* tools/gnu/classpath/tools/jar/Main.java (initializeParser): Add
'-@' option.
(readNames): New method.
(run): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121424 138bc75d-0d04-0410-961f-82ee72b054a4

14 files changed:
libjava/classpath/ChangeLog
libjava/classpath/resource/gnu/classpath/tools/jar/messages.properties
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$1.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$2.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$3.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$4.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$5.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$6.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$7.class [new file with mode: 0644]
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$HandleFile.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$JarParser.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$ModeOption.class
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main.class
libjava/classpath/tools/gnu/classpath/tools/jar/Main.java

index d1295d2..bcba0a9 100644 (file)
@@ -1,3 +1,12 @@
+2007-01-31  Tom Tromey  <tromey@redhat.com>
+
+       * resource/gnu/classpath/tools/jar/messages.properties
+       (Main.Stdin): New message.
+       * tools/gnu/classpath/tools/jar/Main.java (initializeParser): Add
+       '-@' option.
+       (readNames): New method.
+       (run): Use it.
+
 2007-01-26  Andrew Haley  <aph@redhat.com>
 
         * java/lang/SecurityManager.java: Load and initialize
index e589a21..a456fe2 100644 (file)
@@ -69,3 +69,4 @@ Main.FileNameGroup=File name selection
 Main.ChangeDir=change to directory before the next file
 Main.ChangeDirArg=DIR FILE
 Main.InternalError=jar: internal error:
+Main.Stdin=Read file names from stdin
index 1912cbd..dad181c 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$1.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$1.class differ
index 9bd0cbe..93ef661 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$2.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$2.class differ
index ddbd7f5..cf00699 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$3.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$3.class differ
index 9dfd4c5..496c411 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$4.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$4.class differ
index 8050a01..2efdda0 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$5.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$5.class differ
index 1266394..4825fd1 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$6.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$6.class differ
diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$7.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$7.class
new file mode 100644 (file)
index 0000000..cb9fcd5
Binary files /dev/null and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$7.class differ
index 16d4ed7..6d7c301 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$HandleFile.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$HandleFile.class differ
index 5a62fdc..db164f2 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$JarParser.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$JarParser.class differ
index 3630f9b..394b4e0 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$ModeOption.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main$ModeOption.class differ
index 1c32274..5b4d96c 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Main.class differ
index 34f6372..c3575bd 100644 (file)
@@ -1,5 +1,5 @@
 /* Main.java - jar program main()
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
  This file is part of GNU Classpath.
 
@@ -45,7 +45,9 @@ import gnu.classpath.tools.getopt.OptionException;
 import gnu.classpath.tools.getopt.OptionGroup;
 import gnu.classpath.tools.getopt.Parser;
 
+import java.io.BufferedReader;
 import java.io.File;
+import java.io.InputStreamReader;
 import java.io.IOException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -232,11 +234,34 @@ public class Main
         changedDirectory = argument;
       }
     });
+    grp.add(new Option('@', Messages.getString("Main.Stdin"))
+    {
+      public void parsed(String argument) throws OptionException
+      {
+       readNamesFromStdin = true;
+      }
+    });
     p.add(grp);
 
     return p;
   }
 
+  private void readNames()
+  {
+    String line;
+    try
+      {
+       BufferedReader br
+         = new BufferedReader(new InputStreamReader(System.in));
+       while ((line = br.readLine()) != null)
+         entries.add(new Entry(new File(line)));
+      }
+    catch (IOException _)
+      {
+       // Ignore.
+      }
+  }
+
   private void run(String[] args)
       throws InstantiationException, IllegalAccessException, IOException
   {
@@ -245,6 +270,8 @@ public class Main
     if (args.length > 0 && args[0].charAt(0) != '-')
       args[0] = '-' + args[0];
     p.parse(args, new HandleFile());
+    if (readNamesFromStdin)
+      readNames();
     Action t = (Action) operationMode.newInstance();
     t.run(this);
   }