CVSROOT: /cvsroot/classpath
Module name: classpath
Changes by: Tom Tromey <tromey> 06/06/18 18:45:19
Modified files:
. : ChangeLog
tools/gnu/classpath/tools/getopt: Parser.java
Log message:
* tools/gnu/classpath/tools/getopt/Parser.java
(handleLongOption):
Also handle short options.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7868&r2=1.7869
http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/getopt/Parser.java?cvsroot=classpath&r1=1.7&r2=1.8
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.7868
retrieving revision 1.7869
diff -u -b -r1.7868 -r1.7869
--- ChangeLog 18 Jun 2006 18:33:09 -0000 1.7868
+++ ChangeLog 18 Jun 2006 18:45:19 -0000 1.7869
@@ -1,3 +1,8 @@
+2006-06-18 Tom Tromey <[EMAIL PROTECTED]>
+
+ * tools/gnu/classpath/tools/getopt/Parser.java (handleLongOption):
+ Also handle short options.
+
2006-06-18 Jim Huang <[EMAIL PROTECTED]>
PR classpath/28076:
Index: tools/gnu/classpath/tools/getopt/Parser.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/tools/gnu/classpath/tools/getopt/Parser.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- tools/gnu/classpath/tools/getopt/Parser.java 15 May 2006 15:56:42
-0000 1.7
+++ tools/gnu/classpath/tools/getopt/Parser.java 18 Jun 2006 18:45:19
-0000 1.8
@@ -316,6 +316,9 @@
int eq = option.indexOf('=');
if (eq != - 1)
justName = option.substring(0, eq);
+ char shortName = 0;
+ if (justName.length() == 1)
+ shortName = justName.charAt(0);
Option found = null;
for (int i = options.size() - 1; i >= 0; --i)
{
@@ -325,6 +328,11 @@
found = opt;
break;
}
+ if (shortName != 0 && opt.getShortName() == shortName)
+ {
+ found = opt;
+ break;
+ }
}
if (found == null)
{