libgrapheme

Freestanding C library for unicode string handling
git clone https://git.sinitax.com/suckless/libgrapheme
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 995e37182dc53da55dc4cf34868513610215c79e
parent a5b1b0c0c7bc1576b5893175b27585fa963f4433
Author: Laslo Hunhold <dev@frign.de>
Date:   Sun,  2 Oct 2022 22:22:54 +0200

Fix a few small errors in the manpages

Thanks to NRK for spotting most of these problems! In the other cases,
mandoc with its Tlint-flag proved to be very useful.

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Mman/template/is_case.sh | 4++--
Mman/template/next_break.sh | 8++++----
Mman/template/to_case.sh | 4++--
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/man/template/is_case.sh b/man/template/is_case.sh @@ -22,7 +22,7 @@ cat << EOF .Sh SYNOPSIS .In grapheme.h .Ft size_t -.Fn grapheme_is_${CASE}${SUFFIX} "const ${DATATYPE} *str" "size_t len" "size_t caselen" +.Fn grapheme_is_${CASE}${SUFFIX} "const ${DATATYPE} *str" "size_t len" "size_t *caselen" .Sh DESCRIPTION The .Fn grapheme_is_${CASE}${SUFFIX} @@ -54,7 +54,7 @@ function returns .Dv true if the ${ARRAYTYPE} .Va str -is ${CASE}, otherwise +is ${CASE}, otherwise .Dv false . .Sh SEE ALSO .Xr grapheme_is_${CASE}${ANTISUFFIX} 3 , diff --git a/man/template/next_break.sh b/man/template/next_break.sh @@ -38,12 +38,12 @@ is set to .Dv SIZE_MAX (stdint.h is already included by grapheme.h) the string .Va str -is interpreted to be NUL-terminated and processing stops when a -NUL-byte is encountered. +is interpreted to be NUL-terminated and processing stops when +a $(if [ "$ENCODING" = "utf8" ]; then printf "NUL-byte"; else printf "codepoint with the value 0"; fi) is encountered. .Pp For $(if [ "$ENCODING" != "utf8" ]; then printf "UTF-8-encoded"; else printf "non-UTF-8"; fi) input data$(if [ "$TYPE" = "character" ] && [ "$ENCODING" = "utf8" ]; then printf "\n.Xr grapheme_is_character_break 3 and"; fi) -.Xr grapheme_next_${TYPE}_break${ANTISUFFIX} +.Xr grapheme_next_${TYPE}_break${ANTISUFFIX} 3 can be used instead. .Sh RETURN VALUES The @@ -102,7 +102,7 @@ fi cat << EOF .Sh SEE ALSO$(if [ "$TYPE" = "character" ] && [ "$ENCODING" != "utf8" ]; then printf "\n.Xr grapheme_is_character_break 3 ,"; fi) -.Xr grapheme_next_${TYPE}_break${ANTISUFFIX} +.Xr grapheme_next_${TYPE}_break${ANTISUFFIX} 3 , .Xr libgrapheme 7 .Sh STANDARDS .Fn grapheme_next_${TYPE}_break${SUFFIX} diff --git a/man/template/to_case.sh b/man/template/to_case.sh @@ -38,7 +38,7 @@ is set to .Dv NULL . .Pp If -.Va len +.Va srclen is set to .Dv SIZE_MAX (stdint.h is already included by grapheme.h) the ${ARRAYTYPE} @@ -56,7 +56,7 @@ function returns the number of ${UNIT}s in the array resulting from converting .Va src to ${CASE}, even if -.Va len +.Va destlen is not large enough or .Va dest is