From 51ecf18f6ce5b9e06ec61423548270b4746f379d Mon Sep 17 00:00:00 2001 From: bonmas14 Date: Mon, 29 Sep 2025 19:58:12 +0300 Subject: Added zlib --- deps/zlib-1.3.1/gzclose.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 deps/zlib-1.3.1/gzclose.c (limited to 'deps/zlib-1.3.1/gzclose.c') diff --git a/deps/zlib-1.3.1/gzclose.c b/deps/zlib-1.3.1/gzclose.c new file mode 100644 index 0000000..48d6a86 --- /dev/null +++ b/deps/zlib-1.3.1/gzclose.c @@ -0,0 +1,23 @@ +/* gzclose.c -- zlib gzclose() function + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* gzclose() is in a separate file so that it is linked in only if it is used. + That way the other gzclose functions can be used instead to avoid linking in + unneeded compression or decompression routines. */ +int ZEXPORT gzclose(gzFile file) { +#ifndef NO_GZCOMPRESS + gz_statep state; + + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); +#else + return gzclose_r(file); +#endif +} -- cgit v1.2.3-70-g09d2