diff options
author | Tom Tromey <tromey@redhat.com> | 2006-05-09 19:28:32 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2006-05-09 19:28:32 +0000 |
commit | 295b98c9fff7e2ab4a3cc1e4c30470249d45183b (patch) | |
tree | d696cbb7221ecd9fa50135e673b90d55b94871b6 /tools | |
parent | 60e1fc7d605ea7c8cdc8c97630c103ccd025ff52 (diff) | |
download | classpath-295b98c9fff7e2ab4a3cc1e4c30470249d45183b.tar.gz |
* tools/gnu/classpath/tools/getopt/OptionGroup.java (printHelp):
Special case for '-J'. Use space instead of '='.
* tools/gnu/classpath/tools/getopt/Parser.java (setHeader): Added
comment.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gnu/classpath/tools/getopt/OptionGroup.java | 13 | ||||
-rw-r--r-- | tools/gnu/classpath/tools/getopt/Parser.java | 1 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tools/gnu/classpath/tools/getopt/OptionGroup.java b/tools/gnu/classpath/tools/getopt/OptionGroup.java index 35e812b2d..518d9f938 100644 --- a/tools/gnu/classpath/tools/getopt/OptionGroup.java +++ b/tools/gnu/classpath/tools/getopt/OptionGroup.java @@ -147,9 +147,16 @@ public class OptionGroup { if (argName != null) { - out.print(' '); + // This is a silly hack just for '-J'. We don't + // support joined options in general, but this option + // is filtered out before argument processing can see it. + if (option.getShortName() != 'J') + { + out.print(' '); + ++column; + } out.print(argName); - column += 1 + argName.length(); + column += argName.length(); } out.print(" "); } @@ -168,7 +175,7 @@ public class OptionGroup column += (longOnly ? 1 : 2) + option.getLongName().length(); if (argName != null) { - out.print("=" + argName); + out.print(" " + argName); column += 1 + argName.length(); } } diff --git a/tools/gnu/classpath/tools/getopt/Parser.java b/tools/gnu/classpath/tools/getopt/Parser.java index 6e5e61b94..e6fdb1037 100644 --- a/tools/gnu/classpath/tools/getopt/Parser.java +++ b/tools/gnu/classpath/tools/getopt/Parser.java @@ -120,6 +120,7 @@ public class Parser { // -J should be handled by the appletviewer wrapper binary. // We add it here so that it shows up in the --help output. + // Note that there is a special case for this in OptionGroup. } }); add(finalGroup); |