This patch adds the -reverse option to gnative2ascii as described here:

http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=103

The user can pass either option, if both are present one is simply
ignored, I first added an exception, but I guess it's better to just
ignore the redundant option rather that stop the application.

Mark told me that Tom Tromey is already working on it too, so feel free
to ignore this one.

Thanks,
Mario

2008-01-24  Mario Torre  <[EMAIL PROTECTED]>

        * tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
        (createParser): 
        added new option for compatibility with OpenJDK.
        * resource/gnu/classpath/tools/native2ascii/messages.properties: Help
        string for new option.

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: [EMAIL PROTECTED]
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java,v
retrieving revision 1.5
diff -u -r1.5 Native2ASCII.java
--- tools/gnu/classpath/tools/native2ascii/Native2ASCII.java	8 Jan 2007 17:00:49 -0000	1.5
+++ tools/gnu/classpath/tools/native2ascii/Native2ASCII.java	24 Jan 2008 17:14:49 -0000
@@ -68,7 +68,7 @@
   String encoding;
   // True for reverse operation.
   boolean reversed;
-
+  
   private class HandleFile extends FileArgumentCallback
   {
     public HandleFile()
@@ -101,10 +101,18 @@
         encoding = argument;
       }
     });
+    
     result.add(new Option("reversed", Messages.getString("Native2ASCII.ReversedHelp")) //$NON-NLS-1$ //$NON-NLS-2$
     {
       public void parsed(String argument) throws OptionException
-      {
+      {   
+        reversed = true;
+      }
+    });
+    result.add(new Option("reverse", Messages.getString("Native2ASCII.ReverseHelp")) //$NON-NLS-1$ //$NON-NLS-2$
+    {
+      public void parsed(String argument) throws OptionException
+      { 
         reversed = true;
       }
     });
Index: resource/gnu/classpath/tools/native2ascii/messages.properties
===================================================================
RCS file: /sources/classpath/classpath/resource/gnu/classpath/tools/native2ascii/messages.properties,v
retrieving revision 1.1
diff -u -r1.1 messages.properties
--- resource/gnu/classpath/tools/native2ascii/messages.properties	20 May 2006 22:10:31 -0000	1.1
+++ resource/gnu/classpath/tools/native2ascii/messages.properties	24 Jan 2008 17:14:49 -0000
@@ -41,3 +41,4 @@
 Native2ASCII.EncodingArgName=NAME
 Native2ASCII.EncodingSpecified=encoding already specified
 Native2ASCII.ReversedHelp=convert from encoding to native
+Native2ASCII.ReverseHelp=convert from encoding to native, this option has the same effect of \"reversed\"

Reply via email to