diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-24 02:01:26 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-24 02:01:26 +0000 |
commit | 975c8f9d43d4026bf1d669b08646e9d29a9d02e4 (patch) | |
tree | fd8aed139ffef712ccbb2d392c13b3949b0192c5 /inflate.c | |
parent | [w3m-dev 02530] segfault for bad cookie from local (diff) | |
download | w3m-975c8f9d43d4026bf1d669b08646e9d29a9d02e4.tar.gz w3m-975c8f9d43d4026bf1d669b08646e9d29a9d02e4.zip |
run make indent
Diffstat (limited to '')
-rw-r--r-- | inflate.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: inflate.c,v 1.2 2001/11/20 17:49:23 ukai Exp $ */ +/* $Id: inflate.c,v 1.3 2001/11/24 02:01:26 ukai Exp $ */ #include <stdio.h> #include <stdlib.h> #include <zlib.h> @@ -16,9 +16,10 @@ main(int argc, char **argv) if (argc > 1) { f = fopen(argv[1], "rb"); - if (! f) + if (!f) exit(1); - } else + } + else f = stdin; s.zalloc = Z_NULL; @@ -28,12 +29,12 @@ main(int argc, char **argv) if (status != Z_OK) exit(1); s.avail_in = 0; - s.next_out = (Bytef *)outbuf; + s.next_out = (Bytef *) outbuf; s.avail_out = sizeof(outbuf); - flush = Z_NO_FLUSH; + flush = Z_NO_FLUSH; while (1) { if (s.avail_in == 0) { - s.next_in = (Bytef *)inbuf; + s.next_in = (Bytef *) inbuf; s.avail_in = fread(inbuf, 1, sizeof(inbuf), f); } status = inflate(&s, flush); @@ -46,7 +47,7 @@ main(int argc, char **argv) exit(1); if (s.avail_out == 0) { fwrite(outbuf, 1, sizeof(outbuf), stdout); - s.next_out = (Bytef *)outbuf; + s.next_out = (Bytef *) outbuf; s.avail_out = sizeof(outbuf); } } |