For PR libgcj/5303:
authorTom Tromey <tromey@redhat.com>
Mon, 25 Mar 2002 22:08:27 +0000 (22:08 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Mon, 25 Mar 2002 22:08:27 +0000 (22:08 +0000)
* gnu/java/rmi/registry/RegistryImpl.java (main): Recognize --help
and --version.
(help): New method.
(version): Likewise.
* gnu/gcj/convert/Convert.java (version): Removed extraneous
"GNU".
* gnu/java/rmi/rmic/RMIC.java (parseOptions): Removed extraneous
"GNU".

From-SVN: r51343

libjava/ChangeLog
libjava/gnu/gcj/convert/Convert.java
libjava/gnu/java/rmi/registry/RegistryImpl.java
libjava/gnu/java/rmi/rmic/RMIC.java

index ae7ea57f8fd41778fc768b35e480ee55a133efb2..16b672e874cc7cdd0b0d5e370ce0dd815b420903 100644 (file)
@@ -1,3 +1,15 @@
+2002-03-25  Tom Tromey  <tromey@redhat.com>
+
+       For PR libgcj/5303:
+       * gnu/java/rmi/registry/RegistryImpl.java (main): Recognize --help
+       and --version.
+       (help): New method.
+       (version): Likewise.
+       * gnu/gcj/convert/Convert.java (version): Removed extraneous
+       "GNU".
+       * gnu/java/rmi/rmic/RMIC.java (parseOptions): Removed extraneous
+       "GNU".
+
 2002-03-25  Tom Tromey  <tromey@redhat.com>
 
        * java/awt/Component.java (processEvent): Check ComponentEvent
index 820fe14a9f3481aa976bb256e85be2fa2e5cfd42..d16adc13014506badbec40ba8148609fa8a7fce2 100644 (file)
@@ -40,7 +40,7 @@ public class Convert
 
   static void version ()
   {
-    System.out.println("jv-convert (GNU "
+    System.out.println("jv-convert ("
                       + System.getProperty("java.vm.name")
                       + ") "
                       + System.getProperty("java.vm.version"));
index b38ee5cab150b15eb1ab8641a8334982281539f9..fdf4506f32d425997c94e9d5596ff72b3c0bc38b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+  Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -103,9 +103,35 @@ public String[] list() throws RemoteException, AccessException {
        return (strings);
 }
 
+public static void version() {
+       System.out.println("rmiregistry ("
+                          + System.getProperty("java.vm.name")
+                          + ") "
+                          + System.getProperty("java.vm.version"));
+       System.out.println("Copyright 2002 Free Software Foundation, Inc.");
+       System.out.println("This is free software; see the source for copying conditions.  There is NO");
+       System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
+       System.exit(0);
+}
+
+public static void help() {
+       System.out.println(
+"Usage: rmiregistry [OPTION | PORT]\n" +
+"\n" +
+"    --help                Print this help, then exit\n" +
+"    --version             Print version number, then exit\n");
+       System.exit(0);
+}
+
 public static void main(String[] args) {
        int port = Registry.REGISTRY_PORT;
        if (args.length > 0) {
+               if (args[0].equals("--version")) {
+                       version();
+               }
+               else if (args[0].equals("--help")) {
+                       help();
+               }
                try {
                        port = Integer.parseInt(args[0]);
                }
index f3ff128f2a45062237aa00025186a9d7d73b07c8..ef4473247d6ce7ca8794a899ea609298ad70510f 100644 (file)
@@ -939,7 +939,7 @@ private void parseOptions() {
                        usage();
                }
                else if (arg.equals("-version")) {
-                       System.out.println("rmic (GNU "
+                       System.out.println("rmic ("
                                           + System.getProperty("java.vm.name")
                                           + ") "
                                           + System.getProperty("java.vm.version"));