about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-11-13 15:07:58 -0500
committerJune McEnroe <june@causal.agency>2018-11-13 15:07:58 -0500
commit510d1f042a94b5435d1e514a452a9fa193eb2d9e (patch)
treecd1c90606beb99ca579b01fefd83e4864cb6d0f7
parentAdd gzfwrite.3 (diff)
downloadzlib-man-pages-510d1f042a94b5435d1e514a452a9fa193eb2d9e.tar.gz
zlib-man-pages-510d1f042a94b5435d1e514a452a9fa193eb2d9e.zip
Add gzprintf.3
Diffstat (limited to '')
-rw-r--r--Makefile1
-rw-r--r--gzprintf.356
2 files changed, 57 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index dd0e2a9..92f2e6d 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ MAN += gzbuffer.3
 MAN += gzfread.3
 MAN += gzfwrite.3
 MAN += gzopen.3
+MAN += gzprintf.3
 MAN += gzread.3
 MAN += gzsetparams.3
 MAN += gzwrite.3
diff --git a/gzprintf.3 b/gzprintf.3
new file mode 100644
index 0000000..3435a53
--- /dev/null
+++ b/gzprintf.3
@@ -0,0 +1,56 @@
+.Dd November 13, 2018
+.Dt GZPRINTF 3
+.Os
+.
+.Sh NAME
+.Nm gzprintf
+.Nd format output to compressed file
+.
+.Sh LIBRARY
+.Lb libz
+.
+.Sh SYNOPSIS
+.In zlib.h
+.Ft int
+.Fn gzprintf "gzFile file" "const char *format" "..."
+.
+.Sh DESCRIPTION
+Converts, formats, and writes the arguments
+to the compressed file
+under control of the format string,
+as in
+.Xr fprintf 3 .
+.
+.Sh RETURN VALUES
+.Fn gzprintf
+returns the number of
+uncompressed bytes actually written,
+or a negative zlib error code
+in case of error.
+The number of uncompressed bytes written
+is limited to 8191,
+or one less than the buffer size given to
+.Xr gzbuffer 3 .
+The caller should assure that
+this limit is not exceeded.
+If it is exceeded,
+then
+.Fn gzprintf
+will return an error (0)
+with nothing written.
+In this case,
+there may also be a buffer overflow
+with unpredictable consequences,
+which is possibly only if zlib
+was compiled with the insecure functions
+.Xr sprintf 3
+or
+.Xr vsprintf 3
+because the secure
+.Xr snprintf 3
+or
+.Xr vsnprintf 3
+functions
+were not available.
+This can be determined using
+.Xr zlibCompileFlags 3 .
tr class='logheader'>2020-03-03Remove setoptJune McEnroe 2020-03-03Use getopts in shell scriptsJune McEnroe WTF why did no one tell me about this? 2020-02-27Style %T outside of Rs in italicJune McEnroe 2020-02-26Add Fierce Femmes and Notorious LiarsJune McEnroe 2020-02-23Add This Is How You Lose the Time WarJune McEnroe 2020-02-22Add See Ya LaterJune McEnroe 2020-02-20Remove wiki scriptJune McEnroe Wikipedia seems to have removed the one-sentence extracts from the opensearch results. Too bad. It's not a wiki script, what we need is a command that fetches single-sentence summaries of articles on Wikipedia. 2020-02-19Add The Obelisk GateJune McEnroe 2020-02-17Add Four Tet — HandsJune McEnroe One from the cafe that caught my attention. 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe Apparently sometimes it didn't like receiving its own internal storage to parse again. Understandable. 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe Wow. One of the best I've read. 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe Broke out LDLIBS for each bin, and made everything more uniform. 2020-01-28Change scout sensitivity to 1.4June McEnroe idk it seems to work. 2020-01-28Import shows.txtJune McEnroe