Behave like zcat if invoked as zcat. We don't install as zcat; this just

makes us more useful in a tight environment.

Submitted by:	Wilfredo Sanchez <wsanchez@apple.com>
This commit is contained in:
Mike Smith 1998-10-20 06:13:57 +00:00
parent 4757e52686
commit 7c0704e446
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40534

View File

@ -75,7 +75,7 @@ main(argc, argv)
int argc;
char *argv[];
{
enum {COMPRESS, DECOMPRESS} style;
enum {COMPRESS, DECOMPRESS} style = COMPRESS;
size_t len;
int bits, cat, ch;
char *p, newname[MAXPATHLEN];
@ -88,7 +88,10 @@ main(argc, argv)
style = DECOMPRESS;
else if (!strcmp(p, "compress"))
style = COMPRESS;
else
else if (!strcmp(p, "zcat")) {
style = DECOMPRESS;
cat = 1;
} else
errx(1, "unknown program name");
bits = cat = 0;