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:
parent
4757e52686
commit
7c0704e446
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40534
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user