diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-18 20:46:43 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-18 20:46:43 +0000 |
commit | 2626295a40593228f05d47aaae01b8c616a4aed8 (patch) | |
tree | 789ccb2c4cc65793f7dca0501d3cea10eea1da42 /usr.bin/compress/main.c | |
parent | fbf1bb4de62021a3407bb358b992def18b98bfde (diff) |
Previously, "cat" mode (ie: zcat) was set if no input file was specified,
and input was read from the standard input. However, if the -o option
is specified, we don't need (or want) cat mode since the user has told
us where the output should go.
Diffstat (limited to 'usr.bin/compress/main.c')
-rw-r--r-- | usr.bin/compress/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c index 8541d8b8124..472ee6ab726 100644 --- a/usr.bin/compress/main.c +++ b/usr.bin/compress/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.38 2003/07/18 20:43:18 millert Exp $ */ +/* $OpenBSD: main.c,v 1.39 2003/07/18 20:46:42 millert Exp $ */ static const char copyright[] = "@(#) Copyright (c) 1992, 1993\n\ @@ -35,7 +35,7 @@ static const char license[] = #if 0 static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #else -static const char main_rcsid[] = "$OpenBSD: main.c,v 1.38 2003/07/18 20:43:18 millert Exp $"; +static const char main_rcsid[] = "$OpenBSD: main.c,v 1.39 2003/07/18 20:46:42 millert Exp $"; #endif #endif /* not lint */ @@ -290,7 +290,8 @@ main(int argc, char *argv[]) argv[0] = "/dev/stdin"; argv[1] = NULL; pipin++; - cat = 1; + if (!oflag) + cat = 1; } else { for (i = 0; i < argc; i++) { if (argv[i][0] == '-' && argv[i][1] == '\0') { |