[hackers] [libgrapheme] Refactor utf8-codec-manpages a bit || Laslo Hunhold
commit b035c4af5a10ea6ff3d1d948855b40094b559b78
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Fri Aug 26 20:34:06 2022 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Fri Aug 26 20:34:06 2022 +0200
Refactor utf8-codec-manpages a bit
Signed-off-by: Laslo Hunhold <dev_AT_frign.de>
diff --git a/man/grapheme_decode_utf8.3 b/man/grapheme_decode_utf8.3
index 0ca91eb..6adcab5 100644
--- a/man/grapheme_decode_utf8.3
+++ b/man/grapheme_decode_utf8.3
_AT_@ -1,4 +1,4 @@
-.Dd 2021-12-22
+.Dd 2022-08-26
.Dt GRAPHEME_DECODE_UTF8 3
.Os suckless.org
.Sh NAME
_AT_@ -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 .
_AT_@ -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_AT_frign.de
diff --git a/man/grapheme_encode_utf8.3 b/man/grapheme_encode_utf8.3
index cf90c5b..1b1d898 100644
--- a/man/grapheme_encode_utf8.3
+++ b/man/grapheme_encode_utf8.3
_AT_@ -1,4 +1,4 @@
-.Dd 2021-12-22
+.Dd 2022-08-26
.Dt GRAPHEME_ENCODE_UTF8 3
.Os suckless.org
.Sh NAME
_AT_@ -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 */
Received on Fri Aug 26 2022 - 20:34:36 CEST
This archive was generated by hypermail 2.3.0
: Fri Aug 26 2022 - 20:36:36 CEST