diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-04-01 01:32:56 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-04-04 06:58:41 +0000 |
commit | 6f98a0fac33db70b3ceb71d939b0a9d0d47747cc (patch) | |
tree | f4769e5888fca9bd30cde35aabad4542849e9c4f /wiretap/file_wrappers.c | |
parent | e005bc819c201c49cf330a2607ad0770f145904e (diff) |
Rename "libz" to "zlib"
Change-Id: I12f92c983d587c2a4751428cdf299635090c9f0b
Reviewed-on: https://code.wireshark.org/review/14748
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/file_wrappers.c')
-rw-r--r-- | wiretap/file_wrappers.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c index 777d683014..00df01939f 100644 --- a/wiretap/file_wrappers.c +++ b/wiretap/file_wrappers.c @@ -48,10 +48,10 @@ #include <wsutil/ws_diag_control.h> #include <wsutil/file_util.h> -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB #define ZLIB_CONST #include <zlib.h> -#endif /* HAVE_LIBZ */ +#endif /* HAVE_ZLIB */ /* * See RFC 1952 for a description of the gzip file format. @@ -70,7 +70,7 @@ * compression types. */ const char *compressed_file_extension_table[] = { -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB "gz", #endif NULL @@ -83,7 +83,7 @@ const char *compressed_file_extension_table[] = { typedef enum { UNKNOWN, /* unknown - look for a gzip header */ UNCOMPRESSED, /* uncompressed - copy input directly */ -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB ZLIB, /* decompress a zlib stream */ GZIP_AFTER_HEADER #endif @@ -113,7 +113,7 @@ struct wtap_reader { guint avail_in; /* number of bytes available at next_in */ unsigned char *next_in; /* next input byte */ -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB /* zlib inflate stream */ z_stream strm; /* stream structure in-place (not a pointer) */ gboolean dont_check_crc; /* TRUE if we aren't supposed to check the CRC */ @@ -234,13 +234,13 @@ fast_seek_header(FILE_T file, gint64 in_pos, gint64 out_pos, static void fast_seek_reset( -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB FILE_T state) #else FILE_T state _U_) #endif { -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB if (state->compression == ZLIB && state->fast_seek_cur) { struct zlib_cur_seek_point *cur = (struct zlib_cur_seek_point *) state->fast_seek_cur; @@ -249,7 +249,7 @@ fast_seek_reset( #endif } -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB /* Get next byte from input, or -1 if end or error. * @@ -573,7 +573,7 @@ gz_head(FILE_T state) } /* look for the gzip magic header bytes 31 and 139 */ -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB if (state->next_in[0] == 31) { state->avail_in--; state->next_in++; @@ -706,7 +706,7 @@ fill_out_buffer(FILE_T state) return -1; state->next = state->out; } -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB else if (state->compression == ZLIB) { /* decompress */ zlib_read(state, state->out, state->size << 1); } @@ -825,7 +825,7 @@ file_fdopen(int fd) return NULL; } -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB /* allocate inflate memory */ state->strm.zalloc = Z_NULL; state->strm.zfree = Z_NULL; @@ -852,7 +852,7 @@ file_open(const char *path) { int fd; FILE_T ft; -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB const char *suffixp; #endif @@ -875,7 +875,7 @@ file_open(const char *path) return NULL; } -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB /* * If this file's name ends in ".caz", it's probably a compressed * Windows Sniffer file. The compression is gzip, but if we @@ -991,7 +991,7 @@ file_seek(FILE_T file, gint64 offset, int whence, int *err) * has been called on this file, which should never be the case * for a pipe. */ -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB if (here->compression == ZLIB) { #ifdef HAVE_INFLATEPRIME off = here->in - (here->data.zlib.bits ? 1 : 0); @@ -1023,7 +1023,7 @@ file_seek(FILE_T file, gint64 offset, int whence, int *err) file->err_info = NULL; file->avail_in = 0; -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB if (here->compression == ZLIB) { z_stream *strm = &file->strm; @@ -1444,7 +1444,7 @@ file_close(FILE_T file) /* free memory and close file */ if (file->size) { -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB inflateEnd(&(file->strm)); #endif g_free(file->out); @@ -1463,7 +1463,7 @@ file_close(FILE_T file) ws_close(fd); } -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB /* internal gzip file state data structure for writing */ struct wtap_writer { int fd; /* file descriptor */ |