summaryrefslogtreecommitdiff
path: root/src/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compress.c')
-rw-r--r--src/compress.c44
1 files changed, 12 insertions, 32 deletions
diff --git a/src/compress.c b/src/compress.c
index f71c2a69..4e1219c9 100644
--- a/src/compress.c
+++ b/src/compress.c
@@ -19,7 +19,7 @@
#endif
#ifndef lint
-FILE_RCSID("@(#)$Id: compress.c,v 1.24 2002/06/11 17:31:46 christos Exp $")
+FILE_RCSID("@(#)$Id: compress.c,v 1.25 2002/07/03 18:26:37 christos Exp $")
#endif
@@ -44,20 +44,15 @@ static struct {
static int ncompr = sizeof(compr) / sizeof(compr[0]);
-static int swrite __P((int, const void *, size_t));
-static int sread __P((int, void *, size_t));
-static int uncompressbuf __P((int, const unsigned char *, unsigned char **,
- int));
+static int swrite(int, const void *, size_t);
+static int sread(int, void *, size_t);
+static int uncompressbuf(int, const unsigned char *, unsigned char **, int);
#ifdef HAVE_LIBZ
-static int uncompressgzipped __P((const unsigned char *, unsigned char **,
- int));
+static int uncompressgzipped(const unsigned char *, unsigned char **, int);
#endif
int
-zmagic(fname, buf, nbytes)
- const char *fname;
- unsigned char *buf;
- int nbytes;
+zmagic(const char *fname, unsigned char *buf, int nbytes)
{
unsigned char *newbuf;
int newsize;
@@ -87,10 +82,7 @@ zmagic(fname, buf, nbytes)
* `safe' write for sockets and pipes.
*/
static int
-swrite(fd, buf, n)
- int fd;
- const void *buf;
- size_t n;
+swrite(int fd, const void *buf, size_t n)
{
int rv;
size_t rn = n;
@@ -115,10 +107,7 @@ swrite(fd, buf, n)
* `safe' read for sockets and pipes.
*/
static int
-sread(fd, buf, n)
- int fd;
- void *buf;
- size_t n;
+sread(int fd, void *buf, size_t n)
{
int rv;
size_t rn = n;
@@ -141,10 +130,7 @@ sread(fd, buf, n)
}
int
-pipe2file(fd, startbuf, nbytes)
- int fd;
- void *startbuf;
- size_t nbytes;
+pipe2file(int fd, void *startbuf, size_t nbytes)
{
char buf[4096];
int r, tfd;
@@ -217,10 +203,7 @@ pipe2file(fd, startbuf, nbytes)
#define FCOMMENT (1 << 4)
static int
-uncompressgzipped(old, newch, n)
- const unsigned char *old;
- unsigned char **newch;
- int n;
+uncompressgzipped(const unsigned char *old, unsigned char **newch, int n)
{
unsigned char flg = old[3];
int data_start = 10;
@@ -277,11 +260,8 @@ uncompressgzipped(old, newch, n)
#endif
static int
-uncompressbuf(method, old, newch, n)
- int method;
- const unsigned char *old;
- unsigned char **newch;
- int n;
+uncompressbuf(int method, const unsigned char *old, unsigned char **newch,
+ int n)
{
int fdin[2], fdout[2];