From bcb8e950789c173c387bea5c8a6906f9e26a8038 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Date: Fri, 17 May 2024 17:16:06 -0300 Subject: document env.h Singling out envdir_chomp might sound a bit snarky, but it's somewhat contradictory, so I believe it's better to document it separately. --- doc/libstddjb/envalloc.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'doc/libstddjb/envalloc.html') 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 @@

The skalibs/envalloc.h header

- TODO: write this documentation page. (Sorry!) + The following functions are declared in the skalibs/env.h header, +and implemented in the libskarnet.a or libskarnet.so library. +

+ +

General information

+ +

+envalloc.h is a supplement of env.h +header that lets one use genallocs of +char const * instead of fixed-size char const *[]. +

+ +

Functions

+ +

+int envalloc_uniq (genalloc *v, char delim)
+Removes strings in the v that share the same prefix up to the first +delim character. For instance, if delim is =, duplicate +environment variables are removed. Returns the number of removed entries on +success, -1 (and sets errno) on failure. +

+ +

+int envalloc_0 (genalloc *v)
+Appends a null pointer to v. Returns 1 on sucess, 0 (and sets errno) +on failure. +

+ +

+envalloc_make and envalloc_merge work exactly like their +env.h counterparts.

-- cgit v1.3.1