#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <utime.h>
#include "zlib.h"
Go to the source code of this file.
|
#define | local static |
|
#define | SIZE 32768U /* input and output buffer sizes */ |
|
#define | PIECE 16384 /* limits i/o chunks for 16-bit int case */ |
|
#define | NEXT() |
|
#define | FLUSHCODE() |
|
|
static unsigned | in (void *in_desc, z_const unsigned char **buf) |
|
static int | out (void *out_desc, unsigned char *buf, unsigned len) |
|
static int | lunpipe (unsigned have, z_const unsigned char *next, struct ind *indp, int outfile, z_stream *strm) |
|
static int | gunpipe (z_stream *strm, int infile, int outfile) |
|
static void | copymeta (char *from, char *to) |
|
static int | gunzip (z_stream *strm, char *inname, char *outname, int test) |
|
int | main (int argc, char **argv) |
|
|
unsigned char | inbuf [32768U] |
|
unsigned char | outbuf [32768U] |
|
unsigned short | prefix [65536] |
|
unsigned char | suffix [65536] |
|
unsigned char | match [65280+2] |
|
Definition at line 81 of file gun.c.
Class Members |
unsigned char * |
inbuf |
|
int |
infile |
|
Definition at line 119 of file gun.c.
Class Members |
int |
check |
|
unsigned long |
crc |
|
int |
outfile |
|
unsigned long |
total |
|
Value:do { \
left = 0; \
rem = 0; \
if (chunk > have) { \
chunk -= have; \
have = 0; \
break; \
chunk--; \
if (chunk > have) { \
chunk = have = 0; \
break; \
} \
} \
have -= chunk; \
next += chunk; \
chunk = 0; \
} while (0)
Definition at line 171 of file gun.c.
Definition at line 73 of file gun.c.
Value:(have ? 0 : (have =
in(indp, &next)), \
last = have ? (have--, (int)(*next++)) : -1)
static unsigned in(void *in_desc, z_const unsigned char **buf)
Definition at line 155 of file gun.c.
#define PIECE 16384 /* limits i/o chunks for 16-bit int case */ |
Definition at line 77 of file gun.c.
#define SIZE 32768U /* input and output buffer sizes */ |
Definition at line 76 of file gun.c.
static void copymeta |
( |
char * |
from, |
|
|
char * |
to |
|
) |
| |
|
static |
static int gunpipe |
( |
z_stream * |
strm, |
|
|
int |
infile, |
|
|
int |
outfile |
|
) |
| |
|
static |
static int gunzip |
( |
z_stream * |
strm, |
|
|
char * |
inname, |
|
|
char * |
outname, |
|
|
int |
test |
|
) |
| |
|
static |
static unsigned in |
( |
void * |
in_desc, |
|
|
z_const unsigned char ** |
buf |
|
) |
| |
|
static |
Definition at line 89 of file gun.c.
static int lunpipe |
( |
unsigned |
have, |
|
|
z_const unsigned char * |
next, |
|
|
struct ind * |
indp, |
|
|
int |
outfile, |
|
|
z_stream * |
strm |
|
) |
| |
|
static |
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
static int out |
( |
void * |
out_desc, |
|
|
unsigned char * |
buf, |
|
|
unsigned |
len |
|
) |
| |
|
static |
unsigned char inbuf[32768U ] |
unsigned char match[65280+2] |
unsigned char outbuf[32768U ] |
unsigned short prefix[65536] |
unsigned char suffix[65536] |