]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.10/Modules/zlib/gzclose.c
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Modules / zlib / gzclose.c
CommitLineData
7eb75bcc
DM
1/* gzclose.c -- zlib gzclose() function\r
2 * Copyright (C) 2004, 2010 Mark Adler\r
3 * For conditions of distribution and use, see copyright notice in zlib.h\r
4 */\r
5\r
6#include "gzguts.h"\r
7\r
8/* gzclose() is in a separate file so that it is linked in only if it is used.\r
9 That way the other gzclose functions can be used instead to avoid linking in\r
10 unneeded compression or decompression routines. */\r
11int ZEXPORT gzclose(file)\r
12 gzFile file;\r
13{\r
14#ifndef NO_GZCOMPRESS\r
15 gz_statep state;\r
16\r
17 if (file == NULL)\r
18 return Z_STREAM_ERROR;\r
19 state = (gz_statep)file;\r
20\r
21 return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);\r
22#else\r
23 return gzclose_r(file);\r
24#endif\r
25}\r