abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
gzclose.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "misc/util/abc_global.h"
#include "gzguts.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int
ZEXPORT 
gzclose (gzFile file)
 

Function Documentation

ABC_NAMESPACE_IMPL_START int ZEXPORT gzclose ( gzFile  file)

Definition at line 18 of file gzclose.c.

19 {
20 #ifndef NO_GZCOMPRESS
21  gz_statep state;
22 
23  if (file == NULL)
24  return Z_STREAM_ERROR;
25  state = (gz_statep)file;
26 
27  return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
28 #else
29  return gzclose_r(file);
30 #endif
31 }
#define GZ_READ
Definition: gzguts.h:89
#define Z_STREAM_ERROR
Definition: zlib.h:185
int ZEXPORT gzclose_r(gzFile file)
Definition: gzread.c:612
int ZEXPORT gzclose_w(gzFile file)
Definition: gzwrite.c:486
gz_state FAR * gz_statep
Definition: gzguts.h:129