From: Matt Kraai Date: Tue, 22 May 2001 14:23:02 +0000 (-0000) Subject: Make - read compressed data from stdin (thanks to Marius Groeger). X-Git-Tag: 0_52~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=117231c44f2a6b25b211322b61b192d788917c84;p=platform%2Fupstream%2Fbusybox.git Make - read compressed data from stdin (thanks to Marius Groeger). --- diff --git a/archival/gunzip.c b/archival/gunzip.c index 6f5e63d..c39814d 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -110,7 +110,7 @@ extern int gunzip_main(int argc, char **argv) } /* Set input filename and number */ - if (argv[optind] == NULL) { + if (argv[optind] == NULL || strcmp(argv[optind], "-") == 0) { flags |= gunzip_to_stdout; in_file = stdin; } else { diff --git a/gunzip.c b/gunzip.c index 6f5e63d..c39814d 100644 --- a/gunzip.c +++ b/gunzip.c @@ -110,7 +110,7 @@ extern int gunzip_main(int argc, char **argv) } /* Set input filename and number */ - if (argv[optind] == NULL) { + if (argv[optind] == NULL || strcmp(argv[optind], "-") == 0) { flags |= gunzip_to_stdout; in_file = stdin; } else {