commit 031a47497bd4ef470bd48b8c9455ae4ce9d88121
Author: Laslo Hunhold <[email protected]>
AuthorDate: Sat Dec 18 01:25:49 2021 +0100
Commit: Laslo Hunhold <[email protected]>
CommitDate: Sat Dec 18 01:25:49 2021 +0100
Refactor manual pages for lg_grapheme_*()
Signed-off-by: Laslo Hunhold <[email protected]>
diff --git a/man/lg_grapheme_isbreak.3 b/man/lg_grapheme_isbreak.3
index 2570b2f..2d975dd 100644
--- a/man/lg_grapheme_isbreak.3
+++ b/man/lg_grapheme_isbreak.3
@@ -1,4 +1,4 @@
-.Dd 2021-12-15
+.Dd 2021-12-18
.Dt LG_GRAPHEME_ISBREAK 3
.Os suckless.org
.Sh NAME
@@ -7,16 +7,16 @@
.Sh SYNOPSIS
.In grapheme.h
.Ft size_t
-.Fn lg_grapheme_isbreak "uint_least32_t a, uint_least32_t b,
LG_SEGMENTATION_STATE *state"
+.Fn lg_grapheme_isbreak "uint_least32_t cp1" "uint_least32_t cp2"
"LG_SEGMENTATION_STATE *state"
.Sh DESCRIPTION
The
.Fn lg_grapheme_isbreak
function determines if there is a grapheme cluster break (see
.Xr libgrapheme 7 )
between the two code points
-.Va a
+.Va cp1
and
-.Va b .
+.Va cp2 .
By specification this decision depends on a
.Va state
that can at most be completely reset after detecting a break and must
@@ -29,13 +29,14 @@ is
.Fn lg_grapheme_isbreak
behaves as if it was called with a fully reset state.
.Sh RETURN VALUES
+The
.Fn lg_grapheme_isbreak
-returns
+function returns
.Va true
if there is a grapheme cluster break between the code points
-.Va a
+.Va cp1
and
-.Va b
+.Va cp2
and
.Va false
if there is not.
diff --git a/man/lg_grapheme_nextbreak.3 b/man/lg_grapheme_nextbreak.3
index ff78395..cad7faf 100644
--- a/man/lg_grapheme_nextbreak.3
+++ b/man/lg_grapheme_nextbreak.3
@@ -1,4 +1,4 @@
-.Dd 2021-12-15
+.Dd 2021-12-18
.Dt LG_GRAPHEME_NEXTBREAK 3
.Os suckless.org
.Sh NAME
@@ -9,8 +9,9 @@
.Ft size_t
.Fn lg_grapheme_nextbreak "const char *str"
.Sh DESCRIPTION
+The
.Fn lg_grapheme_nextbreak
-computes the offset (in bytes) to the next grapheme
+function computes the offset (in bytes) to the next grapheme
cluster break (see
.Xr libgrapheme 7 )
in the UTF-8-encoded NUL-terminated string
@@ -23,8 +24,9 @@ For non-UTF-8 input data
.Xr lg_grapheme_isbreak 3
can be used instead.
.Sh RETURN VALUES
+The
.Fn lg_grapheme_nextbreak
-returns the offset (in bytes) to the next grapheme cluster
+function returns the offset (in bytes) to the next grapheme cluster
break in
.Va str
or 0 if