summary refs log tree commit diff
path: root/gzclose.3
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-11-08 21:40:50 -0500
committerJune McEnroe <june@causal.agency>2020-12-27 22:10:42 -0500
commit470523cdad6c92d3b88a82f5e476cd4a4c61bcd2 (patch)
tree8217a4f88c46cc5f2792e17025d7044d2d0b2d28 /gzclose.3
downloadsrc-470523cdad6c92d3b88a82f5e476cd4a4c61bcd2.tar.gz
src-470523cdad6c92d3b88a82f5e476cd4a4c61bcd2.zip
Convert zlib.h comments to mdoc
Diffstat (limited to '')
-rw-r--r--gzclose.397
1 files changed, 97 insertions, 0 deletions
diff --git a/gzclose.3 b/gzclose.3
new file mode 100644
index 00000000..77eae11e
--- /dev/null
+++ b/gzclose.3
@@ -0,0 +1,97 @@
+.Dd January 15, 2017
+.Dt GZCLOSE 3
+.Os
+.
+.Sh NAME
+.Nm gzclose ,
+.Nm gzclose_r ,
+.Nm gzclose_w
+.Nd close compressed file
+.
+.Sh LIBRARY
+.Lb libz
+.
+.Sh SYNOPSIS
+.In zlib.h
+.Ft int
+.Fn gzclose "gzFile file"
+.Ft int
+.Fn gzclose_r "gzFile file"
+.Ft int
+.Fn gzclose_w "gzFile file"
+.
+.Sh DESCRIPTION
+Flushes all pending output if necessary,
+closes the compressed file
+and deallocates the (de)compression state.
+Note that once
+.Fa file
+is closed,
+you cannot call
+.Xr gzerror 3
+with
+.Fa file ,
+since its structures
+have been deallocated.
+.Fn gzclose
+must not be called more than once
+on the same file,
+just as
+.Xr free 3
+must not be called more than once
+on the same allocation.
+.
+.Pp
+.Fn gzclose_r
+and
+.Fn gzclose_w
+are the same as
+.Fn gzclose ,
+but
+.Fn gzclose_r
+is only for use when reading,
+and
+.Fn gzclose_w
+is only for use when writing or appending.
+The advantage to using these instead of
+.Fn gzclose
+is that they avoid linking in
+zlib compression or decompression code
+that is not used when only reading
+or only writing respectively.
+If
+.Fn gzclose
+is used,
+then both compression and decompression code
+will be included in the application
+when linking to a static zlib library.
+.
+.Sh RETURN VALUES
+.Fn gzclose
+will return
+.Dv Z_STREAM_ERROR
+if
+.Fa file
+is not valid,
+.Dv Z_ERRNO
+on a file operator error,
+.Dv Z_MEM_ERROR
+if out of memory,
+.Dv Z_BUF_ERROR
+if the last read ended in the middle of a gzip stream,
+or
+.Dv Z_OK
+on success.
+.
+.Sh SEE ALSO
+.Xr gzopen 3
+.
+.Sh HISTORY
+This manual page was converted from
+.In zlib.h
+to mdoc format by
+.An C. McEnroe Aq Mt june@causal.agency .
+.
+.Sh AUTHORS
+.An Jean-loup Gailly Aq Mt jloup@gzip.org
+.An Mark Adler Aq Mt madler@alumni.caltech.edu
'2017-07-31 19:21:50 -0400'>2017-07-31Track tile access countsJune McEnroe 2017-07-31Adjust move speed in clientJune McEnroe 2017-07-31Handle large movesJune McEnroe 2017-07-30Optimize builds for chrootJune McEnroe 2017-07-30Persist bright across color changesJune McEnroe 2017-07-30Add index.htmlJune McEnroe 2017-07-30Add snapshot.shJune McEnroe 2017-07-30Fix termcap patch for background colorsJune McEnroe 2017-07-30Update helpJune McEnroe 2017-07-30Fix help to track colorJune McEnroe 2017-07-30Support background colorsJune McEnroe 2017-07-30Track color only client-sideJune McEnroe 2017-07-30Add ostensible support for background colorsJune McEnroe 2017-07-30Add tile create and access timestampsJune McEnroe 2017-07-30Assert stable struct Tile field offsetsJune McEnroe 2017-07-30Add chroot.shJune McEnroe 2017-07-30Add ` commandJune McEnroe 2017-07-30Add sshd_configJune McEnroe 2017-07-30Add termcap patchJune McEnroe