Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gzclose.cc File Reference
#include "gzguts.h"

Go to the source code of this file.

Functions

int ZEXPORT gzclose (gzFile file)
 

Function Documentation

int ZEXPORT gzclose ( gzFile  file)

Definition at line 11 of file gzclose.cc.

References GZ_READ, gzclose_r(), gzclose_w(), and Z_STREAM_ERROR.

12 {
13 #ifndef NO_GZCOMPRESS
14  gz_statep state;
15 
16  if (file == NULL)
17  return Z_STREAM_ERROR;
18  state = (gz_statep)file;
19 
20  return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
21 #else
22  return gzclose_r(file);
23 #endif
24 }
#define GZ_READ
Definition: gzguts.h:135
#define Z_STREAM_ERROR
Definition: zlib.h:177
int ZEXPORT gzclose_w(gzFile file)
Definition: gzwrite.cc:507
gz_state FAR * gz_statep
Definition: gzguts.h:177
int ZEXPORT gzclose_r(gzFile file)
Definition: gzread.cc:541