summaryrefslogtreecommitdiff
path: root/doc/libstddjb/envalloc.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/libstddjb/envalloc.html')
-rw-r--r--doc/libstddjb/envalloc.html32
1 files changed, 31 insertions, 1 deletions
diff --git a/doc/libstddjb/envalloc.html b/doc/libstddjb/envalloc.html
index cda94ad..fcc2534 100644
--- a/doc/libstddjb/envalloc.html
+++ b/doc/libstddjb/envalloc.html
@@ -21,7 +21,37 @@
<h1> The <tt>skalibs/envalloc.h</tt> header </h1>
<p>
- TODO: write this documentation page. (Sorry!)
+ The following functions are declared in the <tt>skalibs/env.h</tt> header,
+and implemented in the <tt>libskarnet.a</tt> or <tt>libskarnet.so</tt> library.
+</p>
+
+<h2> General information </h2>
+
+<p>
+<tt>envalloc.h</tt> is a supplement of <a href="env.html"><tt>env.h</tt></a>
+header that lets one use <a href="stralloc.html">genallocs</a> of
+<tt>char const *</tt> instead of fixed-size <tt>char const *[]</tt>.
+</p>
+
+<h2> Functions </h2>
+
+<p>
+<code>int envalloc_uniq (genalloc *v, char delim)</code><br />
+Removes strings in the <em>v</em> that share the same prefix up to the first
+<em>delim</em> character. For instance, if delim is <tt>=</tt>, duplicate
+environment variables are removed. Returns the number of removed entries on
+success, -1 (and sets errno) on failure.
+</p>
+
+<p>
+<code>int envalloc_0 (genalloc *v)</code><br />
+Appends a null pointer to <em>v</em>. Returns 1 on sucess, 0 (and sets errno)
+on failure.
+</p>
+
+<p>
+<tt>envalloc_make</tt> and <tt>envalloc_merge</tt> work exactly like their
+<tt>env.h</tt> counterparts.
</p>
</body>