From: Glenn L McGrath Date: Mon, 30 Jul 2001 04:48:50 +0000 (-0000) Subject: If filename is a '-' then read from stdin to stdout X-Git-Tag: 0_60_0~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7499918f304554c6a0047e43b679cc481cc70eba;p=oweals%2Fbusybox.git If filename is a '-' then read from stdin to stdout --- diff --git a/archival/gzip.c b/archival/gzip.c index cdf226889..54bb72745 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1246,7 +1246,7 @@ int gzip_main(int argc, char **argv) show_usage(); } } - if (optind == argc) { + if ((optind == argc) || (strcmp(argv[optind], "-") == 0)) { fromstdin = 1; tostdout = 1; } diff --git a/gzip.c b/gzip.c index cdf226889..54bb72745 100644 --- a/gzip.c +++ b/gzip.c @@ -1246,7 +1246,7 @@ int gzip_main(int argc, char **argv) show_usage(); } } - if (optind == argc) { + if ((optind == argc) || (strcmp(argv[optind], "-") == 0)) { fromstdin = 1; tostdout = 1; }