From 7499918f304554c6a0047e43b679cc481cc70eba Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Mon, 30 Jul 2001 04:48:50 +0000 Subject: [PATCH] If filename is a '-' then read from stdin to stdout --- archival/gzip.c | 2 +- gzip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.25.1