abc-master
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
gzclose.c
Go to the documentation of this file.
1
/* gzclose.c -- zlib gzclose() function
2
* Copyright (C) 2004, 2010 Mark Adler
3
* For conditions of distribution and use, see copyright notice in zlib.h
4
*/
5
6
#include <stdio.h>
7
#include <stdlib.h>
8
#include <string.h>
9
#include "
misc/util/abc_global.h
"
10
11
#include "
gzguts.h
"
12
13
ABC_NAMESPACE_IMPL_START
14
15
/* gzclose() is in a separate file so that it is linked in only if it is used.
16
That way the other gzclose functions can be used instead to avoid linking in
17
unneeded compression or decompression routines. */
18
int
ZEXPORT
gzclose
(
gzFile
file)
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
}
32
33
ABC_NAMESPACE_IMPL_END
GZ_READ
#define GZ_READ
Definition:
gzguts.h:89
gzclose
ABC_NAMESPACE_IMPL_START int ZEXPORT gzclose(gzFile file)
Definition:
gzclose.c:18
Z_STREAM_ERROR
#define Z_STREAM_ERROR
Definition:
zlib.h:185
gzFile
voidp gzFile
Definition:
zlib.h:1173
gzclose_r
int ZEXPORT gzclose_r(gzFile file)
Definition:
gzread.c:612
ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_END
Definition:
abc_global.h:108
gzguts.h
gzclose_w
int ZEXPORT gzclose_w(gzFile file)
Definition:
gzwrite.c:486
ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_START
Definition:
abc_global.h:107
abc_global.h
gz_statep
gz_state FAR * gz_statep
Definition:
gzguts.h:129
ZEXPORT
#define ZEXPORT
Definition:
zconf.h:322
src
misc
zlib
gzclose.c
Generated on Thu Dec 18 2014 16:11:55 for abc-master by
1.8.6