diff options
author | Anthony Green <green@redhat.com> | 2002-02-24 19:59:46 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2002-02-24 19:59:46 +0000 |
commit | b9f8d427a830135e7d7dbdde7920139db920698d (patch) | |
tree | dfb66a963ca4a0fc1af4563dacda4ac72a52c4bb /fastjar | |
parent | 3387d36e96b4de9fa1a14eda0a569a8cf5067877 (diff) | |
download | gcc-b9f8d427a830135e7d7dbdde7920139db920698d.zip gcc-b9f8d427a830135e7d7dbdde7920139db920698d.tar.gz gcc-b9f8d427a830135e7d7dbdde7920139db920698d.tar.bz2 |
jar -C fix
From-SVN: r50009
Diffstat (limited to 'fastjar')
-rw-r--r-- | fastjar/ChangeLog | 4 | ||||
-rw-r--r-- | fastjar/jartool.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index 41b4f58..ea908d4 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -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 diff --git a/fastjar/jartool.c b/fastjar/jartool.c index afd08a7..bd5d1fc 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -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': |