diff options
author | bde <bde@FreeBSD.org> | 1998-10-21 11:48:39 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-10-21 11:48:39 +0000 |
commit | f93869e1c489c37b9fe5ebb57746d5ff90573eca (patch) | |
tree | 34453fecdb0ecec163d7ac0b0a82c4e66595e6f2 /usr.bin/compress | |
parent | bbfdc21592f413d50d4b1b41afed0845147e3c61 (diff) | |
download | FreeBSD-src-f93869e1c489c37b9fe5ebb57746d5ff90573eca.zip FreeBSD-src-f93869e1c489c37b9fe5ebb57746d5ff90573eca.tar.gz |
Fixed previous commit to actually work. The wrong variable was initialized
earlier (with style bugs of course), so zcat was an alias for uncompress
instead of `uncompress -c'.
Diffstat (limited to 'usr.bin/compress')
-rw-r--r-- | usr.bin/compress/compress.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index 2736e5c..5e323d3 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -75,11 +75,12 @@ main(argc, argv) int argc; char *argv[]; { - enum {COMPRESS, DECOMPRESS} style = COMPRESS; + enum {COMPRESS, DECOMPRESS} style; size_t len; int bits, cat, ch; char *p, newname[MAXPATHLEN]; + cat = 0; if ((p = rindex(argv[0], '/')) == NULL) p = argv[0]; else @@ -89,12 +90,12 @@ main(argc, argv) else if (!strcmp(p, "compress")) style = COMPRESS; else if (!strcmp(p, "zcat")) { - style = DECOMPRESS; cat = 1; + style = DECOMPRESS; } else errx(1, "unknown program name"); - bits = cat = 0; + bits = 0; while ((ch = getopt(argc, argv, "b:cdfv")) != -1) switch(ch) { case 'b': |