diff options
author | Tom Tromey <tromey@redhat.com> | 2004-11-29 22:26:00 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2004-11-29 22:26:00 +0000 |
commit | 693ac16709fa7198d0c2dc33c296ed2ca43686ad (patch) | |
tree | 707a7729a6511f90759faadb3ce54af47b1c6594 /libjava | |
parent | bac8beb4026b8ee678eb412593a0f61206ed02a5 (diff) | |
download | gcc-693ac16709fa7198d0c2dc33c296ed2ca43686ad.zip gcc-693ac16709fa7198d0c2dc33c296ed2ca43686ad.tar.gz gcc-693ac16709fa7198d0c2dc33c296ed2ca43686ad.tar.bz2 |
Main.java (main): Mention gcj-dbtool.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Mention gcj-dbtool.
Recognize --help and --version.
(usage): Mention gcj-dbtool. Added "out" argument.
(insist): Updated.
From-SVN: r91491
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 7 | ||||
-rw-r--r-- | libjava/gnu/gcj/tools/gcj_dbtool/Main.java | 29 |
2 files changed, 24 insertions, 12 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index baa11c4..539827b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2004-11-29 Tom Tromey <tromey@redhat.com> + + * gnu/gcj/tools/gcj_dbtool/Main.java (main): Mention gcj-dbtool. + Recognize --help and --version. + (usage): Mention gcj-dbtool. Added "out" argument. + (insist): Updated. + 2004-11-29 Eric Botcazou <ebotcazou@libertysurf.fr> * link.cc (link_symbol_table): Do not use intptr_t. diff --git a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java index a478f93..b9bea0e 100644 --- a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java +++ b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java @@ -21,10 +21,10 @@ public class Main public static void main (String[] s) { insist (s.length >= 1); - if (s[0].equals("-v")) + if (s[0].equals("-v") || s[0].equals("--version")) { insist (s.length == 1); - System.out.println("jv-dbtool (" + System.out.println("gcj-dbtool (" + System.getProperty("java.vm.name") + ") " + System.getProperty("java.vm.version")); @@ -34,6 +34,11 @@ public class Main System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); return; } + if (s[0].equals("--help")) + { + usage(System.out); + return; + } if (s[0].equals("-n")) { @@ -60,7 +65,7 @@ public class Main if (capacity <= 2) { - usage(); + usage(System.err); System.exit(1); } } @@ -199,7 +204,7 @@ public class Main return; } - usage(); + usage(System.err); System.exit(1); } @@ -207,22 +212,22 @@ public class Main { if (! ok) { - usage(); + usage(System.err); System.exit(1); } } - private static void usage() + private static void usage(PrintStream out) { - System.err.println - ("jv-dbtool: Manipulate gcj map database files\n" + out.println + ("gcj-dbtool: Manipulate gcj map database files\n" + "\n" + " Usage: \n" - + " jv-dbtool -n file.gcjdb [size] - Create a new gcj map database\n" - + " jv-dbtool -a file.gcjdb file.jar file.so\n" + + " gcj-dbtool -n file.gcjdb [size] - Create a new gcj map database\n" + + " gcj-dbtool -a file.gcjdb file.jar file.so\n" + " - Add the contents of file.jar to the database\n" - + " jv-dbtool -t file.gcjdb - Test a gcj map database\n" - + " jv-dbtool -l file.gcjdb - List a gcj map database\n"); + + " gcj-dbtool -t file.gcjdb - Test a gcj map database\n" + + " gcj-dbtool -l file.gcjdb - List a gcj map database\n"); } |