diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-04-13 13:26:34 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-04-13 13:26:34 +0000 |
commit | cfdc7ebde08b8f8600be0a71901c899030ebfda1 (patch) | |
tree | 328462c2ee9c583bcc64d39bbebf033ab7696387 /Build/source/libs/zlib/zlib-1.2.4/gzclose.c | |
parent | f4844d60ab6540a3a081a5c21a826376a09152c3 (diff) |
more preparation for zlib-1.2.4
git-svn-id: svn://tug.org/texlive/trunk@17840 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zlib/zlib-1.2.4/gzclose.c')
-rw-r--r-- | Build/source/libs/zlib/zlib-1.2.4/gzclose.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/libs/zlib/zlib-1.2.4/gzclose.c b/Build/source/libs/zlib/zlib-1.2.4/gzclose.c new file mode 100644 index 00000000000..caeb99a3177 --- /dev/null +++ b/Build/source/libs/zlib/zlib-1.2.4/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 +} |