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".

From-SVN: r51344
This commit is contained in:
Tom Tromey 2002-03-25 22:15:21 +00:00 committed by Tom Tromey
parent f930fc9cc5
commit cdc09e8f96
4 changed files with 41 additions and 3 deletions

View 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-24 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/io/PushbackReader.java: Reformat.

View 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"));

View 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]);
}

View 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"));