diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-09-27 12:49:30 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-09-27 12:49:30 +0000 |
commit | 177e09603080f8842c6b596e30aa05a750b5dbed (patch) | |
tree | 24e646494e4029c03a68febf736761015d6e0102 /Build/source/libs/zlib/zlib-1.2.5/gzclose.c | |
parent | 6fff08d6f5fcdac85369a6f5f481074b83fed347 (diff) |
prepare for zlib 1.2.5
git-svn-id: svn://tug.org/texlive/trunk@19919 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zlib/zlib-1.2.5/gzclose.c')
-rw-r--r-- | Build/source/libs/zlib/zlib-1.2.5/gzclose.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/libs/zlib/zlib-1.2.5/gzclose.c b/Build/source/libs/zlib/zlib-1.2.5/gzclose.c new file mode 100644 index 00000000000..caeb99a3177 --- /dev/null +++ b/Build/source/libs/zlib/zlib-1.2.5/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 +} |