20 #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) 23 # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) 25 # define SET_BINARY_MODE(file) 70 if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
113 if (ferror(source)) {
136 if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
153 fputs(
"zpipe: ", stderr);
157 fputs(
"error reading stdin\n", stderr);
159 fputs(
"error writing stdout\n", stderr);
162 fputs(
"invalid compression level\n", stderr);
165 fputs(
"invalid or incomplete deflate data\n", stderr);
168 fputs(
"out of memory\n", stderr);
171 fputs(
"zlib version mismatch!\n", stderr);
176 int main(
int argc,
char **argv)
193 else if (argc == 2 && strcmp(argv[1],
"-d") == 0) {
194 ret =
inf(stdin, stdout);
202 fputs(
"zpipe usage: zpipe [-d] < source > dest\n", stderr);
GLsizei GLsizei GLchar * source
#define Z_DEFAULT_COMPRESSION
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
int ZEXPORT deflateEnd(z_streamp strm)
#define inflateInit(strm)
local int out(void *out_desc, unsigned char *buf, unsigned len)
#define deflateInit(strm, level)
int ZEXPORT inflate(z_streamp strm, int flush)
int inf(FILE *source, FILE *dest)
int ZEXPORT deflate(z_streamp strm, int flush)
#define SET_BINARY_MODE(file)
int def(FILE *source, FILE *dest, int level)
int main(int argc, char **argv)
int ZEXPORT inflateEnd(z_streamp strm)