#ifndef HAVE_VSNPRINTF # if !defined(NO_vsnprintf) && \
(defined(MSDOS) || defined(__TURBOC__) || defined(__SASC) || \ defined(VMS) || defined(__OS400) || defined(__MVS__)) /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
but for now we just assume it doesn't. */ # define NO_vsnprintf # endif # ifdef WIN32 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ # if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) # ifndef vsnprintf # define vsnprintf _vsnprintf # endif # endif # elif !defined(__STDC_VERSION__) || __STDC_VERSION__-0 < 199901L /* Otherwise if C89/90, assume no C99 snprintf() or vsnprintf() */ # ifndef NO_snprintf # define NO_snprintf # endif # ifndef NO_vsnprintf # define NO_vsnprintf # endif # endif #endif
/* unlike snprintf (which is required in C99), _snprintf does not guarantee nullterminationoftheresult--howeverthisisonlyusedingzlib.cwhere
the result is assured to fit in the space provided */ #ifdefined(_MSC_VER) && _MSC_VER < 1900 # define snprintf _snprintf #endif
#ifndef local # define local static #endif /* since "static" is used to mean two completely different things in C, we define"local"forthenon-staticmeaningof"static",forreadability
(compile with -Dlocal if your debugger can't find static symbols) */
/* default i/o buffer size -- double this for output when reading (this and
twice this must be able to fit in an unsigned type) */ #define GZBUFSIZE 8192
/* gzip modes, also provide a little integrity check on the passed structure */ #define GZ_NONE 0 #define GZ_READ 7247 #define GZ_WRITE 31153 #define GZ_APPEND 1/* mode set to GZ_WRITE after the file is opened */
/* values for gz_state how */ #define LOOK 0/* look for a gzip header */ #define COPY 1/* copy input directly */ #define GZIP 2/* decompress a gzip stream */
/* internal gzip file state data structure */ typedefstruct { /* exposed contents for gzgetc() macro */ struct gzFile_s x; /* "x" for exposed */ /* x.have: number of bytes available at x.next */ /* x.next: next output data to deliver or write */ /* x.pos: current position in uncompressed data */ /* used for both reading and writing */ int mode; /* see gzip modes above */ int fd; /* file descriptor */ char *path; /* path or fd for error messages */ unsigned size; /* buffer size, zero if not allocated yet */ unsigned want; /* requested buffer size, default is GZBUFSIZE */ unsignedchar *in; /* input buffer (double-sized when writing) */ unsignedchar *out; /* output buffer (double-sized when reading) */ int direct; /* 0 if processing gzip, 1 if transparent */ /* just for reading */ int junk; /* -1 = start, 1 = junk candidate, 0 = in gzip */ int how; /* 0: get header, 1: copy, 2: decompress */ int again; /* true if EAGAIN or EWOULDBLOCK on last i/o */
z_off64_t start; /* where the gzip data started, for rewinding */ int eof; /* true if end of input file reached */ int past; /* true if read requested past end */ /* just for writing */ int level; /* compression level */ int strategy; /* compression strategy */ int reset; /* true if a reset is pending after a Z_FINISH */ /* seek request */
z_off64_t skip; /* amount to skip (already rewound if backwards) */ /* error information */ int err; /* error code */ char *msg; /* error message */ /* zlib inflate or deflate stream */
z_stream strm; /* stream structure in-place (not a pointer) */
} gz_state; typedef gz_state FAR *gz_statep;
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t value--neededwhencomparingunsignedtoz_off64_t,whichissigned
(possible z_off64_t types off_t, off64_t, and long are all signed) */ unsigned ZLIB_INTERNAL gz_intmax(void); #define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.