jar -C fix
authorAnthony Green <green@redhat.com>
Sun, 24 Feb 2002 19:59:46 +0000 (19:59 +0000)
committerAnthony Green <green@gcc.gnu.org>
Sun, 24 Feb 2002 19:59:46 +0000 (19:59 +0000)
From-SVN: r50009

fastjar/ChangeLog
fastjar/jartool.c

index 41b4f581b3c2597385b6f05e418746fe58da7fee..ea908d416484c132904b58fcd9fd9da2d556049e 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-23  Anthony Green  <green@redhat.com>
+
+       * jartool.c (main): Fix handling of -C.
+
 2002-01-30  Tom Tromey  <tromey@redhat.com>
 
        * jartool.c (main): NULL-terminate new_argv.  Pass 0 as argument
index afd08a758f282ce2200db7910b355c0ad2422379..bd5d1fc43a337c84ffcc9cfb2e7284dcc4b79835 100644 (file)
@@ -303,8 +303,8 @@ int number_of_entries; /* number of entries in the linked list */
 
 #define OPT_HELP     LONG_OPT (0)
 
-/* This holds all options except `-C', which is handled specially.  */
-#define OPTION_STRING "-ctxuvVf:m:0ME@"
+/* This holds all options.  */
+#define OPTION_STRING "-ctxuvVf:m:C:0ME@"
 
 static const struct option options[] =
 {
@@ -348,9 +348,11 @@ int main(int argc, char **argv){
   while ((opt = getopt_long (argc, argv, OPTION_STRING,
                             options, NULL)) != -1) {
     switch(opt){
+    case 'C':
+      new_argv[new_argc++] = (char *) "-C";
+      /* ... fall through ... */
     case 1:
-      /* File name or unparsed option, due to RETURN_IN_ORDER.  In
-        particular `-C' is handled here and not elsewhere.  */
+      /* File name or unparsed option, due to RETURN_IN_ORDER.  */
       new_argv[new_argc++] = optarg;
       break;
     case 'c':