commit b035c4af5a10ea6ff3d1d948855b40094b559b78
parent c8715cbecccbdb61b2f46f7ad18e015ba8703637
Author: Laslo Hunhold <dev@frign.de>
Date: Fri, 26 Aug 2022 20:34:06 +0200
Refactor utf8-codec-manpages a bit
Signed-off-by: Laslo Hunhold <dev@frign.de>
Diffstat:
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/man/grapheme_decode_utf8.3 b/man/grapheme_decode_utf8.3
@@ -1,4 +1,4 @@
-.Dd 2021-12-22
+.Dd 2022-08-26
.Dt GRAPHEME_DECODE_UTF8 3
.Os suckless.org
.Sh NAME
@@ -11,7 +11,7 @@
.Sh DESCRIPTION
The
.Fn grapheme_decode_utf8
-function decodes the next codepoint in the UTF-8-encoded string
+function decodes the first codepoint in the UTF-8-encoded string
.Va str
of length
.Va len .
@@ -95,7 +95,6 @@ print_cps_nul_terminated(const char *str)
.Ed
.Sh SEE ALSO
.Xr grapheme_encode_utf8 3 ,
-.Xr grapheme_is_character_break 3 ,
.Xr libgrapheme 7
.Sh AUTHORS
.An Laslo Hunhold Aq Mt dev@frign.de
diff --git a/man/grapheme_encode_utf8.3 b/man/grapheme_encode_utf8.3
@@ -1,4 +1,4 @@
-.Dd 2021-12-22
+.Dd 2022-08-26
.Dt GRAPHEME_ENCODE_UTF8 3
.Os suckless.org
.Sh NAME
@@ -22,16 +22,19 @@ and
.Va len
is large enough it writes the UTF-8-string to the memory pointed to by
.Va str .
+Otherwise no data is written.
.Sh RETURN VALUES
The
.Fn grapheme_encode_utf8
function returns the length (in bytes) of the UTF-8-string resulting
from encoding
-.Va cp .
-When the returned value is larger than
+.Va cp ,
+regardless if
.Va len
-it is indicated that the output string is too small and no data has been
-written.
+is not large enough or
+.Va str
+is
+.Dv NULL .
.Sh EXAMPLES
.Bd -literal
/* cc (-static) -o example example.c -lgrapheme */