From 1f2d5f95684e93f8523e369ef1fed7a75c444082 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 8 Aug 2023 09:39:15 +0000 Subject: Fix back slurpn Signed-off-by: Laurent Bercot --- doc/libstddjb/djbunix.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') 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 @@ -512,6 +512,14 @@ to the amount of heap memory it can get. The function returns 1 if it succeeds, or 0 (and sets errno) if it fails.

+

+ int slurpn (stralloc *sa, int fd, size_t max)
+Same as slurp, but only grows the stralloc to a maximum +of max bytes of total length. If there is still more to +read on fd after sa→len has reached max, +the function returns 0 with errno set to ENOBUFS. +

+

int openslurpclose (stralloc *sa, char const *file)
Slurps the contents of file file into *sa. -- cgit 1.4.1