summaryrefslogtreecommitdiff
path: root/doc/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-08-08 09:39:15 +0000
committerLaurent Bercot <ska@appnovation.com>2023-08-08 09:39:15 +0000
commit1f2d5f95684e93f8523e369ef1fed7a75c444082 (patch)
treef8cc1dd4b1378490386def2e0571561fab10b275 /doc/libstddjb
parent687b52b09b10a501d21f168b45a4e24fd8bdf65e (diff)
downloadskalibs-1f2d5f95684e93f8523e369ef1fed7a75c444082.tar.xz
Fix back slurpn
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc/libstddjb')
-rw-r--r--doc/libstddjb/djbunix.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html
index a48a57f..a892bde 100644
--- a/doc/libstddjb/djbunix.html
+++ b/doc/libstddjb/djbunix.html
@@ -513,6 +513,14 @@ The function returns 1 if it succeeds, or 0 (and sets errno) if it fails.
</p>
<p>
+<code> int slurpn (stralloc *sa, int fd, size_t max) </code> <br />
+Same as <tt>slurp</tt>, but only grows the stralloc to a maximum
+of <em>max</em> bytes of total length. If there is still more to
+read on <em>fd</em> after <em>sa&rarr;len</em> has reached <em>max</em>,
+the function returns 0 with errno set to ENOBUFS.
+</p>
+
+<p>
<code> int openslurpclose (stralloc *sa, char const *file) </code> <br />
Slurps the contents of file <em>file</em> into *<em>sa</em>.
Returns 1 if it succeeds, and 0 (and sets errno) if it fails.