aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-01 00:41:10 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-01 00:41:10 +0000
commit8ea5a6684695803d0ebc3be238692e885600e919 (patch)
tree23221f25390d9e63d8b69b06f83261b652a8bfdf /archival
parentbbc56159e186cc3a9dc5e991e24661ae17768b31 (diff)
downloadbusybox-w32-8ea5a6684695803d0ebc3be238692e885600e919.tar.gz
busybox-w32-8ea5a6684695803d0ebc3be238692e885600e919.tar.bz2
busybox-w32-8ea5a6684695803d0ebc3be238692e885600e919.zip
Correct the stdin/stdout behavior when no args are provided.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@991 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival')
-rw-r--r--archival/gunzip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 20af97aed..9032852ed 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -581,10 +581,7 @@ int gunzip_main(int argc, char **argv)
581 char ofname[MAX_PATH_LEN + 1]; /* output file name */ 581 char ofname[MAX_PATH_LEN + 1]; /* output file name */
582 582
583 if (strcmp(applet_name, "zcat") == 0) { 583 if (strcmp(applet_name, "zcat") == 0) {
584 tostdout = 1; 584 force = 1;
585 if (argc == 1) {
586 fromstdin = 1;
587 }
588 } 585 }
589 586
590 /* Parse any options */ 587 /* Parse any options */
@@ -608,8 +605,11 @@ int gunzip_main(int argc, char **argv)
608 } 605 }
609 } 606 }
610 } 607 }
611 if (argc <= 0) 608
609 if (argc <= 0) {
610 tostdout = 1;
612 fromstdin = 1; 611 fromstdin = 1;
612 }
613 613
614 if (isatty(fileno(stdin)) && fromstdin==1 && force==0) 614 if (isatty(fileno(stdin)) && fromstdin==1 && force==0)
615 fatalError( "data not read from terminal. Use -f to force it.\n"); 615 fatalError( "data not read from terminal. Use -f to force it.\n");