diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-05 22:30:02 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-05 23:27:59 +0100 |
commit | 2ca0337f5f8564b62920087d898f8f4a580d7b3b (patch) | |
tree | e5dd37e0955c430d37d283d1627910354ed782a2 /thirdparty/zlib/gzclose.c | |
parent | a0141fa823aeaba0a99ac2e004496b081204313b (diff) | |
download | redot-engine-2ca0337f5f8564b62920087d898f8f4a580d7b3b.tar.gz |
zlib: Update to upstream 1.2.10
Diffstat (limited to 'thirdparty/zlib/gzclose.c')
-rw-r--r-- | thirdparty/zlib/gzclose.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/thirdparty/zlib/gzclose.c b/thirdparty/zlib/gzclose.c new file mode 100644 index 0000000000..caeb99a317 --- /dev/null +++ b/thirdparty/zlib/gzclose.c @@ -0,0 +1,25 @@ +/* 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(file) + 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 +} |