diff options
author | Glenn L McGrath | 2001-03-29 01:07:54 +0000 |
---|---|---|
committer | Glenn L McGrath | 2001-03-29 01:07:54 +0000 |
commit | 5f2ef46d6dd0cc8f564b11da70ac8c34968302d1 (patch) | |
tree | 9a6f77212781322d0a5280339dd6f4a8dd943083 | |
parent | ed7a77653847c72bfe22879cea5f976fa9defb24 (diff) | |
download | busybox-5f2ef46d6dd0cc8f564b11da70ac8c34968302d1.zip busybox-5f2ef46d6dd0cc8f564b11da70ac8c34968302d1.tar.gz |
Fix zcat
-rw-r--r-- | archival/gunzip.c | 6 | ||||
-rw-r--r-- | gunzip.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index d457b75..1107bc7 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -1074,16 +1074,14 @@ extern int gunzip_main(int argc, char **argv) int opt = 0; int delete_old_file = FALSE; -#ifdef BB_ZCAT /* if called as zcat */ if (strcmp(applet_name, "zcat") == 0) { if (argc != 2) { show_usage(); } + optind = 1; flags |= (gunzip_force | gunzip_to_stdout); - } else -#endif - if (strcmp(applet_name, "gunzip") == 0) { + } else { /* workout flags as regular gunzip */ /* set default flags */ if (argc == 1) { @@ -1074,16 +1074,14 @@ extern int gunzip_main(int argc, char **argv) int opt = 0; int delete_old_file = FALSE; -#ifdef BB_ZCAT /* if called as zcat */ if (strcmp(applet_name, "zcat") == 0) { if (argc != 2) { show_usage(); } + optind = 1; flags |= (gunzip_force | gunzip_to_stdout); - } else -#endif - if (strcmp(applet_name, "gunzip") == 0) { + } else { /* workout flags as regular gunzip */ /* set default flags */ if (argc == 1) { |