Rizin
unix-like reverse engineering framework and cli tools
gzclose.c File Reference
#include "gzguts.h"

Go to the source code of this file.

Functions

int ZEXPORT gzclose (gzFile file)
 

Function Documentation

◆ gzclose()

int ZEXPORT gzclose ( gzFile  file)

Definition at line 11 of file gzclose.c.

13 {
14 #ifndef NO_GZCOMPRESS
16 
17  if (file == NULL)
18  return Z_STREAM_ERROR;
19  state = (gz_statep)file;
20 
21  return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
22 #else
23  return gzclose_r(file);
24 #endif
25 }
#define NULL
Definition: cris-opc.c:27
gz_state FAR * gz_statep
Definition: gzguts.h:203
#define GZ_READ
Definition: gzguts.h:160
int ZEXPORT gzclose_r(gzFile file)
Definition: gzread.c:625
int ZEXPORT gzclose_w(gzFile file)
Definition: gzwrite.c:639
Definition: gzappend.c:170
Definition: dis.h:43
#define Z_STREAM_ERROR
Definition: zlib.h:181

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

Referenced by gzfilebuf::close(), izstream::close(), ozstream::close(), and tar().