annotate src/zlib-1.2.7/gzclose.c @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents e13257ea84a4
children
rev   line source
Chris@4 1 /* gzclose.c -- zlib gzclose() function
Chris@4 2 * Copyright (C) 2004, 2010 Mark Adler
Chris@4 3 * For conditions of distribution and use, see copyright notice in zlib.h
Chris@4 4 */
Chris@4 5
Chris@4 6 #include "gzguts.h"
Chris@4 7
Chris@4 8 /* gzclose() is in a separate file so that it is linked in only if it is used.
Chris@4 9 That way the other gzclose functions can be used instead to avoid linking in
Chris@4 10 unneeded compression or decompression routines. */
Chris@4 11 int ZEXPORT gzclose(file)
Chris@4 12 gzFile file;
Chris@4 13 {
Chris@4 14 #ifndef NO_GZCOMPRESS
Chris@4 15 gz_statep state;
Chris@4 16
Chris@4 17 if (file == NULL)
Chris@4 18 return Z_STREAM_ERROR;
Chris@4 19 state = (gz_statep)file;
Chris@4 20
Chris@4 21 return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
Chris@4 22 #else
Chris@4 23 return gzclose_r(file);
Chris@4 24 #endif
Chris@4 25 }