Welcome to little lamb

Code » limb » commit 4f148bf

doc: Bunch of minor fixes

author Olivier Brunel
2023-07-23 17:25:34 UTC
committer Olivier Brunel
2023-07-24 10:16:43 UTC
parent 17f15c3ee21628d27761997bb924468298ab849c

doc: Bunch of minor fixes

src/doc/buffer.h/buffer_putmsg.3.md +1 -1
src/doc/cdbmake.h/cdbmaker_add.3.md +1 -1
src/doc/chacha20.h/chacha20.h.0.md +1 -1
src/doc/djbunix.h/djbunix.h.0.md +0 -7
src/doc/genalloc.h/genalloc_ready_tuned.3.md +1 -1
src/doc/genalloc.h/genalloc_remove.3.md +1 -1
src/doc/genalloc.h/genalloc_s.3.md +1 -0
src/doc/hmap.h/hmap_free.3.md +1 -0
src/doc/hmap.h/hmap_get.3.md +1 -0
src/doc/hmap.h/hmap_next.3.md +1 -0
src/doc/hmap.h/hmap_set.3.md +1 -0
src/doc/include/obuffers.md +5 -0
src/doc/loadopt.h/loadopt.3.md +1 -1
src/doc/output.h/die.3.md +1 -4
src/doc/output.h/diecmdhelp.3.md +1 -0
src/doc/output.h/diecmdusage.3.md +1 -0
src/doc/output.h/diehelp.3.md +1 -0
src/doc/output.h/dieusage.3.md +1 -0
src/doc/output.h/dieversion.3.md +1 -0
src/doc/output.h/errhelp.3.md +1 -0
src/doc/output.h/out.3.md +1 -4
src/doc/output.h/output.h.0.md +2 -0
src/doc/output.h/{ret.3.md => retw.3.md} +0 -0
src/doc/output.h/retwsys.3.md +1 -0
src/doc/output.h/retwu.3.md +1 -0
src/doc/output.h/retwusys.3.md +1 -0
src/doc/output.h/warn.3.md +2 -5
src/doc/parseopt.h/parseopt.3.md +1 -1
src/doc/poly1305.h/poly1305_init.3.md +2 -2
src/doc/shldata.5.md +1 -1
src/doc/shldata.h/shldata_initr.3.md +1 -1
src/doc/shldata.h/shldata_initw.3.md +2 -1
src/doc/stralloc.h/stralloc_remove.3.md +1 -1
src/doc/term.h/ask_password.3.md +4 -4

diff --git a/src/doc/buffer.h/buffer_putmsg.3.md b/src/doc/buffer.h/buffer_putmsg.3.md
index d9edb41..3116382 100644
--- a/src/doc/buffer.h/buffer_putmsg.3.md
+++ b/src/doc/buffer.h/buffer_putmsg.3.md
@@ -85,7 +85,7 @@ and a trailing new line is added.
 ! :: for use in a coma-separated list, as it expands to :
 ! :: `PUTMSG_INT_NEXT, PUTMSG_ASINT(n)`
 !
-! :: *PUTMSG_ERR(`n`)*, *PMERR(`n`)*
+! : *PUTMSG_ERR(`n`)*, *PMERR(`n`)*
 ! :: Shorthand to easily add an error description. This is intended for use in a
 ! :: coma-separated list, as it expends to :
 ! :: `PUTMSG_ERR_NEXT, PUTMSG_ASUINT(n)`
diff --git a/src/doc/cdbmake.h/cdbmaker_add.3.md b/src/doc/cdbmake.h/cdbmaker_add.3.md
index f5cdbdc..f70885a 100644
--- a/src/doc/cdbmake.h/cdbmaker_add.3.md
+++ b/src/doc/cdbmake.h/cdbmaker_add.3.md
@@ -1,5 +1,5 @@
 % limb manual
-% cdbmaker_start(3)
+% cdbmaker_add(3)
 
 # NAME
 
diff --git a/src/doc/chacha20.h/chacha20.h.0.md b/src/doc/chacha20.h/chacha20.h.0.md
index ebf9f63..3931a48 100644
--- a/src/doc/chacha20.h/chacha20.h.0.md
+++ b/src/doc/chacha20.h/chacha20.h.0.md
@@ -28,7 +28,7 @@ The following functions are defined :
 : [chacha20_init](3)
 :: To initialize a chacha20 context.
 
-: [chacha20_encrypt](3)
+: [chacha20_crypt](3)
 :: To encrypt/decrypt a message.
 
 : [chacha20_clear](3)
diff --git a/src/doc/djbunix.h/djbunix.h.0.md b/src/doc/djbunix.h/djbunix.h.0.md
index 8526836..d2e618e 100644
--- a/src/doc/djbunix.h/djbunix.h.0.md
+++ b/src/doc/djbunix.h/djbunix.h.0.md
@@ -306,13 +306,6 @@ The following functions/macros are defined :
 :: inside the given *stralloc*.
 
 
-: [sa_basename](3)
-:: Append the basename of a given path to a *stralloc*.
-
-: [sa_dirname](3)
-:: Append the dirname of a given path to a *stralloc*.
-
-
 : [sa_readlink](3)
 :: Places the content of a symbolic link into a *stralloc*.
 
diff --git a/src/doc/genalloc.h/genalloc_ready_tuned.3.md b/src/doc/genalloc.h/genalloc_ready_tuned.3.md
index d601405..755630c 100644
--- a/src/doc/genalloc.h/genalloc_ready_tuned.3.md
+++ b/src/doc/genalloc.h/genalloc_ready_tuned.3.md
@@ -68,7 +68,7 @@ set `errno` to indicate the error.
 
 The `genalloc_ready_tuned`(), `genalloc_ready`() and `genalloc_readyplus`()
 functions may fail for the errors described for [stralloc_ready_tuned](3),
-[stralloc_ready](3) and [stralloc_readuplus](3), respectively.
+[stralloc_ready](3) and [stralloc_readyplus](3), respectively.
 
 The `genalloc_shrink`() function may fail for the errors described for
 [stralloc_shrink](3).
diff --git a/src/doc/genalloc.h/genalloc_remove.3.md b/src/doc/genalloc.h/genalloc_remove.3.md
index c6b143a..de0a20c 100644
--- a/src/doc/genalloc.h/genalloc_remove.3.md
+++ b/src/doc/genalloc.h/genalloc_remove.3.md
@@ -33,4 +33,4 @@ The `genalloc_remove`() function may fail for the errors described for
 
 # SEE ALSO
 
-[genalloc_shrunk](3)
+[genalloc_shrink](3)
diff --git a/src/doc/genalloc.h/genalloc_s.3.md b/src/doc/genalloc.h/genalloc_s.3.md
index 116b79c..220c24f 100644
--- a/src/doc/genalloc.h/genalloc_s.3.md
+++ b/src/doc/genalloc.h/genalloc_s.3.md
@@ -21,6 +21,7 @@ The `genalloc_s`() macro returns a pointer to the data contained in genalloc
 `ga`, which must be elements of type `type`. This macro is intended as a way to
 access data stored inside a genalloc, allowing to read or write said data.
 A typical way to access a specific element might be :
+
     mytype *el = &genalloc_s(mytype, ga)[idx];
 
 The `genalloc_len`() macro returns the number of elements contained in genalloc
diff --git a/src/doc/hmap.h/hmap_free.3.md b/src/doc/hmap.h/hmap_free.3.md
new file mode 120000
index 0000000..672942f
--- /dev/null
+++ b/src/doc/hmap.h/hmap_free.3.md
@@ -0,0 +1 @@
+hmap_init.3.md
\ No newline at end of file
diff --git a/src/doc/hmap.h/hmap_get.3.md b/src/doc/hmap.h/hmap_get.3.md
new file mode 120000
index 0000000..672942f
--- /dev/null
+++ b/src/doc/hmap.h/hmap_get.3.md
@@ -0,0 +1 @@
+hmap_init.3.md
\ No newline at end of file
diff --git a/src/doc/hmap.h/hmap_next.3.md b/src/doc/hmap.h/hmap_next.3.md
new file mode 120000
index 0000000..672942f
--- /dev/null
+++ b/src/doc/hmap.h/hmap_next.3.md
@@ -0,0 +1 @@
+hmap_init.3.md
\ No newline at end of file
diff --git a/src/doc/hmap.h/hmap_set.3.md b/src/doc/hmap.h/hmap_set.3.md
new file mode 120000
index 0000000..672942f
--- /dev/null
+++ b/src/doc/hmap.h/hmap_set.3.md
@@ -0,0 +1 @@
+hmap_init.3.md
\ No newline at end of file
diff --git a/src/doc/include/obuffers.md b/src/doc/include/obuffers.md
new file mode 100644
index 0000000..1141dce
--- /dev/null
+++ b/src/doc/include/obuffers.md
@@ -0,0 +1,5 @@
+! INFO: output buffers
+! All of those are using output buffers *obuffer_1* or *obuffer_2* to write
+! to *stdout* or *stderr* respectively.
+! As such, data will also be written to any & all output buffers attached to the
+! corresponding output buffer. See [obuffer_attach](3) for more.
diff --git a/src/doc/loadopt.h/loadopt.3.md b/src/doc/loadopt.h/loadopt.3.md
index 767ee5b..9d12d24 100644
--- a/src/doc/loadopt.h/loadopt.3.md
+++ b/src/doc/loadopt.h/loadopt.3.md
@@ -146,7 +146,7 @@ To define them, you can use the following convenience macros :
 :: To define argument `arg` as optional
 
 : *ARGUMENT_REQ*(`name`, `flags`, `id`)
-: To define argument `arg` as required
+:: To define argument `arg` as required
 
 The actual parsing/handling of arguments is no different than of options,
 `loadopt`() will return the corresponding `id` (which must be valid as described
diff --git a/src/doc/output.h/die.3.md b/src/doc/output.h/die.3.md
index bf3564a..26de4db 100644
--- a/src/doc/output.h/die.3.md
+++ b/src/doc/output.h/die.3.md
@@ -43,10 +43,7 @@ One exception is `errhelp`() which is the same as `diehelp`() only based on
 [err_putmsg](3), so it will /not/ end program execution. It is mainly intended
 for internal use through [dienocommand](3).
 
-! INFO: output buffers
-! All of those are using output buffers, and will therefore write to the output
-! buffers for *stdout* or *stderr*, as well as all the extra buffers set up,
-! e.g. via [obuffers_addlog](3) and/or [obuffers_adddbg](3).
+<inc obuffers.md>
 
 All messages will be prefixed by the program's name (i.e. value of `PROG`), a
 colon and a space.
diff --git a/src/doc/output.h/diecmdhelp.3.md b/src/doc/output.h/diecmdhelp.3.md
new file mode 120000
index 0000000..03976a4
--- /dev/null
+++ b/src/doc/output.h/diecmdhelp.3.md
@@ -0,0 +1 @@
+die.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/diecmdusage.3.md b/src/doc/output.h/diecmdusage.3.md
new file mode 120000
index 0000000..03976a4
--- /dev/null
+++ b/src/doc/output.h/diecmdusage.3.md
@@ -0,0 +1 @@
+die.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/diehelp.3.md b/src/doc/output.h/diehelp.3.md
new file mode 120000
index 0000000..03976a4
--- /dev/null
+++ b/src/doc/output.h/diehelp.3.md
@@ -0,0 +1 @@
+die.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/dieusage.3.md b/src/doc/output.h/dieusage.3.md
new file mode 120000
index 0000000..03976a4
--- /dev/null
+++ b/src/doc/output.h/dieusage.3.md
@@ -0,0 +1 @@
+die.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/dieversion.3.md b/src/doc/output.h/dieversion.3.md
new file mode 120000
index 0000000..03976a4
--- /dev/null
+++ b/src/doc/output.h/dieversion.3.md
@@ -0,0 +1 @@
+die.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/errhelp.3.md b/src/doc/output.h/errhelp.3.md
new file mode 120000
index 0000000..03976a4
--- /dev/null
+++ b/src/doc/output.h/errhelp.3.md
@@ -0,0 +1 @@
+die.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/out.3.md b/src/doc/output.h/out.3.md
index 15da8c6..057eab7 100644
--- a/src/doc/output.h/out.3.md
+++ b/src/doc/output.h/out.3.md
@@ -41,10 +41,7 @@ void sysverbdie(<em>exit</em>, ...)
 All of those are implemented as macros and will write to either standard output
 or standard error, then maybe terminate the calling process or return.
 
-! INFO: output buffers
-! All of those are using output buffers, and will therefore write to the output
-! buffers for *stdout* or *stderr*, as well as all the extra buffers set up,
-! e.g. via [obuffers_addlog](3) and/or [obuffers_adddbg](3).
+<inc obuffers.md>
 
 The macro `out`() writes given strings to *stdout* buffers with level
 *OLVL_NORMAL* or more, adding a newline and flushing out the buffer.
diff --git a/src/doc/output.h/output.h.0.md b/src/doc/output.h/output.h.0.md
index f30eaf5..286eed2 100644
--- a/src/doc/output.h/output.h.0.md
+++ b/src/doc/output.h/output.h.0.md
@@ -10,6 +10,8 @@ output.h - writing to stdout/stderr
 
     #include <limb/output.h>
 
+    const char *PROG
+
 # DESCRIPTION
 
 This header defines functions used to write messages/warnings to stdout or
diff --git a/src/doc/output.h/ret.3.md b/src/doc/output.h/retw.3.md
similarity index 100%
rename from src/doc/output.h/ret.3.md
rename to src/doc/output.h/retw.3.md
diff --git a/src/doc/output.h/retwsys.3.md b/src/doc/output.h/retwsys.3.md
new file mode 120000
index 0000000..299b264
--- /dev/null
+++ b/src/doc/output.h/retwsys.3.md
@@ -0,0 +1 @@
+retw.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/retwu.3.md b/src/doc/output.h/retwu.3.md
new file mode 120000
index 0000000..299b264
--- /dev/null
+++ b/src/doc/output.h/retwu.3.md
@@ -0,0 +1 @@
+retw.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/retwusys.3.md b/src/doc/output.h/retwusys.3.md
new file mode 120000
index 0000000..299b264
--- /dev/null
+++ b/src/doc/output.h/retwusys.3.md
@@ -0,0 +1 @@
+retw.3.md
\ No newline at end of file
diff --git a/src/doc/output.h/warn.3.md b/src/doc/output.h/warn.3.md
index 0e87b21..b420820 100644
--- a/src/doc/output.h/warn.3.md
+++ b/src/doc/output.h/warn.3.md
@@ -25,10 +25,7 @@ All of those are implemented as macros and will write the specified strings as
 warning to *stderr* output buffers (with level *OLVL_NORMAL* or more), with a
 new line added at the end.
 
-! INFO: output buffers
-! All of those are using output buffers, and will therefore write to the output
-! buffers for *stderr*, as well as all the extra buffers set up, e.g. via
-! [obuffers_addlog](3) and/or [obuffers_adddbg](3).
+<inc obuffers.md>
 
 All warnings will be prefixed by the program's name (i.e. value of `PROG`), the
 word "warning " in between colon and a space.
@@ -46,4 +43,4 @@ will be followed by a colon, a space and the error description provided by
 
 # SEE ALSO
 
-[out](3), [err_putmsg](3), [buffer_putmsg](3)
+[out](3), [buffer_putmsg](3)
diff --git a/src/doc/parseopt.h/parseopt.3.md b/src/doc/parseopt.h/parseopt.3.md
index dda3ffd..2c31307 100644
--- a/src/doc/parseopt.h/parseopt.3.md
+++ b/src/doc/parseopt.h/parseopt.3.md
@@ -166,4 +166,4 @@ The `parseopt`() function may fail if :
 
 # SEE ALSO
 
-[loadopt](3), [autoopt](3)
+[loadopt](3), [autoopt.h](0)
diff --git a/src/doc/poly1305.h/poly1305_init.3.md b/src/doc/poly1305.h/poly1305_init.3.md
index 0f5108a..f3ed0b0 100644
--- a/src/doc/poly1305.h/poly1305_init.3.md
+++ b/src/doc/poly1305.h/poly1305_init.3.md
@@ -3,7 +3,7 @@
 
 # NAME
 
-poly1305\_init, poly1305\_update, poly1305\_final - compute Poly1305-based MAC
+poly1305_init, poly1305_update, poly1305_final - compute Poly1305-based MAC
 of a message
 
 # SYNOPSIS
@@ -24,7 +24,7 @@ compute a Poly1305-based message authentication code.
 This implementation is conform to [RFC 8439][rfc8439], as such the key pointed
 to by `key` must be 256bit/32 bytes long.
 
-[rfc8439] (https://datatracker.ietf.org/doc/html/rfc8439)
+[rfc8439]: https://datatracker.ietf.org/doc/html/rfc8439
 
 
 The `poly1305_upate`() function feeds the specified chunk of data pointed by
diff --git a/src/doc/shldata.5.md b/src/doc/shldata.5.md
index c7fb35f..55ed53a 100644
--- a/src/doc/shldata.5.md
+++ b/src/doc/shldata.5.md
@@ -20,7 +20,7 @@ the derivation parameters to the authentication process.
 The actual encryption/decryption is performed using the ChaCha20-Poly1305
 algorithm, as described in [RFC 8439][rfc8439].
 
-[rfc8439] (https://datatracker.ietf.org/doc/html/rfc8439)
+[rfc8439]: https://datatracker.ietf.org/doc/html/rfc8439
 
 The derivation parameters as well as the encrypted data and the message
 authentication code are encoded in [patrim](5) format :
diff --git a/src/doc/shldata.h/shldata_initr.3.md b/src/doc/shldata.h/shldata_initr.3.md
index 98a03cb..945e80e 100644
--- a/src/doc/shldata.h/shldata_initr.3.md
+++ b/src/doc/shldata.h/shldata_initr.3.md
@@ -35,7 +35,7 @@ The `shldata_decrypt`() function can then be used to decrypt data pointed by
 `sce` of length `slen` into the memory pointed by `dst` (which must be able to
 store at least `slen` bytes), using the specified `ctx`.
 
-As with [ccpl_decrupt](3) it is possible to use the same memory area for both
+As with [ccpl_decrypt](3) it is possible to use the same memory area for both
 `sce` and `dst`, and have it processed in-place.
 
 It is possible to call this function as many times as needed.
diff --git a/src/doc/shldata.h/shldata_initw.3.md b/src/doc/shldata.h/shldata_initw.3.md
index 8e9fbfb..5aaf0b1 100644
--- a/src/doc/shldata.h/shldata_initw.3.md
+++ b/src/doc/shldata.h/shldata_initw.3.md
@@ -40,11 +40,12 @@ The `shldata_encrypt`() function can then be used to encrypt data pointed by
 `data` of length `dlen` into the memory pointed by `dst` (which must be able to
 store at least `dlen` bytes), using the specified `ctx`.
 
-As with [ccpl_encrupt](3) it is possible to use the same memory area for both
+As with [ccpl_encrypt](3) it is possible to use the same memory area for both
 `data` and `dst`, and have it processed in-place.
 
 It is possible to call this function as many times as needed.
 
+! INFO: Pay attention when to write data
 ! If the length of data to be encrypted was known and given to `shldata_initw`()
 ! it is correct to write encrypted data right after the parameters written by
 ! said function, and no call to `shldata_predata`() is required.
diff --git a/src/doc/stralloc.h/stralloc_remove.3.md b/src/doc/stralloc.h/stralloc_remove.3.md
index f7064e8..0050279 100644
--- a/src/doc/stralloc.h/stralloc_remove.3.md
+++ b/src/doc/stralloc.h/stralloc_remove.3.md
@@ -35,4 +35,4 @@ The `stralloc_remove`() function may fail if :
 
 # SEE ALSO
 
-[stralloc_shrunk](3)
+[stralloc_shrink](3)
diff --git a/src/doc/term.h/ask_password.3.md b/src/doc/term.h/ask_password.3.md
index e7718c4..bc274ee 100644
--- a/src/doc/term.h/ask_password.3.md
+++ b/src/doc/term.h/ask_password.3.md
@@ -26,9 +26,9 @@ on the password input, and finally drop any data that might remain in
 
 If `prompt` is not NULL, it will be written to *stderr* before attempting to
 read from *stdin*, unless it begins with `>` in which case it is written (past
-this leading prefix) into *stdout* instead.
+this leading character) into *stdout* instead.
 
-If `prompt` begins with a backslash (`\\`) then it is skipped, to notably allow
+If `prompt` begins with a backslash (`\`) then it is skipped, to notably allow
 to use a prompt beginning with a `>` whilst remaining in *stderr*.
 
 All data read will be placed into `dst` (up to `dlen` bytes), reading stops as
@@ -42,8 +42,8 @@ Once done, character echoing is restored for *stdin*, and a newline printed on
 ! INFO:
 ! The `prompt` value will be printed using the [err](3) family of functions,
 ! with an output level of *OLVL_NORMAL*, and as such written not only to
-! `obuffer_2` (or `obuffer_1`) but duplicated on any extra buffers as well.
-! Refer to [outpout.h](0) for more.
+! `obuffer_2` (or `obuffer_1`) but duplicated on any an all attached buffers as
+! well. Refer to [output.h](0) for more.
 
 # RETURN VALUE