diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-15 21:39:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-15 21:39:50 +0000 |
commit | f2d240e3af96300dd96067cd653bc34a08c47e26 (patch) | |
tree | f90c1ffd8bee155bcfed692f77d84f44efd46dec /Build/source/libs/zlib/zlib-src/gzclose.c | |
parent | 4af143877155448dadfe2ac57e4b290a75b9ad49 (diff) |
rename zlib-1.2.8* to zlib-{src,PATCHES}
git-svn-id: svn://tug.org/texlive/trunk@39726 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zlib/zlib-src/gzclose.c')
-rw-r--r-- | Build/source/libs/zlib/zlib-src/gzclose.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/libs/zlib/zlib-src/gzclose.c b/Build/source/libs/zlib/zlib-src/gzclose.c new file mode 100644 index 00000000000..caeb99a3177 --- /dev/null +++ b/Build/source/libs/zlib/zlib-src/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 +} |