From: Glenn L McGrath Date: Thu, 29 Mar 2001 01:07:54 +0000 (-0000) Subject: Fix zcat X-Git-Tag: 0_51~65 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5f2ef46d6dd0cc8f564b11da70ac8c34968302d1;p=oweals%2Fbusybox.git Fix zcat --- diff --git a/archival/gunzip.c b/archival/gunzip.c index d457b750c..1107bc75c 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) { diff --git a/gunzip.c b/gunzip.c index d457b750c..1107bc75c 100644 --- a/gunzip.c +++ b/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) {